From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1265 invoked by alias); 28 Sep 2013 17:32:51 -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 1231 invoked by uid 48); 28 Sep 2013 17:32:47 -0000 From: "reichelt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58561] New: [c++0x] ICE using declaration of function with auto in return type Date: Sat, 28 Sep 2013 17:32: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-09/txt/msg01959.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58561 Bug ID: 58561 Summary: [c++0x] ICE using declaration of function with auto in return type 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++0x -g") triggers an ICE since GCC 4.8.0: ================= auto foo(); namespace N { using ::foo; } ================= bug.cc:1:10: warning: 'foo' function uses 'auto' type specifier without trailing return type [enabled by default] auto foo(); ^ bug.cc:5:11: internal compiler error: in is_base_type, at dwarf2out.c:10146 using ::foo; ^ 0x86a0f6 is_base_type ../../gcc/gcc/dwarf2out.c:10146 0x86a0f6 modified_type_die ../../gcc/gcc/dwarf2out.c:10337 0x86b58a add_type_attribute ../../gcc/gcc/dwarf2out.c:16702 0x861250 gen_subprogram_die ../../gcc/gcc/dwarf2out.c:17895 0x86a42a force_decl_die ../../gcc/gcc/dwarf2out.c:19955 0x87b0e2 dwarf2out_imported_module_or_decl_1 ../../gcc/gcc/dwarf2out.c:20398 0x70bcf6 cp_emit_debug_info_for_using(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:6206 0x70be53 do_toplevel_using_decl(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:3939 0x655204 cp_parser_using_declaration ../../gcc/gcc/cp/parser.c:15771 0x6559ec cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:10848 0x65e7fe cp_parser_declaration ../../gcc/gcc/cp/parser.c:10764 0x65d55d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65d770 cp_parser_namespace_body ../../gcc/gcc/cp/parser.c:15568 0x65d770 cp_parser_namespace_definition ../../gcc/gcc/cp/parser.c:15549 0x65e8f1 cp_parser_declaration ../../gcc/gcc/cp/parser.c:10752 0x65d55d cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:10650 0x65ee46 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:3939 0x65ee46 c_parse_file() ../../gcc/gcc/cp/parser.c:28898 0x772524 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1046 Please submit a full bug report, [etc.]