Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900404_03.C
blob7e2829f7b095558972cb23a43b9dd38c9ab25d38
1 // { dg-do assemble  }
2 // g++ 1.37.1 bug 900404_03
4 // g++ fails to be able to properly flag errors for even simple cases of
5 // ambiguous overload resolution (such as the one shown below).
7 // Cfront 2.0 passes this test.
9 // keywords: overloading, ambiguity, resolution
11 void function0 (int i, char c)  // { dg-message "function0" }
13   i = c;
16 void function0 (char c, int i)  // { dg-message "function0" }
18   i = c;
21 char c;
23 void test ()
25   function0 (c,c);              // { dg-error "ambiguous" }
26   // { dg-message "candidate" "candidate note" { target *-*-* } 25 }
29 int main () { return 0; }