https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98784
Bug ID: 98784 Summary: [gcc 8.4/9.3/10] sparcv8 regression Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: romain.naour at gmail dot com Target Milestone: --- Hello, When building a rootfs for sparcv8 using the Buildroot defconfig qemu_sparc_ss10_defconfig, the system produce some illegal instruction messages. gcc 8.3, 9.2 are the latest working gcc version. git bisect between gcc 8.3 and 8.4 allowed to identify the commit that introduced the regression: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0a83f1a441d7aaadecb368c237b6ee70bd7b91d6 The commit has been introduced to fix the following bub: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92095 It has been backported to gcc 8.4 and 9.3. Reverting this patch allowed to produce a working rootfs. This issue can be reproduced using the following steps: $ git://git.busybox.net/buildroot $ cd buildroot/ $ git checkout 2020.11.1 $ make qemu_sparc_ss10_defconfig $ make $ ./output/images/start-qemu.sh The kernel boot correctly but the login program (busybox) crash while trying to login: [...] Starting syslogd: Welcome to Buildroot buildroot login: root Welcome to Buildroot buildroot login: root For now, It's just a basic test that allow to reproduce the issue. We can use a shell instead of init program but even with a simple command such 'ls' the system crash: sh-5.0# ls CPU: 0 PID: 1 Comm: sh Not tainted 4.19.16 #1 [f0022fbc : do_exit+0x948/0x968 ] [f000afec : do_signal+0x5f8/0x79c ] [f000b4b4 : do_notify_resume+0x48/0x58 ] [f0008c88 : signal_p+0x14/0x24 ] [0004b874 : 0x4b874 ] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 Best regards, Romain