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

            Bug ID: 125758
           Summary: [17 regression] ICE in ranger (stack overflow) when
                    building qgis
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Reported to me by Paul Zander (negril).

It doesn't crash for me without Valgrind but it does with. For him, it fails
always.

```
$ g++ foo.ii -c -march=znver3 -mshstk -wrapper valgrind,-q
==430399== Stack overflow in thread #1: can't grow stack to 0x1ffe001000
==430399== Can't extend stack to 0x1ffe000d98 during signal delivery for thread
1:
==430399==   no stack segment
==430399==
==430399== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==430399==  Access not within mapped region at address 0x1FFE000D98
==430399== Stack overflow in thread #1: can't grow stack to 0x1ffe001000
==430399==    at 0x55C8C48: fold_using_range::range_of_range_op(vrange&,
gimple_range_op_handler&, fur_source&) (gimple-range-fold.cc:734)
==430399==  If you believe this happened as a result of a stack
==430399==  overflow in your program's main thread (unlikely but
==430399==  possible), you can try to increase the size of the
==430399==  main thread stack using the --main-stacksize= flag.
==430399==  The main thread stack size used in this run was 16777216.
g++: internal compiler error: Segmentation fault signal terminated program
valgrind
Segmentation fault         (core dumped) g++ foo.ii -c -march=znver3 -mshstk
-wrapper valgrind,-q
```

```
Using built-in specs.
COLLECT_GCC=g++
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
6ff3934e1b39a90cf0a405c1ec18b24a6246acb5' --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-lean'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260611 (experimental)
91e141998eafb97725873b3a1e61b7b8cdd676e3 (Gentoo Hardened 17.0.9999 p, commit
6ff3934e1b39a90cf0a405c1ec18b24a6246acb5)
``

Reply via email to