https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66358
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #1) > Created attachment 35661 [details] > reduced test case > > FYI, it doesn't fail with -O2 -fpic -mlra. Somehow the reduced test case seems to work OK on sh-elf even without -mlra. sh-elf-gcc -v Using built-in specs. COLLECT_GCC=sh-elf-gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sh-elf/6.0.0/lto-wrapper Target: sh-elf Configured with: ../gcc-trunk/configure --target=sh-elf --prefix=/usr/local --enable-languages=c,c++ --enable-multilib --enable-libssp --disable-nls --disable-werror --enable-lto --with-newlib --with-system-zlib Thread model: single gcc version 6.0.0 20150521 (experimental) (GCC) Maybe I'm missing some option?