public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/113004] New: OpenMP 5 - structs are not mapped element-wise by default
@ 2023-12-13 20:42 jules at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: jules at gcc dot gnu.org @ 2023-12-13 20:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113004

            Bug ID: 113004
           Summary: OpenMP 5 - structs are not mapped element-wise by
                    default
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jules at gcc dot gnu.org
  Target Milestone: ---

According to e.g. OpenMP 5.2, "5.8.2 Mapper Identifiers and mapper Modifiers":

"A structure type T has a predefined default mapper that is defined as if by a
declare mapper directive that specifies v in a map clause with the alloc
map-type and each structure element of v in a map clause with the tofrom
map-type."

At present, a variable of struct type will be mapped as as a single block (the
pre-OpenMP 5.0 legacy behaviour).

This works fine most of the time, but for example fails in the case where one
of the struct's members is a reference, demonstrated in the test case:

  libgomp/testsuite/libgomp.c++/target-49.C

Once "declare mapper" support is committed, cases where a struct with an
implicit default mapper should invoke a struct with a *non*-default mapper,
will also probably be mishandled.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-13 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 20:42 [Bug middle-end/113004] New: OpenMP 5 - structs are not mapped element-wise by default jules 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).