[rfc] towards a defined abi for libgfortran
Mike Stump
mrs@apple.com
Tue Dec 14 00:58:00 GMT 2004
On Dec 10, 2004, at 10:57 PM, Andrew Pinski wrote:
> OK?
I think this is the wrong patch. In default_binds_local_p_1, we have:
bool
default_binds_local_p_1 (tree exp, int shlib)
{
bool local_p;
/* A non-decl is an entry in the constant pool. */
if (!DECL_P (exp))
local_p = true;
/* Static variables are always local. */
else if (! TREE_PUBLIC (exp))
local_p = true;
/* A variable is local if the user explicitly tells us so. */
else if (DECL_VISIBILITY_SPECIFIED (exp) && DECL_VISIBILITY (exp) !=
VISIBILITY_DEFAULT)
local_p = true;
In the test case given, you specify the visibility, and it isn't the
default, so this code says that it is local. But, a hidden common isn't
local, right? So, that would mean the code above is wrong?
Adding a ! DECL_COMMON (exp) && might be one way to avoid it.
More information about the Gcc
mailing list