1 // Contributed by Dodji Seketeli <dseketel@redhat.com>
2 // Origin: PR c++/36407
3 // { dg-do compile }
4 
5 struct A
6 {
7   A (const A&);
8 };
9 
10 struct B
11 {
12   operator A&();
13 };
14 
15 void
foo(const B & b)16 foo (const B& b)
17 {
18   const A a = b; // { dg-error "conversion from 'const B' to non-scalar type 'const A' requested" }
19 }
20 
21