This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid duplicate vars in namespace debuginfo (PR debug/39524)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 23/03/2009 22:54, Jason Merrill a Ãcrit :
> The gen_variable_die patch is OK, though I'm not sure why we need to
> check that the old die was a declaration too.

It was because of the comment that comes a biter later in that function:

"Loop unrolling can create multiple blocks that refer to the same
     static variable, so we must test for the DW_AT_declaration flag.".

So apparently there can be valid cases where the variable DIE could
appear multiple times. My understanding was that checking for
DW_AT_declaration on the old DIE was a way to not mess with those
aforementioned cases.

Though  this line (that comes later in the function):

 if (declaration)
    add_AT_flag (var_die, DW_AT_declaration, 1);

shows that I was probably being overly cautious.

So yes, I guess checking for the old die to be a declaration is useless
then.

Dodji.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org/

iEYEARECAAYFAknIDz4ACgkQPejI7lrem2G71ACgrnX8eoa5Bve0QZ0DGFCJ9GST
yMoAoIsfw3TwRmAhbZz9rDhow6/Dp+1G
=lXYl
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]