https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110869
--- Comment #12 from Stefan Schulze Frielinghaus <stefansf at linux dot ibm.com> --- I have done a test with a cross-compiler and it looks to me as if we need -O2 instead of -O1 on Sparc in order to trigger the optimization. Can you give the attached patch a try? Sorry for all the hassle.