OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [aggregate-ret2.c] - Blame information for rev 704

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* 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
 
8
struct foo {
9
  int a;
10
  int b;
11
  int c;
12
  int d;
13
};
14
 
15
__attribute__ ((callee_pop_aggregate_return(1)))
16
struct foo
17
bar (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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.