c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / pointer_init_1.f90
blob511320525888ea1f32ad0416121c9eba171cf823
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)) STOP 1
12 if (associated(b)) STOP 2
13 if (associated(c)) STOP 3
14 if (associated(d)) STOP 4
15 end