This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/85415] New: internal compiler error: in finish_member_declaration, at cp/semantics.c:2984


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

            Bug ID: 85415
           Summary: internal compiler error: in finish_member_declaration,
                    at cp/semantics.c:2984
           Product: gcc
           Version: 7.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frederik.engels24 at gmail dot com
  Target Milestone: ---

Created attachment 43944
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43944&action=edit
testcase triggering error

Not sure if this is similar to #82722.
Seems to happen when trying to use fold expressions, but the same thing
occurred when I used std::make_tuple to execute over all tuple members.
The same code compiles in clang 6.0.0 and MSVC

Here is the full output, with the testcase as an attachment

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/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 --enable-libmpx --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
Thread model: posix
gcc version 7.3.1 20180312 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-save-temps' '-std=c++1z' '-o'
'testcase' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/cc1plus -E -quiet -v -D_GNU_SOURCE
testcase.cpp -mtune=generic -march=x86-64 -std=c++1z -Wall -Wextra
-fpch-preprocess -o testcase.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1

/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/x86_64-pc-linux-gnu
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-save-temps' '-std=c++1z' '-o'
'testcase' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/cc1plus -fpreprocessed testcase.ii
-quiet -dumpbase testcase.cpp -mtune=generic -march=x86-64 -auxbase testcase
-Wall -Wextra -std=c++1z -version -o testcase.s
GNU C++14 (GCC) version 7.3.1 20180312 (x86_64-pc-linux-gnu)
        compiled by GNU C version 7.3.1 20180312, GMP version 6.1.2, MPFR
version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++14 (GCC) version 7.3.1 20180312 (x86_64-pc-linux-gnu)
        compiled by GNU C version 7.3.1 20180312, GMP version 6.1.2, MPFR
version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3fb60f63f2e4dccab1b015b716b8b627
testcase.cpp: In instantiation of
‘tuple_vector<Ts>::clear_all()::<lambda(auto:1& ...)> [with auto:1 =
{std::vector<int, std::allocator<int> >, std::vector<bool, std::allocator<bool>
>, std::vector<double, std::allocator<double> >}; Ts = {int, bool, double}]’:
/usr/include/c++/7.3.1/type_traits:2428:26:   required by substitution of
‘template<class _Fn, class ... _Args> static std::__result_of_success<decltype
(declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other>
std::__result_of_other_impl::_S_test(int) [with _Fn =
tuple_vector<Ts>::clear_all() [with Ts = {int, bool, double}]::<lambda(auto:1&
...)>; _Args = {std::vector<int, std::allocator<int> >&, std::vector<bool,
std::allocator<bool> >&, std::vector<double, std::allocator<double> >&}]’
/usr/include/c++/7.3.1/type_traits:2439:55:   required from ‘struct
std::__result_of_impl<false, false, tuple_vector<Ts>::clear_all() [with Ts =
{int, bool, double}]::<lambda(auto:1& ...)>, std::vector<int,
std::allocator<int> >&, std::vector<bool, std::allocator<bool> >&,
std::vector<double, std::allocator<double> >&>’
/usr/include/c++/7.3.1/type_traits:2444:12:   required from ‘struct
std::__invoke_result<tuple_vector<Ts>::clear_all() [with Ts = {int, bool,
double}]::<lambda(auto:1& ...)>, std::vector<int, std::allocator<int> >&,
std::vector<bool, std::allocator<bool> >&, std::vector<double,
std::allocator<double> >&>’
/usr/include/c++/7.3.1/bits/invoke.h:89:5:   required by substitution of
‘template<class _Callable, class ... _Args> constexpr typename
std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&,
_Args&& ...) [with _Callable = tuple_vector<Ts>::clear_all() [with Ts = {int,
bool, double}]::<lambda(auto:1& ...)>; _Args = {std::vector<int,
std::allocator<int> >&, std::vector<bool, std::allocator<bool> >&,
std::vector<double, std::allocator<double> >&}]’
/usr/include/c++/7.3.1/tuple:1662:27:   required from ‘constexpr decltype(auto)
std::__apply_impl(_Fn&&, _Tuple&&, std::index_sequence<_Idx ...>) [with _Fn =
tuple_vector<Ts>::clear_all() [with Ts = {int, bool, double}]::<lambda(auto:1&
...)>; _Tuple = std::tuple<std::vector<int, std::allocator<int> >,
std::vector<bool, std::allocator<bool> >, std::vector<double,
std::allocator<double> > >&; long unsigned int ..._Idx = {0, 1, 2};
std::index_sequence<_Idx ...> = std::integer_sequence<long unsigned int, 0, 1,
2>]’
/usr/include/c++/7.3.1/tuple:1671:31:   required from ‘constexpr decltype(auto)
std::apply(_Fn&&, _Tuple&&) [with _Fn = tuple_vector<Ts>::clear_all() [with Ts
= {int, bool, double}]::<lambda(auto:1& ...)>; _Tuple =
std::tuple<std::vector<int, std::allocator<int> >, std::vector<bool,
std::allocator<bool> >, std::vector<double, std::allocator<double> > >&]’
testcase.cpp:17:19:   required from ‘void tuple_vector<Ts>::clear_all() [with
Ts = {int, bool, double}]’
testcase.cpp:28:27:   required from here
testcase.cpp:19:84: internal compiler error: in finish_member_declaration, at
cp/semantics.c:2984
             (clear<typename
std::remove_reference_t<decltype(vectors)>::value_type>(), ...);
             
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]