[Bug fortran/37747] New: [4.4 Regression]: Errors when printing real(16)
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Mon Oct 6 13:22:00 GMT 2008
With revision 140892 I get the following failures in 32 bit mode (but not with
-m64):
FAIL: gfortran.dg/large_real_kind_1.f90 -O0 execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -O1 execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -O2 execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -O3 -fomit-frame-pointer execution
test
FAIL: gfortran.dg/large_real_kind_1.f90 -O3 -fomit-frame-pointer
-funroll-loops execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -O3 -g execution test
FAIL: gfortran.dg/large_real_kind_1.f90 -Os execution test
The following reduced test
! { dg-do run }
! { dg-require-effective-target fortran_large_real }
program test
implicit none
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
real(kind=k) :: x
character(len=20) :: c1, c2
print *, k
x = huge(x)
write (c1,'(G20.10E5)') x
write (c2,'(G20.10E5)') -x
print *, huge(x)/2.0_k
print *, huge(x), nearest(huge(x), -1.0_k)
print *, x, c1
print *, c2
c2(1:1) = ' '
x = tiny(x)
write (c1,'(G20.10E5)') x
write (c2,'(G20.10E5)') -x
print *, tiny(x), nearest(tiny(x), 1.0_k)
print *, x, c1
print *, c2
c2(1:1) = ' '
if (c1 /= c2) call abort
end program test
gives
16
**************************************
**************************************
**************************************
************************************** *************
*************
0.000000000000000000
0.000000000000000000
0.000000000000000000 0.000000
-0.000000
Abort
in 32 bit mode and
16
4.49423283715578976932326297697256183E+0307
8.98846567431157953864652595394512367E+0307
8.98846567431157953864652595394490209E+0307
8.98846567431157953864652595394512367E+0307 0.8988465674E+00308
-0.8988465674E+00308
2.00416836000897277799610805135016205E-0292
2.00416836000897277799610805135020213E-0292
2.00416836000897277799610805135016205E-0292 0.2004168360E-00291
-0.2004168360E-00291
in 64 bit mode.
--
Summary: [4.4 Regression]: Errors when printing real(16)
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
GCC build triplet: powerpc-apple-darwin9
GCC host triplet: powerpc-apple-darwin9
GCC target triplet: powerpc-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37747
More information about the Gcc-bugs
mailing list