[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / dtio_10.f90
blob6ab6c3e68b4407e4cb36052a49ca314e4ed739b9
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(27:47).ne."intrinsic type passed") call abort
27 end program test1