3 ! Check that pointer assignments allowed by F2003:C717
4 ! work and check null initialization of CLASS(*) pointers.
6 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
11 class(*), pointer, intent(in) :: z
19 class(*), pointer :: y, z
22 z => y ! unlimited => unlimited allowed
30 class(*), pointer :: ptr1 => null() ! pointer initialization
31 if (same_type_as (ptr1, x) .neqv. .FALSE.) call abort
39 class(*), pointer, intent(in) :: tgt
47 type(s), pointer :: ptr1
48 type(t), pointer :: ptr2
49 ptr1 => tgt ! bind(c) => unlimited allowed
50 if (ptr1%k .ne. 42) call abort
51 ptr2 => tgt ! sequence type => unlimited allowed
52 if (ptr2%k .ne. 42) call abort