This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/84389] New: Defined output: unexpected compiler error with the use of ":" edit descriptor
- From: "fortranfan at outlook dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Feb 2018 19:19:35 +0000
- Subject: [Bug fortran/84389] New: Defined output: unexpected compiler error with the use of ":" edit descriptor
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84389
Bug ID: 84389
Summary: Defined output: unexpected compiler error with the use
of ":" edit descriptor
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: fortranfan at outlook dot com
Target Milestone: ---
Consider the following:
--- begin console output ---
C:\Temp>type p.f90
module m
type :: t
private
contains
private
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!"
return
end subroutine write_t
end module
program p
use m, only : t
type(t) :: foo(2)
print "(*(dt:,','))", foo
end program
C:\Temp>gfortran p.f90 -o p.exe
p.f90:37:14:
print "(*(dt:,','))", foo
1
Error: Unexpected element ':' in format string at (1)
C:\Temp>
--- end output ---
Program compiled and built using another toolset gives my expected output:
Hello World!,Hello World!
Cheers,