From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19202 invoked by alias); 29 Jan 2010 14:31:49 -0000 Received: (qmail 18701 invoked by alias); 29 Jan 2010 14:31:16 -0000 Date: Fri, 29 Jan 2010 14:31:00 -0000 Message-ID: <20100129143116.18698.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/42336] [4.5 Regression] ICE with pointer-to-member-function argument in template function with -fipa-sra In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dodji at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg03313.txt.bz2 ------- 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