diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-14 18:52:45 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-14 18:52:45 +0000 |
commit | 480e5bc3913e7e97b83ee44e2f2cad3d059e3c83 (patch) | |
tree | 6d8feafd44f2de9032de4ce2c227a0a65c29c51f /gcc/omp-low.c | |
parent | e558af2945cb5bbc3890a0dd9e1d825328d13eec (diff) | |
download | gcc-480e5bc3913e7e97b83ee44e2f2cad3d059e3c83.tar.gz |
PR c++/25874
* omp-low.c (expand_omp_parallel): If child_cfun->cfg, free dominators,
post dominators and cleanup cfg before returning.
* gcc.dg/gomp/pr25874.c: Add dg-options.
* g++.dg/gomp/pr25874.C: Add dg-options.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123822 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index f176f9e4102..5715812c2dc 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2409,6 +2409,7 @@ expand_omp_parallel (struct omp_region *region) block_stmt_iterator si; tree entry_stmt; edge e; + bool do_cleanup_cfg = false; entry_stmt = last_stmt (region->entry); child_fn = OMP_PARALLEL_FN (entry_stmt); @@ -2444,6 +2445,7 @@ expand_omp_parallel (struct omp_region *region) exit_succ_e = single_succ_edge (exit_bb); make_edge (new_bb, exit_succ_e->dest, EDGE_FALLTHRU); } + do_cleanup_cfg = true; } else { @@ -2537,6 +2539,14 @@ expand_omp_parallel (struct omp_region *region) /* Emit a library call to launch the children threads. */ expand_parallel_call (region, new_bb, entry_stmt, ws_args); + + if (do_cleanup_cfg) + { + /* Clean up the unreachable sub-graph we created above. */ + free_dominance_info (CDI_DOMINATORS); + free_dominance_info (CDI_POST_DOMINATORS); + cleanup_tree_cfg (); + } } |