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

            Bug ID: 82082
           Summary: [8 Regression] ICE: in tsubst, at cp/pt.c:13700
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

Created attachment 42106
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42106&action=edit
Somewhat reduced testcase

More r251433 outfall:

 % g++ -w -c logical.ii
logical.ii: In instantiation of ‘TestLogical< <template-parameter-1-1>
>::TestLogical(Xs) [with Xs = tuple<int>; <template-parameter-1-1> =
when<false>]::<lambda(auto:1, auto:2, auto:3, auto:4)> [with auto:1 =
<missing>; auto:2 = <missing>; auto:3 = <missing>; auto:4 = <missing>]’:
logical.ii:80:29:   required from ‘auto partial_t<integer_sequence<long
unsigned int, n ...>, F, X ...>::operator()(Y ...) [with Y = {ebo<bti<0>,
int>}; long unsigned int ...n = {0}; F = partial_t<integer_sequence<long
unsigned int, 0>, partial_t<integer_sequence<long unsigned int, 0>,
TestLogical< <template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int>, int>; X = {int}]’
logical.ii:138:18:   required from ‘void on_each<F>::operator()(Xs ...) [with
Xs = {ebo<bti<0>, int>}; F = partial_t<integer_sequence<long unsigned int, 0>,
partial_t<integer_sequence<long unsigned int, 0>,
partial_t<integer_sequence<long unsigned int, 0>, TestLogical<
<template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int>, int>, int>*]’
logical.ii:63:7:   required from ‘static auto
unpack_impl<int>::apply(basic_tuple_impl<integer_sequence<long unsigned int, n
...>, Xn ...>, F) [with long unsigned int ...i = {0}; Xn = {int}; F =
on_each<partial_t<integer_sequence<long unsigned int, 0>,
partial_t<integer_sequence<long unsigned int, 0>,
partial_t<integer_sequence<long unsigned int, 0>, TestLogical<
<template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int>, int>, int>*>]’
logical.ii:87:16:   [ skipping 20 instantiation contexts, use
-ftemplate-backtrace-limit=0 to disable ]
logical.ii:87:16:   required from ‘constexpr decltype(auto)
unpack_t::operator()(Xs&&, F&&) const [with Xs = basic_tuple<int>&; F =
on_each<_compose<partial_t<integer_sequence<long unsigned int, 0>,
for_each_n_t<2>, tuple<int> >, partial_t<integer_sequence<long unsigned int,
0>, <unnamed struct>, partial_t<integer_sequence<long unsigned int, 0>,
TestLogical< <template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int> > >*>&]’
logical.ii:109:11:   required from ‘static auto
unpack_impl<tuple_tag>::apply(Xs, F) [with Xs = tuple<int>; F =
on_each<_compose<partial_t<integer_sequence<long unsigned int, 0>,
for_each_n_t<2>, tuple<int> >, partial_t<integer_sequence<long unsigned int,
0>, <unnamed struct>, partial_t<integer_sequence<long unsigned int, 0>,
TestLogical< <template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int> > >*>]’
logical.ii:87:16:   required from ‘constexpr decltype(auto)
unpack_t::operator()(Xs&&, F&&) const [with Xs = tuple<int>&; F =
on_each<_compose<partial_t<integer_sequence<long unsigned int, 0>,
for_each_n_t<2>, tuple<int> >, partial_t<integer_sequence<long unsigned int,
0>, <unnamed struct>, partial_t<integer_sequence<long unsigned int, 0>,
TestLogical< <template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int> > >*>]’
logical.ii:143:11:   required from ‘static void for_each_impl<T,
when<condition> >::apply(Xs, F) [with Xs = tuple<int>; F =
_compose<partial_t<integer_sequence<long unsigned int, 0>, for_each_n_t<2>,
tuple<int> >, partial_t<integer_sequence<long unsigned int, 0>, <unnamed
struct>, partial_t<integer_sequence<long unsigned int, 0>, TestLogical<
<template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int> > >; T = tuple_tag; bool condition = false]’
logical.ii:132:17:   required from ‘constexpr void for_each_t::operator()(Xs&&,
F&&) const [with Xs = tuple<int>&; F = _compose<partial_t<integer_sequence<long
unsigned int, 0>, for_each_n_t<2>, tuple<int> >,
partial_t<integer_sequence<long unsigned int, 0>, <unnamed struct>,
partial_t<integer_sequence<long unsigned int, 0>, TestLogical<
<template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int> > >]’
logical.ii:148:13:   required from ‘void for_each_n_t<i>::operator()(Xs, F)
[with Xs = tuple<int>; F = partial_t<integer_sequence<long unsigned int, 0>,
TestLogical< <template-parameter-1-1> >::TestLogical(Xs) [with Xs = tuple<int>;
<template-parameter-1-1> = when<false>]::<lambda(auto:1, auto:2, auto:3,
auto:4)>, int>; int i = 3]’
logical.ii:162:13:   required from ‘TestLogical< <template-parameter-1-1>
>::TestLogical(Xs) [with Xs = tuple<int>; <template-parameter-1-1> =
when<false>]’
logical.ii:167:41:   required from here
logical.ii:163:56: internal compiler error: in tsubst, at cp/pt.c:13700
                      [](auto, auto, auto, auto) { auto true_valued = [] {};
}));
                                                        ^~~~~~~~~~~
0x1044231b tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:13700
0x1043cb13 tsubst_decl
        ../../gcc/gcc/cp/pt.c:13047
0x104406f3 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:13552
0x1042ebe3 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16013
0x1042e217 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15944
0x1042ed0f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16183
0x1042ed0f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16183
0x1042ed0f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16183
0x104741f3 instantiate_decl(tree_node*, bool, bool)
        ../../gcc/gcc/cp/pt.c:23246
0x1031357f maybe_instantiate_decl
        ../../gcc/gcc/cp/decl2.c:4954
0x10316c37 mark_used(tree_node*, int)
        ../../gcc/gcc/cp/decl2.c:5048
0x1021be03 build_over_call
        ../../gcc/gcc/cp/call.c:8157
0x10230b1b build_op_call_1
        ../../gcc/gcc/cp/call.c:4559
0x10230b1b build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
        ../../gcc/gcc/cp/call.c:4585
0x104a08ab finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**,
bool, bool, int)
        ../../gcc/gcc/cp/semantics.c:2502
0x10429263 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:17744
0x1042ed5b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16708
0x1042e577 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15954
0x1042ed0f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:16183
0x104741f3 instantiate_decl(tree_node*, bool, bool)
        ../../gcc/gcc/cp/pt.c:23246

Reply via email to