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] Fix PR debug/14114



On Mar 3, 2004, at 2:12 PM, Zack Weinberg wrote:


Eric Botcazou <ebotcazou@libertysurf.fr> writes:

I don't see why this happens - you are saying that it is the *same*
tree that was already sent from the compilation of 'c', so the
front-end should recognize that it doesn't have to be done again.

Why? Is there a special flag that is set on a definition DECL which has
already been dwarfized?

I don't know, honestly, but consider that the same problem does not occur for

void c();

void c() { ... }

so I think the real bug will be found in where this case is treated
differently from your case.

gen_subprogram_die() in dwarf2out.c is prepared to handle this case. When same tree is supplied again, it checks that previous die generated for the tree was declaration die. If possible it reuses that declaration die for definition.

gen_subprogram_die() is not prepared to handle the sequence presented
by pr14114, that is definition first and then declaration.

--
Devang


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