[Bug c++/113170] ICE: Segfault (template template parameter, alias template, default template argument)

2023-12-29 Thread iamkirkezz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113170

--- Comment #1 from Kirkezz  ---
I was experimenting with the template template parameters, and ICE occured.

[Bug c++/113170] New: ICE: Segfault (template template parameter, alias template, default value)

2023-12-29 Thread iamkirkezz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113170

Bug ID: 113170
   Summary: ICE: Segfault (template template parameter, alias
template, default value)
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iamkirkezz at gmail dot com
  Target Milestone: ---

Created attachment 56964
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56964=edit
g++ main.cpp -v output

| gcc version: 13.2.1 20230801
| system type: x86_64-pc-linux-gnu
| gcc options:
"""
/build/gcc/src/gcc/configure
--enable-languages=ada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-bootstrap
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--with-build-config=bootstrap-lto --with-linker-hash-style=gnu
--with-system-zlib --enable-__cxa_atexit --enable-cet=auto
--enable-checking=release --enable-clocale=gnu --enable-default-pie
--enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object
--enable-libstdcxx-backtrace --enable-link-serialization=1
--enable-linker-build-id --enable-lto --enable-multilib --enable-plugin
--enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-werror
"""
| the complete command line: g++ main.cpp
| gcc output (for the full `g++ -v` output, see the attachment):
"""
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
"""
| source file (https://godbolt.org/z/cKTGrn1sP):
"""
template typename TT>
struct S;
template typename TT = S>
struct SSS {};
template typename TT = SSS>
struct S {};
template typename TT = S, typename T = int>
using SS = S;
int main() {
SS ss;
}
"""