This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42336] [4.5 Regression] ICE with pointer-to-member-function argument in template function with -fipa-sra
- From: "dodji at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2010 14:31:16 -0000
- Subject: [Bug c++/42336] [4.5 Regression] ICE with pointer-to-member-function argument in template function with -fipa-sra
- References: <bug-42336-17896@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #23 from dodji at gcc dot gnu dot org 2010-01-29 14:31 -------
Subject: Bug 42336
Author: dodji
Date: Fri Jan 29 14:30:41 2010
New Revision: 156351
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156351
Log:
Fix PRs c++/42758, c++/42634, c++/42797
... and mitigate PR c++/42336
gcc/cp/ChangeLog:
PR c++/42758
PR c++/42634
PR c++/42336
PR c++/42797
PR c++/42880
* cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
* pt.c (coerce_template_parms, type_unification_real,
expand_template_argument_pack, coerce_template_parameter_pack):
Set the non default template args count.
(current_template_args): Always set non defaulted
template args count when compiled with --enable-checking
(tsubst_template_args, type_unification_real): Propagate the non
defaulted template args count.
* error.c (get_non_default_template_args_count): Renamed
count_non_default_template_args into this. Don't calculate the
non default template argument count anymore. Use the new
accessor macros above to get it.
(dump_template_argument_list, dump_type, dump_decl,
dump_template_parms): Adjust.
* parser.c (cp_parser_template_argument_list): Always set defaulted
template args count when compiled with --enable-checking.
gcc/testsuite/ChangeLog:
PR c++/42758
PR c++/42634
PR c++/42336
PR c++/42797
PR c++/42880
* g++.dg/other/crash-5.C: New test.
* g++.dg/other/crash-6.C: New test.
* g++.dg/other/crash-7.C: New test.
* g++.dg/other/crash-8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/other/crash-5.C
trunk/gcc/testsuite/g++.dg/other/crash-6.C
trunk/gcc/testsuite/g++.dg/other/crash-7.C
trunk/gcc/testsuite/g++.dg/other/crash-8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/error.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42336