re PR debug/42234 (internal compiler error: verify_ssa failed)

PR c++/42234
	* tree-cfgcleanup.c (cleanup_omp_return): Don't ICE if control_bb
	contains no statements.

	* g++.dg/gomp/pr42234.C: New test.

From-SVN: r154879
This commit is contained in:
Jakub Jelinek 2009-12-01 20:44:34 +01:00 committed by Jakub Jelinek
parent a05492f185
commit d709285d6f
4 changed files with 32 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2009-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/42234
* tree-cfgcleanup.c (cleanup_omp_return): Don't ICE if control_bb
contains no statements.
2009-11-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (last_scheduled_insn): New variable.

View File

@ -1,3 +1,8 @@
2009-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/42234
* g++.dg/gomp/pr42234.C: New test.
2009-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41278

View File

@ -0,0 +1,19 @@
// PR c++/42234
// { dg-do compile }
// { dg-options "-fopenmp" }
extern int foo (void);
void
bar (int x)
{
#pragma omp critical
{
int j;
for (j = 0; j < foo (); j++)
;
if (0)
if (x >= 4)
;
}
}

View File

@ -1,5 +1,5 @@
/* CFG cleanup for trees.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@ -517,7 +517,7 @@ cleanup_omp_return (basic_block bb)
control_bb = single_pred (bb);
stmt = last_stmt (control_bb);
if (gimple_code (stmt) != GIMPLE_OMP_SECTIONS_SWITCH)
if (stmt == NULL || gimple_code (stmt) != GIMPLE_OMP_SECTIONS_SWITCH)
return false;
/* The block with the control statement normally has two entry edges -- one