Hi,

when putting together a patch to fix PR 43812 I wanted to extend
the call graph verifier to verify that

1) the same_comdat_group linked lists are indeed circular,
2) there are no one element lists, and
3) all nodes in such lists have the flag DECL_COMDAT (node->decl) set.

However, the third property is currently violated when building
libstc++, at first I thought that we drop the flag without evicting
the associated nodes from a list but it is not so.  The C++ front-end
actually adds a node to a same_comdat_group list even though the
corresponding function decl does not have DECL_COMDAT set - however it
does have a non-NULL DECL_COMDAT_GROUP.  This happens at
cp/optimize.c:436.  So my question essentially is: Is this a bug or
are DECL_COMDAT same_comdat_group and DECL_COMDAT_GROUP (un)related in
some other way?

For now, I'll drop the verification from th patch (which is attached
in bugzilla).  However, it would be nice to formulate relevant
invariants precisely and verify them, lest we will be bumping into
bugs like this one.

Thanks,

Martin

Reply via email to