aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-10-19 14:54:34 +0000
committerRichard Guenther <rguenther@suse.de>2011-10-19 14:54:34 +0000
commitc8431dca09cde4bbb79055493eaae47cbfa3bd62 (patch)
tree02c66940d76557ca76c3cfc4affa106d1affc4c2 /gcc/tree-eh.c
parentb07761d3b492b17bb5bccf85b137e3fefccd3ae5 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@180192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index f751d8d98a2..c1896be228d 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2512,7 +2512,13 @@ stmt_could_throw_1_p (gimple stmt)
|| TREE_CODE_CLASS (code) == tcc_unary
|| 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);
if (fp_operation)
{