https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91121
Bug ID: 91121
Summary: ICE with type deduction guides and CRTP base class
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
Target Milestone: ---
Hello gcc-team,
the following code will ICE
```c++
template <typename> struct a { a(int); };
template <typename> struct b : a<b<int>> { using a<b>::a; };
template <typename c> b(c)->b<c>;
struct e {
template <typename d> e(d);
} e{b{2}};
```
with
```
> g++-git -std=c++17 ice.cpp
ice.cpp:6:8: internal compiler error: Segmentation fault
6 | } e{b{2}};
| ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
```
gcc version:
```
g++-git -v
Using built-in specs.
COLLECT_GCC=g++-git
COLLECT_LTO_WRAPPER=/opt/gcc/gcc-git/bin/../lib/gcc/x86_64-pc-linux-gnu/10.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/marehr/Packages/gcc-git/src/gcc/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib
--disable-werror --enable-checking=release --enable-default-pie
--enable-default-ssp --enable-cet=auto
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.0 20190709 (experimental) (GCC)
```
Thank you!