diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-01-03 00:33:54 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-01-03 00:33:54 +0100 |
commit | 99819c6385c162ae9dbb222baec7c008ad370367 (patch) | |
tree | abd2d1a421d905cb6b31b59654548df767291992 /gcc/omp-low.c | |
parent | caf38560722a95700eae50a51a1adae6ce2458c6 (diff) | |
download | gcc-99819c6385c162ae9dbb222baec7c008ad370367.zip gcc-99819c6385c162ae9dbb222baec7c008ad370367.tar.gz gcc-99819c6385c162ae9dbb222baec7c008ad370367.tar.bz2 |
re PR middle-end/34608 (ICE with "-ftest-coverage -fopenmp")
PR middle-end/34608
* omp-low.c (expand_omp_parallel): Purge dead EH edges in the
child fn.
* g++.dg/gomp/pr34608.C: New test.
From-SVN: r131264
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 36fb13d..cf4ae12 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -3,7 +3,7 @@ marshalling to implement data sharing and copying clauses. Contributed by Diego Novillo <dnovillo@redhat.com> - Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -2646,6 +2646,24 @@ expand_omp_parallel (struct omp_region *region) if (optimize) optimize_omp_library_calls (); rebuild_cgraph_edges (); + + /* Some EH regions might become dead, see PR34608. If + pass_cleanup_cfg isn't the first pass to happen with the + new child, these dead EH edges might cause problems. + Clean them up now. */ + if (flag_exceptions) + { + basic_block bb; + tree save_current = current_function_decl; + bool changed = false; + + current_function_decl = child_fn; + FOR_EACH_BB (bb) + changed |= tree_purge_dead_eh_edges (bb); + if (changed) + cleanup_tree_cfg (); + current_function_decl = save_current; + } pop_cfun (); } |