On Tue, Mar 13, 2018 at 11:07 AM, Marek Polacek <pola...@redhat.com> wrote: > Here's another case of a template code leaking into cxx_constant_value. > While I recently added the require_rvalue_constant_expression check, it > doesn't help here, because the problem is that we have a MODOP_EXPR (a > template code), whose op1 is a TRUNC_DIV_EXPR without a type, so it's > considered dependent, so fold_non_dependent_expr doesn't do its job.
If it's dependent, we should have taken the dependent path earlier in the function. Should that test use instantiation_dependent_expression_p rather than the existing type or value dependent check? Jason