summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr82556.c
blob: 409a301af305b9a945060f3d6a43924f228bdaee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fno-strict-aliasing -fwrapv -fexcess-precision=standard" } */
extern int foo();
typedef struct {
  char id;
  unsigned char fork_flags;
  short data_length;
} Header;
int a;
void X() {
  do {
    char* b;
    Header c;
    if (a)
      c.fork_flags |= 1;
    __builtin_memcpy(b, &c, __builtin_offsetof(Header, data_length));
    b += foo();
  } while (1);
}