-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Closed
Closed
Copy link
Labels
flang:runtimequestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Consider the following code:
module m
type base
integer(4) :: i
end type
interface write(formatted)
subroutine writeformatted(dtv, unit, iotype, v_list, iostat, iomsg )
import base
class(base), intent(in) :: dtv
integer, intent(in) :: unit
character(*), intent(in) :: iotype
integer, intent(in) :: v_list(:)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
end subroutine
end interface
end module
program fdtedit102
use m
class(base), allocatable :: b1
integer :: stat
character(150) :: msg
open (1, file = 'fdtedit102.1', form='formatted', access='sequential' )
allocate ( b1, source = base(100) )
write ( 1, "(DT'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefg')", iostat = stat, iomsg = msg ) b1
print*, stat
print*, msg
if ( stat /= 0 ) ERROR STOP 1
end program
subroutine writeformatted (dtv, unit, iotype, v_list, iostat, iomsg)
use m, only: base
class(base), intent(in) :: dtv
integer, intent(in) :: unit
character(*), intent(in) :: iotype
integer, intent(in) :: v_list(:)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
end subroutine
Flang complains
> a.out
1005
Excessive DT'iotype' in FORMAT; at offset 1 in format '(DT'ABCDEFGHIJKLMNOPQRS
TUVWXYZabcdefg')'
Fortran ERROR STOP: code 1
It seems the limit for the length of the character string for the DT editor is 32.
What is the reason for setting up a limit?
XLF doesn't have a limit, but gfortran seems have a limit too, but larger than Flang.
Metadata
Metadata
Assignees
Labels
flang:runtimequestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!