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: Final intermodule patch


> 
> There are a few changes since the last version.  The most notable is
> the __attribute__((used)) changes; the previous implementation was
> broken, assuming that DECL_ASSEMBLER_NAME was valid when the decl
> wasn't even fully parsed yet!  Also, there's a new C_DECL_FILE_SCOPE
> macro, and it's used in more places.

Hi,
I am having dificulties understanding how your patch corelate with
callgraph builder.  At the moment it does not appear to work for me at
all - when I configure with enable-intermodule and use -funit-at-a-time
in addition to -O2 the compilation dies.

I guess it is because you change DECL_ASSEMBLER_NAME somewhere causing
the cgraph.c hashtables to get corrupted but I can't find the spot.
In fact when I write two files one:
static int t()
{
}
q()
{
 t();
}
and other
static int t()
{
}
q1()
{
 t()
 }
I get multiple definitions of function t without unit-at-a-time.  With
unit-at-a-time I get compilation to pass, but the callgraph has single
shared node for both functions t() so only one body is emit and no
mangling is done.
How this all is supposed to work?

Honza


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