diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2006-08-30 10:14:29 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2006-08-30 08:14:29 +0000 |
commit | dc14f1915ccb1fb35de2c582f6cd98837cadc0b5 (patch) | |
tree | 60331baa5669c81c73c3772f0667c674953ff487 /gcc/testsuite/gcc.dg/loop-unswitch-1.c | |
parent | b0d3a6aeb8b18937740877996a862d7dd7e65557 (diff) | |
download | gcc-dc14f1915ccb1fb35de2c582f6cd98837cadc0b5.zip gcc-dc14f1915ccb1fb35de2c582f6cd98837cadc0b5.tar.gz gcc-dc14f1915ccb1fb35de2c582f6cd98837cadc0b5.tar.bz2 |
re PR rtl-optimization/27735 (ICE at -O3 caused by loop unswitching)
PR rtl-optimization/27735
* cfgloopmanip.c (fix_loop_placements, fix_bb_placements, unloop):
Add new argument to keep track of whether an irreducible region
was affected. All callers changed.
(fix_irreducible_loops): Removed.
(remove_path): Call mark_irreducible_loops if EDGE_IRREDUCIBLE_LOOP
flags were invalidated.
* gcc.dg/loop-unswitch-1.c: New test.
From-SVN: r116582
Diffstat (limited to 'gcc/testsuite/gcc.dg/loop-unswitch-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/loop-unswitch-1.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-1.c b/gcc/testsuite/gcc.dg/loop-unswitch-1.c new file mode 100644 index 0000000..930364c --- /dev/null +++ b/gcc/testsuite/gcc.dg/loop-unswitch-1.c @@ -0,0 +1,34 @@ +/* For PR rtl-optimization/27735 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -funswitch-loops" } */ + +void set_color(void); +void xml_colorize_line(unsigned int *p, int state) +{ + int c; + switch(state) + { + case 1: + goto parse_tag; + case 2: + goto parse_comment; + } + + for(;;) + { + c = *p; + if (c == '<' && state == 0) + { +parse_comment: ; + while (*p != '\n') + state = 3; +parse_tag: ; + while (*p != '\n') + state = 0; + set_color(); + } + else + p++; + } +} + |