summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash54.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash54.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash54.C29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash54.C b/gcc/testsuite/g++.old-deja/g++.pt/crash54.C
new file mode 100644
index 000000000..72f92d128
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash54.C
@@ -0,0 +1,29 @@
+// { dg-do assemble }
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+template <class T>
+int g (T);
+
+int j = g (3);
+
+template <class T>
+inline T f (T)
+{
+ return 2;
+}
+
+template <class T>
+struct S
+{
+ static const int i;
+};
+
+template <class T>
+const int S<T>::i = f (3);
+
+template <class T>
+int g (T)
+{
+ return S<double>::i;
+}
+