public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109911] New: [OpenMP] 'declare reduction' not USE associated
@ 2023-05-19 16:55 burnus at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2023-05-19 16:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109911
Bug ID: 109911
Summary: [OpenMP] 'declare reduction' not USE associated
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: openmp, rejects-valid
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
Found via OpenMP Spec Pull Request #3629 for Issue #3595.
The following program fails with:
Error: !$OMP DECLARE REDUCTION add not found at (1)
But it works when moving or copying the declare line into the main program.
[Side remark: It is unclear (see PR above) whether the code is supposed to work
with 'private'.]
Note that the spec states:
"If a _directive_ appears in the specification part of a module then the
behavior is as if that _directive_ appears in the specification part of any
_compilation-unit_ that references the module with a *USE* statement unless
otherwise specified."
module m
! private
!$omp declare reduction (Add : integer : myadd(omp_in, omp_out))
contains
subroutine myadd(in, out)
integer :: in, out
end
end module
use m
implicit none (type,external)
integer :: x
!$omp parallel reduction(Add: x)
! ...
!$omp end parallel
end
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-19 16:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 16:55 [Bug fortran/109911] New: [OpenMP] 'declare reduction' not USE associated burnus at gcc dot gnu.org
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).