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

            Bug ID: 90550
           Summary: ICE in determine_visibility, at cp/decl2.c:2567
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least gcc-4.5 :


$ cat z1.cc
template <typename>
void f ()
{
  struct S { struct T typedef a; };
  struct S::a b;
}
void g ()
{
  f<int> ();
}


$ g++-10-20190519 -c z1.cc
z1.cc: In instantiation of 'void f() [with <template-parameter-1-1> = int]':
z1.cc:9:11:   required from here
z1.cc:4:31: internal compiler error: Segmentation fault
    4 |   struct S { struct T typedef a; };
      |                               ^
0xb8ae7f crash_signal
        ../../gcc/toplev.c:326
0x64da44 determine_visibility(tree_node*)
        ../../gcc/cp/decl2.c:2567
0x68d077 do_pushtag
        ../../gcc/cp/name-lookup.c:6944
0x68d077 pushtag(tree_node*, tree_node*, tag_scope)
        ../../gcc/cp/name-lookup.c:6956
0x6ef215 lookup_template_class_1
        ../../gcc/cp/pt.c:9555
0x6ef215 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/cp/pt.c:9769
0x6efa85 tsubst_aggr_type
        ../../gcc/cp/pt.c:12777
0x6eacc9 tsubst_decl
        ../../gcc/cp/pt.c:13768
0x6e0be7 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/cp/pt.c:14378
0x6e1ccb perform_typedefs_access_check
        ../../gcc/cp/pt.c:10942
0x6e42b3 instantiate_decl(tree_node*, bool, bool)
        ../../gcc/cp/pt.c:24743
0x6f9a0b instantiate_pending_templates(int)
        ../../gcc/cp/pt.c:24871
0x651755 c_parse_final_cleanups()
        ../../gcc/cp/decl2.c:4819

Reply via email to