Test miscompiled for v850 target with -O -mv850e due to cse bug.
authorJim Wilson <wilson@redhat.com>
Thu, 10 Oct 2002 19:36:31 +0000 (19:36 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 10 Oct 2002 19:36:31 +0000 (12:36 -0700)
* gcc.c-torture/execute/20021010-1.c: New test.

From-SVN: r58025

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20021010-1.c [new file with mode: 0644]

index a0b6de2471ea51017f2309fc749ffaab01446f95..78787bc48dec8e112afa3720d5f4632005cdb457 100644 (file)
@@ -1,3 +1,7 @@
+2002-10-10  Jim Wilson  <wilson@redhat.com>
+
+       * gcc.c-torture/execute/20021010-1.c: New test.
+
 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
 
        PR c/7353
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021010-1.c b/gcc/testsuite/gcc.c-torture/execute/20021010-1.c
new file mode 100644 (file)
index 0000000..d742ce4
--- /dev/null
@@ -0,0 +1,21 @@
+#include <limits.h>
+
+int
+sub ()
+{
+  int dummy = 0, a = 16;
+
+  if (a / INT_MAX / 16 == 0)
+    return 0;
+  else
+    return a / INT_MAX / 16;
+}
+
+int
+main ()
+{
+  if (sub () != 0)
+    abort ();
+
+  exit (0);
+}