]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Sun, 16 Jun 2002 21:54:12 +0000 (21:54 +0000)
committerNo Author <no-author@gcc.gnu.org>
Sun, 16 Jun 2002 21:54:12 +0000 (21:54 +0000)
'gcc-3_1-branch'.

From-SVN: r54682

gcc/testsuite/gcc.dg/20020616-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/20020616-1.c b/gcc/testsuite/gcc.dg/20020616-1.c
new file mode 100644 (file)
index 0000000..4630664
--- /dev/null
@@ -0,0 +1,29 @@
+/* PR opt/6722 */
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options "-O2" } */
+
+register int k asm("%ebx");
+
+void __attribute__((noinline))
+foo()
+{
+  k = 1;
+}
+
+void test()
+{
+  int i;
+  for (i = 0; i < 10; i += k)
+    {
+      k = 0;
+      foo();
+    }
+}
+
+int main()
+{
+  int old = k;
+  test();
+  k = old;
+  return 0;
+}