https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93727

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #62911|0                           |1
        is obsolete|                            |

--- Comment #13 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Created attachment 63523
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63523&action=edit
Finalized patch ready, also handling internal units

This patch is very close to being ready to submit. There are probably some
simplifications that can be done.  I have some test cases. One of the issues I
am dealing with is the output can be machine dependent so I will have to limit
the cases to a specific architecture. ie what I have here.

Here are two cases for internal units output:

KIND=1:

program simple
  implicit none
  integer, parameter :: wp = 8
  real(kind=wp) :: num
  character(35) :: str1

  !num = 3.141777289_wp / 546.772_wp
  num = -3.14159682678_wp * 25._wp
  !num = -42.0_wp
  print *, " 123456789012345678901234567890"
  write(str1, '(">",EX30.0,"<")') num
  print *, str1
  write(str1, '(">",EX30.1,"<")') num
  print *, str1
  write(str1, '(">",EX30.2,"<")') num
  print *, str1
  write(str1, '(">",EX30.3,"<")') num
  print *, str1
  write(str1, '(">",EX30.4,"<")') num
  print *, str1
  write(str1, '(">",EX30.15e8,"<")') num
  print *, str1
  write(str1, '(">",EX8.5,"<")') num
  print *, str1
  print *, " 123456789012345678901234567890"
end program simple

KIND=4:

program simple
  implicit none
  integer, parameter :: wp = 8
  real(kind=wp) :: num
  character(kind=4,len=35) :: str1

  !num = 3.141777289_wp / 546.772_wp
  num = -3.14159682678_wp * 25._wp
  !num = -42.0_wp
  print *, " 123456789012345678901234567890"
  write(str1, '(a,EX30.0,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX30.1,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX30.2,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX30.3,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX30.4,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX30.15e8,a)') ">", num, "<"
  print *, str1
  write(str1, '(a,EX8.5,a)') ">", num, "<"
  print *, str1
  print *, " 123456789012345678901234567890"
end program simple
  • [Bug libfortran/93727] Fortran 2... jvdelisle at gcc dot gnu.org via Gcc-bugs

Reply via email to