summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.bugs/900404_03.C27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
new file mode 100755
index 0000000..98a33d7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
@@ -0,0 +1,27 @@
+// g++ 1.37.1 bug 900404_03
+
+// g++ fails to be able to properly flag errors for even simple cases of
+// ambiguous overload resolution (such as the one shown below).
+
+// Cfront 2.0 passes this test.
+
+// keywords: overloading, ambiguity, resolution
+
+void function0 (int i, char c)
+{ // ERROR -
+ i = c;
+}
+
+void function0 (char c, int i)
+{ // ERROR -
+ i = c;
+}
+
+char c;
+
+void test ()
+{
+ function0 (c,c); // ERROR - missed
+}
+
+int main () { return 0; }