https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116565
Bug ID: 116565 Summary: ICE in tsubst, at cp/pt.cc:16401 Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tsnorri at iki dot fi Target Milestone: --- Created attachment 59038 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59038&action=edit Compiler input Attached is the input processed with cvise. I used GCC 13 to preprocess the original input in order to get valid code for it as well as GCC 14. Command line: ~/../linuxbrew/.linuxbrew/bin/g++-14 -c -std=c++2b -Wall -o test.o fasta_reader_arbitrary.ii fasta_reader_arbitrary.ii: In instantiation of 'transition_map_builder<tuple<libbio::markov_chains::transition<comment_line, comment_line, wrapped_double{0.0}> > >::make_transition_map()::<lambda(integral_constant<long unsigned int, t_idx>)> [with long unsigned int t_idx = 0]': fasta_reader_arbitrary.ii:24:16: required from 'constexpr void map_to_array(integer_sequence<t_integer, t_indices ...>, t_fn) [with t_integer = long unsigned int; long unsigned int ...t_indices = {0}; t_fn = transition_map_builder<tuple<libbio::markov_chains::transition<comment_line, comment_line, wrapped_double{0.0}> > >::make_transition_map()::<lambda(integral_constant<long unsigned int, t_idx>)>]' 24 | make_tuple(fn(integral_constant<t_integer, t_indices>{})...); | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fasta_reader_arbitrary.ii:48:17: required from 'constexpr const array<1> libbio::markov_chains::chain<fasta_line, initial_state, libbio::markov_chains::transition_list<libbio::markov_chains::transition<comment_line, comment_line, wrapped_double{0.0}> > >::transitions' 48 | map_to_array( | ~~~~~~~~~~~~^ 49 | make_index_sequence<transition_node_indices.size()>{}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 | []<unsigned long t_idx>(integral_constant<unsigned long, t_idx>) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51 | return first_index_of_v< | ~~~~~~~~~~~~~~~~~~~~~~~~ 52 | nodes_type, tuple_element_t<t_idx, transition_nodes_type>>; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 53 | }); | ~~ fasta_reader_arbitrary.ii:60:25: required from 'struct libbio::markov_chains::chain<fasta_line, initial_state, libbio::markov_chains::transition_list<libbio::markov_chains::transition<comment_line, comment_line, wrapped_double{0.0}> > >' 60 | constexpr static auto transitions{transition_map_builder< | ^~~~~~~~~~~ fasta_reader_arbitrary.ii:65:32: required from here 65 | template <typename T> decltype(T()) arbitrary; | ^~~ fasta_reader_arbitrary.ii:61:69: in 'constexpr' expansion of 'transition_map_builder<tuple<libbio::markov_chains::transition<comment_line, comment_line, wrapped_double{0.0}> > >::make_transition_map()' fasta_reader_arbitrary.ii:46:36: internal compiler error: in tsubst, at cp/pt.cc:16442 46 | typedef invoke_result_t<decltype([] {})> nodes_type; | ^~~~~ 0x764e36429d8f __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x764e36429e3f __libc_start_main_impl ../csu/libc-start.c:392 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://github.com/Homebrew/homebrew-core/issues> for instructions. Triggered with following versions: g++-14 (Homebrew GCC 14.2.0) 14.2.0 (both GNU/Linux on x86_64 and macOS on arm64) g++ (conda-forge gcc 14.1.0-1) 14.1.0 (tested GNU/Linux only) Not triggered with any of the following on either platform: g++-13 (Homebrew GCC 13.3.0) 13.3.0 g++-12 (Homebrew GCC 12.4.0) 12.4.0 (Unfortunately I don't have access to GCC 14 installed with the operating system's package manager.) Configuration options for the GCC 14 builds tested on Linux: g++-14 -v Reading specs from /home/linuxbrew/.linuxbrew/Cellar/gcc/14.2.0/bin/../lib/gcc/current/gcc/x86_64-pc-linux-gnu/14/specs COLLECT_GCC=/home/linuxbrew/.linuxbrew/bin/g++-14 COLLECT_LTO_WRAPPER=/home/linuxbrew/.linuxbrew/Cellar/gcc/14.2.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=/home/linuxbrew/.linuxbrew/opt/gcc --libdir=/home/linuxbrew/.linuxbrew/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran,m2 --program-suffix=-14 --with-gmp=/home/linuxbrew/.linuxbrew/opt/gmp --with-mpfr=/home/linuxbrew/.linuxbrew/opt/mpfr --with-mpc=/home/linuxbrew/.linuxbrew/opt/libmpc --with-isl=/home/linuxbrew/.linuxbrew/opt/isl --with-zstd=/home/linuxbrew/.linuxbrew/opt/zstd --with-pkgversion='Homebrew GCC 14.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --with-boot-ldflags='-static-libstdc++ -static-libgcc ' --disable-multilib --enable-default-pie Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.0 (Homebrew GCC 14.2.0) g++ -v Reading specs from /home/tnorri/.conda/envs/mamba/envs/clang/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/specs could not find specs file conda.specs COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/home/tnorri/.conda/envs/mamba/envs/clang/bin/../libexec/gcc/x86_64-conda-linux-gnu/14.1.0/lto-wrapper Target: x86_64-conda-linux-gnu Configured with: ../configure --prefix=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho --with-slibdir=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib --libdir=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib --mandir=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/man --build=x86_64-conda-linux-gnu --host=x86_64-conda-linux-gnu --target=x86_64-conda-linux-gnu --enable-languages=c,c++,fortran,objc,obj-c++ --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-lto --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-bootstrap --disable-multilib --enable-long-long --with-sysroot=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/x86_64-conda-linux-gnu/sysroot --with-build-sysroot=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/work/cf-compilers/x86_64-conda-linux-gnu/sysroot --with-native-system-header-dir=/usr/include --with-gxx-include-dir=/home/conda/feedstock_root/build_artifacts/gcc_compilers_1724798733686/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/gcc/x86_64-conda-linux-gnu/14.1.0/include/c++ --with-pkgversion='conda-forge gcc 14.1.0-1' --with-bugurl=https://github.com/conda-forge/ctng-compilers-feedstock/issues/new/choose --enable-libsanitizer --enable-default-pie --enable-threads=posix Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.1.0 (conda-forge gcc 14.1.0-1)