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

--- Comment #1 from Matthias Klose <doko at debian dot org> ---
Created attachment 50031
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50031&action=edit
reduced test case

the reduction from https://bugs.debian.org/980429
$ x86_64-linux-gnu-g++-10 -std=c++17 -Wno-return-type -c gcc-10-segfault.C
gcc-10-segfault.C: In substitution of 'template<class _Functor, class, class>
std::function<float(float, float, float)>::function(_Functor) [with _Functor =
<missing>; <template-parameter-1-2> = <missing>; <template-parameter-1-3> =
<missing>]':
gcc-10-segfault.C:283:12:   required from 'static void
tweeny::detail::easingresolve<I, TypeTuple, FunctionTuple,
tweeny::easing::linearEasing, Fs ...>::impl(FunctionTuple&,
tweeny::easing::linearEasing, Fs ...) [with int I = 0; TypeTuple =
std::array<float, 1>; FunctionTuple = std::tuple<std::function<float(float,
float, float)> >; Fs = {}]'
gcc-10-segfault.C:289:64:   required from 'void
tweeny::detail::easingfill(EasingCollectionT&, EasingT,
tweeny::detail::int2type<0>) [with TypeTupleT = std::array<float, 1>;
EasingCollectionT = std::tuple<std::function<float(float, float, float)> >;
EasingT = tweeny::easing::linearEasing]'
gcc-10-segfault.C:297:41:   required from 'void
tweeny::detail::tweenpoint<Ts>::via(F) [with F = tweeny::easing::linearEasing;
Ts = {float}]'
gcc-10-segfault.C:294:5:   required from
'tweeny::detail::tweenpoint<Ts>::tweenpoint(Ts ...) [with Ts = {float}]'
gcc-10-segfault.C:141:2:   required from 'static constexpr
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > >
std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with
_Tp = tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >;
std::_Require<std::__and_<std::__not_<typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type>,
std::is_constructible<_Tp, _Args ...> > > = void; typename
std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type =
std::integral_constant<bool, false>]'
gcc-10-segfault.C:144:14:   required from 'static decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...))
std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp
= tweeny::detail::tweenpoint<float>; _Args = {float&}; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; decltype
(std::allocator_traits<_Alloc>::_S_construct(__a, __p,
(forward<_Args>)(std::allocator_traits<_Alloc>::construct::__args)...)) =
void]'
gcc-10-segfault.C:224:26:   required from 'std::vector<_Tp, _Alloc>::reference
std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {float&}; _Tp
= tweeny::detail::tweenpoint<float>; _Alloc =
std::allocator<tweeny::detail::tweenpoint<float> >; std::vector<_Tp,
_Alloc>::reference = tweeny::detail::tweenpoint<float>&]'
gcc-10-segfault.C:310:21:   required from 'tweeny::tween<T>&
tweeny::tween<T>::to(T) [with T = float]'
gcc-10-segfault.C:322:47:   required from here
gcc-10-segfault.C:283:12: internal compiler error: Segmentation fault
  283 |  get<I>(b) = easing::linear.run<ArgType>;
      |  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0xa65400 crash_signal
        ../../src/gcc/toplev.c:328
0x7fa8b7dfed5f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x13a54ed synthesize_method(tree_node*)
        ../../src/gcc/cp/method.c:1536
0x64cece maybe_instantiate_noexcept(tree_node*, int)
        ../../src/gcc/cp/pt.c:25338
0x768644 resolve_overloaded_unification
        ../../src/gcc/cp/pt.c:22255
0x768644 unify_one_argument
        ../../src/gcc/cp/pt.c:21801
0x111d442 type_unification_real
        ../../src/gcc/cp/pt.c:21945
0x111c93f fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
        ../../src/gcc/cp/pt.c:21325
0x111c02a add_template_candidate_real(z_candidate**, tree_node*, tree_node*,
tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed> const*, tree_node*,
tree_node*, tree_node*, int, tree_node*, unification_kind_t, int) [clone
.isra.0]
        ../../src/gcc/cp/call.c:3417
0xf538cd add_template_candidate
        ../../src/gcc/cp/call.c:3502
0xf538cd add_candidates
        ../../src/gcc/cp/call.c:5855
0x11289ec build_user_type_conversion_1
        ../../src/gcc/cp/call.c:4055
0xedc654 implicit_conversion
        ../../src/gcc/cp/call.c:2075
0x101b193 reference_binding
        ../../src/gcc/cp/call.c:1914
0xedc597 implicit_conversion
        ../../src/gcc/cp/call.c:2013
0xf5424d add_function_candidate
        ../../src/gcc/cp/call.c:2410
0xf53969 add_candidates
        ../../src/gcc/cp/call.c:5868
0x1045831 add_operator_candidates
        ../../src/gcc/cp/call.c:5974
0xf5de70 build_new_op_1
        ../../src/gcc/cp/call.c:6182
0xf5d597 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
        ../../src/gcc/cp/call.c:6573
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Reply via email to