From c4471bb2aa3963391adb6bca7dab67a0452b903c Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Sun, 17 Jan 2010 10:38:10 +0000 Subject: Revert PR c++/42697 The commit is reverted as this was not a regression. It's rather going to be stagged for 4.6. From-SVN: r155976 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 3 +-- gcc/testsuite/ChangeLog | 6 +++++- gcc/testsuite/g++.dg/template/crash94.C | 28 ---------------------------- 4 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 gcc/testsuite/g++.dg/template/crash94.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dc563cc..ffa7b86 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,11 @@ 2010-01-17 Dodji Seketeli PR c++/42697 + *pt.c (tsubst_decl): Revert commit for PR c++/42697. + +2010-01-17 Dodji Seketeli + + PR c++/42697 *pt.c (tsubst_decl): Get the arguments of a specialization from the specialization template, not from the most general template. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 0acb860..f27b931 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8825,8 +8825,7 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) specialize R. */ gen_tmpl = most_general_template (DECL_TI_TEMPLATE (t)); argvec = tsubst_template_args (DECL_TI_ARGS - (DECL_TEMPLATE_RESULT - (DECL_TI_TEMPLATE (t))), + (DECL_TEMPLATE_RESULT (gen_tmpl)), args, complain, in_decl); /* Check to see if we already have this specialization. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8211355..5272d3d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,11 @@ 2010-01-17 Dodji Seketeli PR c++/42697 - * g++.dg/template/crash94.C: New test. + * g++.dg/template/crash94.C: Reverted. + +2010-01-17 Dodji Seketeli + + PR c++/42697 2010-01-17 Jie Zhang diff --git a/gcc/testsuite/g++.dg/template/crash94.C b/gcc/testsuite/g++.dg/template/crash94.C deleted file mode 100644 index 810aed0..0000000 --- a/gcc/testsuite/g++.dg/template/crash94.C +++ /dev/null @@ -1,28 +0,0 @@ -// Origin: PR c++/42697 -// { dg-do compile } - -template -class fparser -{ - template - void eval2(Value_t r[2]); -public: - void evaltest(); -}; - -template<> -template -void fparser::eval2(int r[2]) -{ - struct ObjType {}; -} - - -template -void fparser::evaltest - () -{ - eval2(0); -} - -template class fparser; -- cgit v1.1