https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124632
Bug ID: 124632
Summary: [16 Regression] gcc/cp/pt.cc:9665:27: runtime error:
index 42405 out of bounds for t ype 'tree_code_class
[389]'
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
For the g++ testsuite file g++.dg/cpp23/explicit-obj-lambda2.C,
compiled by recent g++ trunk, does this:
$ for i in ~/gcc/results*/bin/g++; do echo $i; $i -c -Wall
-Wno-c++23-extensions g++.dg/cpp23/explicit-obj-lambda2.C;
/home/dcb/gcc/results.20260305.ubsan/bin/g++
/home/dcb/gcc/results.20260309.ubsan/bin/g++
../../trunk/gcc/cp/pt.cc:9665:27: runtime error: index 42405 out of bounds for
t
ype 'tree_code_class [389]'
#0 0x00f3ff90 in template_args_equal(tree_node*, tree_node*)
../../trunk/gcc
/cp/pt.cc:9665
#1 0x00f40594 in template_args_equal(tree_node*, tree_node*)
../../trunk/gcc
/cp/pt.cc:9635
Latest release seems happy with it:
$ for i in ~/gcc/results.15.2.0/bin/g++; do echo $i; $i -c -Wall
-Wno-c++23-extensions g++.dg/cpp23/explicit-obj-lambda2.C; done 2>&1 | more
/home/dcb/gcc/results.15.2.0/bin/g++
$
For bisection:
$ /home/dcb/gcc/results.20260305.ubsan/bin/g++ -v 2>&1 | grep exp
gcc version 16.0.1 20260305 (experimental) (ee8ca6c927ec949a)
$ /home/dcb/gcc/results.20260309.ubsan/bin/g++ -v 2>&1 | grep exp
gcc version 16.0.1 20260309 (experimental) (ede3dd56e6324578)
dcb@raspberrypi:~/gcc/trunk/gcc/testsuite $
This is on a 32 bit raspberry PI:
$ /home/dcb/gcc/results.20260309.ubsan/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results.20260309.ubsan/bin/g++
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20260309.ubsan/libexec/gcc/arm-linux-gnueabihf/16.0.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure
--prefix=/home/dcb/gcc/results.20260309.ubsan --disable-doc --disable-multilib
--with-build-config=bootstrap-ubsan --with-pkgversion=ede3dd56e6324578
--enable-checking=yes --enable-languages=c,c++,fortran --with-cpu=cortex-a76
--with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.1 20260309 (experimental) (ede3dd56e6324578)
$