https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126221
Bug ID: 126221
Summary: [17 regression] ICE when building
networkmanager-1.56.1 with -m32 -march=x86-64-v4
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Created attachment 65006
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65006&action=edit
nm-team-utils.c.i.xz
```
$ gcc -c -m32 ./src/libnm-core-impl/libnm-core-impl.a.p/nm-team-utils.c.i -O2
-march=x86-64-v4during RTL pass: expand
../NetworkManager-1.56.1/src/libnm-core-impl/nm-team-utils.c: In function
‘_nm_utils_team_link_watchers_from_variant’:
../NetworkManager-1.56.1/src/libnm-core-impl/nm-team-utils.c:1705:1: internal
compiler error: in maybe_legitimize_operand, at optabs.cc:8427
1705 | _nm_utils_team_link_watchers_from_variant(GVariant *value, gboolean
strict_parsing, GError **error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x564833502584 internal_error(char const*, ...)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/diagnostic-global-context.cc:787
0x56483115eeaf fancy_abort(char const*, int, char const*)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/diagnostics/context.cc:1813
0x564830a57338 maybe_legitimize_operand
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/optabs.cc:8427
0x564830a57338 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/optabs.cc:8576
0x564831852640 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*,
machine_mode, int, tree_node*, rtx_def*, profile_probability)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/optabs.cc:5140
0x5648313f2bf3 do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int,
tree_node*, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*,
profile_probability)
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/dojump.cc:1255
0x5648313f4bf5 do_jump
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/dojump.cc:620
0x56483136174d expand_gimple_cond
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/cfgexpand.cc:3006
0x56483136841c expand_gimple_basic_block
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/cfgexpand.cc:6358
0x56483136a63f execute
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/gcc/cfgexpand.cc:7255
/usr/libexec/gcc/x86_64-pc-linux-gnu/17/cc1 -fpreprocessed
./src/libnm-core-impl/libnm-core-impl.a.p/nm-team-utils.c.i -quiet -dumpbase
nm-team-utils.c.i -dumpbase-ext .i -m32 -march=x86-64-v4 -mtls-dialect=gnu2 -O2
-foffload-options=-fno-stack-protector -foffload-options=-fcf-protection=none
-o /tmp/ccvycIH7.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
```
```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/17/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage.notmp/portage/sys-devel/gcc-17.0.9999/work/gcc-17.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/17
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/17/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/17/python
--enable-libphobos --enable-languages=c,c++,d,fortran,ada,jit --enable-obsolete
--enable-secureplt --disable-werror --with-system-zlib --enable-nls
--without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo Hardened 17.0.9999 p, commit
03c4df9126fe6f8d6b5cdd49e7116310773e87a7' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch
--enable-linker-build-id --enable-libada --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --with-tls=gnu2 --enable-multilib
--with-multilib-list=m32,mx32,m64 --disable-fixed-point --with-abi=m64
--enable-targets=all --enable-offload-defaulted
--enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp
--enable-cet --disable-systemtap --disable-valgrind-annotations
--disable-valgrind-interop --disable-vtable-verify --disable-libvtv --with-zstd
--with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie
--enable-host-bind-now --enable-default-ssp --disable-fixincludes
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-host-shared
--enable-libgdiagnostics --with-build-config=bootstrap-cet
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260710 (experimental)
081959973e38fde06077cbfa70e036e4f018489c (Gentoo Hardened 17.0.9999 p, commit
03c4df9126fe6f8d6b5cdd49e7116310773e87a7)
```