This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch] Fix PR41764
- From: Tobias Burnus <burnus at net-b dot de>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Rafael Espindola <espindola at google dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Guenther <richard dot guenther at gmail dot com>, Diego Novillo <dnovillo at google dot com>, Paul Brook <paul at codesourcery dot com>, fortran at gcc dot gnu dot org
- Date: Wed, 28 Oct 2009 21:02:57 +0100
- Subject: Re: [patch] Fix PR41764
- References: <38a0d8450910211055g4968b06fie72550732e1dcf4c@mail.gmail.com> <38a0d8450910211517j4af51106qf3f81c169a7e830c@mail.gmail.com> <38a0d8450910261141i5f4dda4erfd4122c388f2f240@mail.gmail.com> <38a0d8450910271648m76a92c3as1b8a8ee9404cc7e1@mail.gmail.com> <mcry6mvfv3b.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
Ian Lance Taylor wrote:
> Rafael Espindola <espindola@google.com> writes
>> gcc/
>> 2009-10-27 Rafael Avila de Espindola <espindola@google.com>
>>
>> * dbxout.c (dbxout_common_check): Accept non public trees.
>> * dwarf2out.c (fortran_common): Accept non public trees.
>>
>> gcc/fortran/
>> 2009-10-27 Rafael Avila de Espindola <espindola@google.com>
>>
>> * trans-common.c (create_common): Set TREE_PUBLIC to false on
>> fake variables.
>>
> The middle-end parts of this patch are OK.
>
> This is OK if the Fortran maintainers are OK with the change to
> trans-common.c.
>
Sorry for the delay. The Fortran part is also OK.
Tobias
>> --- a/gcc/fortran/trans-common.c
>> +++ b/gcc/fortran/trans-common.c
>> @@ -680,7 +680,6 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
>> var_decl = build_decl (s->sym->declared_at.lb->location,
>> VAR_DECL, DECL_NAME (s->field),
>> TREE_TYPE (s->field));
>> - TREE_PUBLIC (var_decl) = TREE_PUBLIC (decl);
>> TREE_STATIC (var_decl) = TREE_STATIC (decl);
>> TREE_USED (var_decl) = TREE_USED (decl);
>> if (s->sym->attr.use_assoc)
>> @@ -689,7 +688,9 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
>> TREE_ADDRESSABLE (var_decl) = 1;
>> /* This is a fake variable just for debugging purposes. */
>> TREE_ASM_WRITTEN (var_decl) = 1;
>> -
>> + /* Fake variables are not visible from other translation units. */
>> + TREE_PUBLIC (var_decl) = 0;
>> +
>> /* To preserve identifier names in COMMON, chain to procedure
>> scope unless at top level in a module definition. */
>> if (com
>>
>