(should block F2003 meta PR 20585)

gfortran should support:

- DECIMAL= 'COMMA' or 'POINT' specifier in OPEN, READ, WRITE and INQUIRE
(9.4.5.5, 9.5.1.6  in F2003 standard)
- DP and DC as edit descriptors (10.7.8)

- SIGN= 'PLUS', 'SUPPRESS' or 'PROCESSOR_DEFINED' specifier for OPEN, WRITE and
INQUIRE (9.4.5.14, 9.5.1.13)
- SS, SP and S edit descriptors (10.7.4)

- DELIM= 'APOSTROPHE', 'QUOTE' or 'NONE' also for WRITE  (9.4.5.6, 9.5.1.7)

- BLANK= 'NULL'/'ZERO' and PAD= 'YES'/'NO' specifiers: Now also for READ 
(9.4.5.10, 9.4.5.4; new: 9.5.1.5, 9.5.1.9)

- ENCODING= 'DEFAULT'/'UTF-8' (open); 'UTF-8'/'UNDEFINED'/'UNKNOWN'/... for
INQUIRE (9.4.5.7, 9.9.1.9)

---------------------
program iotests
  implicit none
  character(len=45) :: a
  real, parameter :: pi = 3.14159265358979323846
!  write(*,'(f10.3,s,f10.3,sp,f10.3,ss,f10.3)',SIGN='PLUS') pi, pi, pi, pi
!  write(*,'(f10.3,dc,f10.3,dp,f10.3)',DECIMAL='COMMA') pi, pi, pi
!  write(6,*,delim='quote') 'Hello'
  open(99,file='test.dat',form='formatted',status='new')
  write(99,'(a)') 'hello'
  close(99)
  open(99,file="test.dat",form='formatted',status='old', &
       PAD='YES',BLANK='NULL',ENCODING='DEFAULT')
  read(99,*,PAD='NO',BLANK='NULL') a
  close(99)
end program iotests
---------------------

The current diagnostic for 'sp' is strange:
  write(*,'(f10.3,dc,f10.3,f10.3)') pi, pi, pi
                                             1
Warning: Positive width required in format string at (1)
-- and --
Fortran runtime error: Nonnegative width required in format
(f10.3,dc,f10.3,f10.3)
        ^


-- 
           Summary: [F2003]  In/output:  DECIMAL=/dp/dc; SIGN=/S/SP/SS
                    BLANK=/PAD=; DELIM=; ENCODING=
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28655

Reply via email to