aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/arg11.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/arg11.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/arg11.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg11.C b/gcc/testsuite/g++.old-deja/g++.law/arg11.C
new file mode 100644
index 00000000000..77ea8d84e45
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.law/arg11.C
@@ -0,0 +1,23 @@
+// Build don't link:
+// GROUPS passed arg-matching
+// excess errors test - XFAIL *-*-*
+// From: gustavo@cpqd.br (Gustavo Chaves)
+// Date: Wed, 25 May 94 09:38:00 EST
+// Subject: problem with user defined conversions in initialization
+// Message-ID: <9405251238.AA19815@moon.cpqd.br>
+
+struct String { String(const char*); };
+
+struct Ack { Ack(String); };
+
+struct S { void method(Ack); };
+
+void function(Ack);
+
+int
+foo(S *o)
+{ // Neither call has a usable constructor for conversions of char[5] to Ack.
+ function("adsf");// ERROR -
+ o->method("adsf");// ERROR -
+ return 0;
+}