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.]

Reply via email to