| 1 |
// Copyright (C) 2005 Free Software Foundation, Inc. |
| 2 |
// Contributed by Nathan Sidwell 14 Jun 2005 <[email protected]> |
| 3 |
|
| 4 |
// PR 20678: ICE on error message |
| 5 |
// Origin: Andrew Pinski [email protected] |
| 6 |
|
| 7 |
// NOTE: This test assumes packed structure layout differs from unpacked |
| 8 |
// structure layout. |
| 9 |
|
| 10 |
struct a |
| 11 |
{ |
| 12 |
int m; |
| 13 |
a(const a&); |
| 14 |
}; |
| 15 |
struct b // { dg-error "cannot bind packed field" "" { target { ! default_packed } } } |
| 16 |
{ |
| 17 |
char c; |
| 18 |
a aa __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } } |
| 19 |
}; |
| 20 |
struct c |
| 21 |
{ |
| 22 |
b bb; |
| 23 |
c(const b& __a): bb(__a) {} // { dg-message "synthesized" "" { target { ! default_packed } } } |
| 24 |
}; |