diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20020927-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20020927-1.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020927-1.c b/gcc/testsuite/gcc.c-torture/compile/20020927-1.c new file mode 100644 index 000000000..b93d8a18d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20020927-1.c @@ -0,0 +1,26 @@ +/* PR optimization/7520 */ +/* ICE at -O3 on x86 due to register life problems caused by + the return-without-value in bar. */ + +int +foo () +{ + int i; + long long int j; + + while (1) + { + if (j & 1) + ++i; + j >>= 1; + if (j) + return i; + } +} + +int +bar () +{ + if (foo ()) + return; +} |