PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_scalar_6.f90
blob33daee4b848c368852efe1ef3656f7236a8eaaf4
1 ! { dg-do run }
2 ! { dg-options "-Wall -pedantic" }
4 ! PR fortran/41872
6 ! (De)allocate tests
8 program test
9 implicit none
10 integer, allocatable :: a, b, c
11 integer :: stat
12 stat=99
13 allocate(a, stat=stat)
14 if (stat /= 0) call abort ()
15 allocate(a, stat=stat)
16 if (stat == 0) call abort ()
18 allocate (b)
19 deallocate (b, stat=stat)
20 if (stat /= 0) call abort ()
21 deallocate (b, stat=stat)
22 if (stat == 0) call abort ()
24 deallocate (c, stat=stat)
25 if (stat == 0) call abort ()
26 end program test