summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/rfg4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/rfg4.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C b/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C
new file mode 100644
index 000000000..fbc3841dd
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C
@@ -0,0 +1,13 @@
+// { dg-do assemble }
+// { dg-options "-ansi -pedantic-errors -w" }
+// Bug: f1 and f2 are treated as overloaded when they aren't.
+
+int i;
+void f1(double) { }
+void f2(double) { }
+
+void
+test ()
+{
+ i ? f1 : f2; // { dg-bogus "" } improper overloading
+}