https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92848
--- Comment #5 from jules at gcc dot gnu.org --- Created attachment 47478 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47478&action=edit Refcount checking for current trunk Hi, This is a merge of the refcount checking patch to current trunk, with the name of the "virtual_refcount" field changed back to the current "dynamic_refcount". With RC_CHECKING macro defined, this flags consistency errors in a large number of OpenACC tests: how many of those are user-visible problems, I am not sure. In at least some cases, we certainly have "two wrongs making a right" in that the consistency errors do not result in a user-visible problem. An assumption here is that "dynamic_refcount" is supposed to mean the same thing as "virtual_refcount" does in the overhaul patch: those references that represent dynamic data lifetimes without having links in the interlinked splay tree/target_mem_desc structure. Or otherwise, the number which the static refcount should be decreased by on encountering a "finalize" operation for the data item in question. Anyway: I hope this is useful in evaluating the rest of the refcount overhaul patch.