[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2021-10-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2019-03-14 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #15 from Paolo Carlini  ---
Let's close it, then.

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2018-11-19 Thread ldionne.2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #14 from Louis Dionne  ---
I think so -- all the reproducers posted in this bug report can compile with
GCC trunk.

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2018-11-19 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #13 from Martin Liška  ---
Can the bug be marked as resolved?

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2018-10-17 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Paolo Carlini  changed:

   What|Removed |Added

 CC|jason at gcc dot gnu.org   |

--- Comment #12 from Paolo Carlini  ---
Can we close this?

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-07-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #11 from Jason Merrill  ---
Author: jason
Date: Wed Jul 20 05:06:52 2016
New Revision: 238507

URL: https://gcc.gnu.org/viewcvs?rev=238507=gcc=rev
Log:
PR c++/67164 - clean up dead code

* pt.c (iterative_hash_template_arg, template_args_equal): Don't
handle ARGUMENT_PACK_SELECT.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-04-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #10 from Jason Merrill  ---
Author: jason
Date: Fri Apr 15 17:03:33 2016
New Revision: 235043

URL: https://gcc.gnu.org/viewcvs?rev=235043=gcc=rev
Log:
PR c++/67164

* pt.c (copy_template_args): New.
(tsubst_pack_expansion): Use it.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/variadic-tuple2.C
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/pt.c

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #9 from Jason Merrill  ---
(In reply to Jason Merrill from comment #8)
> I've now fixed (for GCC 6) all the bugs that affect Hana except for 47226.

That is, that break parts of 'make check'.  There's also bug 66543, but that's
just a warning issue, so I'm not going to check in the fix quite yet.

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #8 from Jason Merrill  ---
I've now fixed (for GCC 6) all the bugs that affect Hana except for 47226.

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-03-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #7 from Jason Merrill  ---
Author: jason
Date: Fri Mar  4 01:45:43 2016
New Revision: 233954

URL: https://gcc.gnu.org/viewcvs?rev=233954=gcc=rev
Log:
PR c++/67164

* pt.c (copy_template_args): New.
(tsubst_pack_expansion): Use it.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-tuple2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-03-02 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-03-02
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2016-02-27 Thread ldionne.2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #6 from Louis Dionne  ---
The code I posted above does not seem to trigger the bug anymore on GCC trunk. 
However, the following code still produces an ICE on trunk:

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

--
#include 

namespace detail {
template 
struct fast_and
: std::is_same>
{ };
}

template 
struct tuple {
tuple() { }

template ::value...>::value
>::type>
tuple(Yn&& ...yn) { }

template ::value...>::value
>::type>
tuple(tuple const& other) { }
};

tuple> t{};
tuple> copy = t;
--

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2015-08-27 Thread ldionne.2 at gmail dot com
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(declvalYn()))...

closure(Yn ...);

template typename ...Yn
closure(closureYn...);
};

