public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Are non-DECL_COMDAT nodes in same_comdat_group lists OK?
@ 2010-04-21 12:10 Martin Jambor
  2010-04-21 12:32 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jambor @ 2010-04-21 12:10 UTC (permalink / raw)
  To: GCC Mailing List; +Cc: Jakub Jelinek, Jan Hubicka

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Are non-DECL_COMDAT nodes in same_comdat_group lists OK?
  2010-04-21 12:10 Are non-DECL_COMDAT nodes in same_comdat_group lists OK? Martin Jambor
@ 2010-04-21 12:32 ` Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2010-04-21 12:32 UTC (permalink / raw)
  To: GCC Mailing List, Jakub Jelinek, Jan Hubicka

On Wed, Apr 21, 2010 at 01:53:21PM +0200, Martin Jambor wrote:
> 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.

All notes should have same non-NULL DECL_COMDAT_GROUP, that's something
different from DECL_COMDAT (non-NULL DECL_COMDAT_GROUP is DECL_ONE_ONLY
property).

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-21 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 12:10 Are non-DECL_COMDAT nodes in same_comdat_group lists OK? Martin Jambor
2010-04-21 12:32 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).