Commit f23c5627 by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/15754 (Accepts assignment of the form P = NULL())

fortran/
PR fortran/15754
* expr.c (gfc_check_assign): Print ranks if incompatible. Issue
warning if assigning NULL().

testsuite/
PR fortran/17574
* gfortran.dg/pr15754.f90: New test.
the changes to expr.c were accidentally committed previously

From-SVN: r84521
parent 5f0bbc1b
......@@ -17,6 +17,10 @@
* primary.c (match_boz_constant): Call gfc_notify_std only if
we actually have a non-standard boz-literal-constant.
PR fortran/15754
* expr.c (gfc_check_assign): Print ranks if incompatible. Issue
warning if assigning NULL().
2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
* f95-lang.c (set_block): Remove.
......
! we didn't give a warning if the RHS of an assignment was NULL
! { dg-do-compile }
INTEGER, POINTER :: P
I = NULL() ! { dg-warning "NULL appears" "Assignment non-pointer = NULL" }
P = NULL() ! { dg-warning "NULL appears" "Assignment pointer = NULL" }
P => NULL()
END
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