https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93808
Bug ID: 93808 Summary: [9 Regression] [SH] Ruby crashes with 'Illegal Instruction' when compiled with gcc-9 Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glaubitz at physik dot fu-berlin.de CC: gcc-bugzilla at mkarcher dot dialup.fu-berlin.de, jrtc27 at jrtc27 dot com, kkojima at gcc dot gnu.org, olegendo at gcc dot gnu.org Target Milestone: --- Target: sh*-*-* When compiling the ruby2.5 package on Debian/sh4 with gcc-9 instead of gcc-8, the Ruby interpretor crashes with 'Illegal Instruction'. root@tirpitz:..ruby2.5-ixXW4Q/ruby2.5-2.5.5> ./miniruby Illegal instruction root@tirpitz:..ruby2.5-ixXW4Q/ruby2.5-2.5.5> Printing the assembly with GDB shows that the IP seems to be pointing at data instead of code(?): (gdb) x/5i $pc => 0x5380c0 <coderange_scan+720>: .word 0x0000 0x5380c2 <coderange_scan+722>: .word 0x0010 0x5380c4 <coderange_scan+724>: mov r14,r2 0x5380c6 <coderange_scan+726>: bra 0x538094 <coderange_scan+676> 0x5380c8 <coderange_scan+728>: add #-16,r2 (gdb) I have not tested gcc-10 yet. Will do that now.