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