2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / aggregate-ret1.c
blob6d46dc5ef733a1152cca0ef7d8fe657deaba7110
1 /* target/36834 */
2 /* Check that, with keep_aggregate_return_pointer attribute, callee does
3 not pop the stack for the implicit pointer arg when returning a large
4 structure in memory. */
5 /* { dg-do compile } */
6 /* { dg-require-effective-target ia32 } */
8 struct foo {
9 int a;
10 int b;
11 int c;
12 int d;
15 __attribute__ ((callee_pop_aggregate_return(0)))
16 struct foo
17 bar (void)
19 struct foo retval;
20 retval.a = 1;
21 retval.b = 2;
22 retval.c = 3;
23 retval.d = 4;
24 return retval;
27 /* { dg-final { scan-assembler-not "ret\[ \t\]\\\$4" } } */