From patchwork Sat Jan 29 15:39:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libgfortran] PR47434 Wrong field width for NaN with (F0.n) formatting Date: Sat, 29 Jan 2011 05:39:05 -0000 From: Tobias Burnus X-Patchwork-Id: 80940 Message-Id: <4D443499.20507@net-b.de> To: Jerry DeLisle Cc: gfortran , gcc patches Jerry DeLisle wrote: > 2011-01-28 Jerry DeLisle > > PR libgfortran/47434 > * io/write_float.def (write_infnan): Use calculate_sign to determine > if the sign should be given and check field widths accordingly. Regarding the test cases: * pr47434.f90 You need to add: ! { dg-add-options ieee } * gfortran.dg/nan_7.f90 You need to add: ! { dg-require-effective-target fortran_quad_real } ! { dg-add-options ieee } But you additionally need to apply the attached patch. I am not sure who can/needs to review the patch for gcc/testsuite/lib/target-supports.exp Tobias diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ee7a8bf..aad4560 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -945,6 +945,23 @@ proc check_effective_target_fortran_large_real { } { }] } +# Return 1 if the target supports Fortran real kind real(16), +# 0 otherwise. Contrary to check_effective_target_fortran_large_real +# this checks for Real(16) only; the other returned real(10) if +# both real(10) and real(16) are available. +# +# When the target name changes, replace the cached result. + +proc check_effective_target_fortran_quad_real { } { + return [check_no_compiler_messages fortran_large_real executable { + ! Fortran + real(kind=16) :: x + x = cos (x) + end + }] +} + + # Return 1 if the target supports Fortran integer kinds larger than # integer(8), 0 otherwise. #