https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122925
--- Comment #4 from Krister Walfridsson <kristerw at gcc dot gnu.org> --- I'm running on GCC trunk configured for sh-elf, and testing with sh-elf-run from GDB 16.3. -O0 generates correct code. All other optimization levels reproduce the bug for me. I get the same issue with smtgcc, so I think it is a real issue. But Newlib's abort() on sh-elf-run is annoying as it just performs exit(1), so I have also verified that I get the incorrect result when prinf:ing the result of foo.
