public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103289] New: OpenMP: Private Allocatable arrays not allowed inside 'parallel' with default(none)
@ 2021-11-16 21:40 vzborovsky at gmail dot com
0 siblings, 0 replies; only message in thread
From: vzborovsky at gmail dot com @ 2021-11-16 21:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103289
Bug ID: 103289
Summary: OpenMP: Private Allocatable arrays not allowed inside
'parallel' with default(none)
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: vzborovsky at gmail dot com
Target Milestone: ---
Hello,
This code does not compile:
program t
implicit none
integer, allocatable :: a(:)
integer :: j
!$omp parallel default(none)
!$omp do private(a)
do j = 1, 1000
end do
!$omp end do
!$omp end parallel
end program
Compiler fails with the error:
/app/example.f90:7:19:
7 | !$omp do private(a)
| ^
Error: 'a' not specified in enclosing 'parallel'
/app/example.f90:6:28:
6 | !$omp parallel default(none)
| ^
note: enclosing 'parallel'
Compiler returned: 1
The code above was tested against gfortran versions 4.9.4, 7.3.0, 10.2, 11.2.
Versions 4.9.4 and 11.2 were tested at godbolt.org site,
https://godbolt.org/z/caEEsvxc6
All versions above produce the same error.
But the code does compile when:
a) either I change the type of 'a' variable to fixed-size array
b) or declare 'a' as private in 'parallel' construct
c) or use combined 'parallel do' construct
d) or use Intel Fortran compiler
I have tried to read OpenMP specification but haven't found anything
prohibiting the code above.
With best regards,
Vadim Zborovskii
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-16 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 21:40 [Bug fortran/103289] New: OpenMP: Private Allocatable arrays not allowed inside 'parallel' with default(none) vzborovsky at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).