https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85675
Bug ID: 85675
Summary: parameters from other modules in openmp default(none)
not specified in enclosing 'parallel'
Product: gcc
Version: 7.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: daanvanvugt at gmail dot com
Target Milestone: ---
I have been experiencing an issue (for a few versions already) related to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59488
but in the case where the parameter is imported from a module in a different
source file.
c.f90:
module c
integer, parameter :: n = 100
integer, parameter :: ns(n) = 0
end module c
test.f90:
program test
use c
implicit none
integer :: i
!$omp parallel do default(none) private(i)
do i=1,n
write(*,*) ns(i)
end do
!$omp end parallel do
end program test
gfortran -fopenmp -c c.f90
gfortran -fopenmp -c test.f90
test.f90:8:0:
write(*,*) ns(i)
Error: ‘ns’ not specified in enclosing ‘parallel’
test.f90:6:0:
!$omp parallel do default(none) private(i)
Error: enclosing ‘parallel’