Final intermodule patch

Jan Hubicka jh@suse.cz
Sun Jul 13 21:31:00 GMT 2003


> 
> 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



More information about the Gcc-patches mailing list