This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR32360 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 16 Jun 2007 22:20:59 -0700
- Subject: Re: [patch, fortran] PR32360 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE
- References: <46748E94.20505@verizon.net>
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;