aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mmitchell@usa.net>1998-04-26 12:34:42 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1998-04-26 12:34:42 +0000
commit42da2fd81b78cbd3cf2951b3d35c01d8693977ac (patch)
tree96609b5009a12691c2f23c5aeee64fc56dd28c0d /gcc
parent7101ca0127194e492340f91bd1f0d4bdbeca2d26 (diff)
downloadgcc-42da2fd81b78cbd3cf2951b3d35c01d8693977ac.zip
gcc-42da2fd81b78cbd3cf2951b3d35c01d8693977ac.tar.gz
gcc-42da2fd81b78cbd3cf2951b3d35c01d8693977ac.tar.bz2
pt.c (check_explicit_specialization): Handle overloaded constructors correctly.
* pt.c (check_explicit_specialization): Handle overloaded constructors correctly. From-SVN: r19413
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C10
3 files changed, 18 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eb764e8..323d0e4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * pt.c (check_explicit_specialization): Handle overloaded
+ constructors correctly.
+
Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5284e76..01868c5 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1041,12 +1041,10 @@ check_explicit_specialization (declarator, decl, template_count, flags)
return decl;
}
- fns = TREE_VEC_ELT(CLASSTYPE_METHOD_VEC (ctype),
- is_constructor ? 0 : 1);
+ name = is_constructor ? ctor_identifier : dtor_identifier;
}
- else
- fns = lookup_fnfields (TYPE_BINFO (ctype), name,
- 1);
+
+ fns = lookup_fnfields (TYPE_BINFO (ctype), name, 1);
if (fns == NULL_TREE)
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C
new file mode 100644
index 0000000..62062f7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate3.C
@@ -0,0 +1,10 @@
+// Build don't link:
+
+template <class T>
+struct S
+{
+ S(const T&) {}
+ S(int, long);
+};
+
+template S<double>::S(const double&);