Am 22.11.21 um 16:10 schrieb Giulio Paci:
I guess the main reason for this weird behavior is described in (option
-mfpmath):
https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/x86-Options.html#x86-Options
<https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/x86-Options.html#x86-Options>
and in (option -ffloat-store):
https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/Optimize-Options.html#Optimize-Options
<https://gcc.gnu.org/onlinedocs/gcc-10.3.0/gcc/Optimize-Options.html#Optimize-Options>.
Using -ffloat-store option indeed seems to fix the issue.
However I am wondering:
1) is this the proper solution?
2) is it correct that the compiler does not guarantee the above assumptions?
Do you have any suggestion?
Hi,
I am not very knowlegable about floating point semantics in various compiler
optimizations,
so unfortunately I do not have any suggestion. Does upstream have an opinion on
this?
Thanks,
Bastian