| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed pointers-to-members |
| 3 |
template<class T> class TemplA { |
| 4 |
T t; |
| 5 |
}; |
| 6 |
|
| 7 |
|
| 8 |
template<class T> class TemplB { |
| 9 |
public: |
| 10 |
typedef void (T::*TClassMethod)(); |
| 11 |
|
| 12 |
private: |
| 13 |
/* |
| 14 |
This line should not crash cuz of the get_decl_list change in this: |
| 15 |
* cp-tree.c (list_hash_lookup_or_cons): Make sure the type doesn't |
| 16 |
have TYPE_PTRMEMFUNC_P set before we try to build its |
| 17 |
CLASSTYPE_ID_AS_LIST. |
| 18 |
(get_decl_list): Likewise, when trying to read it. |
| 19 |
*/ |
| 20 |
TemplA<TClassMethod> Tmethod; |
| 21 |
}; |
| 22 |
|
| 23 |
|
| 24 |
class C { |
| 25 |
int a; |
| 26 |
}; |
| 27 |
|
| 28 |
int main(int, char**) { |
| 29 |
|
| 30 |
TemplB<C> test; |
| 31 |
} |
| 32 |
|