mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 21:01:27 +08:00
re PR libfortran/28354 ([4.1 Only] 0.99999 printed as 0. instead of 1. by format(f3.0))
2006-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28354 * gfortran.dg/fmt_zero_precision.f90: New test. From-SVN: r116503
This commit is contained in:
parent
20e1580fad
commit
8d8e3aa02c
@ -1,3 +1,8 @@
|
||||
2006-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/28354
|
||||
* gfortran.dg/fmt_zero_precision.f90: New test.
|
||||
|
||||
2006-08-27 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/28058
|
||||
|
30
gcc/testsuite/gfortran.dg/fmt_zero_precision.f90
Normal file
30
gcc/testsuite/gfortran.dg/fmt_zero_precision.f90
Normal file
@ -0,0 +1,30 @@
|
||||
! { dg-do run }
|
||||
! PR28354 Incorrect rounding of .99999 with f3.0 format specifier
|
||||
! Test case derived from PR. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
write(*,50) -0.99999
|
||||
write(*,50) 0.99999
|
||||
write(*,50) -9.0
|
||||
write(*,50) -0.99
|
||||
write(*,50) -0.999
|
||||
write(*,50) -0.999
|
||||
write(*,50) -0.59
|
||||
write(*,50) -0.49
|
||||
write(*,100) 37.99999
|
||||
write(*,100) 10345.0
|
||||
write(*,100) 333.678
|
||||
write(*,100) 333.499
|
||||
50 format(f3.0,"<")
|
||||
100 format(f8.0,"<")
|
||||
end
|
||||
! {dg-output "-1.<"
|
||||
! {dg-output " 1.<"
|
||||
! {dg-output "-9.<"
|
||||
! {dg-output "-1.<"
|
||||
! {dg-output "-1.<"
|
||||
! {dg-output "-1.<"
|
||||
! {dg-output "-1.<"
|
||||
! {dg-output " 0.<"
|
||||
! {dg-output " 38.<"
|
||||
! {dg-output " 10345.<"
|
||||
! {dg-output " 334.<"
|
||||
! {dg-output " 333.<"
|
Loading…
x
Reference in New Issue
Block a user