https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113193
Bug ID: 113193 Summary: [SH] ICE in gen_reg_rtx, at emit-rtl.cc:1177 with -mfcsa -funsafe-math-operations Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zack+gcc at buhman dot org Target Milestone: --- Target: sh*-*-* Created attachment 56971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56971&action=edit -freport-bug On the sh*-*-* target it is possible to generate an ICE at all optimization levels above -O0 with -mfcsa -funsafe-math-optimizations , for certain sequences of valid code that contain __builtin_cosf and/or __builtin_sinf. The attached -freport-bug output is one (500-line) example that only appears to trigger this ICE at -O3, but other (perhaps more convoluted) examples are possible. This affects all GCC versions between at least 9.5.0 and the current 14.0 master, inclusive. I did not test GCC versions older than 9.5.0.