diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-09 21:05:13 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-09 21:05:13 +0000 |
commit | 96b9f485851ec6d596049ccad9e787bb9389a06c (patch) | |
tree | 018895ec0fe2b94bae950c5ebd23bf8d7fcf7012 /gcc | |
parent | 71bda45df1547ff8a1aeee9a72661bb8b12ac6ee (diff) | |
download | gcc-96b9f485851ec6d596049ccad9e787bb9389a06c.tar.gz |
* builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not
TYPE_MODE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <ghazi@caip.rutgers.edu> + + * builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not + TYPE_MODE. + 2004-04-09 Andrew Pinski <pinskia@physics.uc.edu> * 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; |