3 ! Allocating CLASS variables.
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
11 class(t1),pointer :: cc
14 type, extends(t1) :: t2
18 type, extends(t2) :: t3
22 class(t1),pointer :: cp, cp2
23 type(t2),pointer :: cp3
28 ! (1) check that vindex is set correctly (for different cases)
41 if (i /= 1) call abort()
54 if (i /= 2) call abort()
57 allocate(cp, source = x)
67 if (i /= 3) call abort()
71 allocate(cp, source = cp2)
73 allocate(cp, source=cp3)
84 if (i /= 2) call abort()
87 ! (2) check initialization (default initialization vs. SOURCE)
90 if (cp%comp /= 5) call abort()
94 allocate(cp, source=x)
95 if (cp%comp /= 4) call abort()