summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/ref3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ref3.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ref3.C b/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
new file mode 100644
index 000000000..68372b227
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
@@ -0,0 +1,23 @@
+// { dg-do run }
+// { dg-prune-output "mangled name" }
+// Origin: John Wilkinson <jfw@sgi.com>
+
+template <class T, int& Size>
+struct Base {
+ Base() : obj(Size) {}
+ T obj;
+};
+
+int globalInt = 5;
+
+struct A {
+ A(int arg) : ia(arg) {}
+ int ia;
+};
+
+int main()
+{
+ Base<A, globalInt> ob;
+ if (ob.obj.ia != 5)
+ return 1;
+}