[patch, fortran] PR32360 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE

Jerry DeLisle jvdelisle@verizon.net
Sun Jun 17 05:21:00 GMT 2007


Jerry DeLisle wrote:
Comment to myself.
> Index: expr.c
> ===================================================================
> *** expr.c	(revision 125747)
> --- expr.c	(working copy)
> *************** gfc_check_assign (gfc_expr *lvalue, gfc_
> *** 2407,2418 ****
>         return FAILURE;
>       }
>   
> !    if (rvalue->expr_type == EXPR_NULL)
> !      {
> !        gfc_error ("NULL appears on right-hand side in assignment at %L",
> ! 		  &rvalue->where);
> !        return FAILURE;
> !      }
>   
>      if (sym->attr.cray_pointee
>          && lvalue->ref != NULL
> --- 2407,2423 ----
>         return FAILURE;
>       }
>   
> !   if (rvalue->expr_type == EXPR_NULL)
> !     {  
> !       if (lvalue->symtree->n.sym->attr.pointer)

Its probably better to just return SUCCESS here rather than set the ts.type.

> !         rvalue->ts.type = lvalue->ts.type;



More information about the Fortran mailing list