[Bug target/126468] New: [14/15/16/17 Regression] ICE at -O2 on aarch64 during RTL pass: expand

xxs_chy at outlook dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126468

            Bug ID: 126468
           Summary: [14/15/16/17 Regression] ICE at -O2 on aarch64 during
                    RTL pass: expand
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Created attachment 65158
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65158&action=edit
case.c

Reproducer: https://godbolt.org/z/z3rT387TM

The reduced case is attached.

Dump at -O2:
during RTL pass: expand
reduced.c: In function ‘f1’:
reduced.c:51:11: internal compiler error: in expand_bitquery, at
internal-fn.cc:5807
   51 |     g31 = __builtin_clrsbll(g8);
      |           ^~~~~~~~~~~~~~~~~~~~~
0x272678d internal_error(char const*, ...)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/diagnostic-global-context.cc:787
0xb121eb fancy_abort(char const*, int, char const*)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/diagnostics/context.cc:1813
0x945f1e expand_bitquery
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/internal-fn.cc:5807
0xfd780f expand_CLRSB(internal_fn, gcall*)
       
/data/Projects/compiler-test-env/cte-work/src/gcc/gcc/internal-fn.cc:5817
0xd08e08 expand_call_stmt
        /data/Projects/compiler-test-env/cte-work/src/gcc/gcc/cfgexpand.cc:3155
0xd08e08 expand_gimple_stmt_1
        /data/Projects/compiler-test-env/cte-work/src/gcc/gcc/cfgexpand.cc:4273
0xd08e08 expand_gimple_stmt
        /data/Projects/compiler-test-env/cte-work/src/gcc/gcc/cfgexpand.cc:4420
0xd0ae47 expand_gimple_basic_block
        /data/Projects/compiler-test-env/cte-work/src/gcc/gcc/cfgexpand.cc:6537
0xd0d037 execute
        /data/Projects/compiler-test-env/cte-work/src/gcc/gcc/cfgexpand.cc:7288
/data/Projects/compiler-test-env/cte-work/toolchains/gcc/aarch64-linux-musl/libexec/gcc/aarch64-linux-musl/17.0.0/cc1
-quiet reduced.c -quiet -dumpdir a- -dumpbase reduced.c -dumpbase-ext .c
-mlittle-endian -mabi=lp64 -O2 -o /tmp/ccE3ecSV.s
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.