Add execution tests of ARM EXT intrinsics
[official-gcc.git] / gcc / testsuite / gfortran.dg / deallocate_alloc_opt_3.f90
blob67ec14a4a1912096add32f18ea2399ff116058aa
1 ! { dg-do run }
2 program a
4 implicit none
6 integer n
7 character(len=70) e1
8 character(len=30) e2
9 integer, allocatable :: i(:)
11 e1 = 'No error'
12 allocate(i(4))
13 deallocate(i, stat=n, errmsg=e1)
14 if (trim(e1) /= 'No error') call abort
16 e2 = 'No error'
17 allocate(i(4))
18 deallocate(i, stat=n, errmsg=e2)
19 if (trim(e2) /= 'No error') call abort
21 e1 = 'No error'
22 deallocate(i, stat=n, errmsg=e1)
23 if (trim(e1) /= 'Attempt to deallocate an unallocated object') call abort
25 e2 = 'No error'
26 deallocate(i, stat=n, errmsg=e2)
27 if (trim(e2) /= 'Attempt to deallocate an unall') call abort
29 end program a