re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000")
2015-02-10 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/57822 * gfortran/fmt_g0_7.f08: New test. From-SVN: r220565
This commit is contained in:
parent
94ce26f1b7
commit
2d51422f39
2 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-02-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/57822
|
||||
* gfortran/fmt_g0_7.f08: New test.
|
||||
|
||||
2015-02-10 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
PR tree-optimization/43378
|
||||
|
|
28
gcc/testsuite/gfortran.dg/fmt_g0_7.f08
Normal file
28
gcc/testsuite/gfortran.dg/fmt_g0_7.f08
Normal file
|
@ -0,0 +1,28 @@
|
|||
! { dg-do run }
|
||||
! PR58722
|
||||
program testit
|
||||
character(50) :: astring
|
||||
|
||||
write(astring, '(g0)') 0.1_4
|
||||
if (test(astring)) call abort
|
||||
write(astring, '(g0)') 0.1_8
|
||||
if (test(astring)) call abort
|
||||
write(astring, '(g0)') 0.1_10
|
||||
if (test(astring)) call abort
|
||||
write(astring, '(g0)') 0.1_16
|
||||
if (test(astring)) call abort
|
||||
|
||||
contains
|
||||
|
||||
function test (string1) result(res)
|
||||
character(len=*) :: string1
|
||||
logical :: res
|
||||
|
||||
res = .true.
|
||||
do i = 1, len(string1)
|
||||
if (string1(i:i) == 'E') return
|
||||
end do
|
||||
res = .false.
|
||||
end function
|
||||
|
||||
end program
|
Loading…
Add table
Reference in a new issue