re PR c++/25874 ([gomp] ICE in calc_dfs_tree())

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.

From-SVN: r123822
This commit is contained in:
Jakub Jelinek 2007-04-14 20:52:45 +02:00 committed by Jakub Jelinek
parent ed5ee445f9
commit b1483e87c9
5 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-04-14 Jakub Jelinek <jakub@redhat.com>
PR c++/25874
* omp-low.c (expand_omp_parallel): If child_cfun->cfg, free dominators,
post dominators and cleanup cfg before returning.
2007-04-14 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.

View File

@ -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 ();
}
}

View File

@ -1,3 +1,9 @@
2007-04-14 Jakub Jelinek <jakub@redhat.com>
PR c++/25874
* gcc.dg/gomp/pr25874.c: Add dg-options.
* g++.dg/gomp/pr25874.C: Add dg-options.
2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
PR fortran/21061

View File

@ -1,3 +1,5 @@
// { dg-options "-O -fopenmp" }
int foo();
struct wigner_d

View File

@ -1,3 +1,5 @@
/* { dg-options "-O -fopenmp" } */
void foo();
inline void bar()