modernc.org/cc@v1.0.1/v2/testdata/bug/13.c (about) 1 #include <assert.h> 2 3 typedef struct _OVERLAPPED { 4 int Internal; 5 int InternalHigh; 6 union { 7 struct { 8 int Offset; 9 int OffsetHigh; 10 }; 11 void *Pointer; 12 }; 13 unsigned hEvent; 14 } OVERLAPPED; 15 16 OVERLAPPED test; 17 OVERLAPPED test2; 18 19 int main() { 20 OVERLAPPED test3, test4; 21 OVERLAPPED *p = &test2, *q = &test4; 22 test.Offset = 42; 23 p->Offset = 43; 24 test3.Offset = 44; 25 q->Offset = 45; 26 assert(test.Offset == 42); 27 assert(p->Offset == 43); 28 assert(test3.Offset == 44); 29 assert(q->Offset == 45); 30 }