diff options
author | Jan Hubicka <jh@suse.cz> | 2005-12-16 00:52:16 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2005-12-15 23:52:16 +0000 |
commit | 094bb856e66fc86a004c604331cbc4bd17472369 (patch) | |
tree | b40d07b7efdcd9d96f951a5796b113221ad6be1e | |
parent | cb20f7e8750c4d765bd3d88718e17a624409722a (diff) | |
download | gcc-094bb856e66fc86a004c604331cbc4bd17472369.zip gcc-094bb856e66fc86a004c604331cbc4bd17472369.tar.gz gcc-094bb856e66fc86a004c604331cbc4bd17472369.tar.bz2 |
re PR rtl-optimization/25224 (ICE in initialize_original_copy_tables)
PR rtl-optimization/25224
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Free copy
tables.
From-SVN: r108606
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr25224.c | 20 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 5 |
4 files changed, 34 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3f97a1..0690daa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-12-16 Jan Hubicka <jh@suse.cz> + + PR rtl-optimization/25224 + * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Free copy + tables. + 2005-12-15 Zdenek Dvorak <dvorakz@suse.cz> Steven Bosscher <stevenb@suse.de> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 39fa89c..ddc0b83 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-12-16 Jan Hubicka <jh@suse.cz> + + * gcc.c-torture/combine/pr25224.c: New. + 2005-12-15 Joseph S. Myers <joseph@codesourcery.com> PR other/25028 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25224.c b/gcc/testsuite/gcc.c-torture/compile/pr25224.c new file mode 100644 index 0000000..0ccf0cdf --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr25224.c @@ -0,0 +1,20 @@ +/* { dg-options "-funswitch-loops" } */ +static float rgam; +extern void *jmp(void *); + +void drotmg(float d1) { +void *labels[] = { &&L170, &&L180, 0 }; + + for(;;) { + goto *jmp(labels); + if (d1 <= rgam) + goto L170; + +L170: + if (d1 <= rgam) + goto L170; + } + +L180: + goto L170; +} diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index d0625c5..f896354 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -253,7 +253,10 @@ tree_unswitch_single_loop (struct loops *loops, struct loop *loop, int num) /* Unswitch the loop on this condition. */ nloop = tree_unswitch_loop (loops, loop, bbs[i], cond); if (!nloop) - return changed; + { + free_original_copy_tables (); + return changed; + } /* Update the SSA form after unswitching. */ update_ssa (TODO_update_ssa); |