https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
--- Comment #185 from Kazumoto Kojima <kkojima at gcc dot gnu.org> --- Unfortunately, nothing new showed up in running gcc/g++ testsuite for sh-elf+sim with -mlra. OTOH, the segfault can be reproduced on qemu with the patched stage2 compiler built with -g -O2 -mlra -m4. gdb says that it occurs in the function call wide-int.cc:top_bit_of (a=0x407ff620, len=65792, prec=128) at the statement unsigned HOST_WIDE_INT val = a[len - 1]; which ends up "mov @r2, r3" as in c#173. Looks len=65792 is a wrong value. It seems that at least gcc/pointer-query.cc is miscompiled by the patched stage2 compiler built with -O2 -mlra -m4. Compiling pointer-query.cc with -O0 -mlra instead of -O2 -mlra, __muldi3 is compiled successfully. This compiler segfaults for another files of libgcc, i.e. there are another gcc objects miscompiled with -O2 -mlra. It is not at all clear what is causing the wrong value or code, though. We are still at the starting point of the bugfix.