rt_gccstream/gcc/testsuite/gfortran.dg/pr15754.f90

8 lines
264 B
Fortran

! we didn't give a warning if the RHS of an assignment was NULL
! { dg-do compile }
INTEGER, POINTER :: P
I = NULL() ! { dg-error "NULL appears" "Assignment non-pointer = NULL" }
P = NULL() ! { dg-error "NULL appears" "Assignment pointer = NULL" }
P => NULL()
END