summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C
new file mode 100644
index 000000000..14c529fca
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate9.C
@@ -0,0 +1,25 @@
+// { dg-do assemble }
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 Nov 2000 <nathan@codesourcery.com>
+
+// Bug 789. We ICE'd trying to instantiate B<float> because there was no
+// existing partial specialization of C in A<float>.
+
+template <typename T>
+struct A {
+ template <typename D1>
+ struct C { };
+};
+
+template <typename T1>
+struct B {
+ typename A<T1>::template C<int> s1;
+};
+
+int main()
+{
+ B<float> b;
+
+ return 0;
+}