| 1 |
// PR c++/83322 - ICE: tree check: expected class ‘type’, have ‘exceptional’ |
| 2 |
// (baselink) in diag_attr_exclusions, at attribs.c:393 |
| 3 |
// { dg-do compile } |
| 4 |
// { dg-options "-Wattributes" } |
| 5 |
|
| 6 |
#define ATTR(list) __attribute__ (list) |
| 7 |
|
| 8 |
// Test case from comment #0. |
| 9 |
struct A0 |
| 10 |
{ |
| 11 |
template <class T> operator T(); |
| 12 |
ATTR ((always_inline)) operator int(); |
| 13 |
}; |
| 14 |
|
| 15 |
// Test case from comment #4. |
| 16 |
struct A1 |
| 17 |
{ |
| 18 |
void foo(); |
| 19 |
}; |
| 20 |
|
| 21 |
struct B |
| 22 |
{ |
| 23 |
bool foo; |
| 24 |
}; |
| 25 |
|
| 26 |
struct C: A1, B |
| 27 |
{ |
| 28 |
ATTR ((warn_unused_result)) int foo (); |
| 29 |
}; |