| 1 |
// { dg-do assemble } |
| 2 |
// 981203 bkoz |
| 3 |
// g++/16567 |
| 4 |
|
| 5 |
typedef bool Bool; |
| 6 |
typedef unsigned char Uint8; |
| 7 |
typedef unsigned short Uint16; |
| 8 |
typedef unsigned int Uint32; |
| 9 |
|
| 10 |
enum e_ms { third = 3, fourth = 4 }; |
| 11 |
|
| 12 |
struct bitmask { |
| 13 |
Uint8* anon1; |
| 14 |
Uint32 anon2; |
| 15 |
Uint8 anon3; |
| 16 |
Uint8 here: 2; |
| 17 |
Uint8 anon4: 2; |
| 18 |
Uint8 anon5: 4; |
| 19 |
}; |
| 20 |
|
| 21 |
struct control { |
| 22 |
Uint8 foo_1(); |
| 23 |
}; |
| 24 |
|
| 25 |
inline Uint8 foo_2(bitmask* p) { |
| 26 |
return p->here; |
| 27 |
} |
| 28 |
|
| 29 |
inline Uint8 control::foo_1() { |
| 30 |
return foo_2((bitmask*) this); |
| 31 |
} |
| 32 |
|
| 33 |
void foo(void) { |
| 34 |
control obj; |
| 35 |
control *fp = &obj; |
| 36 |
e_ms result; |
| 37 |
|
| 38 |
result = (e_ms) fp->foo_1; // { dg-error "" } // ERROR - |
| 39 |
} |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|