------- Comment #21 from burnus at gcc dot gnu dot org 2009-12-07 14:43 ------- (In reply to comment #20) > Dominique's idea is good. Let's go to that (comment #14) for now and leave > the rest as enhancement. This would be a great project for a new volunteer. > > Anyone interested. I am willing to provide guidance. :)
Going with comment 14 is trivial: The following program works with the patch below. Now one only needs to modify the test case such that it also works on real(kind=16) systems (for "{ dg-require-effective-target fortran_large_real }") and one needs to bootstrap/regtest. implicit none character(len=30) :: str integer(16) :: i16 real(10) :: r10 str = ' 4002A000000000000000' print '(a)', str read(str,'(z30)') i16 read(str,'(z30)') r10 print '(z30)', i16 print '(z30)', r10 end Index: libgfortran/io/read.c =================================================================== --- libgfortran/io/read.c (revision 155032) +++ libgfortran/io/read.c (working copy) @@ -45,6 +45,8 @@ set_integer (void *dest, GFC_INTEGER_LAR switch (length) { #ifdef HAVE_GFC_INTEGER_16 +/* length=10 comes about for kind=10 real/complex BOZ, cf. PR41711. */ + case 10: case 16: { GFC_INTEGER_16 tmp = value; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41711