diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-04 08:59:47 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-04 08:59:47 +0000 |
commit | f9d34e9a216f7c9e2ba5a641ce95c4cff8f49ad4 (patch) | |
tree | b7e6b66499bc59fda10aad5210c9e60158b25d48 /gcc/testsuite | |
parent | 798ba30cb8bed47b99234c5c898b8b522943a403 (diff) | |
download | gcc-f9d34e9a216f7c9e2ba5a641ce95c4cff8f49ad4.tar.gz |
2014-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
* decl.c (gfc_match_null): Parse and reject MOLD.
2014-01-04 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
* gfortran.dg/null_7.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194886 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/null_7.f90 | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5357e0bdab5..2594b26508c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2013-01-04 Tobias Burnus <burnus@net-b.de> + PR fortran/55763 + * gfortran.dg/null_7.f90: New. + +2013-01-04 Tobias Burnus <burnus@net-b.de> + PR fortran/55854 PR fortran/55763 * gfortran.dg/unlimited_polymorphic_3.f03: Remove invalid code. 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 |