diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-12-01 20:41:52 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-12-01 20:41:52 +0100 |
commit | 4f2eb765d71a0bdf740ec57900916bf9cf9dcf9a (patch) | |
tree | c8713cd4d2b5447f05d6ea1a049d429790689e19 /gcc/tree-cfgcleanup.c | |
parent | 090fa0ab610a8735d967f854f2e0e4517a3d3602 (diff) | |
download | gcc-4f2eb765d71a0bdf740ec57900916bf9cf9dcf9a.zip gcc-4f2eb765d71a0bdf740ec57900916bf9cf9dcf9a.tar.gz gcc-4f2eb765d71a0bdf740ec57900916bf9cf9dcf9a.tar.bz2 |
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: r154878
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 495450b..9fb489a 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -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. @@ -511,7 +511,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 |