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] - Rev 704

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

/* target/36834 */
/* Check that, with dont_keep_aggregate_return_pointer attribute,  callee
   pops 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__ ((callee_pop_aggregate_return(1)))
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 "ret\[ \t\]\\\$4" } } */
 
 
 

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

powered by: WebSVN 2.1.0

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