This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [rfc] towards a defined abi for libgfortran
- From: Mike Stump <mrs at apple dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, fortran at gcc dot gnu dot org, GCC ML <gcc at gcc dot gnu dot org>, Richard Henderson <rth at twiddle dot net>
- Date: Mon, 13 Dec 2004 16:57:58 -0800
- Subject: Re: [rfc] towards a defined abi for libgfortran
- References: <20041207004150.GA5856@twiddle.net> <DA243E46-47ED-11D9-840F-000A95D692F4@physics.uc.edu> <72BE8881-4B28-11D9-8186-000A95D692F4@physics.uc.edu> <DDE9658A-4B41-11D9-8186-000A95D692F4@physics.uc.edu>
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.