Re: returning struct or union with just double on Win32/x86

2018-12-04 Thread Jonathan Wakely
On Tue, 4 Dec 2018 at 10:19, Jay K wrote: > Seems like a bug? Then it should be reported to Bugzilla, not this mailing list. See https://gcc.gnu.org/bugs/

returning struct or union with just double on Win32/x86

2018-12-04 Thread Jay K
typedef struct { double d; } Struct; Struct f1 () { Struct res = {3.0}; return res; } typedef union { double d; } Union; Union f2 () { Union res = {3.0}; return res; } x86 mingw 7.3.0 The first returns in ST0, the  second in edx:eax. Msvc returns first in edx:eax. Seems like a bug?