From ce58118c3d596e5732e17cbca57b6e7518b50d70 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Fri, 9 Apr 2004 21:05:13 +0000 Subject: [PATCH] builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not TYPE_MODE. * builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not TYPE_MODE. From-SVN: r80567 --- gcc/ChangeLog | 5 +++++ gcc/builtins.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bebfffa682f..f96a2b4b04b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-04-09 Kaveh R. Ghazi + + * builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not + TYPE_MODE. + 2004-04-09 Andrew Pinski * c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead diff --git a/gcc/builtins.c b/gcc/builtins.c index 655dd250395..8720666c7c0 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1389,7 +1389,6 @@ expand_builtin_constant_p (tree arglist, enum machine_mode target_mode) tree mathfn_built_in (tree type, enum built_in_function fn) { - const enum machine_mode type_mode = TYPE_MODE (type); enum built_in_function fcode, fcodef, fcodel; switch (fn) @@ -1472,11 +1471,11 @@ mathfn_built_in (tree type, enum built_in_function fn) return 0; } - if (type_mode == TYPE_MODE (double_type_node)) + if (TYPE_MAIN_VARIANT (type) == double_type_node) return implicit_built_in_decls[fcode]; - else if (type_mode == TYPE_MODE (float_type_node)) + else if (TYPE_MAIN_VARIANT (type) == float_type_node) return implicit_built_in_decls[fcodef]; - else if (type_mode == TYPE_MODE (long_double_type_node)) + else if (TYPE_MAIN_VARIANT (type) == long_double_type_node) return implicit_built_in_decls[fcodel]; else return 0; -- 2.30.2