1/* target/36834 */
2/* Check that, with dont_keep_aggregate_return_pointer attribute,  callee
3   pops 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 } */
7
8struct foo {
9  int a;
10  int b;
11  int c;
12  int d;
13};
14
15__attribute__ ((callee_pop_aggregate_return(1)))
16struct foo
17bar (void)
18{
19  struct foo retval;
20  retval.a = 1;
21  retval.b = 2;
22  retval.c = 3;
23  retval.d = 4;
24  return retval;
25}
26
27/* { dg-final { scan-assembler "ret\[ \t\]\\\$4" } } */
28
29
30