On 29/05/15 18:23, Bernd Schmidt wrote: > When predicating the code for OpenACC, we should avoid the entry block > in an offloaded region, which contains setup code that should be run in > every thread. The following patch adds a new marker statement that is > used to identify this block. Currently, predication doesn't happen > anyway due to an oversight in the algorithm, but I'll be fixing that in > a followup patch. > > Committed on gomp-4_0-branch. > Hi Bernd, this causes an ICE in kernels-eternal.c. The GIMPLE_OMP_ENTRY_END is removed the first time (!ssa) we call expand_omp_target. The second time we call expand_omp_target (ssa), it's no longer there, and we call 'gimple_code (NULL)' here: ... basic_block entry_succ_bb = single_succ (entry_bb); gsi = gsi_last_bb (entry_succ_bb); if (gimple_code (gsi_stmt (gsi)) == GIMPLE_OMP_ENTRY_END) gsi_remove (&gsi, true); ... This patch fixes that by not attempting to remove GIMPLE_OMP_ENTRY_END when in ssa. Committed to gomp-4_0-branch. Thanks, - Tom