https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90742
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Status|WAITING |NEW
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Came up in context of my patch for PR92568 (gfortran.dg/gomp/defaultmap-8.f90)
and the following does not work neither for scalars nor for arrays:
integer, allocatable :: a, b(:)
a = 2 ! implicit allocation
b = [2] ! implicit allocation
!$omp target firstprivate(a,b)
if (a /= 2 .or. b(1) /= 1) stop 1
a = 1
b = 1
!$omp end target
if (a /= 2) stop 2
if (b(1) /= 2) stop 2
end
Namely (for a variant with only the scalar 'a'):
.omp_data_arr.2.a = a;
#pragma omp target num_teams(1) thread_limit(0) firstprivate(a) [child fn:
MAIN__._omp_fn.0 (.omp_data_arr.2, .omp_data_sizes.3, .omp_data_kinds.4)]
{
.omp_data_i = (const struct .omp_data_t.1 & restrict) &.omp_data_arr.2;
D.3963 = .omp_data_i->a;
a = D.3963;
{
D.3943 = *a;