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
This commit is contained in:
Richard Biener 2015-05-13 10:59:49 +00:00 committed by Richard Biener
parent 3211f4c2bf
commit b56b040c84
4 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -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;
}

View File

@ -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;