[Bug target/71493] [6/7 regression] accidental ABI change for structure return on PowerPC
segher at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 17 19:56:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71493
--- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Is there a testcase? I cannot reproduce the problem. powerpc-elf-gcc
on both trunk and gcc-6-branch returns a struct in registers if it needs
at most two registers for that, in float regs if it needs just one, exactly
like GCC 5 does.
===
struct sd { double a; };
struct sf { float a; };
struct sdd { double a; double b; };
struct sff { float a; float b; };
struct sd fd(void) { return (struct sd){ .a = 42 }; }
struct sf ff(void) { return (struct sf){ .a = 42 }; }
struct sdd fdd(void) { return (struct sdd){ .a = 42, .b = 31 }; }
struct sff fff(void) { return (struct sff){ .a = 42, .b = 31 }; }
===
fd,ff return in FPR1. fdd does an indirect return (stores values in
the struct pointed to by its GPR3). fff returns in GPR3,GPR4.
More information about the Gcc-bugs
mailing list