2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_init_1.f90
blob0cfa90381905189f2906de1fe72eb0dcb59be050
1 ! Check that null initialization of pointer variable works.
2 ! { dg-do run }
3 program pointer_init_1
4 type t
5 real x
6 end type
7 type(t), pointer :: a => NULL()
8 real, pointer :: b => NULL()
9 character, pointer :: c => NULL()
10 integer, pointer, dimension(:) :: d => NULL()
11 if (associated(a)) call abort()
12 if (associated(b)) call abort()
13 if (associated(c)) call abort()
14 if (associated(d)) call abort()
15 end