------- Comment #23 from burnus at gcc dot gnu dot org 2009-12-07 15:56 ------- Dominique, does the following program work on a real(16) system such as Darwin?
! { dg-do run } ! { dg-require-effective-target fortran_large_real } ! { dg-require-effective-target fortran_large_int } ! ! PR fortran/41711 ! ! Check reading and writing of real(10/16) BOZ, ! which needs integer(16) support. ! implicit none character(len=255) :: str integer,parameter :: xp = selected_real_kind (precision (0.0d0)+1) real(xp) :: r1,r2 complex(xp) :: z1,z2 r2 = 0.0_xp r1 = 2.0_xp ! Real B(OZ) write(str,'(b126)') r1 read (str,'(b126)') r2 if(r2 /= r1) call abort() ! Real (B)O(Z) r1 = 2.0_xp write(str,'(o126)') r1 read (str,'(o126)') r2 if(r2 /= r1) call abort() ! Real (BO)Z r1 = 2.0_xp write(str,'(z126)') r1 read (str,'(z126)') r2 if(r2 /= r1) call abort() z2 = 0.0_xp r1 = cmplx(2.0_xp,3.0_xp) ! Complex B(OZ) write(str,'(2b126)') z1 read (str,'(2b126)') z2 if(r2 /= r1) call abort() ! Complex (B)O(Z) z1 = 2.0_xp write(str,'(2o126)') z1 read (str,'(2o126)') z2 if(r2 /= r1) call abort() ! Complex (BO)Z z1 = 2.0_xp write(str,'(2z126)') z1 read (str,'(2z126)') z2 if(z2 /= z1) call abort() end -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41711