aarch64: Add missing ACLE macro for NEON-SVE Bridge
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_1.f03
blobc2ff505a38abd83c0d1bdbbc8c0e9f375e74b38f
1 ! { dg-do run }
3 ! PR 40940: CLASS statement
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 implicit none
9 type t
10   integer :: comp
11   class(t),pointer :: c2
12 end type
14 class(t),pointer :: c1
16 allocate(c1)
18 c1%comp = 5
19 c1%c2 => c1
21 print *,c1%comp
23 call sub(c1)
25 if (c1%comp/=5) STOP 1
27 deallocate(c1)
29 contains
31   subroutine sub (c3)
32     class(t) :: c3
33     print *,c3%comp
34   end subroutine
36 end