public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/113867] New: [14 Regression][OpenMP] Wrong code with mapping pointers in structs
@ 2024-02-10 18:01 burnus at gcc dot gnu.org
  2024-02-10 18:07 ` [Bug middle-end/113867] " burnus at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-02-10 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113867
           Summary: [14 Regression][OpenMP] Wrong code with mapping
                    pointers in structs
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: openmp, wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57381
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57381&action=edit
Testcase, compile with 'gcc -fopenmp' and run with an offload device

Split off from PR113724 which mainly about an ICE.

The attached programs work with GCC 13 but fails with mainline.
(Requires actual offloading; tried here with nvptx.)

Probably due to Julian's mapping patches.


With mainline, it fails for 'g()' when executing

   omp target data map(tofrom: s2.p[:100])

(i.e. GOMP_target_data_ext → gomp_copy_host2dev → gomp_device_copy) with

  libgomp: cuMemGetAddressRange_v2 error: named symbol not found
  libgomp: Copying of host object [0x118c500..0x118c690) to dev object
[0x7f7e721cae00..0x7f7e721caf90) failed

It works using a separate target enter/exit data (i.e. for 'f()').


The mainline dump shows:

map(struct:s2 [len: 1]) map(alloc:s2.p [len: 0]) map(tofrom:*_2 [len: 400])
map(attach:s2.p [bias: 0])

I somehow hadn't expected the

   map(struct:s2 [len: 1]) map(alloc:s2.p [len: 0])

which might or might not be the issue. As it works with 'f()' (i.e. enter/exit
data), it might be a red herring (or not).

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-07  7:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-10 18:01 [Bug middle-end/113867] New: [14 Regression][OpenMP] Wrong code with mapping pointers in structs burnus at gcc dot gnu.org
2024-02-10 18:07 ` [Bug middle-end/113867] " burnus at gcc dot gnu.org
2024-02-12  8:45 ` rguenth at gcc dot gnu.org
2024-02-12 12:30 ` [Bug libgomp/113867] " burnus at gcc dot gnu.org
2024-02-12 13:00 ` burnus at gcc dot gnu.org
2024-02-13 10:43 ` burnus at gcc dot gnu.org
2024-02-21 17:59 ` burnus at gcc dot gnu.org
2024-03-07 20:40 ` law at gcc dot gnu.org
2024-04-03 12:02 ` rguenth at gcc dot gnu.org
2024-04-26  8:42 ` jakub at gcc dot gnu.org
2024-05-07  7:45 ` [Bug libgomp/113867] [14/15 " rguenth 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).