Commit b7d8e7e5 by Jason Merrill Committed by Jason Merrill

PR c++/84181 - ICE with lambda parm in template argument.

	* tree.c (strip_typedefs_expr): Use cp_tree_operand_length.

From-SVN: r257339
parent 113db472
2018-02-02 Jason Merrill <jason@redhat.com>
PR c++/84181 - ICE with lambda parm in template argument.
* tree.c (strip_typedefs_expr): Use cp_tree_operand_length.
2018-02-01 Jason Merrill <jason@redhat.com>
PR c++/84160 - ICE with nested variadic capture.
......
......@@ -1773,7 +1773,7 @@ strip_typedefs_expr (tree t, bool *remove_attributes)
gcc_assert (EXPR_P (t));
n = TREE_OPERAND_LENGTH (t);
n = cp_tree_operand_length (t);
ops = XALLOCAVEC (tree, n);
type = TREE_TYPE (t);
......
// PR c++/84181
// { dg-do compile { target c++14 } }
template < int ... I >
struct A{};
template < typename T >
void f(){
[](auto ... i){
return A< decltype(i){} ... >{};
};
}
int main(){
f< int >();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment