111
|
1 // { dg-do assemble }
|
|
2 // prms-id: 3538
|
|
3
|
|
4 // This tests for an ambiguous conversion of the this pointer (going
|
|
5 // down to DECL_CONTEXT of a FUNCTION_DECL.
|
|
6
|
|
7 class ccObjectInfo
|
|
8 {
|
|
9 public:
|
|
10 virtual const ccObjectInfo& repInvariant (int);
|
|
11 };
|
|
12
|
|
13 template<class T>
|
|
14 class ccHandle : public ccObjectInfo
|
|
15 {
|
|
16 protected:
|
|
17 T* p;
|
|
18 public:
|
|
19 virtual const ccObjectInfo& repInvariant (int);
|
|
20 };
|
|
21
|
|
22 template <class T>
|
|
23 const ccObjectInfo& ccHandle<T>::repInvariant (int)
|
|
24 { return p->repInvariant(1); }
|
|
25
|
|
26 class ccHandleBase : public ccObjectInfo
|
|
27 {};
|
|
28
|
|
29 class cc_CircleHdl : public virtual ccHandleBase, public ccObjectInfo // { dg-warning "" }
|
|
30 {
|
|
31 public:
|
|
32 virtual const ccObjectInfo& repInvariant (int);
|
|
33 };
|
|
34
|
|
35 class ccCircleHdl : public ccHandle <cc_CircleHdl> {};
|