diff options
author | Richard Biener <rguenther@suse.de> | 2015-05-13 10:59:49 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-05-13 10:59:49 +0000 |
commit | b56b040c8438eeabeb633cf0048571c3389af990 (patch) | |
tree | cf8a861aaf4a005a74183f99364421885cabbbe6 | |
parent | 3211f4c2bf624368c77c4a4e186ca812dbd1fa2c (diff) | |
download | gcc-b56b040c8438eeabeb633cf0048571c3389af990.zip gcc-b56b040c8438eeabeb633cf0048571c3389af990.tar.gz gcc-b56b040c8438eeabeb633cf0048571c3389af990.tar.bz2 |
re PR tree-optimization/66123 (Array of labels as values + ternary operator + pointer arithmetic = internal compiler error)
2015-05-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/66123
* tree-ssa-dom.c (propagate_rhs_into_lhs): Check if we found
a taken edge.
* gcc.dg/torture/pr66123.c: New testcase.
From-SVN: r223130
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr66123.c | 11 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 3 |
4 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa9c72e..d9a4fe4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-05-13 Richard Biener <rguenther@suse.de> + PR tree-optimization/66123 + * tree-ssa-dom.c (propagate_rhs_into_lhs): Check if we found + a taken edge. + +2015-05-13 Richard Biener <rguenther@suse.de> + PR middle-end/66110 * alias.c (alias_sets_conflict_p): Do not treat has_zero_child specially. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index be35550..8dcf8cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-05-13 Richard Biener <rguenther@suse.de> + PR tree-optimization/66123 + * gcc.dg/torture/pr66123.c: New testcase. + +2015-05-13 Richard Biener <rguenther@suse.de> + PR middle-end/66110 * gcc.dg/alias-2.c: Adjust. * gcc.dg/tree-ssa/ssa-dse-17.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/torture/pr66123.c b/gcc/testsuite/gcc.dg/torture/pr66123.c new file mode 100644 index 0000000..848f8fe --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr66123.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ + +int +test (int foo) +{ + static void *dummy[] = { &&a, &&b }; + goto *((char *) &&b - 2 * (foo < 0)); +a: +b: + return 0; +} diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 14f3e9e..42324ee 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -2918,6 +2918,9 @@ propagate_rhs_into_lhs (gimple stmt, tree lhs, tree rhs, bitmap interesting_name { basic_block bb = gimple_bb (use_stmt); edge te = find_taken_edge (bb, val); + if (!te) + continue; + edge_iterator ei; edge e; gimple_stmt_iterator gsi; |