re PR tree-optimization/59413 (wrong code at -Os on x86_64-linux-gnu in both 32-bit...
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Dec 2013 13:07:10 +0000 (14:07 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 20 Dec 2013 13:07:10 +0000 (14:07 +0100)
PR tree-optimization/59413
* gcc.c-torture/execute/pr59413.c: New test.

From-SVN: r206147

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

index 4d994b414727d5de114ab35ae20972aef6f155c6..7e90641adf719f1b0db9cab8d2711bf115a74ed6 100644 (file)
@@ -1,5 +1,8 @@
 2013-12-20  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/59413
+       * gcc.c-torture/execute/pr59413.c: New test.
+
        * c-c++-common/ubsan/load-bool-enum.c: New test.
 
 2013-12-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59413.c b/gcc/testsuite/gcc.c-torture/execute/pr59413.c
new file mode 100644 (file)
index 0000000..d7a2084
--- /dev/null
@@ -0,0 +1,21 @@
+/* PR tree-optimization/59413 */
+
+typedef unsigned int uint32_t;
+
+uint32_t a;
+int b;
+
+int
+main ()
+{
+  uint32_t c;
+  for (a = 7; a <= 1; a++)
+    {
+      char d = a;
+      c = d;
+      b = a == c;
+    }
+  if (a != 7)
+    __builtin_abort ();
+  return 0;
+}