PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / der_init_5.f90
blobc81d9260e557df410cb287e27a04199af0c4c748
1 ! Check that null initialization of pointer components works.
2 ! PR 15969 prompted these
3 ! the commented out tests are cases where we still fail
4 program der_init_5
5 type t
6 type(t), pointer :: a => NULL()
7 real, pointer :: b => NULL()
8 character, pointer :: c => NULL()
9 integer, pointer, dimension(:) :: d => NULL()
10 end type t
11 type (t) :: p
12 if (associated(p%a)) call abort()
13 if (associated(p%b)) call abort()
14 ! if (associated(p%c)) call abort()
15 if (associated(p%d)) call abort()
16 end