int main() {
closureclosure empty{};
closureclosure 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 ‘
templateclass ... Yn 
closureXn::closure(closureYn ...) [with Yn = missing]’:

test/worksheet.cpp:1573:31:   required by substitution of ‘
templateclass ... Yn, class 
closureXn::closure(Yn ...) [with Yn = closureclosure ; 
   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
   ^
--

[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2015-08-27 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

--- Comment #5 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Louis Dionne from comment #4)
 Still fails on trunk. Out of curiosity Markus, do you use software to reduce 
 test cases? Did you generate these A, B, ... structs yourself?

I normally just use https://github.com/csmith-project/creduce .
But, as your testcase shows, you can sometimes reduce testcases further by
hand.


[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2015-08-23 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Here's another testcase: 

namespace std {
template typename _Tp struct A { static constexpr _Tp value = 0; };
template bool, typename, typename struct conditional;
template typename... struct B;
template typename _B1, typename _B2
struct B_B1, _B2 : conditional1, _B1, _B2 {};
template typename... struct C;
template typename _B1, typename _B2
struct C_B1, _B2 : conditional1, _B2, _B1 {};
template typename struct D;
template typename _Tp struct I : BAbool, D_Tp::type {};
template typename _Tp _Tp declval();
struct F {
  template typename _Tp, typename _Arg,
typename = decltype(_Tp(declval_Arg()))
  static Abool __test(int);
};
template typename _Tp, typename _Arg struct J : F {
  decltype(__test_Tp, _Arg(0)) type;
};
template typename _Tp, typename _Arg struct K : Cint, J_Tp, _Arg {};
template typename _Tp, typename _Arg
struct L : conditionalI_Tp::value, int, K_Tp, _Arg {};
template typename _Tp, typename _Arg
struct __is_direct_constructible : L_Tp, _Arg::type {};
template typename... struct G;
template typename _Tp, typename _Arg
struct G_Tp, _Arg : __is_direct_constructible_Tp, _Arg {};
template typename _Tp, typename... _Args
struct is_constructible : G_Tp, _Args...::type {};
template bool struct enable_if;
template bool, typename _Iftrue, typename struct conditional {
  typedef _Iftrue type;
};
template typename _Iftrue, typename _Iffalse
struct conditionalfalse, _Iftrue, _Iffalse {
  typedef _Iffalse type;
};
}
namespace detail {
template bool struct fast_and;
template typename... Xn struct closure {
  template typename... Yn,
typename = std::enable_if
fast_andstd::is_constructibleXn, Yn::value...::value
  closure(Yn...);
  template typename... Yn closure(closureYn...);
};
}
template typename struct make_impl;
template typename Datatype struct H {
  template typename... X decltype(auto) operator()(X... x) {
return make_implDatatype::apply(x...);
  }
};
template typename Datatype HDatatype make;
struct Tuple;
template typename... Xs struct M : detail::closureXs... {
  using detail::closureXs...::closure;
};
template  struct make_implTuple {
  template typename... Xs static MXs... apply(Xs...);
};
namespace test {
struct {
  template typename... Xs decltype(auto) operator()(Xs... xs) {
auto storage = makeTuple(xs...);
return storage;
  }
} seq;
}
int main() { test::seq(test::seq()); }


[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2015-08-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ldionne.2 at gmail dot com

--- Comment #2 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(Louis, this ICE was introduced by commit 8a0ddb0fa7b6f7a of
https://github.com/ldionne/hana)


[Bug c++/67164] ICE: tree check: expected class ‘expression’, have ‘exceptional’ (argument_pack_select) in tree_operand_check, at tree.h:3356

2015-08-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67164

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

Summary|[6 Regression] ICE: tree|ICE: tree check: expected
   |check: expected class   |class ‘expression’, have
   |‘expression’, have  |‘exceptional’
   |‘exceptional’   |(argument_pack_select) in
   |(argument_pack_select) in   |tree_operand_check, at
   |tree_operand_check, at  |tree.h:3356
   |tree.h:3356 |
  Known to fail||5.1.0, 6.0

--- Comment #1 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
With --enable-checking gcc-5 also ICEs.

gcc-4.9 rejects the testcase:

github_113.ii:70:47: error: template declaration of
‘boost::hana::make_tDatatype boost::hana::make’
 template typename Datatype make_tDatatype make;
   ^
github_113.ii:72:18: error: ‘make’ was not declared in this scope
 auto make_pair = makePair;
  ^
github_113.ii:72:27: error: expected primary-expression before ‘’ token
 auto make_pair = makePair;
   ^
github_113.ii:72:28: error: expected primary-expression before ‘;’ token
 auto make_pair = makePair;
^
github_113.ii:74:19: error: ‘make’ was not declared in this scope
 auto make_tuple = makeTuple;
   ^
github_113.ii:74:29: error: expected primary-expression before ‘’ token
 auto make_tuple = makeTuple;
 ^
github_113.ii:74:30: error: expected primary-expression before ‘;’ token
 auto make_tuple = makeTuple;
  ^