This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67164] ICE: tree check: expected class âexpressionâ, have âexceptionalâ (argument_pack_select) in tree_operand_check, at tree.h:3356
- From: "ldionne.2 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Aug 2015 19:52:55 +0000
- Subject: [Bug c++/67164] ICE: tree check: expected class âexpressionâ, have âexceptionalâ (argument_pack_select) in tree_operand_check, at tree.h:3356
- Auto-submitted: auto-generated
- References: <bug-67164-4 at http dot gcc dot gnu dot org/bugzilla/>
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<
^
------------------------------------------------------------------------------