Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / overload / builtin1.C
blobfdd208135c7ca8e476a0b75653cb976dc410b506
1 // Test that we don't discard builtin candidates inappropriately.
3 struct B { };
5 struct A {
6   operator int ();
7   operator B ();
8 };
10 void operator+ (B, B);          // { dg-message "operator" "operator" }
12 int main ()
14   A a;
15   a + a;                        // { dg-error "ambiguous" "ambiguous" }
16   // { dg-message "operator" "match candidate text" { target *-*-* } 15 }
17   // { dg-message "candidates" "candidates" { target *-*-* } 15 }