From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8770 invoked by alias); 22 Feb 2014 01:27:47 -0000 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 Received: (qmail 8740 invoked by uid 48); 22 Feb 2014 01:27:41 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60312] New: [4.9 Regression] [c++1y] ICE using auto as template parameter Date: Sat, 22 Feb 2014 01:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: reichelt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02332.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60312 Bug ID: 60312 Summary: [4.9 Regression] [c++1y] ICE using auto as template parameter Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following invalid code snippet (compiled with "-std=c++1y") triggers an ICE on trunk: ================================== template struct A; template<> struct A { template void foo(); }; void bar() { A().foo<0>(); } ================================== bug.cc: In substitution of 'template > void A::foo() [with int = 0]': bug.cc:10:20: required from here bug.cc:5:22: internal compiler error: in tsubst, at cp/pt.c:11554 template void foo(); ^ 0x621ff5 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11554 0x62cb32 tsubst_template_args ../../gcc/gcc/cp/pt.c:9837 0x62d5c3 tsubst_aggr_type ../../gcc/gcc/cp/pt.c:10034 0x61f961 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11445 0x61f1cb tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11435 0x62b376 tsubst_arg_types ../../gcc/gcc/cp/pt.c:11091 0x62b77b tsubst_function_type ../../gcc/gcc/cp/pt.c:11190 0x61f85a tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11903 0x646550 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:15633 0x5b1941 add_template_candidate_real ../../gcc/gcc/cp/call.c:2974 0x5ad5ec add_template_candidate ../../gcc/gcc/cp/call.c:3071 0x5ad5ec add_candidates ../../gcc/gcc/cp/call.c:5132 0x5b71ae build_new_method_call_1 ../../gcc/gcc/cp/call.c:7772 0x5b71ae build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/gcc/cp/call.c:7958 0x6b6f09 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6135 0x6b9286 cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7170 0x6b9faf cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7874 0x6ba4a1 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8112 0x6bc854 cp_parser_expression ../../gcc/gcc/cp/parser.c:8274 0x6bd08c cp_parser_expression ../../gcc/gcc/cp/parser.c:8313 Please submit a full bug report, [etc.]