https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70590
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to Patrick Palka from comment #3) > (In reply to Jakub Jelinek from comment #2) > > location references block not in block tree generally means insufficient > > unsharing, where some function that got through gimple-low.c where > > TREE_SET_BLOCK has been used on some of the trees is sharing trees with a > > different function. > > That makes sense. So in cxx_eval_call_expression we should unconditionally > unshare the result of the call because the two caches (fundef_copies_table > and constexpr_call_table) may cause us to share the same trees in different > functions. Alternatively we can just call unshare_expr once in the > top-level cxx_eval_outermost_constant_expression, I think. Markus, does > this patch fix the build for you? No. It now ICEs: in maybe_constant_value_1, at cp/constexpr.c:4328