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