https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119835
Bug ID: 119835 Summary: GCN, nvptx offloading: ' Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openmp Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org Target Milestone: --- Target: GCN, nvptx I noticed that when building the PR106445 'libgomp.c++/pr106445-1.C' with (default '-O2' and) '-fno-inline' added, we ICE for both GCN, nvptx offloading compilation: during GIMPLE pass: nrv [...]/build-gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h: In member function 'begin': [...]/build-gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:1008:7: internal compiler error: in execute, at tree-nrv.cc:179 That's 'gcc/tree-nrv.cc:pass_nrv::execute': 174 /* In a function with an aggregate return value, the 175 gimplifier has changed all non-empty RETURN_EXPRs to 176 return the RESULT_DECL. */ 177 ret_val = gimple_return_retval (return_stmt); 178 if (ret_val) 179 gcc_assert (ret_val == result); If I manually disable the pass, we're back to good.