summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C
blob: 8be5d6ed3334468173df1d8e88f9171563b3ae5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// { dg-do assemble  }
// GROUPS passed conversions
class GttObject {};
class GctObject: virtual public GttObject {};
class NDAMObject: virtual public GttObject, virtual public GctObject {};
class GctHashObject: virtual public GctObject {};

class GctRef: virtual public GctHashObject
{ public: operator void*() const; };

class NDAMAssemblerObject: virtual public NDAMObject {};
class GctReferenceObject: virtual public GctHashObject {};
class NDAMValue: virtual public NDAMAssemblerObject, public GctReferenceObject {};

class nnyacc;
class NDAMValueRef : virtual public NDAMObject, public GctRef 
{
  NDAMValue *operator->() const;	 
  operator NDAMValue *() const;	 
friend class nnyacc;
};

typedef void* Pix;
class NDAMValueRefSLList
{
public:
  NDAMValueRefSLList();
  NDAMValueRefSLList(const NDAMValueRefSLList& a);
  ~NDAMValueRefSLList();
  NDAMValueRef& operator () (Pix p) const;
};

struct bar
{
  NDAMValueRefSLList *valueList;
};

class nnyacc
{
public:
      static void assign(void*& lval, void*& rval); // { dg-message "nnyacc::assign|no known conversion" }
};

void
foo (bar yylval, bar *yyvsp)
{
  nnyacc::assign(yylval.valueList, yyvsp[0].valueList);// { dg-error "no matching" } 
  // { dg-message "candidate" "candidate note" { target *-*-* } 47 }
}