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] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
struct __attribute__((packed)) S
2
{
3
  int a, b, c;
4
};
5
 
6
static int __attribute__ ((noinline,noclone))
7
extract(const char *p)
8
{
9
  struct S s;
10
  __builtin_memcpy (&s, p, sizeof(struct S));
11
  return s.a;
12
}
13
 
14
volatile int i;
15
 
16
int main (void)
17
{
18
  char p[sizeof(struct S) + 1];
19
 
20
  __builtin_memset (p, 0, sizeof(struct S) + 1);
21
  i = extract (p + 1);
22
 
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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