[Bug c/126920] New: ICE in gimple_phi_arg_def_from_edge in gcc/gimpl.h

"frank.scheiner at web dot de via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126920

            Bug ID: 126920
           Summary: ICE in gimple_phi_arg_def_from_edge in gcc/gimpl.h
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frank.scheiner at web dot de
  Target Milestone: ---
            Target: ia64
             Build: x86_64

With latest gcc-17-20260816 Linux kernel compilations fail on x86_64 for ia64.
With the previous snapshot (gcc-17-20260809) the same sources compile fine. So
this regression must have been introduced or enabled in the last week between
snapshots.

Reproduced 3 times for a (1) real machine, (2) QEMU and (3) Ski kernel.

Shortest reproducer so far is the kernel build for the Ski kernel, from where I
also took the error messages:

```
root@b450m-g-p:/usr/src# time ./make-kernel.bash linux-for-hp-ski-v7 ia64
ssd/torvalds-linux ski
[...]
  CC      kernel/time/namespace.o
during GIMPLE pass: ch
lib/zstd/compress/zstd_lazy.c: In function
'ZSTD_RowFindBestMatch_noDict_6_4.constprop':
lib/zstd/compress/zstd_lazy.c:1362:51: internal compiler error: Segmentation
fault
 1362 | #define ZSTD_ROW_SEARCH_FN(dictMode, mls, rowLog)
ZSTD_RowFindBestMatch_##dictMode##_##mls##_##rowLog
      |                                                  
^~~~~~~~~~~~~~~~~~~~~~
lib/zstd/compress/zstd_lazy.c:1387:33: note: in expansion of macro
'ZSTD_ROW_SEARCH_FN'
 1387 |     ZSTD_SEARCH_FN_ATTRS size_t ZSTD_ROW_SEARCH_FN(dictMode, mls,
rowLog)(                     \
      |                                 ^~~~~~~~~~~~~~~~~~
lib/zstd/compress/zstd_lazy.c:1398:5: note: in expansion of macro
'GEN_ZSTD_ROW_SEARCH_FN'
 1398 |     X(dictMode, mls, 4)                        \
      |     ^
lib/zstd/compress/zstd_lazy.c:1405:5: note: in expansion of macro
'ZSTD_FOR_EACH_ROWLOG'
 1405 |     ZSTD_FOR_EACH_ROWLOG(X, dictMode, 6)
      |     ^~~~~~~~~~~~~~~~~~~~
lib/zstd/compress/zstd_lazy.c:1413:5: note: in expansion of macro
'ZSTD_FOR_EACH_MLS_ROWLOG'
 1413 |     X(__VA_ARGS__, noDict)              \
      |     ^
lib/zstd/compress/zstd_lazy.c:1419:1: note: in expansion of macro
'ZSTD_FOR_EACH_DICT_MODE'
 1419 | ZSTD_FOR_EACH_DICT_MODE(ZSTD_FOR_EACH_MLS_ROWLOG,
GEN_ZSTD_ROW_SEARCH_FN)
      | ^~~~~~~~~~~~~~~~~~~~~~~
0x1a5928c internal_error(char const*, ...)
        /usr/src/gcc/gcc/diagnostic-global-context.cc:787
0xd008ff crash_signal
        /usr/src/gcc/gcc/toplev.cc:325
0xeb9cdf gimple_phi_arg_def_from_edge(gphi const*, edge_def const*)
        /usr/src/gcc/gcc/gimple.h:4777
0xeb9cdf path_range_query::ssa_range_in_phi(vrange&, gphi*)
        /usr/src/gcc/gcc/gimple-range-path.cc:263
0xeba275 path_range_query::range_defined_in_block(vrange&, tree_node*,
basic_block_def*)
        /usr/src/gcc/gcc/gimple-range-path.cc:303
0xeba678 path_range_query::internal_range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:160
0xeba988 path_range_query::internal_range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:188
0xeba988 path_range_query::range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:180
0x9a01ec fold_using_range::range_of_range_op(vrange&, gimple_range_op_handler&,
fur_source&)
        /usr/src/gcc/gcc/gimple-range-fold.cc:817
0x9a1ff1 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*)
        /usr/src/gcc/gcc/gimple-range-fold.cc:706
0xeb846b path_range_query::range_of_stmt(vrange&, gimple*, tree_node*)
        /usr/src/gcc/gcc/gimple-range-path.cc:681
0xeba212 path_range_query::range_defined_in_block(vrange&, tree_node*,
basic_block_def*)
        /usr/src/gcc/gcc/gimple-range-path.cc:309
0xeba678 path_range_query::internal_range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:160
0xeba988 path_range_query::internal_range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:188
0xeba988 path_range_query::range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:180
0x9a01ec fold_using_range::range_of_range_op(vrange&, gimple_range_op_handler&,
fur_source&)
        /usr/src/gcc/gcc/gimple-range-fold.cc:817
0x9a1ff1 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*)
        /usr/src/gcc/gcc/gimple-range-fold.cc:706
0xeb846b path_range_query::range_of_stmt(vrange&, gimple*, tree_node*)
        /usr/src/gcc/gcc/gimple-range-path.cc:681
0xeba212 path_range_query::range_defined_in_block(vrange&, tree_node*,
basic_block_def*)
        /usr/src/gcc/gcc/gimple-range-path.cc:309
0xeba678 path_range_query::internal_range_of_expr(vrange&, tree_node*, gimple*)
        /usr/src/gcc/gcc/gimple-range-path.cc:160
/opt/gcc-17-20260816-nolibc/ia64-linux/libexec/gcc/ia64-linux/17.0.0/cc1 -quiet
-nostdinc -I ./arch/ia64/include -I ./arch/ia64/include/generated -I ./include
-I ./include -I ./arch/ia64/include/uapi -I ./arch/ia64/include/generated/uapi
-I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D
HAVE_WORKING_TEXT_ALIGN -D HAVE_MODEL_SMALL_ATTRIBUTE -D
HAVE_SERIALIZE_DIRECTIVE -D KBUILD_MODFILE="lib/zstd/zstd_compress" -D
KBUILD_BASENAME="zstd_lazy" -D KBUILD_MODNAME="zstd_compress" -D
__KBUILD_MODNAME=zstd_compress -include ./include/linux/compiler-version.h
-include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h
-MMD lib/zstd/compress/.zstd_lazy.o.d lib/zstd/compress/zstd_lazy.c -quiet
-dumpdir lib/zstd/compress/ -dumpbase zstd_lazy.c -dumpbase-ext .c
-mfixed-range=f12-f15,f32-f127 -mconstant-gp -O2 -Wall -Wextra -Wundef
-Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type
-Werror=strict-prototypes -Wno-format-security -Wno-trigraphs
-Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations
-Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-type-limits
-Wdangling-pointer=0 -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type
-Wno-unterminated-string-initialization -Warray-bounds=0 -Wstringop-overflow=0
-Walloc-size-larger-than=18446744073709551615EiB -Wimplicit-fallthrough=5
-Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init
-Wenum-conversion -Wunused -Wunused-but-set-variable=0
-Wunused-const-variable=0 -Wno-packed-not-aligned -Wformat-overflow=0
-Wformat-truncation=0 -Wno-stringop-truncation -Wno-override-init
-Wno-missing-field-initializers -Wno-shift-negative-value
-Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -std=gnu11
-fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing
-fms-extensions -ffixed-r13 -frename-registers -fno-optimize-sibling-calls
-fno-delete-null-pointer-checks -fno-allow-store-data-races
-fno-stack-protector -fomit-frame-pointer -ftrivial-auto-var-init=zero
-fzero-init-padding-bits=all -fno-stack-clash-protection
-fdiagnostics-show-context=2 -fmin-function-alignment=32 -fstrict-flex-arrays=3
-fno-strict-overflow -fstack-check=no -fconserve-stack -fno-builtin-wcslen -o -
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.
make[4]: *** [scripts/Makefile.build:289: lib/zstd/compress/zstd_lazy.o] Error
1
make[4]: *** Waiting for unfinished jobs....
  CC      fs/proc/base.o
  CC      fs/kernfs/dir.o
  CC      fs/kernfs/file.o
  CC      fs/iomap/fiemap.o
  CC      fs/sysfs/symlink.o
  CC      fs/proc/generic.o
  CC      fs/devpts/inode.o
  CC      fs/proc/array.o
  CC      fs/sysfs/mount.o
  CC      fs/iomap/seek.o
  CC      fs/ext4/balloc.o
  CC      fs/kernfs/symlink.o
  AR      kernel/bpf/built-in.a
  CC      fs/proc/fd.o
  CC      net/ipv4/metrics.o
  CC      kernel/time/namespace_vdso.o
  CC      lib/ucs2_string.o
make[3]: *** [scripts/Makefile.build:549: lib/zstd] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      fs/ext4/bitmap.o
  AR      fs/devpts/built-in.a
  CC      fs/proc/proc_tty.o
  CC      fs/proc/cmdline.o
  CC      fs/ext2/balloc.o
  AR      kernel/time/built-in.a
  CC      fs/iomap/bio.o
  AR      kernel/built-in.a
  CC      fs/sysfs/group.o
  CC      net/ipv4/netlink.o
  CC      fs/proc/consoles.o
  CC      fs/ext2/dir.o
  CC      fs/iomap/swapfile.o
  CC      fs/jbd2/transaction.o
make[2]: *** [scripts/Makefile.build:549: lib] Error 2
make[2]: *** Waiting for unfinished jobs....
[...]
```
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.