https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94278
Bug ID: 94278 Summary: [amdgcn] Offloading build failures due to 'llvm-mc' SIGSEGV 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: --- 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: [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/pr93515.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/pr93515.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/pr93515.c [-execution test-]{+compilation failed to produce executable+} Stack dump: 0. Program arguments: [...]/install/offload-amdgcn-amdhsa/amdgcn-amdhsa/bin/as -triple=amdgcn--amdhsa -mattr=-code-object-v3 -mcpu=fiji -filetype=obj -o /tmp/ccn2bzJ1.o /tmp/cchOR6jK.mkoffload.2.s xgcc: internal compiler error: Segmentation fault signal terminated program as [...] mkoffload: fatal error: [...]/build-gcc/./gcc/x86_64-pc-linux-gnu-accel-amdgcn-amdhsa-gcc returned 4 exit status That's with stock Ubuntu 18.04 LLVM 9 packages: $ [...]/install/offload-amdgcn-amdhsa/amdgcn-amdhsa/bin/as --version LLVM (http://llvm.org/): LLVM version 9.0.0 [...] $ readlink [...]/install/offload-amdgcn-amdhsa/amdgcn-amdhsa/bin/as /usr/bin/llvm-mc-9 $ dpkg -S /usr/bin/llvm-mc-9 llvm-9: /usr/bin/llvm-mc-9 $ apt-cache policy llvm-9 llvm-9: Installed: 1:9-2~ubuntu18.04.2 [...] As this is a problem in an external tool, are we going to declare this "not our problem", hoping it'll go away in a later release? Or, do we intent to be compatible with this LLVM version, and inspect whether there maybe is an actual issue with GCC's amdgcn code generation that triggers this problem? Same for 'libgomp.c++' variant. Supposedly same problem for: [-PASS:-]{+FAIL: libgomp.c/examples-4/async_target-2.c (internal compiler error)+} {+FAIL:+} libgomp.c/examples-4/async_target-2.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/examples-4/async_target-2.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/examples-4/target-5.c (internal compiler error)+} {+FAIL:+} libgomp.c/examples-4/target-5.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/examples-4/target-5.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/examples-4/target_data-6.c (internal compiler error)+} {+FAIL:+} libgomp.c/examples-4/target_data-6.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/examples-4/target_data-6.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/examples-4/target_data-7.c (internal compiler error)+} {+FAIL:+} libgomp.c/examples-4/target_data-7.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/examples-4/target_data-7.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/pr86660.c (internal compiler error)+} {+FAIL:+} libgomp.c/pr86660.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/pr86660.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/target-3.c (internal compiler error)+} {+FAIL:+} libgomp.c/target-3.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/target-3.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/target-4.c (internal compiler error)+} {+FAIL:+} libgomp.c/target-4.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/target-4.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/target-5.c (internal compiler error)+} {+FAIL:+} libgomp.c/target-5.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/target-5.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/target-6.c (internal compiler error)+} {+FAIL:+} libgomp.c/target-6.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/target-6.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/target-7.c (internal compiler error)+} {+FAIL:+} libgomp.c/target-7.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/target-7.c [-execution test-]{+compilation failed to produce executable+} {+FAIL: libgomp.c/thread-limit-2.c (internal compiler error)+} FAIL: libgomp.c/thread-limit-2.c (test for excess errors) UNRESOLVED: libgomp.c/thread-limit-2.c compilation failed to produce executable [-PASS:-]{+FAIL: libgomp.c/thread-limit-3.c (internal compiler error)+} {+FAIL:+} libgomp.c/thread-limit-3.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/thread-limit-3.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c++/for-15.C (internal compiler error)+} {+FAIL:+} libgomp.c++/for-15.C (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c++/for-15.C [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c++/for-24.C (internal compiler error)+} {+FAIL:+} libgomp.c++/for-24.C (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c++/for-24.C [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c++/pr69555-2.C (internal compiler error)+} {+FAIL:+} libgomp.c++/pr69555-2.C (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c++/pr69555-2.C [-execution test-]{+compilation failed to produce executable+} And, 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): PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-2.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-2.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-2.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-2.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-2.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-4.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-4.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-4.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-4.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-4.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-5.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-5.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-5.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-5.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/abort-5.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_on_device-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_on_device-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_on_device-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_on_device-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_on_device-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-kernels.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-clauses-parallel.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-firstprivate-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-firstprivate-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-firstprivate-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-firstprivate-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-firstprivate-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/lib-32.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/lib-32.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/lib-32.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/lib-32.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/lib-32.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant. PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-type-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 (test for excess errors) [n/a]: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-type-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O0 execution test FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-type-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (internal compiler error) FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-type-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 (test for excess errors) UNRESOLVED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-type-1.c -DACC_DEVICE_TYPE_gcn=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O2 compilation failed to produce executable Same for 'libgomp.oacc-c++' variant.