OSDN Git Service

* builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2004 21:05:13 +0000 (21:05 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2004 21:05:13 +0000 (21:05 +0000)
TYPE_MODE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80567 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c

index bebfffa..f96a2b4 100644 (file)
@@ -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
index 655dd25..8720666 100644 (file)
@@ -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;