[Bug target/39179] [4.4 Regression] Wrong code in c++ for const members initialized in external file
jason at gcc dot gnu dot org
Wed Feb 18 17:48:00 GMT 2009
------- Comment #20 from jason at gcc dot gnu dot org 2009-02-18 17:47 -------
(In reply to comment #19)
> I suppose it's a question of what "module" means.
"module" is used in a lot of different ways, but this usage definitely refers
to the current translation unit:
/* In a VAR_DECL, FUNCTION_DECL, NAMESPACE_DECL or TYPE_DECL,
nonzero means name is to be accessible from outside this module.
#define TREE_PUBLIC(NODE) ((NODE)->base.public_flag)
Looking at more uses of binds_local_p and the RTL SYMBOL_FLAG_LOCAL, it does
seem to be primarily used for references to the current translation unit.
Which means that the i386 back end is using it incorrectly somewhere; we don't
need a GOT lookup for any reference to a symbol in another translation unit.
More information about the Gcc-bugs