mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 04:14:06 +08:00
re PR rtl-optimization/16180 (gcc crashes when optimization is turned on)
PR c/16180 * jump.c (duplicate_loop_exit_test): If the location reached by the unconditional jump at the top of the loop is outside the loop, then do not treat it as the exit test. PR c/16180 * gcc.dg/loop-5.c: New test. From-SVN: r86459
This commit is contained in:
parent
2e6ae27f33
commit
a9b5a054c9
@ -1,3 +1,8 @@
|
||||
2004-08-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c/16180
|
||||
* gcc.dg/loop-5.c: New test.
|
||||
|
||||
2004-08-23 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
|
||||
|
||||
* gcc.c-torture/execute/20040823-1.c: New test.
|
||||
|
16
gcc/testsuite/gcc.dg/loop-5.c
Normal file
16
gcc/testsuite/gcc.dg/loop-5.c
Normal file
@ -0,0 +1,16 @@
|
||||
/* PR c/16180 */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
extern int b;
|
||||
int foo (int a)
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
b = 0;
|
||||
for(;;)
|
||||
goto L;
|
||||
}
|
||||
L:
|
||||
for(;;)
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user