https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90867
Richard Biener changed:
What|Removed |Added
Target||x86_64-*-*, i?86-*-*
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Known to work||5.5.0
Keywords||wrong-code
Last reconfirmed||2019-06-13
Component|c |target
Ever confirmed|0 |1
Summary|Multiplication or typecast |[7/8/9/10 Regression]
|of integer and double |Multiplication or typecast
|always zero when... |of integer and double
||always zero when...
Target Milestone|--- |7.5
Known to fail||6.4.0
--- Comment #2 from Richard Biener ---
Confirmed when compiling with -march=native. It seems to work with
-march=haswell or other specific archs. Also fails with -mavx or even -msse2.
For some reason main() ends up with x87 math and bogus calling conventions.
Also:
> gcc-8 t.c -msse2 -fdump-tree-optimized -mfpmath=sse
t.c:16:1: warning: SSE instruction set disabled, using 387 arithmetics
{
^
may hint at the underlying issue. Worked in GCC 5.