summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20011121-1.c
blob: 3e3d03a32ece9c3db41d274d9271516567176ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
struct s
{
  int i[18];
  char f;
  char b[2];
};

struct s s1;

int
main()
{
  struct s s2;
  s2.b[0] = 100;
  __builtin_memcpy(&s2, &s1, ((unsigned int) &((struct s *)0)->b));
  if (s2.b[0] != 100)
    abort();
  exit(0);
}