From patchwork Tue Nov 8 16:48:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 124394 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 995FE1007D3 for ; Wed, 9 Nov 2011 03:48:51 +1100 (EST) Received: (qmail 31823 invoked by alias); 8 Nov 2011 16:48:45 -0000 Received: (qmail 31807 invoked by uid 22791); 8 Nov 2011 16:48:45 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_IB 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; Tue, 08 Nov 2011 16:48:30 +0000 Received: from [192.168.178.22] (port-92-204-111-228.dynamic.qsc.de [92.204.111.228]) by mx01.qsc.de (Postfix) with ESMTP id 353B33DA9D; Tue, 8 Nov 2011 17:48:26 +0100 (CET) Message-ID: <4EB95D57.9000102@net-b.de> Date: Tue, 08 Nov 2011 17:48:23 +0100 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Janne Blomqvist CC: Rainer Orth , Steve Kargl , Eric Botcazou , gcc-patches@gcc.gnu.org, gfortran Subject: Re: [Patch, Fortran, committed] Add libquadmath testcase gfortran.dg/quad_2.f90 References: <4EB5A1C2.7090606@net-b.de> <201111072155.48747.ebotcazou@adacore.com> <20111107210011.GA50212@troutmask.apl.washington.edu> <20111108152408.GA55075@troutmask.apl.washington.edu> In-Reply-To: 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 On 11/08/2011 05:10 PM, Janne Blomqvist wrote: > On Tue, Nov 8, 2011 at 17:41, Rainer Orth wrote: >> Steve Kargl writes: >> >>>> Please no: sqrtl is a C99 addition, and we don't want lists of non-C99 >>>> targets in tests that require them. >>>> >>> OK, so, then we simply accept that running a regression test >>> on these targets will always FAIL? If the answer is 'yes', >>> then please close this PR because I doubt anyone will implement >>> sqrtl(). >> No. AFAICS so far C99 functions have been implemented in >> intrinsics/c99_functions.c for the benefit of platforms that aren't >> C99. Has this policy changed recently? One possibility would be the following patch. It still checks on all systems the I/O for the largest real_kind, but restricts the SQRT test to libquadmath. The restriction is done by doing the calculation on systems which have both real-kind 10 and real-kind 16 (besides the standard 4 and 8), which should be only the case for libquadmath systems. Would that be a solution? Tobias PS: The qp == 16 test is superfluous. PPS: The if-condition below will fail as soon as gfortran supports another kind of real numbers, e.g. those with RADIX=10, on systems with (native) REAL(16) and a libm which lacks support for sqrtl. call abort() end select --- a/gcc/testsuite/gfortran.dg/quad_2.f90 +++ b/gcc/testsuite/gfortran.dg/quad_2.f90 @@ -50,12 +50,14 @@ program test_qp if (str2 /= "1.00000000000000000000000000000000000") call abort() if (str3 /= " 1.41421356237309504880168872420969798") call abort() if (str4 /= "1.41421356237309504880168872420969798") call abort() - block + if (qp == 16 .and. size (real_kinds) >= 4) then + block real(qp), volatile :: fp2a fp2a = 2.0_qp fp2a = sqrt (fp2a) if (abs (fp2a - fp2) > sqrt(2.0_qp)-nearest(sqrt(2.0_qp),-1.0_qp)) call abort() - end block + end block + end if case default