diff mbox

[libgfortran] PR47434 Wrong field width for NaN with (F0.n) formatting

Message ID 4D443499.20507@net-b.de
State New
Headers show

Commit Message

Tobias Burnus Jan. 29, 2011, 3:39 p.m. UTC
Jerry DeLisle wrote:
> 2011-01-28  Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
>     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

Comments

Gerald Pfeifer Jan. 30, 2011, 5:08 p.m. UTC | #1
On Sat, 29 Jan 2011, Tobias Burnus wrote:
> 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

Practically I'd suggest to handle this like a "simple" Fortran
patch, that is, have it reviewed/approved by one of the other
Fortran maintainers.

Gerald
Jerry DeLisle Jan. 30, 2011, 5:36 p.m. UTC | #2
On 01/30/2011 09:08 AM, Gerald Pfeifer wrote:
> On Sat, 29 Jan 2011, Tobias Burnus wrote:
>> 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
>
> Practically I'd suggest to handle this like a "simple" Fortran
> patch, that is, have it reviewed/approved by one of the other
> Fortran maintainers.
>
OK, well Tobias, if you review and approve, I will commit.  Looks pretty safe to me.

Jerry
Tobias Burnus Jan. 30, 2011, 7:03 p.m. UTC | #3
Jerry DeLisle wrote:
> On 01/30/2011 09:08 AM, Gerald Pfeifer wrote:
>> On Sat, 29 Jan 2011, Tobias Burnus wrote:
>>> 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
>>
>> Practically I'd suggest to handle this like a "simple" Fortran
>> patch, that is, have it reviewed/approved by one of the other
>> Fortran maintainers.
>>
> OK, well Tobias, if you review and approve, I will commit.  Looks 
> pretty safe to me.
>

The gcc/testsuite/lib/target-supports.exp part
of http://gcc.gnu.org/ml/fortran/2011-01/msg00302.html
is OK.

(I did not look at nan_7.f90 as it first requires the libquadmath changes.)

Tobias
diff mbox

Patch

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.
 #