From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29750 invoked by alias); 8 Apr 2013 09:37:07 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 29698 invoked by uid 89); 8 Apr 2013 09:37:06 -0000 X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 08 Apr 2013 09:37:05 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 08 Apr 2013 10:37:02 +0100 Received: from e106375-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Apr 2013 10:37:01 +0100 From: James Greenhalgh To: libffi-discuss@sourceware.org Subject: [libffi testsuite] Set -ffp-contract=off for libffi.call/many.c Date: Mon, 08 Apr 2013 09:37:00 -0000 Message-Id: <1365413805-5517-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: 113040810370208801 Content-Type: multipart/mixed; boundary="------------1.8.1.rc3.28.gcf793a4" X-Virus-Found: No X-SW-Source: 2013/txt/msg00128.txt.bz2 This is a multi-part message in MIME format. --------------1.8.1.rc3.28.gcf793a4 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: quoted-printable Content-length: 874 Hi, A recent patch fixed libffi.call/many.c to check that the absolute value of the difference of its two test results was smaller than FLT_EPSILO= N, rather than just checking their difference. Sadly, this exposes a problem with the testcase for targets with a fused-multiply-add instruction. After inlining the non-ffi function body, GCC will happily contract the final multiply with the subtract for the comparison. Thus skipping the rounding step after the multiply and causing an error large enough to cause the test to fail. Fixed by adding -ffp-contract=3Doff to the list of dg-options thus suppressing the introduction of fused-multiply-add. Tested on aarch64-none-linux-gnu to ensure the failure becomes a pass. Thanks, James Greenhalgh --- 2013-04-08 James Greenhalgh * testsuite/libffi.call/many.c: Set -ffp-contract=3Doff. --------------1.8.1.rc3.28.gcf793a4 Content-Type: text/x-patch; name=0001-libffi-testsuite-Set-ffp-contract-off-for-libffi.cal.patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-libffi-testsuite-Set-ffp-contract-off-for-libffi.cal.patch" Content-length: 354 diff --git a/testsuite/libffi.call/many.c b/testsuite/libffi.call/many.c index 67a367f..afade91 100644 --- a/testsuite/libffi.call/many.c +++ b/testsuite/libffi.call/many.c @@ -5,6 +5,8 @@ Originator: From the original ffitest.c */ =20 /* { dg-do run } */ +/* { dg-options -ffp-contract=3Doff } */ + #include "ffitest.h" =20 #include = --------------1.8.1.rc3.28.gcf793a4--