This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch, fortran] PR32360 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE


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;


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