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

            Bug ID: 92328
           Summary: [10 Regression] ICE in eliminate_stmt, at
                    tree-ssa-sccvn.c:5497
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-10.0.0-alpha20191027 snapshot (r277495) ICEs when compiling the following
testcase w/ -O2:

int nt;

void
ja (int os)
{
  int *ku = &os, *id = &os;
  unsigned int qr = 0;

  for (;;)
    {
      if (os == *ku)
        {
          *id = 0;
          qr += os != *ku;
          id = &qr;
        }

      *id &= qr;

      if (os != 0)
        {
          nt /= 0;
          ku = &qr;
        }
    }
}

% gcc-10.0.0-alpha20191027 -O2 -w -c ewpykney.c
during GIMPLE pass: pre
ewpykney.c: In function 'ja':
ewpykney.c:4:1: internal compiler error: in eliminate_stmt, at
tree-ssa-sccvn.c:5497
    4 | ja (int os)
      | ^~
0x6a5140 eliminate_dom_walker::eliminate_stmt(basic_block_def*,
gimple_stmt_iterator*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-ssa-sccvn.c:5497
0xdee2bd eliminate_dom_walker::before_dom_children(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-ssa-sccvn.c:5913
0xdee2bd eliminate_dom_walker::before_dom_children(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-ssa-sccvn.c:5846
0x1406b6a dom_walker::walk(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/domwalk.c:309
0xde657d eliminate_with_rpo_vn(bitmap_head*)
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-ssa-sccvn.c:6091
0xdcadb0 execute
       
/var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191027/work/gcc-10-20191027/gcc/tree-ssa-pre.c:4234

Reply via email to