]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/30044 (ICE in tsubst, at cp/pt.c:7359)
authorPatrick Palka <ppalka@gcc.gnu.org>
Fri, 10 Jul 2015 23:21:39 +0000 (23:21 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Fri, 10 Jul 2015 23:21:39 +0000 (23:21 +0000)
commitc5540945071f17bed8009e2cfeffd7af8e830ba7
tree6449427b1ab698673633eb97179cc607d0dca792
parent0a73242e1ab3ac00d8fe9a98f10732473a96dc04
re PR c++/30044 (ICE in tsubst, at cp/pt.c:7359)

Fix PR c++/30044

gcc/cp/ChangeLog:

PR c++/30044
* pt.c (begin_template_parm_list): Add a dummy parameter level
to current_template_parms.
(end_template_parm_list): Remove the dummy parameter level
before adding the real one.
(tsubst): Don't attempt to substitute for template parameters
corresponding to a dummy argument level.
(template_parms_to_args): Remove obsolete hack for
giving template template arguments the proper level.
(splite_late_return_type): Remove obsolete hack for giving
template template arguments the proper level.
* error.c (dump_template_decl): Don't print dummy template
levels.

gcc/testsuite/ChangeLog

PR c++/30044
* g++.dg/cpp0x/auto46.C: New test.
* g++.dg/template/pr30044.C: New test.
* g++.dg/template/shadow2.C: New test.
* g++.dg/template/error55.C: New test.
* g++.dg/template/crash83.C: Accept any error string.
* g++.dg/cpp0x/variadic18.C: Adjust to avoid shadowing template
parameters.
* g++.dg/cpp0x/variadic18.C: Likewise
* g++.dg/template/canon-type-13.C: Likewise.
* g++.old-deja/g++.pt/ttp42.C: Likewise.
* g++.dg/torture/20070621-1.C: Likewise.

From-SVN: r225706
14 files changed:
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/auto46.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/variadic18.C
gcc/testsuite/g++.dg/cpp0x/variadic19.C
gcc/testsuite/g++.dg/template/canon-type-13.C
gcc/testsuite/g++.dg/template/crash83.C
gcc/testsuite/g++.dg/template/error55.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/pr30044.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/shadow2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/torture/20070621-1.C
gcc/testsuite/g++.old-deja/g++.pt/ttp42.C