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

            Bug ID: 127445
           Summary: [17 Regression] ICE: in df_refs_verify, at
                    df-scan.cc:4012 with -Os -finstrument-functions-once
                    -fzero-call-used-regs=all-gpr-arg
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: aarch64-unknown-linux-gnu

Created attachment 65616
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65616&action=edit
reduced testcase

Compiler output:
$ aarch64-unknown-linux-gnu-gcc -Os -finstrument-functions-once
-fzero-call-used-regs=all-gpr-arg testcase.c 
during RTL pass: narrow_gp_writes
testcase.c: In function 'foo':
testcase.c:14:1: internal compiler error: in df_refs_verify, at df-scan.cc:4012
   14 | }
      | ^
0x2a7148d internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xc62ef1 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x87315f df_refs_verify
        /repo/gcc-trunk/gcc/df-scan.cc:4012
0xed6b66 df_insn_refs_verify
        /repo/gcc-trunk/gcc/df-scan.cc:4091
0xed8b63 df_bb_verify
        /repo/gcc-trunk/gcc/df-scan.cc:4128
0xed8ee7 df_scan_verify()
        /repo/gcc-trunk/gcc/df-scan.cc:4249
0xec2161 df_verify()
        /repo/gcc-trunk/gcc/df-core.cc:1864
0xec2161 df_analyze_1
        /repo/gcc-trunk/gcc/df-core.cc:1251
0x1a9b663 narrow_gp_writes
        /repo/gcc-trunk/gcc/config/aarch64/aarch64-narrow-gp-writes.cc:250
0x1a9b663 execute
        /repo/gcc-trunk/gcc/config/aarch64/aarch64-narrow-gp-writes.cc:594
/repo/gcc-trunk/binary-trunk-20260916200900-r17-4373-gd9128914a30615-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260916200900-r17-4373-gd9128914a30615-checking-yes-rtl-df-extra-aarch64/bin/../lib/gcc/aarch64-unknown-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mlittle-endian -mabi=lp64 -Os -finstrument-functions-once
-fzero-call-used-regs=all-gpr-arg -o /tmp/ccW7AGzQ.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260916200900-r17-4373-gd9128914a30615-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/17.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260916200900-r17-4373-gd9128914a30615-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260916 (experimental) (GCC)

Reply via email to