2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900404_03.C
blob6f7ea3f4581c6282e86889f78f70346a1e1382de
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" }
28 int main () { return 0; }