summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20080222-1.c
blob: 6db83ccdf9028a7f10bfce67af6c7632d087407b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern void abort (void);

struct container
{
  unsigned char data[1];
};

unsigned char space[6] = {1, 2, 3, 4, 5, 6};

int
foo (struct container *p)
{
  return p->data[4];
}

int
main ()
{
  if (foo ((struct container *) space) != 5)
    abort ();
  return 0;
}