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

            Bug ID: 82913
           Summary: [8 Regression] ICE: Segmentation fault in
                    try_merge_compare
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc-8.0.0-alpha20171105 snapshot (r254432) ICEs when compiling the following
snippet w/ -O2, -O3, or -Ofast:

unsigned int iy;
unsigned long int pp;

int
vr (void)
{
  ++iy;
  pp = 0;
}

unsigned long int
pu (int cq)
{
  if (!vr () || !iy)
    {
      int wd = iy != pp;

      if (wd != cq)
        return iy;
    }

  return 0;
}

% x86_64-pc-linux-gnu-gcc-8.0.0-alpha20171105 -O2 -c tcj0zno5.c
during RTL pass: cmpelim
tcj0zno5.c: In function 'pu':
tcj0zno5.c:23:1: internal compiler error: Segmentation fault
 }
 ^
0xc697ef crash_signal
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171105/work/gcc-8-20171105/gcc/toplev.c:324
0x132e310 try_merge_compare
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171105/work/gcc-8-20171105/gcc/compare-elim.c:690
0x132e310 try_eliminate_compare
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171105/work/gcc-8-20171105/gcc/compare-elim.c:730
0x132e310 execute_compare_elim_after_reload
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171105/work/gcc-8-20171105/gcc/compare-elim.c:873
0x132e310 execute
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20171105/work/gcc-8-20171105/gcc/compare-elim.c:916

Reply via email to