From: No Author Date: Sun, 16 Jun 2002 21:54:12 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.1.1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a42d1c7424d29e8f632c209fed1facb8efeff5f;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_1-branch'. From-SVN: r54682 --- diff --git a/gcc/testsuite/gcc.dg/20020616-1.c b/gcc/testsuite/gcc.dg/20020616-1.c new file mode 100644 index 000000000000..4630664d9579 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20020616-1.c @@ -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; +}