This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [rfc] towards a defined abi for libgfortran


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.


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