public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107350] New: [OpenMP] linear clause with non-scalar list items
@ 2022-10-21 17:52 burnus at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2022-10-21 17:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107350
Bug ID: 107350
Summary: [OpenMP] linear clause with non-scalar list items
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
I think the current OpenMP wording does not restrict the arguments to linear to
scalars.
Currently, a Fortran program like below (based on
libgomp.fortran/taskloop2.f90) compiles (and works at runtime) – but I am not
sure it should or not and whether it works reliably.
For C, it is rejected as
linear clause applied to non-integral non-pointer variable with type ‘int[2]’
Expected: Consistency between Fortran and C/C++ - and if it is valid, ensuring
that it
works correctly. Assuming the spec permits it for both or none and not only for
Fortran.
* * *
subroutine f2 (a, b, cx)
integer, intent(in) :: a, b, cx
integer :: c(5), d, e
c = cx
!$omp taskloop simd default(none) shared(u, v, w) linear(d:1) linear(c:5)
lastprivate(e)
do d = a, b
u(d) = v(d) + w(d)
c = c + 5
e = c(3) + 9
end do
!$omp end taskloop simd
m = d + c(3) + e
end subroutine f2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-21 17:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 17:52 [Bug middle-end/107350] New: [OpenMP] linear clause with non-scalar list items 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).