With Dominique's fix so that the test case runs, I get failure.
Here is a slightly modified version to illustrate:
! { dg-do run }
! { dg-require-effective-target fortran_large_real }
program main
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
real(kind=k) a,b,c
a = 1.1_k
open(10,convert="swap",form="unformatted") ! { dg-warning "Extension:
CONVERT" }
write(10) a
backspace 10
read (10) b
close(10,status="delete")
print *, a, b
!if (a /= b) call abort
write (11) a
backspace 11
open (11,form="unformatted")
read (11) c
print *, a, c
if (a .ne. c) call abort
close (11, status="delete")
end program main
The first test fails miserably.
$ ./a.out
1.100000000000000000 3.9138956899828401554E-4942
1.100000000000000000 1.100000000000000000
I gather that this will not show up on some platforms.
--
Summary: Failure with unf_io_convert_3.f90
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
GCC host triplet: x86-64-pc-Linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915