New test.
authorJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Oct 2001 12:45:11 +0000 (13:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Oct 2001 12:45:11 +0000 (13:45 +0100)
From-SVN: r46637

gcc/testsuite/gcc.dg/20011029-2.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/20011029-2.c b/gcc/testsuite/gcc.dg/20011029-2.c
new file mode 100644 (file)
index 0000000..77a5b07
--- /dev/null
@@ -0,0 +1,23 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-O2" } */
+
+int foo (int s)
+{
+  for (;;)
+    {
+      int a[32];
+      int y, z;
+      __asm__ __volatile__ ("" : "=c" (y), "=D" (z)
+                           : "a" (0), "0" (32), "1" (a) : "memory");
+      if (({ register char r;
+            __asm__ __volatile__ ("" : "=q" (r)
+                                  : "r" (s % 32), "m" (a[s / 32])
+                                  : "cc"); r; }))
+        continue;
+      else if (({ register char r;
+                 __asm__ __volatile__ ("" : "=q" (r)
+                                       : "r" (0), "m" (a)
+                                       : "cc"); r; }))
+        continue;
+    }
+}