From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32431 invoked by alias); 4 Nov 2013 20:06:26 -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 30295 invoked by uid 48); 4 Nov 2013 20:04:24 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58987] New: [c++11] ICE with template alias Date: Mon, 04 Nov 2013 20:06: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: 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 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: 2013-11/txt/msg00269.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58987 Bug ID: 58987 Summary: [c++11] ICE with template alias Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.7.3: ================================================= template using A = T*; template::X> struct B; ================================================= bug.cc:3:28: internal compiler error: in cp_parser_type_name, at cp/parser.c:14658 template::X> struct B; ^ 0x65fc8c cp_parser_type_name ../../gcc/gcc/cp/parser.c:14658 0x65027f cp_parser_qualifying_entity ../../gcc/gcc/cp/parser.c:5532 0x65027f cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:5241 0x668459 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14517 0x64eddf cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5805 0x65156d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7097 0x6520df cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7801 0x6525af cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8039 0x652a14 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:8089 0x652a14 cp_parser_constant_expression ../../gcc/gcc/cp/parser.c:8299 0x6545cb cp_parser_default_argument ../../gcc/gcc/cp/parser.c:18442 0x660cf0 cp_parser_parameter_declaration ../../gcc/gcc/cp/parser.c:18368 0x66121b cp_parser_template_parameter ../../gcc/gcc/cp/parser.c:12886 0x66121b cp_parser_template_parameter_list ../../gcc/gcc/cp/parser.c:12789 0x6648a1 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:22605 0x6709b9 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10849 0x66f548 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10771 0x670e86 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4007 0x670e86 c_parse_file() ../../gcc/gcc/cp/parser.c:31057 0x7914e3 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.] In GCC 4.7.0 - 4.7.2 the code was wrongly rejected. (Template aliases were introduced in GCC 4.7.0).