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

            Bug ID: 80500
           Summary: [7/8 Regression] ICE: internal consistency failure
                    (error: invalid rtl sharing found in the insn)
           Product: gcc
           Version: 7.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-7.0.0-alpha20170416 and gcc-8.0.0-alpha20170423 snapshots ICE when
compiling the following snippet w/ -O2 -funroll-loops -ftree-loop-if-convert
-fvariable-expansion-in-unroller:

char ja;

void
hd (int ut)
{
  while (ut != 0)
    {
      ja = (ut >= 0) + 1;
      ++ut;
    }
}

% x86_64-pc-linux-gnu-gcc-7.0.0-alpha20170416 -O2 -funroll-loops
-ftree-loop-if-convert -fvariable-expansion-in-unroller -c exs8cfjp.c
exs8cfjp.c: In function 'hd':
exs8cfjp.c:11:1: error: invalid rtl sharing found in the insn
 }
 ^
(insn 216 34 33 8 (parallel [
            (set (subreg:QI (reg:SI 92) 0)
                (plus:QI (subreg:QI (reg:SI 92) 0)
                    (reg:QI 97)))
            (clobber (reg:CC 17 flags))
        ]) -1
     (nil))
exs8cfjp.c:11:1: error: shared rtx
(subreg:QI (reg:SI 92) 0)
exs8cfjp.c:11:1: internal compiler error: internal consistency failure

Reply via email to