https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105019
Bug ID: 105019 Summary: [nvptx] malias in libgomp results in "Internal error: reference to deleted section" Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- As mentioned in the commit message for malias: ... When enabling malias by default, libgomp detects alias support and consequently libgomp.a will contains a few uses of .alias. This however results in aforementioned "Internal error: reference to deleted section" in many test-cases. Either there's some error with how .alias is used, or there's a driver bug. While this issue is not resolved, we keep malias off-by-default. ... This needs to be investigated, and if it's a driver bug, reported to nvidia, or otherwise fixed or worked around. Note: the same error showed up in a test-case where the call to an alias was inlined, and consequently the alias referenced a defined but unused function. To observe this, disable this bit: ... if (!cgraph_node::get (name)->referred_to_p ()) /* Prevent "Internal error: reference to deleted section". */ return; ... in nvptx_asm_output_def_from_decls and run nvptx.exp=alias-2.c: ... PASS: gcc.target/nvptx/alias-2.c (test for excess errors) spawn nvptx-none-run ./alias-2.exe^M fatal : Internal error: reference to deleted section^M nvptx-run: cuLinkComplete failed: unknown error (CUDA_ERROR_UNKNOWN, 999)^M FAIL: gcc.target/nvptx/alias-2.c execution test ... So it's possible that the error somehow related to this scenario.