aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template28.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/template28.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/template28.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template28.C b/gcc/testsuite/g++.old-deja/g++.brendan/template28.C
new file mode 100644
index 00000000000..3ae4caf4638
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/template28.C
@@ -0,0 +1,13 @@
+// Build don't link:
+// GROUPS passed templates
+class X {
+ const char *fptr;
+public:
+ X(const char *ptr) { fptr = ptr; }
+ operator const char*() { return fptr; }
+};
+
+main(){
+ X x1("1234");
+ X x2(x1+1);
+}