Commit aaa6a466 by Jason Merrill Committed by Jason Merrill

PR c++/88183 - ICE with .* fold-expression.

build_m_component_ref can't handle type-dependent operands, so let's use the
default case; tsubst_copy_and_build also uses build_x_binary_op for
substituting a DOTSTAR_EXPR.

	* pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.

From-SVN: r269293
parent 1eb7a085
2019-02-28 Jason Merrill <jason@redhat.com> 2019-02-28 Jason Merrill <jason@redhat.com>
PR c++/88183 - ICE with .* fold-expression.
* pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
PR c++/86969 - ICE with constexpr if and recursive generic lambdas. PR c++/86969 - ICE with constexpr if and recursive generic lambdas.
* class.c, lambda.c, pt.c: Revert earlier change. * class.c, lambda.c, pt.c: Revert earlier change.
* lambda.c (add_capture): Don't special-case capture of dependent * lambda.c (add_capture): Don't special-case capture of dependent
......
...@@ -11784,8 +11784,6 @@ fold_expression (tree t, tree left, tree right, tsubst_flags_t complain) ...@@ -11784,8 +11784,6 @@ fold_expression (tree t, tree left, tree right, tsubst_flags_t complain)
{ {
case COMPOUND_EXPR: case COMPOUND_EXPR:
return build_x_compound_expr (input_location, left, right, complain); return build_x_compound_expr (input_location, left, right, complain);
case DOTSTAR_EXPR:
return build_m_component_ref (left, right, complain);
default: default:
return build_x_binary_op (input_location, code, return build_x_binary_op (input_location, code,
left, TREE_CODE (left), left, TREE_CODE (left),
......
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