[Bug target/64243] Passing and returning structures with single member of floating type via SSE registers is wrong on Windows x86-64 ABI

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Dec 30 09:06:33 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64243

--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
This is fixed in gcc-11:

--cut here--
struct TestFloat { float x; };
struct TestDouble { double x; };

struct TestFloat foo (struct TestFloat x) { return x; }
struct TestDouble bar (struct TestDouble x) { return x; }
--cut here--

gcc -O2:

foo:
        movl    %ecx, %eax
        ret

bar:
        movq    %rcx, %rax
        ret


More information about the Gcc-bugs mailing list