Commit 37775e79 by Jerry DeLisle

re PR fortran/32360 (GFORTRAN WON'T COMPILE 'DATA PTR1 /NULL ()/' WHEN PTR1 HAS POINTER ATTRIBUTE)

2007-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/32360
	* expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
	check to see if the lvalue has attribute pointer and data.

From-SVN: r125949
parent 9064c533
2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32360
* expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
check to see if the lvalue has attribute pointer and data.
2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31162 PR fortran/31162
......
...@@ -2407,12 +2407,18 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) ...@@ -2407,12 +2407,18 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform)
return FAILURE; return FAILURE;
} }
if (rvalue->expr_type == EXPR_NULL) if (rvalue->expr_type == EXPR_NULL)
{ {
gfc_error ("NULL appears on right-hand side in assignment at %L", if (lvalue->symtree->n.sym->attr.pointer
&rvalue->where); && lvalue->symtree->n.sym->attr.data)
return FAILURE; return SUCCESS;
} else
{
gfc_error ("NULL appears on right-hand side in assignment at %L",
&rvalue->where);
return FAILURE;
}
}
if (sym->attr.cray_pointee if (sym->attr.cray_pointee
&& lvalue->ref != NULL && lvalue->ref != NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment