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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20120105-1.c] - Rev 695

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

struct __attribute__((packed)) S
{
  int a, b, c;
};
 
static int __attribute__ ((noinline,noclone))
extract(const char *p)
{
  struct S s;
  __builtin_memcpy (&s, p, sizeof(struct S));
  return s.a;
}
 
volatile int i;
 
int main (void)
{
  char p[sizeof(struct S) + 1];
 
  __builtin_memset (p, 0, sizeof(struct S) + 1);
  i = extract (p + 1);
 
  return 0;
}
 

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.