[Flang] [OpenMP] Variables in common blocks may not be inheriting data sharing attributes #49545
Labels
bug
Indicates an unexpected problem or unintended behavior
bugzilla
Issues migrated from bugzilla
flang:frontend
openmp
Extended Description
The variable 'a' ought to inherit threadprivate from the common block.
% cat t.f90
integer(4) :: a
common /c/ a
!$OMP THREADPRIVATE(/c/)
!$OMP PARALLEL DEFAULT(none)
a = omp_get_thread_num()
!$OMP END PARALLEL
end
% flang -c -fopenmp t.f90
./t.f90:5:5: error: The DEFAULT(NONE) clause requires that 'a' must be listed in a data-sharing attribute clause
a = omp_get_thread_num()
^
The text was updated successfully, but these errors were encountered: