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

            Bug ID: 85412
           Summary: [8 Regression] ICE in put_TImodes, at sel-sched.c:7191
           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-alpha20180415 snapshot (r259389) ICEs when compiling the following
snippet w/ -march=haswell -O2 (-O3) -fselective-scheduling2
-fsel-sched-pipelining -fno-tree-ch -fno-tree-loop-im:

int n7;

int
rf (double as, long int u1, int sp, int fy)
{
  int ku = 0, us = 1, lo = sp;

  while (fy < 1)
    {
      const long int pg = 5;
      const unsigned int g5 = 3;

      ku = as + us;

      if (fy == 0)
        n7 /= u1;
      else
        {
          const long long unsigned int w7 = 3;

          us = 0;
          as = u1 / w7 + u1;
        }

      fy = sp % pg + n7 / g5;
    }

  if (ku < 1)
    lo = u1;

  return lo;
}

% x86_64-pc-linux-gnu-gcc-8.0.0-alpha20180415 -march=haswell -O2
-fselective-scheduling2 -fsel-sched-pipelining -fno-tree-ch -fno-tree-loop-im
-c t4byfoly.c
during RTL pass: sched2
t4byfoly.c: In function 'rf':
t4byfoly.c:32:1: internal compiler error: in put_TImodes, at sel-sched.c:7191
 }
 ^
0x64f37b put_TImodes
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sel-sched.c:7191
0x64f37b sel_region_target_finish
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sel-sched.c:7238
0x64f37b sel_region_finish
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sel-sched.c:7289
0x64f37b sel_sched_region(int)
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sel-sched.c:7658
0xc6ef38 run_selective_scheduling()
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sel-sched.c:7733
0xc4e9a5 rest_of_handle_sched2
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sched-rgn.c:3732
0xc4e9a5 execute
       
/var/tmp/portage/sys-devel/gcc-8.0.0_alpha20180415/work/gcc-8-20180415/gcc/sched-rgn.c:3876

I've been hitting it for a while but am filing a PR only now, when many
selective scheduling fixes have actually started landing on the trunk.

Reply via email to