summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/conv1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/conv1.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.pt/conv1.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/conv1.C b/gcc/testsuite/g++.old-deja/g++.pt/conv1.C
new file mode 100755
index 0000000..19e433e
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/conv1.C
@@ -0,0 +1,19 @@
+// Build don't link:
+
+template <class T>
+struct S1 {};
+
+struct S2
+{
+ template <class T>
+ operator S1<T>*();
+};
+
+struct D: public S1<int> {
+};
+
+void f()
+{
+ S2 s;
+ (D*) s; // ERROR - cannot convert
+}