summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/spec37.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/spec37.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec37.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec37.C b/gcc/testsuite/g++.old-deja/g++.pt/spec37.C
new file mode 100644
index 000000000..1fd9ef929
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec37.C
@@ -0,0 +1,25 @@
+// { dg-do assemble }
+//
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 21 Jan 2001 <nathan@codesourcery.com>
+
+// Bug 1728. We started sorting things when there were 7 fields. Our
+// template_count algorithm was rather fragile ...
+
+template <int dim> struct X
+{
+ struct Y
+ {
+ int x1;
+ int x2;
+ int x3;
+ int x4;
+ int x5;
+ int x6;
+ int x7;
+
+ void Foo ();
+ };
+};
+
+template <> void X<1>::Y::Foo () {}