LTO seems to change the outcome of the division by zero raises SIGFPE test.
Nick Clifton
nickc@redhat.com
Tue Jul 26 13:49:11 GMT 2022
Hi Kao,
> When CFLAGS include a flavor of LTO, for example, "-flto", executing the binary leads to a
> return value of 1, but it exists through the one at end of the program, *not* the signal
> handler. When no LTO is used, executing returns 0.
I am pretty sure that this is a gcc issue, rather than a binutils one. When LTO
is enabled the compiler is invoked twice, and it would be my guess that it is this
second invocation which is changing the behaviour of the final program.
This could be a known issue. I suggest that you check to see which version of gcc
you are using, and if it is not the latest, upgrade. If the problem persists then
please file a bug report with the gcc bugzilla system.
Cheers
Nick
More information about the Binutils
mailing list