5.1 regression(?) format statement with '& !' character string

Anton Shterenlikht mexas@bris.ac.uk
Mon Nov 23 14:59:00 GMT 2015


The problem seems to be in 5.1.
It doesn't occur in 5.0 or 6.0.

$ cat z.f90 
102 format ( '(' , es23.16 , '_rk , ' , es23.16 , '_rk) , & !' , i4 )
101 format ( '(' , es23.16 , '_rk , ' , es23.16 , '_rk)   & !' , i4 )
end 
$ gfortran --version
GNU Fortran (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ gfortran z.f90
z.f90:2:31:

 101 format ( '(' , es23.16 , '_rk , ' , es23.16 , '_rk)   & !' , i4 )
                               1
Error: Unexpected element '_' in format string at (1)
z.f90:3:4:

 end 
    1
Error: Unexpected end of format string in format string at (1)
$ module swap languages/gcc-5.1 languages/gcc-5.0
$ gfortran --version
GNU Fortran (GCC) 5.0.0 20150201 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ gfortran z.f90
$ 

Thanks

Anton



More information about the Fortran mailing list