https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120620
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Patrick Palka from comment #5) > Do we intend to attempt constant evaluation of user-written __dynamic_cast > calls? If so, we need to make cxx_eval_dynamic_cast_fn robust to > non-constant/non-reduced arguments. If not, I think we need to refine > cxx_dynamic_cast_fn_p to return true only for synthesized __dynamic_cast > calls... I think whichever is easier is fine. One approach to the latter might be to stop pushing the synthesized declaration so it's not merged with the declaration in the actual header?