| 1 |
/* PR c/63543 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
|
| 4 |
struct S; |
| 5 |
union U; |
| 6 |
|
| 7 |
int |
| 8 |
f1 (struct S *s) |
| 9 |
{ |
| 10 |
return s->a /* { dg-error "invalid use of undefined type .struct S." } */ |
| 11 |
+ s->b /* { dg-error "invalid use of undefined type .struct S." } */ |
| 12 |
+ s->c; /* { dg-error "invalid use of undefined type .struct S." } */ |
| 13 |
} |
| 14 |
|
| 15 |
int |
| 16 |
f2 (union U *u) |
| 17 |
{ |
| 18 |
return u->a /* { dg-error "invalid use of undefined type .union U." } */ |
| 19 |
+ u->a /* { dg-error "invalid use of undefined type .union U." } */ |
| 20 |
+ u->a; /* { dg-error "invalid use of undefined type .union U." } */ |
| 21 |
} |