]> gcc.gnu.org Git - gcc.git/commitdiff
btest-gcc.sh (TESTLOGS): Examine regressions in libstdc++, libffi, and libjava.
authorGeoffrey Keating <geoffk@apple.com>
Wed, 27 Oct 2004 02:48:26 +0000 (02:48 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Wed, 27 Oct 2004 02:48:26 +0000 (02:48 +0000)
* btest-gcc.sh (TESTLOGS): Examine regressions in libstdc++,
libffi, and libjava.

From-SVN: r89629

gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20041026-1.c [new file with mode: 0644]

index 38c6bfc5014810eb3f2dfa41c70e79a3980f4da9..7535b4c5e7cc92cf2410096cc14aef4149cf618b 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-26  Geoffrey Keating  <geoffk@apple.com>
+
+       * builtins.c (fold_builtin_unordered_cmp): Always bring both
+       operands to the same type.
+
 2004-10-26  James E Wilson  <wilson@specifixinc.com>
 
        PR target/18010
index 57d871aa606d788cb507ca350fb0bb84936c84f0..4c1d3a4f6fc5a5c69e04d331b5a23657862df697 100644 (file)
@@ -7602,13 +7602,12 @@ fold_builtin_unordered_cmp (tree exp,
   tree type = TREE_TYPE (TREE_TYPE (fndecl));
   enum tree_code code;
   tree arg0, arg1;
+  tree type0, type1;
+  enum tree_code code0, code1;
+  tree cmp_type = NULL_TREE;
 
   if (!validate_arglist (arglist, REAL_TYPE, REAL_TYPE, VOID_TYPE))
     {
-      enum tree_code code0, code1;
-      tree type0, type1;
-      tree cmp_type = 0;
-
       /* Check that we have exactly two arguments.  */
       if (arglist == 0 || TREE_CHAIN (arglist) == 0)
        {
@@ -7622,39 +7621,34 @@ fold_builtin_unordered_cmp (tree exp,
                 IDENTIFIER_POINTER (DECL_NAME (fndecl)));
          return error_mark_node;
        }
-
-      arg0 = TREE_VALUE (arglist);
-      arg1 = TREE_VALUE (TREE_CHAIN (arglist));
-
-      type0 = TREE_TYPE (arg0);
-      type1 = TREE_TYPE (arg1);
-
-      code0 = TREE_CODE (type0);
-      code1 = TREE_CODE (type1);
-
-      if (code0 == REAL_TYPE && code1 == REAL_TYPE)
-       /* Choose the wider of two real types.  */
-        cmp_type = TYPE_PRECISION (type0) >= TYPE_PRECISION (type1)
-                  ? type0 : type1;
-      else if (code0 == REAL_TYPE && code1 == INTEGER_TYPE)
-       cmp_type = type0;
-      else if (code0 == INTEGER_TYPE && code1 == REAL_TYPE)
-       cmp_type = type1;
-      else
-       {
-         error ("non-floating-point argument to function %qs",
-                IDENTIFIER_POINTER (DECL_NAME (fndecl)));
-         return error_mark_node;
-       }
-
-      arg0 = fold_convert (cmp_type, arg0);
-      arg1 = fold_convert (cmp_type, arg1);
     }
+
+  arg0 = TREE_VALUE (arglist);
+  arg1 = TREE_VALUE (TREE_CHAIN (arglist));
+  
+  type0 = TREE_TYPE (arg0);
+  type1 = TREE_TYPE (arg1);
+  
+  code0 = TREE_CODE (type0);
+  code1 = TREE_CODE (type1);
+  
+  if (code0 == REAL_TYPE && code1 == REAL_TYPE)
+    /* Choose the wider of two real types.  */
+    cmp_type = TYPE_PRECISION (type0) >= TYPE_PRECISION (type1)
+      ? type0 : type1;
+  else if (code0 == REAL_TYPE && code1 == INTEGER_TYPE)
+    cmp_type = type0;
+  else if (code0 == INTEGER_TYPE && code1 == REAL_TYPE)
+    cmp_type = type1;
   else
     {
-      arg0 = TREE_VALUE (arglist);
-      arg1 = TREE_VALUE (TREE_CHAIN (arglist));
+      error ("non-floating-point argument to function %qs",
+                IDENTIFIER_POINTER (DECL_NAME (fndecl)));
+      return error_mark_node;
     }
+  
+  arg0 = fold_convert (cmp_type, arg0);
+  arg1 = fold_convert (cmp_type, arg1);
 
   if (unordered_code == UNORDERED_EXPR)
     {
index e248aef39b7979727c70f2cf3fc96333e98ad424..22d8fa79b53e8a0fdd5d18389671d3add7650333 100644 (file)
@@ -1,3 +1,7 @@
+2004-10-26  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.c-torture/compile/20041026-1.c: New.
+
 2004-10-26  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/18093
diff --git a/gcc/testsuite/gcc.c-torture/compile/20041026-1.c b/gcc/testsuite/gcc.c-torture/compile/20041026-1.c
new file mode 100644 (file)
index 0000000..3d6ae8f
--- /dev/null
@@ -0,0 +1,5 @@
+int
+foo (double x, long double y)
+{
+  return __builtin_isgreater (x, y);
+}
This page took 0.114355 seconds and 5 git commands to generate.