On Tue, Feb 11, 2014 at 02:15:00PM +0100, Thomas Schwinge wrote:
> Jakub asked me to »please repost just the (hopefully small) trunk patch
> alone«, so here we go:
>
> Consider the following code:
>
> void baz()
> {
> bad1:
> #pragma omp parallel
> goto bad1;
> }
>
> Then, if both -fcilkplus and -fopenmp are specified, that will run into a
> SIGSEGV/ICE because of label_ctx == NULL in omp-low.c:diagnose_sb_0.
>
> The testcase is basically a concatenation of gcc.dg/cilk-plus/jump.c and
> gcc.dg/gomp/block-1.c -- should this be done differently/better?
>
> 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.
Ok, thanks.
Jakub