public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101544] New: [OpenMP] 'declare target' block around class – unresolved _Znwm = "operator new(unsigned long)"
@ 2021-07-21  6:40 burnus at gcc dot gnu.org
  2021-07-21  7:58 ` [Bug target/101544] [OpenMP][AMDGCN][nvptx] C++ offloading: " burnus at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-07-21  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101544
           Summary: [OpenMP] 'declare target' block around class –
                    unresolved _Znwm = "operator new(unsigned long)"
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: openmp, wrong-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: cltang at gcc dot gnu.org, jakub at gcc dot gnu.org
  Target Milestone: ---

Created attachment 51184
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51184&action=edit
Testcase declare_target_base_class.cpp

>From https://github.com/SOLLVE/sollve_vv/pull/364
which is for https://github.com/SOLLVE/sollve_vv/issues/105

The code compiles with LLVM >= 12 but fails with LLVM < 12 according to the
sollve_vv issue.


The testcase – allegedly OpenMP 4.5 – fails to link with:

unresolved symbol _Znwm
collect2: error: ld returned 1 exit status
mkoffload: fatal error: x86_64-none-linux-gnu-accel-nvptx-none-gcc returned 1
exit status

where  "_Znwm" = "operator new(unsigned long)"


The code has:

+#pragma omp declare target
+class S {
...
+#pragma omp target map(ptr)
+      ptr = new S();
...
+#pragma omp end declare target

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

end of thread, other threads:[~2023-06-01 19:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  6:40 [Bug c++/101544] New: [OpenMP] 'declare target' block around class – unresolved _Znwm = "operator new(unsigned long)" burnus at gcc dot gnu.org
2021-07-21  7:58 ` [Bug target/101544] [OpenMP][AMDGCN][nvptx] C++ offloading: " burnus at gcc dot gnu.org
2021-07-21  8:05 ` jakub at gcc dot gnu.org
2021-07-21  9:06 ` ams at gcc dot gnu.org
2021-07-21  9:33 ` redi at gcc dot gnu.org
2021-07-21 10:03 ` ams at gcc dot gnu.org
2021-07-21 13:27 ` rguenth at gcc dot gnu.org
2021-07-21 13:37 ` redi at gcc dot gnu.org
2021-07-26 12:01 ` tschwinge at gcc dot gnu.org
2022-07-22 13:32 ` tschwinge at gcc dot gnu.org
2022-07-22 14:04 ` tschwinge at gcc dot gnu.org
2022-07-25 11:20 ` rguenth at gcc dot gnu.org
2023-06-01 19:27 ` tschwinge 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).