| 1 |
// { dg-do compile } |
| 2 |
|
| 3 |
typedef struct el_t { |
| 4 |
el_t *next; |
| 5 |
int elem[]; |
| 6 |
} EL; |
| 7 |
el_t a, c; |
| 8 |
void *b; |
| 9 |
void *fn1() { |
| 10 |
if (b) |
| 11 |
return a.elem; |
| 12 |
return c.elem; |
| 13 |
} |
| 14 |
typedef struct { |
| 15 |
int x; |
| 16 |
} EV_T; |
| 17 |
EV_T *d; |
| 18 |
void fn2() { |
| 19 |
EV_T *e = (EV_T *)fn1(); |
| 20 |
d[0] = *e; |
| 21 |
} |