[Bug fortran/28039] Warn when ignoring extra characters in the format specification
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Aug 27 12:11:00 GMT 2009
------- Comment #9 from burnus at gcc dot gnu dot org 2009-08-27 12:11 -------
Test case of valid but previously failing code (which I forgot to include in
fmt_with_extra.f when xfailing it):
SUBROUTINE rw_inp()
CHARACTER(len=100) :: line
integer :: i5
character(100), parameter :: subchapter =
& '(79("-"),/,5("-")," ",A,/,79("-"),/)'
i5 = 1
READ(*,FMT="(4x,a)") line
7182 FORMAT (a3)
7130 FORMAT (i3)
WRITE (6,'(//'' icorr is not correctly transferred. icorr='',i5)
& ') 42
write(*,subchapter) 'test'
END SUBROUTINE rw_inp
The last item has the additional problem that the cursor position points to the
expanded string and not to the parameter. That's probably a general problem;
(the string could also be 'string'//parameter which should also be treated
better.)
write(*,subchapter) 'test'
1
Warning: Extraneous characters in format at (1)
This presumably should be handled in a different PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28039
More information about the Gcc-bugs
mailing list