[patch, fortran] PR32361 TYPE DECLARATION TO INITIALIZE DATA IN NAMED COMMON
Jerry DeLisle
jvdelisle@verizon.net
Sun Jun 17 01:39:00 GMT 2007
:ADDPATCH fortran:
Forgot the addpatch.
Jerry DeLisle wrote:
> This patch is simple, allowing the NULL to be used.
>
> Regression tested on x86-64.
>
> OK for trunk? Test case will be added.
>
> Does this need to be an extension similar to my question on pr32360?
>
> Reporters example case:
>
> BLOCK DATA
> integer, pointer :: ptr1 => NULL()
> common / T / ptr1
> END
>
> Jerry
>
> 2007-06-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR fortran/32361
> * match.c (gfc_match_common): If the symbol value expression type is
> NULL_EXPR, don't error if previously initialized to null.
>
>
> ------------------------------------------------------------------------
>
> Index: match.c
> ===================================================================
> *** match.c (revision 125747)
> --- match.c (working copy)
> *************** gfc_match_common (void)
> *** 2417,2423 ****
> if (gfc_add_in_common (&sym->attr, sym->name, NULL) == FAILURE)
> goto cleanup;
>
> ! if (sym->value != NULL
> && (name[0] == '\0' || !sym->attr.data))
> {
> if (name[0] == '\0')
> --- 2417,2423 ----
> if (gfc_add_in_common (&sym->attr, sym->name, NULL) == FAILURE)
> goto cleanup;
>
> ! if (sym->value != NULL && sym->value->expr_type != EXPR_NULL
> && (name[0] == '\0' || !sym->attr.data))
> {
> if (name[0] == '\0')
More information about the Fortran
mailing list