summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C
new file mode 100644
index 000000000..2f9dec9ae
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp19.C
@@ -0,0 +1,25 @@
+// { dg-do link }
+// GROUPS passed templates membertemplates
+extern "C" int printf(const char*, ...);
+
+struct S {
+ template <class T>
+ operator T();
+};
+
+template <class T>
+S::operator T()
+{
+ printf("Hello, world.\n");
+ return T();
+}
+
+
+template S::operator int();
+
+int main()
+{
+ S s;
+
+ int i = s.operator int();
+}