summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/ctor6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/ctor6.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/ctor6.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/ctor6.C b/gcc/testsuite/g++.dg/parse/ctor6.C
new file mode 100644
index 000000000..0b14ecc6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ctor6.C
@@ -0,0 +1,11 @@
+// { dg-do compile }
+
+// There is no ambiguity in finding a right constructor for X b(a).
+
+class X {
+public:
+ X(const X&, int = 3);
+};
+
+extern X a;
+X b(a);