https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94279
Bug ID: 94279 Summary: [amdgcn] internal compiler error: RTL check: expected code 'const_int', have 'reg' in rtx_to_poly_int64, at rtl.h:2379 Product: gcc Version: unknown Status: UNCONFIRMED Keywords: 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, jakub 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 (with '--enable-checking=yes,extra,rtl'), I see the following regression: [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/for-5.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/for-5.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/for-5.c [-execution test-]{+compilation failed to produce executable+} during RTL pass: split2 [...]/source-gcc/libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/for-2.h:69:9: internal compiler error: RTL check: expected code 'const_int', have 'reg' in rtx_to_poly_int64, at rtl.h:2379 0x54e115 ??? [...]/source-gcc/gcc/rtl.c:881 0xb0a5c4 ??? [...]/source-gcc/gcc/rtl.h:2379 0xabf9ad ??? [...]/source-gcc/gcc/recog.c:2974 0xabfb48 ??? [...]/source-gcc/gcc/recog.c:4026 [...] mkoffload: fatal error: [...]/build-gcc/./gcc/x86_64-pc-linux-gnu-accel-amdgcn-amdhsa-gcc returned 1 exit status compilation terminated. [...] Same for 'libgomp.c++' variant. Supposedly same problem for: [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/pr66199-2.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/pr66199-2.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/pr66199-2.c [-execution test-]{+compilation failed to produce executable+} Same for 'libgomp.c++' variant. [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/pr66199-5.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/pr66199-5.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/pr66199-5.c [-execution test-]{+compilation failed to produce executable+} Same for 'libgomp.c++' variant. [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/pr66199-7.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/pr66199-7.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/pr66199-7.c [-execution test-]{+compilation failed to produce executable+} Same for 'libgomp.c++' variant. [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/pr66199-8.c (internal compiler error)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/pr66199-8.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/pr66199-8.c [-execution test-]{+compilation failed to produce executable+} Same for 'libgomp.c++' variant.