https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120070
--- Comment #10 from Karl Mehltretter <kmehltretter at googlemail dot com> --- Comment on attachment 65191 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65191 Reduced testcase 3 (still ICEs on GCC 17 trunk) Here is a third reduced testcase (attached as pr120070c.c, 34 lines), found while building the Linux kernel for m68k with CONFIG_FRAME_POINTER and CONFIG_KCOV. It was reduced by hand from drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c. $ m68k-linux-gnu-gcc -O2 -fno-omit-frame-pointer -ffixed-a2 \ -fsanitize-coverage=trace-pc -S pr120070c.c during RTL pass: reload pr120070c.c: In function 'scaling_function': pr120070c.c:34:1: internal compiler error: Segmentation fault This appears to be the same underlying bug. This testcase still reproduces on current trunk (17.0.0 20260730, r17 commit 32657f29f). Attachments 61275 and 61518 now compile cleanly there, so the bug is still present even though the existing testcases no longer expose it. 13.4.0 and 14.3.0 compile this testcase. 15.1.0, 15.2.0, 16.1.0 and trunk ICE. -mlra and -fno-ext-dce both avoid the ICE. All three extra flags are required. removing any one, or using -O1 or -Os, also avoids it. These are the actual kernel flags for CONFIG_FRAME_POINTER + CONFIG_KCOV on m68k (-ffixed-a2 is unconditional).
