aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/aggregate-ret3.c
blob: e3c5b0943938e255ee97010507ffd31066419bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Check that, with keep_aggregate_return_pointer attribute,  callee does
   not pop the stack for the implicit pointer arg when returning a large
   structure in memory.  */
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */

struct foo {
  int a;
  int b;
  int c;
  int d;
};

__attribute__ ((ms_abi))
struct foo
bar (void)
{
  struct foo retval;
  retval.a = 1;
  retval.b = 2;
  retval.c = 3;
  retval.d = 4;
  return retval;
}

/* { dg-final { scan-assembler-not "ret\[ \t\]\\\$4" } } */