From: Mark Mitchell Date: Mon, 19 Jan 2004 00:47:59 +0000 (+0000) Subject: re PR c++/13635 (ICE in register_specialization for specific order of template specia... X-Git-Tag: releases/gcc-4.0.0~10945 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b830b74cd4e447647161c1fe0f089901aa77d747;p=thirdparty%2Fgcc.git re PR c++/13635 (ICE in register_specialization for specific order of template specialization) PR c++/13635 * pt.c (tsubst): Use finish_typeof. PR c++/13635 * g++.dg/ext/typeof7.C: New test. From-SVN: r76131 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index acc0bd47647e..840b19f17699 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-01-18 Mark Mitchell + + PR c++/13635 + * pt.c (tsubst): Use finish_typeof. + 2004-01-16 Jason Merrill PR c++/11725 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 97a7d7852f93..78c2b1348ab5 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7106,13 +7106,13 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) case TYPEOF_TYPE: { - tree e1 = tsubst_expr (TYPE_FIELDS (t), args, complain, in_decl); - if (e1 == error_mark_node) - return error_mark_node; + tree type; - return cp_build_qualified_type_real (TREE_TYPE (e1), + type = finish_typeof (tsubst_expr (TYPE_FIELDS (t), args, complain, + in_decl)); + return cp_build_qualified_type_real (type, cp_type_quals (t) - | cp_type_quals (TREE_TYPE (e1)), + | cp_type_quals (type), complain); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9b08ce913bb4..c9444da800dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-18 Mark Mitchell + + PR c++/13635 + * g++.dg/ext/typeof7.C: New test. + 2004-01-18 David Edelsohn * gcc.dg/array-quals-1.c: xfail on powerpc*-*-aix*. diff --git a/gcc/testsuite/g++.dg/ext/typeof7.C b/gcc/testsuite/g++.dg/ext/typeof7.C new file mode 100644 index 000000000000..6c426931bbbc --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/typeof7.C @@ -0,0 +1,6 @@ +// PR c++/13635 +// { dg-options "" } + +template class X {template typeof(Y::y) foo();}; +X<0> x; +