20061031-1.c: New test.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 31 Oct 2006 23:29:06 +0000 (23:29 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 31 Oct 2006 23:29:06 +0000 (23:29 +0000)
        * gcc.c-torture/execute/20061031-1.c: New test.

From-SVN: r118344

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

diff --git a/gcc/testsuite/gcc.c-torture/execute/20061031-1.c b/gcc/testsuite/gcc.c-torture/execute/20061031-1.c
new file mode 100644 (file)
index 0000000..5b95c3d
--- /dev/null
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/29631 */
+/* Origin: Falk Hueffner <falk@debian.org> */
+
+const signed char nunmap[] = { 17, -1, 1 };
+
+__attribute__((noinline))
+void ff(int i) {
+    asm volatile("");
+}
+
+__attribute__((noinline))
+void f(short delta)
+{
+    short p0 = 2, s;
+    for (s = 0; s < 2; s++)
+    {
+        p0 += delta;
+        ff(s);
+        if (nunmap[p0] == 17)
+            asm volatile("# nop");
+    }
+}
+
+int main(void)
+{
+    f(-1);
+    return 0;
+}