fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_scalar_3.f90
blobc624de22d36f055b260a9ac7ec1055d60685794e
1 ! { dg-do run }
3 ! PR 40996: [F03] ALLOCATABLE scalars
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7 implicit none
9 type :: t
10 integer, allocatable :: i
11 end type
13 type(t)::x
15 allocate(x%i)
17 x%i = 13
18 print *,x%i
19 if (.not. allocated(x%i)) call abort()
21 deallocate(x%i)
23 if (allocated(x%i)) call abort()
25 end