summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/allocatable_scalar_1.f90
blob: d83d2f7f72bdaa767413a8c6c44926661caccc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do run }
!
! PR 40996: [F03] ALLOCATABLE scalars
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

implicit none
real, allocatable :: scalar

allocate(scalar)
scalar = exp(1.)
print *,scalar
if (.not. allocated(scalar)) call abort()
deallocate(scalar)
if (allocated(scalar)) call abort()

end