1/* { dg-do compile } */
2
3extern void* malloc(__SIZE_TYPE__) __attribute__((malloc));
4
5typedef struct {
6  char pad;
7  int arr[0];
8} __attribute__((packed)) str;
9
10str *
11foo (void)
12{
13  str *s = malloc (sizeof (str) + sizeof (int));
14  s->arr[0] = 0x12345678;
15  return s;
16}
17