https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81640

            Bug ID: 81640
           Summary: [8 Regression] ICE in lookup_fnfields_slot_nolazy w/
                    -Wshadow=compatible-local
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: nathan at gcc dot gnu.org
  Target Milestone: ---

Starting from r250440 we ICE on:

$ cat ice.ii
struct a;
template <typename b>
void
c ()
{
  b d, e;
  if (e)
    a d;
}

$ g++ ice.ii -Wshadow=compatible-local
ice.ii: In function ‘void c()’:
ice.ii:8:7: internal compiler error: Segmentation fault
     a d;
       ^
0xd90eff crash_signal
        ../../gcc/toplev.c:338
0x7ef213 lookup_fnfields_slot_nolazy(tree_node*, tree_node*)
        ../../gcc/cp/search.c:1577
0x6050bc build_user_type_conversion_1
        ../../gcc/cp/call.c:3741
0x60699b implicit_conversion
        ../../gcc/cp/call.c:1899
0x60bd46 can_convert_arg(tree_node*, tree_node*, tree_node*, int, int)
        ../../gcc/cp/call.c:10448
0x72c99b check_local_shadow
        ../../gcc/cp/name-lookup.c:2084
0x72c99b do_pushdecl
        ../../gcc/cp/name-lookup.c:2416
0x72c99b pushdecl(tree_node*, bool)
        ../../gcc/cp/name-lookup.c:2479
0x6ac905 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/cp/decl.c:5057
0x767477 cp_parser_init_declarator
        ../../gcc/cp/parser.c:19433
0x76eadc cp_parser_simple_declaration
        ../../gcc/cp/parser.c:12951
0x76f9d5 cp_parser_block_declaration
        ../../gcc/cp/parser.c:12776
0x7704a9 cp_parser_declaration_statement
        ../../gcc/cp/parser.c:12371
0x74b123 cp_parser_statement
        ../../gcc/cp/parser.c:10854
0x770c3b cp_parser_implicitly_scoped_statement
        ../../gcc/cp/parser.c:12433
0x74b953 cp_parser_selection_statement
        ../../gcc/cp/parser.c:11329
0x74b953 cp_parser_statement
        ../../gcc/cp/parser.c:10715
0x74c1e0 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:11190
0x74c2af cp_parser_compound_statement
        ../../gcc/cp/parser.c:11144
0x7656b8 cp_parser_function_body
        ../../gcc/cp/parser.c:21608

Reply via email to