On Mon, Apr 10, 2017 at 04:48:43PM -0400, Jason Merrill wrote:
> 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.

Ok.

> > @@ -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.

Will try that tomorrow.

        Jakub

Reply via email to