From patchwork Sun Oct 31 18:53:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1548875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=BBSiVmqA; dkim-atps=neutral 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+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (ip-8-43-85-97.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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hj5143kzkz9sWJ for ; Mon, 1 Nov 2021 05:53:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5B1AC385781D for ; Sun, 31 Oct 2021 18:53:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B1AC385781D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635706434; bh=qXcwNnhOhL0EAxy8NnB+38Qkt9BEnFBlRkDFVE2nqAk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=BBSiVmqAbQ8S3pspzQhbJOpj0zkxobDNzLIQfdxiaO0Q4wiWZMwvUKnpQ0wdFL6kz xcpvc6NxJ2vQhtxmhOOIR/XDvbU5UcPs0rcJr5mtsDCD3FfnyzAxXdJoBcZz4tTlex A7hc/ijc+UJ2qk8KO+maREJmabvldMjT8EGwSm5w= 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 05B053857C5E for ; Sun, 31 Oct 2021 18:53:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05B053857C5E Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Hj5082HhBzQjdM; Sun, 31 Oct 2021 19:53:12 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de To: gcc-patches@gcc.gnu.org Subject: [committed] d: Fix pr96435.d failing on SPARC and HPPA Date: Sun, 31 Oct 2021 19:53:07 +0100 Message-Id: <20211031185307.558811-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EE2D0189C X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch fixes test failures seen on SPARC and HPPA targets. The value used to initialize the integer field in the union didn't account for BigEndian targets running this code. Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, as well as sparc-sun-solaris2.11. Committed to mainline. Regards, Iain --- PR d/102959 gcc/testsuite/ChangeLog: * gdc.dg/torture/pr96435.d: Adjust for BigEndian. --- gcc/testsuite/gdc.dg/torture/pr96435.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gdc.dg/torture/pr96435.d b/gcc/testsuite/gdc.dg/torture/pr96435.d index c6d8785ec5b..896b25f7cb4 100644 --- a/gcc/testsuite/gdc.dg/torture/pr96435.d +++ b/gcc/testsuite/gdc.dg/torture/pr96435.d @@ -6,7 +6,7 @@ int[2] array = [16, 678]; union U { int i; bool b; } U u; - u.i = 0xDEADBEEF; + u.i = 0x81818181; assert(array[u.b] == 678); return u.b; }