Commit dd46054a by Richard Guenther Committed by Richard Biener

re PR tree-optimization/50780 (ICE: verify_gimple failed: invalid operands in…

re PR tree-optimization/50780 (ICE: verify_gimple failed: invalid operands in ternary operation with -ftree-vectorize -fnon-call-exceptions)

2011-10-19  Richard Guenther  <rguenther@suse.de>

	PR middle-end/50780
	* tree-ssa-forwprop.c (forward_propagate_into_cond): Verify
	the condition is properly gimple before using it.
	* tree-eh (stmt_could_throw_1_p): Properly extract the
	operation type from comparisons.

From-SVN: r180192
parent 9aaa9e89
2011-10-19 Richard Guenther <rguenther@suse.de>
PR middle-end/50780
* tree-ssa-forwprop.c (forward_propagate_into_cond): Verify
the condition is properly gimple before using it.
* tree-eh (stmt_could_throw_1_p): Properly extract the
operation type from comparisons.
2011-10-19 Roland Stigge <stigge@antcom.de> 2011-10-19 Roland Stigge <stigge@antcom.de>
PR translation/48638 PR translation/48638
...@@ -2512,7 +2512,13 @@ stmt_could_throw_1_p (gimple stmt) ...@@ -2512,7 +2512,13 @@ stmt_could_throw_1_p (gimple stmt)
|| TREE_CODE_CLASS (code) == tcc_unary || TREE_CODE_CLASS (code) == tcc_unary
|| TREE_CODE_CLASS (code) == tcc_binary) || TREE_CODE_CLASS (code) == tcc_binary)
{ {
t = gimple_expr_type (stmt); if (is_gimple_assign (stmt)
&& TREE_CODE_CLASS (code) == tcc_comparison)
t = TREE_TYPE (gimple_assign_rhs1 (stmt));
else if (gimple_code (stmt) == GIMPLE_COND)
t = TREE_TYPE (gimple_cond_lhs (stmt));
else
t = gimple_expr_type (stmt);
fp_operation = FLOAT_TYPE_P (t); fp_operation = FLOAT_TYPE_P (t);
if (fp_operation) if (fp_operation)
{ {
......
...@@ -597,7 +597,8 @@ forward_propagate_into_cond (gimple_stmt_iterator *gsi_p) ...@@ -597,7 +597,8 @@ forward_propagate_into_cond (gimple_stmt_iterator *gsi_p)
} }
} }
if (tmp) if (tmp
&& is_gimple_condexpr (tmp))
{ {
if (dump_file && tmp) if (dump_file && tmp)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment