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

            Bug ID: 92594
           Summary: [10 Regression] internal compiler error: in
                    build_value_init_noctor, at cp/init.c:400 using
                    std::tuple
           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: ---

Hi gcc-team,

the following code ices on me:

```
template <typename _Head> struct tuple {
  tuple() : _M_head_impl() {}
  _Head _M_head_impl;
};
template <typename type0> struct pod_tuple { type0 _head; };
struct e {};
struct bar : e {
  using e::e;
};
int main() { tuple<pod_tuple<bar>> a; }

```

with

```
> g++-git -std=c++17 -c ice.cpp

ice.cpp: In instantiation of ‘tuple<_Head>::tuple() [with _Head =
pod_tuple<bar>]’:
ice.cpp:10:36:   required from here
ice.cpp:2:26: internal compiler error: in build_value_init_noctor, at
cp/init.c:400
    2 |   tuple() : _M_head_impl() {}
      |                          ^
0x5ddd2b build_value_init_noctor(tree_node*, int)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/init.c:400
0x6ab8f5 build_value_init(tree_node*, int)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/init.c:379
0x6b1c46 perform_member_init
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/init.c:810
0x6b1c46 emit_mem_initializers(tree_node*)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/init.c:1374
0x7365b4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:17529
0x734c5a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:17509
0x734c5a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:17826
0x7341fc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:17509
0x7341fc instantiate_decl(tree_node*, bool, bool)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:25312
0x7532eb instantiate_pending_templates(int)
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/pt.c:25428
0x699aa0 c_parse_final_cleanups()
        /home/marehr/Packages/gcc-git/src/gcc/gcc/cp/decl2.c:4848
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
```

gcc version is:

```
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++ --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 --disable-boostrap
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.0 20191116 (experimental) (GCC)
```

Reply via email to