diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2014-02-12 15:46:08 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2014-02-12 15:46:08 +0100 |
commit | 64e5ace535448901c3e29cc1f6612e6c8d2a0a0c (patch) | |
tree | 89f989ac44affc877db59bdd2965712c0ec6572a /gcc/omp-low.c | |
parent | 7b40f5cf04d6edc82777c4eca0c5b62bae76ee7e (diff) | |
download | gcc-64e5ace535448901c3e29cc1f6612e6c8d2a0a0c.zip gcc-64e5ace535448901c3e29cc1f6612e6c8d2a0a0c.tar.gz gcc-64e5ace535448901c3e29cc1f6612e6c8d2a0a0c.tar.bz2 |
Fix potential ICE (null pointer dereference) in omp-low.c:diagnose_sb_0.
gcc/
* omp-low.c (diagnose_sb_0): Make sure label_ctx is valid to
dereference.
gcc/testsuite/
* gcc.dg/cilk-plus/jump-openmp.c: New file.
From-SVN: r207722
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index f99b2a6..ff3d2e8 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -10269,7 +10269,8 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p, if ((branch_ctx && gimple_code (branch_ctx) == GIMPLE_OMP_FOR && gimple_omp_for_kind (branch_ctx) == GF_OMP_FOR_KIND_CILKSIMD) - || (gimple_code (label_ctx) == GIMPLE_OMP_FOR + || (label_ctx + && gimple_code (label_ctx) == GIMPLE_OMP_FOR && gimple_omp_for_kind (label_ctx) == GF_OMP_FOR_KIND_CILKSIMD)) cilkplus_block = true; } |