aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2009-11-30 09:58:20 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2009-11-30 10:58:20 +0100
commit3a3173c9d664cdcb9e2f5f6aeb6cb699bbf9392b (patch)
treedc000f12a9330d72c0ff8e57bc50e278b1fdcf94 /gcc/cp
parent92a745f3c4451e13570b1ff7e9d94058d2fa8556 (diff)
downloadgcc-3a3173c9d664cdcb9e2f5f6aeb6cb699bbf9392b.zip
gcc-3a3173c9d664cdcb9e2f5f6aeb6cb699bbf9392b.tar.gz
gcc-3a3173c9d664cdcb9e2f5f6aeb6cb699bbf9392b.tar.bz2
re PR c++/42069 (ICE on class template specialization)
Fix PR c++/42069 gcc/cp/ChangeLog: PR c++/42069 * pt.c (convert_template_argument): Strip typedefs from SCOPE_REFs. gcc/testsuite/ChangeLog: PR c++/42069 * g++.dg/template/typedef23.C: New test. From-SVN: r154768
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 57ce3cd..e035f3d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-30 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/42069
+ * pt.c (convert_template_argument): Strip typedefs from SCOPE_REFs.
+
2009-11-29 Dodji Seketeli <dodji@redhat.com>
PR c++/36408
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index dd86cee..9fd06b3 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5526,6 +5526,13 @@ convert_template_argument (tree parm,
if (TYPE_P (val))
val = strip_typedefs (val);
}
+ else if (TREE_CODE (orig_arg) == SCOPE_REF)
+ {
+ /* Strip typedefs from the SCOPE_REF. */
+ tree type = strip_typedefs (TREE_TYPE (orig_arg));
+ tree scope = strip_typedefs (TREE_OPERAND (orig_arg, 0));
+ val = build2 (SCOPE_REF, type, scope, TREE_OPERAND (orig_arg, 1));
+ }
else
{
tree t = tsubst (TREE_TYPE (parm), args, complain, in_decl);