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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [zero-struct-1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
struct g{};
2
char y[3];
3
char *f = &y[0];
4
char *ff = &y[0];
5
void h(void)
6
{
7
  struct g t;
8
  *((struct g*)(f++)) = *((struct g*)(ff++));
9
  *((struct g*)(f++)) = (struct g){};
10
  t = *((struct g*)(ff++));
11
}
12
 
13
void abort (void);
14
 
15
int main(void)
16
{
17
  h();
18
  if (f != &y[2])
19
    abort();
20
  if (ff != &y[2])
21
    abort();
22
  return 0;
23
}

powered by: WebSVN 2.1.0

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