Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr59134.c

raw
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 }