re PR rtl-optimization/61801 (sched2 miscompiles syscall sequence with -g)
authorRichard Biener <rguenther@suse.de>
Mon, 28 Jul 2014 07:54:08 +0000 (07:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 28 Jul 2014 07:54:08 +0000 (07:54 +0000)
2014-07-28  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/61801
* gcc.target/i386/pr61801.c: New testcase.

From-SVN: r213111

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr61801.c [new file with mode: 0644]

index 48717fc3e8c26a37d7289bb9aef32a38f9188d68..581aedf236e0c98fd2952a87033937813cd50d5c 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-28  Richard Biener  <rguenther@suse.de>
+
+       PR rtl-optimization/61801
+       * gcc.target/i386/pr61801.c: New testcase.
+
 2014-07-27  Marek Polacek  <polacek@redhat.com>
 
        PR c/61861
diff --git a/gcc/testsuite/gcc.target/i386/pr61801.c b/gcc/testsuite/gcc.target/i386/pr61801.c
new file mode 100644 (file)
index 0000000..32cebde
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -fcompare-debug" } */
+
+int a, b, c;
+void fn1 ()
+{
+  int d;
+  if (fn2 () && !0)
+    {
+      b = (
+          {
+          int e;
+          fn3 ();
+          switch (0)
+          default:
+          asm volatile("" : "=a"(e) : "0"(a), ""(0));
+          e;
+          });
+      d = b;
+    }
+  c = d;
+}