builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not TYPE_MODE.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Fri, 9 Apr 2004 21:05:13 +0000 (21:05 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Fri, 9 Apr 2004 21:05:13 +0000 (21:05 +0000)
* builtins.c (mathfn_built_in): Check TYPE_MAIN_VARIANT, not
TYPE_MODE.

From-SVN: r80567

gcc/ChangeLog
gcc/builtins.c

index bebfffa682fc100fe8ad2135f75a6b315d6e8a5f..f96a2b4b04bb783e1532be77932a14cd21dcf186 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 655dd2503952fdf9ff93e051c9cdbf3f243b6fb4..8720666c7c05b30c5ce22f371b813f7b3c4bd6e7 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;