From patchwork Wed Feb 13 12:06:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 220126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id CB3952C0087 for ; Wed, 13 Feb 2013 23:06:40 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1361362001; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=WnX5giR CyeWV/ilE12q4v6ayktc=; b=uOgFmLlmegr4V7VIC0Aezswbm4gWzkhBPbV0mLt GgvXDQFhu9VHtnOoZDt+c+HB8jom2h/eLxjpM9pkkdDYeU1K7jn6np0tOaJlr5Tr 3DSLW9yIbbN0YAVdJaXzKyExqqTIbOF8jkkHAiQIjsIQCZXOzwbcneHoCprkSotq kvWo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rGeYffZGlxK3EaXOmVf3E20F5FzEq82+nBRzVyOxiBnCJ3pYDxnR5IwDwnNBqw Tzx60AEwUGUBRRXUGr5las5+P3hEeeGGrkGAfdT2kWfhHauf9Y4zb67WEcbJe2fJ Ko75EMWvN4iBALwKql/hOjSwpB9+7X3bpoUKDI7qQSrJs=; Received: (qmail 12071 invoked by alias); 13 Feb 2013 12:06:30 -0000 Received: (qmail 12058 invoked by uid 22791); 13 Feb 2013 12:06:29 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TBIRD_SPOOF X-Spam-Check-By: sourceware.org Received: from mx01.qsc.de (HELO mx01.qsc.de) (213.148.129.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Feb 2013 12:06:06 +0000 Received: from archimedes.net-b.de (port-92-195-225-65.dynamic.qsc.de [92.195.225.65]) by mx01.qsc.de (Postfix) with ESMTP id 192783CE66; Wed, 13 Feb 2013 13:06:04 +0100 (CET) Message-ID: <511B81AC.1060909@net-b.de> Date: Wed, 13 Feb 2013 13:06:04 +0100 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Patch, Fortran, Committed] PR testsuite/56082 / PR fortran/56304 (libquad) Test-case fixes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 + Rainer Orth + + PR fortran/56204 + * gfortran.dg/quad_2.f90: Use "< epsilon" instead of "==". + * gfortran.dg/quad_3.f90: Ditto. + 2013-02-13 Kostya Serebryany * c-c++-common/asan/strncpy-overflow-1.c: Update the test @@ -20,7 +27,7 @@ 2013-02-12 Dominique d'Humieres Tobias Burnus - 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