public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/116565] New: ICE in tsubst, at cp/pt.cc:16401
@ 2024-09-02  9:42 tsnorri at iki dot fi
  2024-09-03  1:55 ` [Bug c++/116565] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: tsnorri at iki dot fi @ 2024-09-02  9:42 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/116565] ICE in tsubst, at cp/pt.cc:16401
  2024-09-02  9:42 [Bug c++/116565] New: ICE in tsubst, at cp/pt.cc:16401 tsnorri at iki dot fi
@ 2024-09-03  1:55 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-03  1:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced further:
```
template <typename, typename> int const first_index_of_v;
template <typename _Fn> using invoke_result_t = _Fn;
template <typename> struct s1 {
  typedef invoke_result_t<decltype([] {})> nodes_type;
  template<int>
  consteval static auto f() {
    return first_index_of_v< nodes_type, int>;
  }
};
auto arbitrary() { return s1<int>::f<1>(); }
```

Dup.

*** This bug has been marked as a duplicate of bug 115318 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-03  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-02  9:42 [Bug c++/116565] New: ICE in tsubst, at cp/pt.cc:16401 tsnorri at iki dot fi
2024-09-03  1:55 ` [Bug c++/116565] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).