public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
@ 2020-03-23 14:09 tschwinge at gcc dot gnu.org
2020-03-26 14:14 ` [Bug target/94282] " burnus at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-03-23 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
Bug ID: 94282
Summary: [amdgcn] ld: error: undefined symbol:
__gxx_personality_v0
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: openacc, openmp
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: ams at gcc dot gnu.org, jules at gcc dot gnu.org
Target Milestone: ---
Target: amdgcn
This is with GCC commit b73f69020f08208d2d969fcf8879bd294a6e3596 sources, with
commit b12fb08bd95d7dbb9fd6af120ee0b4c658a3deb1, and commit
65858e1869be4a54f8e0e2073a4aa99b15471273 cherry-picked, and PR94248 fixed with
Jakub's 'reg_overlap_mentioned_p' patch.
Relative to a GCC nvptx offloading configuration, when adding amdgcn
offloading, I see the following regression with already XFAILed
'libgomp.c++/../libgomp.c-c++-common/function-not-offloaded.c':
ld: error: undefined symbol: foo()
>>> referenced by /tmp/ccNzknBD.o:(main._omp_fn.0)
>>> referenced by /tmp/ccNzknBD.o:(main._omp_fn.0)
ld: error: undefined symbol: __gxx_personality_v0
>>> referenced by /tmp/ccNzknBD.o:(.data+0x13)
collect2: error: ld returned 1 exit status
mkoffload: fatal error:
[...]/build-gcc/./gcc/x86_64-pc-linux-gnu-accel-amdgcn-amdhsa-gcc returned 1
exit status
The first error is expected (thus the XFAIL); the second error is not expected,
appears for the 'libgomp.c++' variant only.
This is somewhat related to PR92713.
Assuming that's not yet done, can something similar be done as done for nvptx,
where we force-disable all C++ exceptions code/tables generation, see PR86660
GCC trunk r263265, and then GCC trunk r263287?
Same for 'libgomp.oacc-*' (with all "execution test" etc. FAILs ignored as
"[n/a]"; "libgomp: device type gcn not supported" due to running on unsuitable
hardware):
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/routine-1.c
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test
for excess errors)
UNRESOLVED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/routine-1.c
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0
compilation failed to produce executable
PASS: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/routine-1.c
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test
for excess errors)
[n/a]: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/routine-1.c
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2
execution test
FAIL: libgomp.oacc-c++/pr71959.C -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0
-foffload=amdgcn-amdhsa -O0 (test for excess errors)
UNRESOLVED: libgomp.oacc-c++/pr71959.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 compilation failed to produce
executable
PASS: libgomp.oacc-c++/pr71959.C -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0
-foffload=amdgcn-amdhsa -O2 (test for excess errors)
[n/a]: libgomp.oacc-c++/pr71959.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test
FAIL: libgomp.oacc-c++/routine-1-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors)
UNRESOLVED: libgomp.oacc-c++/routine-1-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 compilation failed to produce
executable
PASS: libgomp.oacc-c++/routine-1-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors)
[n/a]: libgomp.oacc-c++/routine-1-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test
FAIL: libgomp.oacc-c++/routine-1-template-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors)
UNRESOLVED: libgomp.oacc-c++/routine-1-template-auto.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0
compilation failed to produce executable
PASS: libgomp.oacc-c++/routine-1-template-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors)
[n/a]: libgomp.oacc-c++/routine-1-template-auto.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test
FAIL: libgomp.oacc-c++/routine-1-template-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test
for excess errors)
UNRESOLVED: libgomp.oacc-c++/routine-1-template-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0
compilation failed to produce executable
PASS: libgomp.oacc-c++/routine-1-template-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test
for excess errors)
[n/a]: libgomp.oacc-c++/routine-1-template-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2
execution test
FAIL: libgomp.oacc-c++/routine-1-template.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors)
UNRESOLVED: libgomp.oacc-c++/routine-1-template.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 compilation failed to produce
executable
PASS: libgomp.oacc-c++/routine-1-template.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors)
[n/a]: libgomp.oacc-c++/routine-1-template.C -DACC_DEVICE_TYPE_gcn=1
-DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 execution test
FAIL: libgomp.oacc-c++/routine-1-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test
for excess errors)
UNRESOLVED: libgomp.oacc-c++/routine-1-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0
compilation failed to produce executable
PASS: libgomp.oacc-c++/routine-1-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test
for excess errors)
[n/a]: libgomp.oacc-c++/routine-1-trailing-return-type.C
-DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2
execution test
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
@ 2020-03-26 14:14 ` burnus at gcc dot gnu.org
2020-03-26 17:53 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-03-26 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The symbol __gxx_personality_v0 is part of libsupc++ – which I believe is not
build to to lacking/restricted C++ support.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
2020-03-26 14:14 ` [Bug target/94282] " burnus at gcc dot gnu.org
@ 2020-03-26 17:53 ` pinskia at gcc dot gnu.org
2020-03-26 17:58 ` ams at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-03-26 17:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> The symbol __gxx_personality_v0 is part of libsupc++ – which I believe is
> not build to to lacking/restricted C++ support.
It is also exception handling related. Does amdgcn have EH support?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
2020-03-26 14:14 ` [Bug target/94282] " burnus at gcc dot gnu.org
2020-03-26 17:53 ` pinskia at gcc dot gnu.org
@ 2020-03-26 17:58 ` ams at gcc dot gnu.org
2020-04-22 16:54 ` tschwinge at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ams at gcc dot gnu.org @ 2020-03-26 17:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #3 from Andrew Stubbs <ams at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> (In reply to Tobias Burnus from comment #1)
> > The symbol __gxx_personality_v0 is part of libsupc++ – which I believe is
> > not build to to lacking/restricted C++ support.
>
> It is also exception handling related. Does amdgcn have EH support?
No, it does not. No unwind support, nor sjlj either (the register file is very
large, and has variable size, so it's not trivial to implement, IIUC).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-26 17:58 ` ams at gcc dot gnu.org
@ 2020-04-22 16:54 ` tschwinge at gcc dot gnu.org
2020-04-23 8:49 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-04-22 16:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-04-22
--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Andrew Stubbs from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > (In reply to Tobias Burnus from comment #1)
> > > The symbol __gxx_personality_v0 is part of libsupc++ – which I believe is
> > > not build to to lacking/restricted C++ support.
> >
> > It is also exception handling related. Does amdgcn have EH support?
>
> No, it does not. No unwind support, nor sjlj either (the register file is
> very large, and has variable size, so it's not trivial to implement, IIUC).
Unexpectedly, the same as for nvptx.
So:
(In reply to Thomas Schwinge from comment #0)
> Assuming that's not yet done
(It isn't.)
> can something similar be done as done for
> nvptx, where we force-disable all C++ exceptions code/tables generation, see
> PR86660 GCC trunk r263265, and then GCC trunk r263287?
Seems so. I successfully tested the following change to
'gcc/common/config/gcn/gcn-common.c'; OK to commit? If approving this patch,
please respond with "Reviewed-by: NAME <EMAIL>" so that your effort will be
recorded in the commit log, see <https://gcc.gnu.org/wiki/Reviewed-by>.
+static enum unwind_info_type
+gcn_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
+{
+ return UI_NONE;
+}
+#undef TARGET_EXCEPT_UNWIND_INFO
+#define TARGET_EXCEPT_UNWIND_INFO gcn_except_unwind_info
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (3 preceding siblings ...)
2020-04-22 16:54 ` tschwinge at gcc dot gnu.org
@ 2020-04-23 8:49 ` burnus at gcc dot gnu.org
2020-04-23 13:54 ` ams at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-04-23 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Cf. also https://gcc.gnu.org/pipermail/gcc-patches/2020-April/544368.html
["config/gcn/unwind-gcn.c (__gxx_personality_v0): New."]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (4 preceding siblings ...)
2020-04-23 8:49 ` burnus at gcc dot gnu.org
@ 2020-04-23 13:54 ` ams at gcc dot gnu.org
2020-04-29 7:58 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ams at gcc dot gnu.org @ 2020-04-23 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #6 from Andrew Stubbs <ams at gcc dot gnu.org> ---
I think we've decided to with Thomas's approach.
Thomas, please go ahead and commit.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (5 preceding siblings ...)
2020-04-23 13:54 ` ams at gcc dot gnu.org
@ 2020-04-29 7:58 ` cvs-commit at gcc dot gnu.org
2020-05-05 9:40 ` burnus at gcc dot gnu.org
2020-05-22 11:50 ` tschwinge at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-29 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Schwinge <tschwinge@gcc.gnu.org>:
https://gcc.gnu.org/g:7f1989249e25af6fc0f124452efa24b3796b767a
commit r10-8033-g7f1989249e25af6fc0f124452efa24b3796b767a
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Apr 21 22:39:33 2020 +0200
[gcn] Set 'UI_NONE' for 'TARGET_EXCEPT_UNWIND_INFO' [PR94282]
In libgomp offloading testing, this resolves all the 'ld: error: undefined
symbol: __gxx_personality_v0' FAILs.
gcc/
PR target/94282
* common/config/gcn/gcn-common.c (gcn_except_unwind_info): New
function.
(TARGET_EXCEPT_UNWIND_INFO): Define.
libgomp/
PR target/94282
* testsuite/libgomp.c-c++-common/function-not-offloaded.c: Remove
'dg-allow-blank-lines-in-output'.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (6 preceding siblings ...)
2020-04-29 7:58 ` cvs-commit at gcc dot gnu.org
@ 2020-05-05 9:40 ` burnus at gcc dot gnu.org
2020-05-22 11:50 ` tschwinge at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2020-05-05 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
This was committed to GCC mainline while it was GCC 10 – hence, GCC 10 and 11
have the fix.
Can this PR now be closed?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/94282] [amdgcn] ld: error: undefined symbol: __gxx_personality_v0
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
` (7 preceding siblings ...)
2020-05-05 9:40 ` burnus at gcc dot gnu.org
@ 2020-05-22 11:50 ` tschwinge at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-05-22 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94282
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |tschwinge at gcc dot gnu.org
Status|NEW |RESOLVED
See Also|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=94248, |
|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=92713, |
|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=71959 |
Resolution|--- |FIXED
--- Comment #9 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-05-22 11:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 14:09 [Bug target/94282] New: [amdgcn] ld: error: undefined symbol: __gxx_personality_v0 tschwinge at gcc dot gnu.org
2020-03-26 14:14 ` [Bug target/94282] " burnus at gcc dot gnu.org
2020-03-26 17:53 ` pinskia at gcc dot gnu.org
2020-03-26 17:58 ` ams at gcc dot gnu.org
2020-04-22 16:54 ` tschwinge at gcc dot gnu.org
2020-04-23 8:49 ` burnus at gcc dot gnu.org
2020-04-23 13:54 ` ams at gcc dot gnu.org
2020-04-29 7:58 ` cvs-commit at gcc dot gnu.org
2020-05-05 9:40 ` burnus at gcc dot gnu.org
2020-05-22 11:50 ` 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).