summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-07 12:27:45 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-07 12:27:45 +0000
commitaa9d6f35eebff77676514ee5e5c71e636fe8ed15 (patch)
treebcb021abf33e8bd3d7b7ec7509c879a30427df66 /gcc/tree-eh.c
parente125029478b567189bc1a028c65340b870ed5824 (diff)
downloadgcc-aa9d6f35eebff77676514ee5e5c71e636fe8ed15.tar.gz
2010-09-07 Richard Guenther <rguenther@suse.de>
PR middle-end/45569 * tree-eh.c (operation_could_trap_helper_p): Neither COMPLEX_EXPR nor CONSTRUCTOR can trap. * tree-complex.c (update_complex_assignment): Update EH info. * g++.dg/eh/pr45569.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 66fee8e2e8c..21742764863 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2334,6 +2334,11 @@ operation_could_trap_helper_p (enum tree_code op,
return true;
return false;
+ case COMPLEX_EXPR:
+ case CONSTRUCTOR:
+ /* Constructing an object cannot trap. */
+ return false;
+
default:
/* Any floating arithmetic may trap. */
if (fp_operation && flag_trapping_math)