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++/67164] ICE: tree check: expected class âexpressionâ, have âexceptionalâ (argument_pack_select) in tree_operand_check, at tree.h:3356


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

--- Comment #4 from Louis Dionne <ldionne.2 at gmail dot com> ---
Still fails on trunk. Out of curiosity Markus, do you use software to reduce 
test cases? Did you generate these A, B, ... structs yourself?

Anyway, I was able to reduce to the following:

------------------------------------------------------------------------------
template <typename T>
T declval();

template <typename ...>
struct expand;

template <typename ...Xn>
struct closure {
    closure();

    template <typename ...Yn, typename = expand<
        decltype(Xn(declval<Yn>()))...
    >>
    closure(Yn ...);

    template <typename ...Yn>
    closure(closure<Yn...>);
};

int main() {
    closure<closure<>> empty{};
    closure<closure<>> copy(empty);
}
------------------------------------------------------------------------------


The command line and output (formatted to fit the report) are:

------------------------------------------------------------------------------
> ~/code/gcc/prefix/bin/g++ --version
g++ (GCC) 6.0.0 20150827 (experimental)

> ~/code/gcc/prefix/bin/g++ -std=c++14 test/worksheet.cpp
test/worksheet.cpp: In substitution of â
    template<class ... Yn> 
    closure<Xn>::closure(closure<Yn ...>) [with Yn = <missing>]â:

test/worksheet.cpp:1573:31:   required by substitution of â
    template<class ... Yn, class> 
    closure<Xn>::closure(Yn ...) [with Yn = closure<closure<> >; 
                                       <template-parameter-1-2> = <missing>]â

test/worksheet.cpp:1584:34:   required from here
test/worksheet.cpp:1573:31: internal compiler error: 
    tree check: expected class âexpressionâ, have âexceptionalâ 
    (argument_pack_select) in tree_operand_check, at tree.h:3356

     template <typename ...Yn, typename = expand<
                               ^
------------------------------------------------------------------------------

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