ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / deallocate_stat_2.f90
blob68320e1ccd82f68e76d172bfe9a275f0612a0395
1 ! { dg-do run }
3 ! Check that the error is properly diagnosed and the strings are correctly padded.
5 integer, allocatable :: A, B(:)
6 integer :: stat
7 character(len=5) :: sstr
8 character(len=200) :: str
10 str = repeat('X', len(str))
11 deallocate(a, stat=stat, errmsg=str)
12 !print *, stat, trim(str)
13 if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") STOP 1
15 str = repeat('Y', len(str))
16 deallocate(b, stat=stat, errmsg=str)
17 !print *, stat, trim(str)
18 if (stat == 0 .or. str /= "Attempt to deallocate an unallocated object") STOP 2
20 sstr = repeat('Q', len(sstr))
21 deallocate(a, stat=stat, errmsg=sstr)
22 !print *, stat, trim(sstr)
23 if (stat == 0 .or. sstr /= "Attem") STOP 3
25 sstr = repeat('P', len(sstr))
26 deallocate(b, stat=stat, errmsg=sstr)
27 !print *, stat, trim(sstr)
28 if (stat == 0 .or. sstr /= "Attem") STOP 4
30 end