aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-11-22 00:21:13 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-11-22 00:21:13 +0000
commit12eb9f939a967d5a34c32749705ab5cdfa030742 (patch)
tree20ebc5c2f5c91c1b998a25e57927cef63691ea1c /gcc/testsuite
parent3258e9961c0c10b625cf1bcaf7dec24a5c722f45 (diff)
downloadgcc-12eb9f939a967d5a34c32749705ab5cdfa030742.zip
gcc-12eb9f939a967d5a34c32749705ab5cdfa030742.tar.gz
gcc-12eb9f939a967d5a34c32749705ab5cdfa030742.tar.bz2
re PR c++/3637 (Internal compiler error in finish_member_declaration)
PR c++/3637 * pt.c (lookup_template_class): Ensure that all specializations are registered on the list corresponding to the most general template. From-SVN: r47252
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
new file mode 100644
index 0000000..14db8ae
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp100.C
@@ -0,0 +1,40 @@
+// Build don't link:
+// Origin: philippeb@videotron.ca
+// Special g++ Options:
+
+#include <iostream>
+
+using namespace std;
+
+template <class _T> struct traits
+{
+ typedef long next;
+};
+
+
+template <class _T>
+struct c1
+{
+ template <class _U>
+ struct c2
+ {
+ c2()
+ {
+ cout << __PRETTY_FUNCTION__ << endl;
+ }
+ };
+};
+
+
+template <class _T>
+void foo()
+{
+ cout << __PRETTY_FUNCTION__ << endl;
+ c1<typename traits<_T>::next>::c2<void>();
+}
+
+
+int main()
+{
+ foo<int>();
+}