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

            Bug ID: 127023
           Summary: [16/17 regression] ICE when building darktable
                    (redirect_callee, at cgraph.cc:1712)
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: jamborm at gcc dot gnu.org
  Target Milestone: ---

Noticed this by chance. Apparently Arch hit this at
https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/work_items/46
but it's unfortunate nobody brought it here.

In the bug, they've bisected for the fix on trunk and said
r17-646-g2508fac25d2722 fixes it, so latent. 16 ICEs though.

```
typedef int a;
typedef enum { b, c } d;
__attribute__((target_clones("default", "fma4"))) void
e(float *, float *, a, a, d f, float, float, float) {
  switch (f)
  case b:
#pragma omp parallel
    for (;;)
      ;
}
__attribute__((target_clones("default", "fma4"))) void g(float *h, float *i) {
  a j;
  a height;
  e(h, i, j, height, c, 1.0f, 0.0f, 1.0f);
}
```

```
$ gcc-16 a.c -c -O3 -fopenmp
during IPA pass: cp
a.c:15:1: internal compiler error: in redirect_callee, at cgraph.cc:1712
   15 | }
      | ^
/usr/libexec/gcc/x86_64-pc-linux-gnu/16/cc1 -quiet -D_REENTRANT a.c -quiet
-dumpbase a.c -dumpbase-ext .c -mtune=generic -march=x86-64 -mtls-dialect=gnu2
-O3 -fopenmp -foffload-options=-fno-stack-protector -o /tmp/ccx78AhX.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
```

```

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-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,algol68,m2,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
cb0bef329c3c99175a317e206f3e376f2fb6690d' --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
--disable-cet --enable-systemtap --enable-valgrind-annotations
--enable-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-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260820 (experimental)
222f7f90191563a71dfbc710c8de950ace91c439 (Gentoo Hardened 17.0.9999 p, commit
cb0bef329c3c99175a317e206f3e376f2fb6690d)
```

Reply via email to