Commit 26eacfe8 by Jerry DeLisle

re PR fortran/84389 (Defined output: unexpected compiler error with the use of ":" edit descriptor)

2018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/84389
	* io.c (check_format): Allow FMT_COLON.

	* gfortran.dg/dtio_33.f90: New test.

From-SVN: r257795
parent c5751d7e
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/84389
* io.c (check_format): Allow FMT_COLON.
2018-02-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/80945
......
......@@ -985,6 +985,9 @@ data_desc:
case FMT_COMMA:
goto format_item;
case FMT_COLON:
goto format_item_1;
case FMT_LPAREN:
dtio_vlist:
......
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/84389
* gfortran.dg/dtio_33.f90: New test.
2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/84412
* gfortran.dg/inquire_18.f90: New test.
......
! { dg-do run }
! PR84389 rejected valid use of ':' in format
module m
type :: t
integer :: i
contains
procedure, pass(this) :: write_t
generic, public :: write(formatted) => write_t
end type
contains
subroutine write_t(this, lun, iotype, vlist, istat, imsg)
! argument definitions
class(t), intent(in) :: this
integer, intent(in) :: lun
character(len=*), intent(in) :: iotype
integer, intent(in) :: vlist(:)
integer, intent(out) :: istat
character(len=*), intent(inout) :: imsg
write(lun, fmt=*, iostat=istat, iomsg=imsg) "Hello World!"
end subroutine write_t
end module
program p
use m, only : t
character(50) :: str
type(t) :: foo(2)
write(str, "(*(dt:,','))") foo
if (str.ne." Hello World!, Hello World!") stop 1
end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment