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

            Bug ID: 96491
           Summary: [11 Regression] ICE: tree check: expected ssa_name,
                    have integer_cst in add_phi_arg, at
                    tree-phinodes.c:373
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200802 snapshot (g:6e46b3f3da5c03bc529b3690dd0995927feb9142)
ICEs when compiling the following testcase w/ -O1:

int rj;

void __attribute__ ((returns_twice))
da (void)
{
  rj = 1;
}

void
c5 (void)
{
  for (;;)
    ++rj;
}

void
ls (int kz)
{
  if (kz == 0)
    {
      rj = 0;
      c5 ();
    }

  da ();
  c5 ();
}

% gcc-11.0.0 -O1 -c qqdrbiy8.c
during GIMPLE pass: sink
qqdrbiy8.c: In function 'ls':
qqdrbiy8.c:17:1: internal compiler error: tree check: expected ssa_name, have
integer_cst in add_phi_arg, at tree-phinodes.c:373
   17 | ls (int kz)
      | ^~
0x707146 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree.c:9687
0x6be83b tree_check(tree_node*, char const*, int, char const*, tree_code)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree.h:3303
0x6be83b add_phi_arg(gphi*, tree_node*, edge_def*, unsigned int)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-phinodes.c:373
0xf997e1 sink_common_stores_to_bb
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:594
0xf997e1 sink_code_in_bb
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:656
0xf98cea sink_code_in_bb
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:743
0xf98cea sink_code_in_bb
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:743
0xf9a5ce execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:824

Reply via email to