1 /* Test for handling of struct-returning methods
2 for the Mac OS X ("NeXT") runtime (which uses specialized entry
4 /* Contributed by Ziemowit Laski <zlaski@apple.com>. */
5 /* { dg-do compile { target *-*-darwin* } } */
6 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
7 /* { dg-require-effective-target ilp32 } */
9 #include "../objc-obj-c++-shared/TestsuiteObject.h"
14 } glob = { 1.0, 2.0, 'a' };
17 float a, b, c, d, e, f;
18 } globb = { 1, 2, 3, 4, 5, 6 };
20 @interface foo : TestsuiteObject
21 - (struct astruct) stret;
22 - (struct bstruct) stretb;
25 @implementation foo : TestsuiteObject
26 - (struct astruct) stret { return glob; }
27 - (struct bstruct) stretb { return globb; }
31 - (struct astruct) stret;
32 - (struct bstruct) stretb;
36 - (struct astruct) stret { return [super stret]; }
37 - (struct bstruct) stretb { return [super stretb]; }
40 struct astruct afunc(foo *foo_obj) {
41 return [foo_obj stret];
44 /* { dg-final { scan-assembler "objc_msgSend_stret" } } */
45 /* { dg-final { scan-assembler "objc_msgSendSuper_stret" } } */
47 /* { dg-final { scan-assembler-not "objc_msgSend\[^_S\]" } } */
48 /* { dg-final { scan-assembler-not "objc_msgSendSuper\[^_\]" } } */