https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84684

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If the in-place modification of the CONSTRUCTOR in these cases are intentional,
the fix could be:
       if (entry == NULL)
         {
           /* We need to keep a pointer to the entry, not just the slot, as the
              slot can move in the call to cxx_eval_builtin_function_call.  */
           *slot = entry = ggc_alloc<constexpr_call> ();
           *entry = new_call;
+          entry->bindings = unshare_constructor (entry->bindings);
         }
with or without the if (lhs->hash != rhs->hash) return false; performance
improvement.
But I really don't have an idea about whether the sharing is intentional or
not, or how much compile time memory increase would the above cause.

Reply via email to