https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65419
--- Comment #7 from vries at gcc dot gnu.org --- Created attachment 35636 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35636&action=edit gcc/testsuite/c-c++-common/goacc/kernels-parallel-loop-data-enter-exit-2.c (In reply to cesar from comment #6) > Isn't GOACC_parallel likely to have the same problem because hostaddrs may > be written to? GOACC_parallel is not declared with a fnspec, so there's no tailcall problem: ... DEF_GOACC_BUILTIN (BUILT_IN_GOACC_PARALLEL, "GOACC_parallel", BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR, ATTR_NOTHROW_LIST) ... OTOH, GOACC_parallel is an optimization barrier. So the attached testcase will fail. AFAICT, the only way this can be helped is by postponing expansion of the parallel region until ompexpandssa, in other words do the same as for kernels.