I have committed a fix for PR 56082, where the test case assumed that
C_Bool is a byte wide (kind=1); however, on 32bit Darwin, C_Bool is by
default an "int" (kind=4) – hence, a warning is not printed. The change
was to use logical(kind=2) for the example, assuming C_Bool is never kind=2.
Committed as http://gcc.gnu.org/viewcvs?view=revision&revision=195984
For PR 56204, the test case assumed that I/O uses by default the same
rounding for input and output. That worked well, except on Solaris –
well, using an epsilon criterion is also fine. Patched by the attached
patch. (Committed as Rev. 196011.)
Tobias
Index: ChangeLog
===================================================================
--- ChangeLog (Revision 196010)
+++ ChangeLog (Arbeitskopie)
@@ -1,3 +1,10 @@
+2013-02-13 Tobias Burnus <bur...@net-b.de>
+ Rainer Orth <r...@cebitec.uni-bielefeld.de>
+
+ PR fortran/56204
+ * gfortran.dg/quad_2.f90: Use "< epsilon" instead of "==".
+ * gfortran.dg/quad_3.f90: Ditto.
+
2013-02-13 Kostya Serebryany <k...@google.com>
* c-c++-common/asan/strncpy-overflow-1.c: Update the test
@@ -20,7 +27,7 @@
2013-02-12 Dominique d'Humieres <domi...@lps.ens.fr>
Tobias Burnus <bur...@net-b.de>
- PR fortran/56082
+ PR testsuite/56082
* gfortran.dg/bind_c_bool_1.f90 (sub): Change kind=4
to kind=2.
Index: gfortran.dg/quad_2.f90
===================================================================
--- gfortran.dg/quad_2.f90 (Revision 196010)
+++ gfortran.dg/quad_2.f90 (Arbeitskopie)
@@ -31,9 +31,9 @@
read (str2, *) fp3
if (fp1 /= fp3) call abort()
read (str3, *) fp4
- if (fp2 /= fp4) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
read (str4, *) fp4
- if (fp2 /= fp4) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
select case (qp)
case (8)
Index: gfortran.dg/quad_3.f90
===================================================================
--- gfortran.dg/quad_3.f90 (Revision 196010)
+++ gfortran.dg/quad_3.f90 (Arbeitskopie)
@@ -25,6 +25,7 @@
read (tmp, *) a, c
! print *, 'same value read again: ', a, c
! print *, 'difference: looks OK now ', a-b(1)
- if (a-b(1) /= 0.0_qp .or. c-b(1) /= 0.0_qp) call abort()
+ if (abs (a-b(1))/a > epsilon(0.0_qp) &
+ .or. abs (c-b(1))/c > epsilon (0.0_qp)) call abort()
end if
end program test_qp