coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / dtio_10.f90
blob71354b7876f8d3e686cdb8958d6c63dbebb1f7de
1 ! { dg-do run }
3 ! Tests runtime check of the required type in dtio formatted read.
5 module usertypes
6 type udt
7 integer :: myarray(15)
8 end type udt
9 type, extends(udt) :: more
10 integer :: itest = -25
11 end type
13 end module usertypes
15 program test1
16 use usertypes
17 type (udt) :: udt1
18 type (more) :: more1
19 class (more), allocatable :: somemore
20 integer :: thesize, i, ios
21 character(100) :: errormsg
23 read (10, fmt='(dt)', advance='no', size=thesize, iostat=ios, &
24 & iomsg=errormsg) i, udt1
25 if (ios.ne.5006) call abort
26 if (errormsg(1:25).ne."Expected CLASS or DERIVED") call abort
27 end program test1