[Bug rtl-optimization/97850] New: [11 Regression] aarch64: ICE in expand_insn, at optabs.c:7467 since r11-1143-gb05d5563f

acoplan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 13:14:16 GMT 2020


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

            Bug ID: 97850
           Summary: [11 Regression] aarch64: ICE in expand_insn, at
                    optabs.c:7467 since r11-1143-gb05d5563f
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

AArch64 ICEs on the following C++ testcase:

unsigned long a, d;
extern int b[];
char c;
void e(int f) {
  for (int g = a; g; g += 20989) {
    a = (c ? c : f) ? 2 / d : 0;
    b[g] = 0;
  }
}

since r11-1143-gb05d5563f4be13b4a0d0951375a82adf483973c0 with -O2
-ftree-vectorize -march=armv8.2-a+sve. The testcase is valid C, but the ICE
only occurs when compiled as C++.

To reproduce:

$ aarch64-elf-gcc -c -S test.cc -O2 -ftree-vectorize -march=armv8.2-a+sve

during RTL pass: expand
test.cc: In function 'void e(int)':
test.cc:6:21: internal compiler error: in expand_insn, at optabs.c:7467
    6 |     a = (c ? c : f) ? 2 / d : 0;
      |         ~~~~~~~~~~~~^~~~~~~~~~~
0xed4e84 expand_insn(insn_code, unsigned int, expand_operand*)
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7467
0xd4cf11 expand_direct_optab_fn
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:3170
0xd4d95c expand_COND_DIV
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.def:180
0xd4f208 expand_internal_call(internal_fn, gcall*)
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:3862
0xd4f222 expand_internal_call(gcall*)
        /home/alecop01/toolchain/src/gcc/gcc/internal-fn.c:3870
0xad7222 expand_call_stmt
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:2618
0xad7222 expand_gimple_stmt_1
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:3713
0xad7222 expand_gimple_stmt
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:3877
0xae12df expand_gimple_basic_block
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:5918
0xae2975 execute
        /home/alecop01/toolchain/src/gcc/gcc/cfgexpand.c:6602
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list