OSDN Git Service

* gcc.c-torture/execute/20061031-1.c: New test.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2006 23:29:06 +0000 (23:29 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2006 23:29:06 +0000 (23:29 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118344 138bc75d-0d04-0410-961f-82ee72b054a4

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;
+}