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
27 ! (1) check that vindex is set correctly (for different cases)
40 if (i /= 1) call abort()
53 if (i /= 2) call abort()
56 allocate(cp, source = x)
66 if (i /= 3) call abort()
70 allocate(cp, source = cp2) ! { dg-warning "not supported yet" }
81 if (i /= 2) call abort()
84 ! (2) check initialization (default initialization vs. SOURCE)
87 if (cp%comp /= 5) call abort()
91 allocate(cp, source=x)
92 if (cp%comp /= 4) call abort()