[Bug c++/70594] [6 Regression] -fcompare-debug failure

nathan at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 8 20:59:00 GMT 2016


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

--- Comment #11 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Patrick's original patch did 2 things AFAICT
1) make constexpr_call_table GC deletable
2) add the fundef_copies_table etc.

The failure we're observing is of constexpr_call_table losing information,
which then causes the changing calls  of copy_fn.  Now, we'd still see that
changing behaviour without #2.  But I don't think we get it without #1.  The
logic in cxx_eval_call_expression is (pseudo code-ish):

entry = constexpr_call_table->find_or_insert (...)
if (entry->value)
  return entry->value

fn = get_fundef_copy (...)
result = evaluate (...)
entry->value = result;

return result;

Those are the only uses of the call_table and get_fundef_copy.

So restoring constexpr_call_table to non-deletableness is the safe patch.  We
still get the fundef_copy improvement.


More information about the Gcc-bugs mailing list