From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3307 invoked by alias); 2 Mar 2014 21:31:42 -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 3268 invoked by uid 48); 2 Mar 2014 21:31:39 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend Date: Sun, 02 Mar 2014 21:31: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-valid-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 cc 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-03/txt/msg00106.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60390 Bug ID: 60390 Summary: [c++1y] ICE with declaring function with auto parameter as friend Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org CC: abutcher at gcc dot gnu.org The following valid code snippet (compiled with "-std=c++1y") triggers an ICE on trunk: =========================================== struct A { void foo(auto); }; struct B { friend void A::foo(auto); }; =========================================== bug.cc:8:26: internal compiler error: in poplevel_class, at cp/name-lookup.c:2951 friend void A::foo(auto); ^ 0x783a07 poplevel_class() ../../gcc/gcc/cp/name-lookup.c:2951 0x667d28 popclass() ../../gcc/gcc/cp/class.c:7129 0x66818a pop_nested_class() ../../gcc/gcc/cp/class.c:7275 0x6c2cf1 cp_parser_direct_declarator ../../gcc/gcc/cp/parser.c:17479 0x6c2cf1 cp_parser_declarator ../../gcc/gcc/cp/parser.c:16947 0x6ac38d cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20353 0x6afa74 cp_parser_member_specification_opt ../../gcc/gcc/cp/parser.c:20034 0x6afa74 cp_parser_class_specifier_1 ../../gcc/gcc/cp/parser.c:19268 0x6afa74 cp_parser_class_specifier ../../gcc/gcc/cp/parser.c:19495 0x6afa74 cp_parser_type_specifier ../../gcc/gcc/cp/parser.c:14305 0x6c8f70 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:11547 0x6cfb49 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:11137 0x6b2ff3 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:11086 0x6da2b2 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10983 0x6d8fa8 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10869 0x6da85a cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4014 0x6da85a c_parse_file() ../../gcc/gcc/cp/parser.c:31595 0x7f9f53 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1060 Please submit a full bug report, [etc.] This is similar to PR60064. Adam, you might want to have a look.