Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / overload / arg3.C
blob34624cd22e43c82e61f9d3f711f46a6fe8ecf2ac
1 // { dg-do compile }
3 // Copyright (C) 2004 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 30 Nov 2004 <nathan@codesourcery.com>
6 // PR 17431. copy ctor from user conv
7 // Origin: Volker Reichelt <reichelt@gcc.gnu.org>
9 struct A {};
11 struct B : A
13   B(int); // { dg-message "B::B|no known conversion" "" }
14   B(B&);  // { dg-message "note" "" }
17 void foo(B);                    // { dg-error "initializing" }
19 void bar()
21   foo(0); // { dg-error "no matching function" "no matching" }
22   // { dg-message "candidate" "candidate note" { target *-*-* } 21 }