From patchwork Mon Apr 27 00:57:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1277271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Ln/4eoTd; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499RFt42Pzz9sRf for ; Mon, 27 Apr 2020 10:57:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C3E6384B0C0; Mon, 27 Apr 2020 00:57:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C3E6384B0C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587949056; bh=f99Zwcn6ODAljoQtcuOJP56nqUS4ulwXSuinpsx0D50=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ln/4eoTdYjd16emCuIO3PXrpci/Sy21A+VF8CqI1MWGUBJxWg+l8T+JRUnjO3Pmrv W/qcXW52vWOs10aPxLc4qnhMPFz5067c+Ni4sO+86MHcOPdHfVRuCGn9gEmW1pXL3c Q9xD0Xw85OFNmlgrt5tjZUl9pyfV5InUpY+oGfdQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by sourceware.org (Postfix) with ESMTPS id 82682385DC1B for ; Mon, 27 Apr 2020 00:57:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 82682385DC1B Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 499RFm3c2jzQlLX; Mon, 27 Apr 2020 02:57:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id fR-85sfsRX3x; Mon, 27 Apr 2020 02:57:29 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] d: Merge upstream dmd f8a1a5153, druntime 2b5c0b27 (PR89418) Date: Mon, 27 Apr 2020 02:57:26 +0200 Message-Id: <20200427005726.30385-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 7307B1772 X-Rspamd-Score: 1.29 / 15.00 / 15.00 X-Spam-Status: No, score=-26.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch merges the D front-end impleentation with upstream dmd f8a1a5153, and the D runtime library with upstream druntime 2b5c0b27. Adds a new test directive COMPILABLE_MATH_TEST, and support has been added for it in gdc-convert-test so that they are skipped if phobos is not present on the target. Only change in D runtime is a small documentation fix. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards Iain. --- gcc/testsuite/ChangeLog: PR d/89418 * lib/gdc-utils.exp (gdc-convert-test): Add dg-skip-if for compilable tests that depend on the phobos standard library. --- gcc/d/dmd/MERGE | 2 +- gcc/testsuite/gdc.test/compilable/ctfe_math.d | 1 + gcc/testsuite/gdc.test/compilable/test5227.d | 1 + gcc/testsuite/lib/gdc-utils.exp | 9 +++++++++ libphobos/libdruntime/MERGE | 2 +- libphobos/libdruntime/core/internal/convert.d | 4 ++-- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index a878cb9f42e..f933cf1c992 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -09db0c41ee922502fa0966bde24c1cb9b15ad436 +f8a1a515346b16ebbd9da56a908540cbef1ee582 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/testsuite/gdc.test/compilable/ctfe_math.d b/gcc/testsuite/gdc.test/compilable/ctfe_math.d index 78de869d090..334b75ac941 100644 --- a/gcc/testsuite/gdc.test/compilable/ctfe_math.d +++ b/gcc/testsuite/gdc.test/compilable/ctfe_math.d @@ -1,3 +1,4 @@ +// COMPILABLE_MATH_TEST // Test CTFE builtins for std.math functions. import std.math; diff --git a/gcc/testsuite/gdc.test/compilable/test5227.d b/gcc/testsuite/gdc.test/compilable/test5227.d index c270b79245b..63ca752f4fb 100644 --- a/gcc/testsuite/gdc.test/compilable/test5227.d +++ b/gcc/testsuite/gdc.test/compilable/test5227.d @@ -1,4 +1,5 @@ /* +COMPILABLE_MATH_TEST REQUIRED_ARGS: PERMUTE_ARGS: TEST_OUTPUT: diff --git a/gcc/testsuite/lib/gdc-utils.exp b/gcc/testsuite/lib/gdc-utils.exp index 87d1105a9db..5c17346dbf5 100644 --- a/gcc/testsuite/lib/gdc-utils.exp +++ b/gcc/testsuite/lib/gdc-utils.exp @@ -302,6 +302,12 @@ proc gdc-convert-test { base test } { # It will need skipping if phobos is not available on the target. regsub -- {RUNNABLE_PHOBOS_TEST.*$} $copy_line "" out_line set needs_phobos 1 + + } elseif [regexp -- {COMPILABLE_MATH_TEST} $copy_line match sources] { + # COMPILABLE_MATH_TEST annotates tests that import the std.math + # module. Which will need skipping if not available on the target. + regsub -- {RUNNABLE_PHOBOS_TEST.*$} $copy_line "" out_line + set needs_phobos 1 } puts $fdout $out_line @@ -358,6 +364,9 @@ proc gdc-convert-test { base test } { # Cleanup extra generated files. puts $fdout "// { dg-final { file delete $genfile } }" } + if $needs_phobos { + puts $fdout "// { dg-skip-if \"imports phobos\" { ! d_runtime_has_std_library } }" + } } fail_compilation { diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index 8b461f76ad0..e3763485adf 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -e68a5ae36790fa9dc5bab6155bc450eb6bf8c12c +2b5c0b2766949e788e4929c5fb0e2ba698ff79a3 The first line of this file holds the git revision number of the last merge done from the dlang/druntime repository. diff --git a/libphobos/libdruntime/core/internal/convert.d b/libphobos/libdruntime/core/internal/convert.d index 3d2cb59a64a..0f540f83d42 100644 --- a/libphobos/libdruntime/core/internal/convert.d +++ b/libphobos/libdruntime/core/internal/convert.d @@ -73,8 +73,8 @@ const(ubyte)[] toUbyte(T)(const ref T val) if (is(Unqual!T == float) || is(Unqua // Parse DoubleDoubles as a pair of doubles. // The layout of the type is: // - // [1| 7 | 56 ][ 8 | 56 ] - // [S| Exp | Fraction (hi) ][ Unused | Fraction (low) ] + // [1| 11 | 52 ][1| 11 | 52 ] + // [S| Exponent | Fraction (hi) ][S| Exponent | Fraction (low) ] // // We can get the least significant bits by subtracting the IEEE // double precision portion from the real value.