modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/pr59134.c (about) 1 /* { dg-do compile } */ 2 3 extern void* malloc(__SIZE_TYPE__) __attribute__((malloc)); 4 5 typedef struct { 6 char pad; 7 int arr[0]; 8 } __attribute__((packed)) str; 9 10 str * 11 foo (void) 12 { 13 str *s = malloc (sizeof (str) + sizeof (int)); 14 s->arr[0] = 0x12345678; 15 return s; 16 }