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

            Bug ID: 129141
           Summary: ICE in gen_highpart, at emit-rtl.cc:1688 during RTL
                    pass ce2 at -O2 on arm
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shimizu2486 at gmail dot com
  Target Milestone: ---
            Target: arm-linux-gnueabihf

Live reproducer: https://godbolt.org/z/rzWK7jbPf

$ cat t1.c
int n, g;
_BitInt(65) h;
unsigned x;
unsigned _BitInt(33) A;
unsigned B;
long long Y;
int f(unsigned long long a, unsigned b, _BitInt(65) y) {
  h = a != y && b >= y;
  long long l = x >= h ? 1 : g;
  return n || l;
}
int main(void) { f(A, B, Y); }

$ arm-linux-gnueabihf-gcc -O2 -marm -mfpu=vfpv3-d16 -c t1.c
during RTL pass: ce2
t1.c: In function 'main':
t1.c:12:30: internal compiler error: in gen_highpart, at emit-rtl.cc:1688
   12 | int main(void) { f(A, B, Y); }
      |                              ^

  arm trunk (b20d26da1d10)            ICE
  arm 16.2.0                          compiles

-O2 ICEs, but -O0, -O1, -Og, -O3 and -Os compile it, and so does -O2 with
-fno-if-conversion, -fno-tree-slp-vectorize or -fno-inline.
-mthumb or -mfpu=neon makes -O2 compile it too.
  • [Bug target/129141] New: ICE in ... shimizu2486 at gmail dot com via Gcc-bugs

Reply via email to