On Mon, Apr 10, 2017 at 4:35 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> -         store_decomp_type (v[i], eltype);
> +         if (!processing_template_decl)
> +           store_decomp_type (v[i], eltype);

This spot shouldn't change; we do want to remember the decltype even
in a template.

> @@ -3935,7 +3935,10 @@ cxx_eval_constant_expression (const cons
>        return (*ctx->values->get (t));
>
>      case VAR_DECL:
> -      if (DECL_HAS_VALUE_EXPR_P (t))
> +      if (DECL_HAS_VALUE_EXPR_P (t)
> +         /* Don't recurse on DECL_VALUE_EXPR of decomposition decls
> +            that have not been finalized yet.  */
> +         && (!DECL_DECOMPOSITION_P (t) || TREE_TYPE (DECL_VALUE_EXPR (t))))

Hmm, we shouldn't get here in this case.  I think
value_dependent_expression_p should return true for a VAR_DECL with
type-dependent DECL_VALUE_EXPR.

Jason

Reply via email to