Merge from trunk
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr59134.c
blob5268805ec81247483fe63d0be4c392c2c288c940
1 /* { dg-do compile } */
3 extern void* malloc(__SIZE_TYPE__) __attribute__((malloc));
5 typedef struct {
6 char pad;
7 int arr[0];
8 } __attribute__((packed)) str;
10 str *
11 foo (void)
13 str *s = malloc (sizeof (str) + sizeof (int));
14 s->arr[0] = 0x12345678;
15 return s;