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

            Bug ID: 97576
           Summary: [11 Regression] ICE: verify_cgraph_node failed (error:
                    reference to dead statement)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

g++-11.0.0-alpha20201025 snapshot (g:308e40331f9d2820f8286769b5fc764671187364)
ICEs when compiling the following testcase w/ -O2:

void
pc (void);

void __attribute__ ((simd))
ty (void);

void __attribute__ ((simd))
gf ()
{
  ty ();
}

void __attribute__ ((simd))
ty (void)
{
  gf (pc);
  gf (gf);
}

% gcc-11.0.0 -O2 -fopenmp -c o1f4i1ek.c
o1f4i1ek.c: In function 'ty':
o1f4i1ek.c:10:3: error: reference to dead statement
   10 |   ty ();
      |   ^~~~~
# _2 = VDEF <.MEM_1(D)>
gf (pc);
o1f4i1ek.c:10:3: error: reference to dead statement
# _3 = VDEF <_2>
gf (gf);
ty/14 (ty) @0x7f3f9241f128
  Type: function definition analyzed
  Visibility: artificial
  next sharing asm name: 11
  previous sharing asm name: 17
  References: pc/2 (addr) gf/0 (addr)
  Referring:
  Function ty/14 is inline copy in ty/1
  Clone of ty/98
  Availability: local
  Function flags: count:1073741824 (estimated locally) body local nonfreeing_fn
  Called by: ty/1 (inlined) (1073741824 (estimated locally),1.00 per call)
  Calls: gf/15 (inlined) (1073741824 (estimated locally),1.00 per call) gf/16
(inlined) (1073741824 (estimated locally),1.00 per call)
during IPA pass: inline
o1f4i1ek.c:10:3: internal compiler error: verify_cgraph_node failed
0x96b8d8 cgraph_node::verify_node()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/cgraph.c:3783
0x95b3a4 symtab_node::verify()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/symtab.c:1318
0xe44a5d expand_call_inline
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-inline.c:4837
0xe47671 gimple_expand_calls_inline
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-inline.c:5270
0xe47671 optimize_inline_calls(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-inline.c:5443
0xb9c87b inline_transform(cgraph_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/ipa-inline-transform.c:754
0xcddd55 execute_one_ipa_transform_pass
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/passes.c:2240
0xcddd55 execute_all_ipa_transforms(bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/passes.c:2287
0x964754 cgraph_node::get_body()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/cgraph.c:3954
0x18346c8 expand_simd_clones(cgraph_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/omp-simd-clone.c:1674
0x183545f ipa_omp_simd_clone
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/omp-simd-clone.c:1784
0x183545f execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/omp-simd-clone.c:1812

Reply via email to