summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/null_7.f90
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 16:42:49 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 16:42:49 +0000
commit5391d40fb4321a779e2a0fcb7353b421a20121ba (patch)
tree270c2cd1491c40f8ae4b82d95b25b0e914a1f0a8 /gcc/testsuite/gfortran.dg/null_7.f90
parenta94856bbd406ecad873946beeeeabec5db7eb7ac (diff)
downloadgcc-5391d40fb4321a779e2a0fcb7353b421a20121ba.tar.gz
Merged with trunk at revision 194958.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cilkplus@194982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/null_7.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/null_7.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/null_7.f90 b/gcc/testsuite/gfortran.dg/null_7.f90
new file mode 100644
index 00000000000..d6d77d2b0a4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/null_7.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/55763
+!
+
+implicit none
+integer, pointer :: x
+class(*), pointer :: y
+integer, pointer :: p1 => null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+integer, pointer :: p2 => null(mold=x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+class(*), pointer :: p3 =>null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+type t
+ real, pointer :: a1 => null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+ real, pointer :: a2 => null ( mold = x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+ class(*), pointer :: a3 => null(mold = x ) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+end type t
+
+x => null(x) ! OK
+y => null(y) ! OK
+end