https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83692
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
So this works but might be too big a hammer. But I have no better ideas.
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -3663,6 +3663,10 @@ cxx_eval_store_expression (const constexpr_ctx *ctx,
tree t,
else
*valp = init;
+ /* We've rewritten a value of a temporary in this constexpr
+ context which might invalide a cached call. */
+ constexpr_call_table = NULL;
+
/* Update TREE_CONSTANT and TREE_SIDE_EFFECTS on enclosing
CONSTRUCTORs, if any. */
tree elt;