PR c++/88183 - ICE with .* fold-expression.
authorJason Merrill <jason@redhat.com>
Fri, 1 Mar 2019 00:08:58 +0000 (19:08 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 1 Mar 2019 00:08:58 +0000 (19:08 -0500)
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

gcc/cp/ChangeLog
gcc/cp/pt.c

index 30cc1ce46b3a315c58d8afc247085731b4bb5198..a86ffa3c33b3ce0c3472fbf04394199cd2b44dd5 100644 (file)
@@ -1,5 +1,8 @@
 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.
        * class.c, lambda.c, pt.c: Revert earlier change.
        * lambda.c (add_capture): Don't special-case capture of dependent
index d678e27807810a2353a6f3ebdbc60ff79a953025..7295839ebd2353454a55f4037c137c0600e16fad 100644 (file)
@@ -11784,8 +11784,6 @@ fold_expression (tree t, tree left, tree right, tsubst_flags_t complain)
     {
     case COMPOUND_EXPR:
       return build_x_compound_expr (input_location, left, right, complain);
-    case DOTSTAR_EXPR:
-      return build_m_component_ref (left, right, complain);
     default:
       return build_x_binary_op (input_location, code,
                                 left, TREE_CODE (left),