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

            Bug ID: 87273
           Summary: [8/9 Regression] ICE in merge_fences, at
                    sel-sched-ir.c:708
           Product: gcc
           Version: unknown
            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-9.0.0-alpha20180902 snapshot (r264045) ICEs when compiling the following
snippet w/ -march=core2 -Os -fschedule-insns -fsel-sched-pipelining
-fselective-scheduling -fno-ssa-phiopt -fno-tree-loop-im:

int sd;

void
w5 (int n4)
{
  long int *vq = (long int *) &n4;

  while (n4 < 1)
    {
      int ks;

      ks = !!(n4 + 1) ? ((++sd) == *vq) : 0;
      if (ks == 1 / *vq)
        *vq *= sd;
    }
}

% gcc-9.0.0-alpha20180902 -march=core2 -Os -fschedule-insns
-fsel-sched-pipelining -fselective-scheduling -fno-ssa-phiopt -fno-tree-loop-im
-c mdrdoij6.c
during RTL pass: sched1
mdrdoij6.c: In function 'w5':
mdrdoij6.c:16:1: internal compiler error: in merge_fences, at
sel-sched-ir.c:708
16 | }
   | ^
0x64a6f4 merge_fences
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched-ir.c:708
0xc71d8a move_fence_to_fences(_list_node*, flist_tail_def*)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched-ir.c:841
0xc8082b calculate_new_fences
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched.c:7425
0xc8082b sel_sched_region_2
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched.c:7505
0xc81386 sel_sched_region_1
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched.c:7546
0xc82b66 sel_sched_region(int)
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched.c:7647
0xc83a81 run_selective_scheduling()
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sel-sched.c:7733
0xc6379d rest_of_handle_sched
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sched-rgn.c:3718
0xc6379d execute
       
/var/tmp/portage/sys-devel/gcc-9.0.0_alpha20180902/work/gcc-9-20180909/gcc/sched-rgn.c:3828

Reply via email to