[Bug fortran/94672] [10 Regression] gfortran/OpenMP chokes on PRESENT(array) despite of SHARED(array): Error: ‘array’ not specified in enclosing ‘parallel’
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 20 15:12:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94672
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, just making (some or all) optional PARM_DECLs predetermined shared (or
firstprivate) by the langhook isn't correct, because
subroutine foo (array)
real, optional :: array(:)
!$omp parallel default(none) ! { dg-error "enclosing" }
if (.not.present (array)) stop 1 ! { dg-error "not specified in enclosing" }
!$omp end parallel
end subroutine
is now correctly rejected, but used to be accepts-invalid before this change.
More information about the Gcc-bugs
mailing list