------- Comment #2 from iains at gcc dot gnu dot org 2010-04-06 23:39 ------- according to PP50 of http://developer.apple.com/Mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/100-32-bit_PowerPC_Function_Calling_Conventions/32bitPowerPC.html#//apple_ref/doc/uid/TP40002438-SW20 it's doing the Right Thing. Structs <=8 bytes should be returned in EAX:EDX.
Conversely, the PPC ABI calls for structs to be returned into an area pointed to by GPR3. So, it seems that what we need to do is to make the struct > 8 bytes and then the same test should apply to PPC and i686. We should not be running this for m64 code (I had already included the /* { dg-require-effective-target ilp32 } */ as part of the remaining patches for PR35165 ... ) try this: Index: gcc/testsuite/objc.dg/stret-2.m =================================================================== --- gcc/testsuite/objc.dg/stret-2.m (revision 158016) +++ gcc/testsuite/objc.dg/stret-2.m (working copy) @@ -3,13 +3,15 @@ points). */ /* Contributed by Ziemowit Laski <zla...@apple.com>. */ /* { dg-do compile { target *-*-darwin* } } */ +/* { dg-require-effective-target ilp32 } */ /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ #include "../objc-obj-c++-shared/Object1.h" struct astruct { float a, b; -} glob = { 1.0, 2.0 }; + char makeMeBiggerThan8Bytes; +} glob = { 1.0, 2.0, 'P' }; struct bstruct { float a, b, c, d, e, f; -- iains at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iains at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25766