https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119369
Bug ID: 119369
Summary: GCN: weak undefined symbols -> execution test FAIL,
'HSA_STATUS_ERROR_VARIABLE_UNDEFINED'
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: testsuite-fail
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
Target Milestone: ---
Target: GCN
I've noticed that in presence of a weak undefined symbol, we get execution test
FAILs, for example:
[...]
PASS: gcc.dg/attr-weakref-1.c (test for excess errors)
[...]
spawn -ignore SIGHUP [...]/gcn-run ./attr-weakref-1.exe
Load GCN code object: FAILED
HSA Runtime message: HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS: The arguments
passed to a functions are not compatible.
FAIL: gcc.dg/attr-weakref-1.c execution test
My understanding is that weak undefined symbols should resolve to NULL.
This also causes the effective-target 'weak_undefined' test to fail in the same
way, and therefore:
UNSUPPORTED: gcc.dg/addr_equal-1.c
UNSUPPORTED: gcc.dg/visibility-22.c
UNSUPPORTED: gcc.dg/torture/pr90020.c -O0
[Etc.]
UNSUPPORTED: gcc.dg/torture/pr53922.c -O0
[Etc.]
..., and as of the recent C++ enablement, this also affects dozens of C++ test
cases.
I suspect 'gcc/config/gcn/gcn-run.cc' needs to be changed to handle this case?
I've not yet looked whether the same applies to 'libgomp/plugin/plugin-gcn.c',
too.