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: Your patch to PR 30700


Alternatively, I would like to propose replacing the assert into a
simple "return *tp".  Without the complete call-graph, we cannot tell
if a DECL will be still unused eventually.  So a reasonable thing to
do is not emit DWARF2 info early.

I'm running dejagnu right now.

-Doug

2007/7/26, Diego Novillo <dnovillo@google.com>:

Jan,


Your patch http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123922 is
causing an ICE when compiling this snippet with -g

namespace NS {
  int x = 0;
  int &ref = x;
}

using NS::ref;

The problem is that we are emitting debug info for 'x' during parsing,
so cgraph_global_info_ready is still false.  Since 'x' has already been
processed in this case, we will have a varpool entry for it.

Since it's too early, the 'needed' indicator may be too pessimistic, but
it didn't seem to me that we have much of a choice.  So, I thought that
if the varpool entry for the decl is already finalized, we can use it.

The other option would be to try and push this analysis much later after
parsing, but that seems fairly intrusive.  I'm currently testing the
attached patch.  Honza, does this make sense at all?

Thanks.


Attachment: diffs-31899.txt
Description: Text document


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