diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/der_init_5.f90')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/der_init_5.f90 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/der_init_5.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/der_init_5.f90 new file mode 100644 index 000000000..c81d9260e --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/der_init_5.f90 @@ -0,0 +1,16 @@ +! Check that null initialization of pointer components works. +! PR 15969 prompted these +! the commented out tests are cases where we still fail +program der_init_5 + type t + type(t), pointer :: a => NULL() + real, pointer :: b => NULL() + character, pointer :: c => NULL() + integer, pointer, dimension(:) :: d => NULL() + end type t + type (t) :: p + if (associated(p%a)) call abort() + if (associated(p%b)) call abort() +! if (associated(p%c)) call abort() + if (associated(p%d)) call abort() +end |