https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117260
Bug ID: 117260 Summary: [15 Regression] "phiopt: do factor_out_conditional_operation for all phis [PR112418]" vs. GCN Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: openacc, 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, pinskia at gcc dot gnu.org Target Milestone: --- Target: GCN With commit r15-4503-g8d6d6d537fdc754a429b08091422c307188f3c82 "phiopt: do factor_out_conditional_operation for all phis [PR112418]", we're getting a regression in GCN offloading testing (but not for nvptx offloading): [-PASS:-]{+FAIL: libgomp.oacc-fortran/privatized-ref-1.f95 -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (internal compiler error: in execute_todo, at passes.cc:2150)+} {+FAIL:+} libgomp.oacc-fortran/privatized-ref-1.f95 -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.oacc-fortran/privatized-ref-1.f95 -DACC_DEVICE_TYPE_radeon=1 -DACC_MEM_SHARED=0 -foffload=amdgcn-amdhsa -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions [-execution test-]{+compilation failed to produce executable+} (Other torture-testing optimization levels not affected.) during GIMPLE pass: phiopt [...]/source-gcc/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: In function 'workers.2._omp_fn.0': [...]/source-gcc/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-1.f95:98:61: internal compiler error: in execute_todo, at passes.cc:2150 0x2094b15 internal_error(char const*, ...) [...]/source-gcc/gcc/diagnostic-global-context.cc:517 0xa6017e fancy_abort(char const*, int, char const*) [...]/source-gcc/gcc/diagnostic.cc:1551 0x7fd1dd execute_todo [...]/source-gcc/gcc/passes.cc:2150 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. gcn mkoffload: fatal error: [...]/install/offload-amdgcn-amdhsa/bin//x86_64-pc-linux-gnu-accel-amdgcn-amdhsa-gcc returned 1 exit status compilation terminated. lto-wrapper: fatal error: [...]/install/offload-amdgcn-amdhsa/libexec/gcc/x86_64-pc-linux-gnu/15.0.0//accel/amdgcn-amdhsa/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status compiler exited with status 1 That's during 'phiopt4' in 'gcc/passes.cc': [...] 2144 static void 2145 execute_todo (unsigned int flags) 2146 { 2147 if (flag_checking 2148 && cfun 2149 && need_ssa_update_p (cfun)) 2150 gcc_assert (flags & TODO_update_ssa_any); [...] It similarly reproduces in a pure '--target=amdgcn-amdhsa' configuration (..., which likely is easier for experimenting). (But beware: for GCN target, compiling that test case has to be expected to run later, 'during RTL pass: final', into 'libgomp.oacc-fortran/privatized-ref-1.f95:63:14: internal compiler error: Segmentation fault', so don't let that confuse you.) Happy to supply any kind of artifacts that may be helpful.