1 // { dg-do assemble  }
2 // GROUPS passed arg-matching
3 // From: gustavo@cpqd.br (Gustavo Chaves)
4 // Date:     Wed, 25 May 94 09:38:00 EST
5 // Subject:  problem with user defined conversions in initialization
6 // Message-ID: <9405251238.AA19815@moon.cpqd.br>
7 
8 struct String { String(const char*); };
9 
10 struct Ack { Ack(String); };
11 
12 struct S { void method(Ack); };	// { dg-message "S::method|no known conversion" } referenced below
13 
14 void function(Ack);
15 
16 int
foo(S * o)17 foo(S *o)
18 { // Neither call has a usable constructor for conversions of char[5] to Ack.
19   function("adsf");// { dg-error "could not convert" }
20   o->method("adsf");// { dg-error "cannot convert" }
21   return 0;
22 }
23