diff options
author | Richard Henderson <rth@redhat.com> | 2006-03-22 04:50:45 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2006-03-22 04:50:45 -0800 |
commit | fad41cd7d43ffce40a20f11cfbe68da548ef6b79 (patch) | |
tree | 600f6369cacf022589c2e874590e5a90eb2f99e5 /gcc/omp-low.c | |
parent | ee51e035d90930ba62d16122a40ffd3188f44c2c (diff) | |
download | gcc-fad41cd7d43ffce40a20f11cfbe68da548ef6b79.zip gcc-fad41cd7d43ffce40a20f11cfbe68da548ef6b79.tar.gz gcc-fad41cd7d43ffce40a20f11cfbe68da548ef6b79.tar.bz2 |
re PR middle-end/26084 (ICE (segfault) on C++ OpenMP code)
PR middle-end/26084
* except.c (duplicate_eh_regions_0): New.
(duplicate_eh_region_1): Duplicate the children of the node as
well as the node itself. Link them up properly.
(duplicate_eh_region_2): Merge into ...
(duplicate_eh_regions): ... here. Take copy_region argument, and
copy only a sub-tree if asked. Simplify copying and fixup.
(eh_region_outer_p): New.
* except.h (duplicate_eh_regions): Update decl.
(eh_region_outer_p): Declare.
* omp-low.c (lower_omp_single): Fix eh region placement wrt OMP_RETURN.
(lower_omp_master): Likewise.
(lower_omp_ordered): Likewise.
* tree-cfg.c (struct move_stmt_d): Add new_label_map.
(move_stmt_r): Use it to remap labels. Handle recursion vs
remap_decls_p properly.
(move_block_to_fn): Pass in new_label_map. Remap RESX_EXPR.
(find_outermost_region_in_block): New.
(new_label_mapper): New.
(move_sese_region_to_fn): Copy eh information to the new function
properly.
* tree-inline.c (copy_cfg_body): Update for new duplicate_eh_regions
argument.
* tree-pretty-print.c (dump_generic_node): Dump RESX_EXPR region
number.
From-SVN: r112283
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 65f7151..41b4093 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -3464,6 +3464,9 @@ lower_omp_sections (tree *stmt_p, omp_context *ctx) new_body = alloc_stmt_list (); append_to_statement_list (ilist, &new_body); append_to_statement_list (stmt, &new_body); + /* ??? The OMP_RETURN doesn't logically belong here, but in + expand_omp_sections we expect this marker to be where the + individual sections join after completing the loop. */ append_to_statement_list (region_exit, &new_body); append_to_statement_list (olist, &new_body); append_to_statement_list (dlist, &new_body); @@ -3610,9 +3613,9 @@ lower_omp_single (tree *stmt_p, omp_context *ctx) lower_omp_single_simple (single_stmt, &BIND_EXPR_BODY (bind)); append_to_statement_list (dlist, &BIND_EXPR_BODY (bind)); + maybe_catch_exception (&BIND_EXPR_BODY (bind)); t = make_node (OMP_RETURN_EXPR); append_to_statement_list (t, &BIND_EXPR_BODY (bind)); - maybe_catch_exception (&BIND_EXPR_BODY (bind)); pop_gimplify_context (bind); BIND_EXPR_VARS (bind) = chainon (BIND_EXPR_VARS (bind), ctx->block_vars); @@ -3647,9 +3650,9 @@ lower_omp_master (tree *stmt_p, omp_context *ctx) x = build1 (LABEL_EXPR, void_type_node, lab); gimplify_and_add (x, &BIND_EXPR_BODY (bind)); + maybe_catch_exception (&BIND_EXPR_BODY (bind)); x = make_node (OMP_RETURN_EXPR); append_to_statement_list (x, &BIND_EXPR_BODY (bind)); - maybe_catch_exception (&BIND_EXPR_BODY (bind)); pop_gimplify_context (bind); BIND_EXPR_VARS (bind) = chainon (BIND_EXPR_VARS (bind), ctx->block_vars); @@ -3683,9 +3686,9 @@ lower_omp_ordered (tree *stmt_p, omp_context *ctx) x = built_in_decls[BUILT_IN_GOMP_ORDERED_END]; x = build_function_call_expr (x, NULL); gimplify_and_add (x, &BIND_EXPR_BODY (bind)); + maybe_catch_exception (&BIND_EXPR_BODY (bind)); x = make_node (OMP_RETURN_EXPR); append_to_statement_list (x, &BIND_EXPR_BODY (bind)); - maybe_catch_exception (&BIND_EXPR_BODY (bind)); pop_gimplify_context (bind); BIND_EXPR_VARS (bind) = chainon (BIND_EXPR_VARS (bind), ctx->block_vars); |