Debian Codegraph @

gcc/testsuite/gcc.target/i386/aggregate-ret4.c

raw
1 /* Check that, with dont_keep_aggregate_return_pointer attribute, callee
2 pops the stack for the implicit pointer arg when returning a large
3 structure in memory. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target ia32 } */
6
7 struct foo {
8 int a;
9 int b;
10 int c;
11 int d;
12 };
13
14 __attribute__ ((sysv_abi))
15 struct foo
16 bar (void)
17 {
18 struct foo retval;
19 retval.a = 1;
20 retval.b = 2;
21 retval.c = 3;
22 retval.d = 4;
23 return retval;
24 }
25
26 /* { dg-final { scan-assembler "ret\[ \t\]\\\$4" } } */
27
28