https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105836
Bug ID: 105836 Summary: [OpenMP] segfault when assigning after firstprivate + allocate Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: openmp, wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- Created attachment 53077 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53077&action=edit Testcase (test.f90) - compile (-fopenmp) + run Testcase – see attachment or (reduced from) testsuite/libgomp.fortran/allocate-1.f90 with a 'x = ...' added at the end of 'subroutine foo'. !$omp parallel !$omp task firstprivate(x) allocate(h: x) ... !$omp end task !$omp end parallel x = 5 ! segfault at runtime The C code works, i.e. libgomp.c-c++-common/allocate-1.c