diff options
author | Richard Guenther <rguenther@suse.de> | 2012-04-23 12:47:02 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-04-23 12:47:02 +0000 |
commit | c6542175665ad1474131efc6292234b1a5e705c2 (patch) | |
tree | 603ede60be182900d1365ef137b34a8706d22f20 /gcc | |
parent | 9771644a91afe5c53b0433eaedb1d9976f77d856 (diff) | |
download | gcc-c6542175665ad1474131efc6292234b1a5e705c2.zip gcc-c6542175665ad1474131efc6292234b1a5e705c2.tar.gz gcc-c6542175665ad1474131efc6292234b1a5e705c2.tar.bz2 |
re PR tree-optimization/53070 (ICE: in execute_cse_reciprocals, at tree-ssa-math-opts.c:513 with -O -ffast-math -ftree-loop-if-convert -fno-tree-loop-im)
2012-04-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53070
* tree-if-conv.c (combine_blocks): Free predicates in all blocks.
(main_tree_if_conversion): Verify we succeeded in that.
* gcc.dg/torture/pr53070.c: New testcase.
From-SVN: r186704
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr53070.c | 10 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 8 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1fca14..06a3158 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-04-23 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/53070 + * tree-if-conv.c (combine_blocks): Free predicates in all blocks. + (main_tree_if_conversion): Verify we succeeded in that. + 2012-04-23 Jan Hubicka <jh@suse.cz> * lto-symtab.c (lto_cgraph_replace_node): Do not call diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7843587..ac08062 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2012-04-23 Richard Guenther <rguenther@suse.de> + PR tree-optimization/53070 + * gcc.dg/torture/pr53070.c: New testcase. + +2012-04-23 Richard Guenther <rguenther@suse.de> + PR c/53060 * gcc.dg/pr53060.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/pr53070.c b/gcc/testsuite/gcc.dg/torture/pr53070.c new file mode 100644 index 0000000..534ac34 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr53070.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-ffast-math -ftree-loop-if-convert -fno-tree-loop-im" } */ +int +foo (int c) +{ + int t = 0, i = 0; + for (; i < 100; i++) + t += c ? c : 1; + return t; +} diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 31bb610..d8e23a4 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -1651,8 +1651,8 @@ combine_blocks (struct loop *loop) free_bb_predicate (bb); if (bb_with_exit_edge_p (loop, bb)) { + gcc_assert (exit_bb == NULL); exit_bb = bb; - break; } } gcc_assert (exit_bb != loop->latch); @@ -1779,6 +1779,7 @@ main_tree_if_conversion (void) struct loop *loop; bool changed = false; unsigned todo = 0; + basic_block bb; if (number_of_loops () <= 1) return 0; @@ -1794,6 +1795,11 @@ main_tree_if_conversion (void) free_dominance_info (CDI_POST_DOMINATORS); +#ifdef ENABLE_CHECKING + FOR_EACH_BB (bb) + gcc_assert (!bb->aux); +#endif + return todo; } |