From patchwork Thu Apr 14 19:19:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1617421 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=wp60aNZ1; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4KfTmt1pBgz9sCq for ; Fri, 15 Apr 2022 05:19:56 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 495BA3857341 for ; Thu, 14 Apr 2022 19:19:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 495BA3857341 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1649963994; bh=iaTfWAqhnLxCcCt8+f8h2B+O+L3itzw/YWA1WoDLdzc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=wp60aNZ11OMqly47xmtRnA8d7oidUcBQ5gvQlwkK/gdQi/SSPf/GdqJ4d0ZIVv+VT xlZKJNHzvy/fDN6mG0bGhVXSiEzTZuKsfHffVczyLw5HHb1O1cBYkCqSIzWtRZF/xr ClX382bSKViuGJ602uK0wVM3X5jExo2u3dDrPpJs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 1967E3858C54 for ; Thu, 14 Apr 2022 19:19:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1967E3858C54 Received: by mail-wm1-x334.google.com with SMTP id v64-20020a1cac43000000b0038cfd1b3a6dso6571235wme.5 for ; Thu, 14 Apr 2022 12:19:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=iaTfWAqhnLxCcCt8+f8h2B+O+L3itzw/YWA1WoDLdzc=; b=fWb5BBf4uxB9g/8YBO8vvi9oP6Nr4jAz3LAqFrPa4tfKurgnxTcc663MwBF8YhdKI/ 3Y8KMxZG97TLeVexc04JkiXeyCrNNzK0Da6VPCkP2iTVoKlaP3b5NWT6cd1bQJdZbMHv PF48iDYDCPstRDcjAtKz+hFcmP5d4LwUykz3Q+44P9NQL5FWRYzZZ84p8k4TEjbNIwF+ TFNMx996YFVSXtUfucjk8zUpAiQUmb60FmyQJ5c2cVmu2z08xtbzGK5WDVqgDdywreBh aB6uNBWcZ0Clnrn2IMBa3KOaTaf8vC7XSiSgvc+Rp/apcaknR9StkM7twlTxseC5hykG sMrA== X-Gm-Message-State: AOAM5313GwKw0z2q4qsjjUkRmhGaHiqC2ejWU3h8haRrokZ8Nz+Qeyiy apUWSwWdW1Qrcb7eg+RWyg62csWRPSU= X-Google-Smtp-Source: ABdhPJyeBHGp1Q1AlME4IutTHM1Rb23Xl8f4ytVlU811e7qgHVBgysr7GeoDFHA9/dtP+nzh4t5iLQ== X-Received: by 2002:a05:600c:35d1:b0:38e:9d4c:2162 with SMTP id r17-20020a05600c35d100b0038e9d4c2162mr88269wmq.86.1649963951833; Thu, 14 Apr 2022 12:19:11 -0700 (PDT) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id bk13-20020a0560001d8d00b00207a6668855sm2214354wrb.47.2022.04.14.12.19.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2022 12:19:11 -0700 (PDT) X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Subject: [pushed] libgccjit: Fix a bootstrap break for some targets. Date: Thu, 14 Apr 2022 20:19:04 +0100 Message-Id: <20220414191904.19743-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 Sandoe via Gcc-patches From: Iain Sandoe Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe , bouanto@zoho.com Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Some targets use 'long long unsigned int' for unsigned HW int, and this leads to a Werror=format= fail for two print cases in jit-playback.cc introduced in r12-8117-g30f7c83e9cfe (Add support for bitcasts [PR104071]) As discussed on IRC, casting to (long) seems entirely reasonable for the values (since they are type sizes). tested that this fixes bootstrap on x86_64-darwin19 and running check-jit. pushed to master, thanks Iain Signed-off-by: Iain Sandoe gcc/jit/ChangeLog: * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi to 'long' to match the print format. --- gcc/jit/jit-playback.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index b1e72fbcf8a..6be6bdf8dea 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -1440,10 +1440,10 @@ new_bitcast (location *loc, active_playback_ctxt->add_error (loc, "bitcast with types of different sizes"); fprintf (stderr, "input expression (size: %ld):\n", - tree_to_uhwi (expr_size)); + (long) tree_to_uhwi (expr_size)); debug_tree (t_expr); fprintf (stderr, "requested type (size: %ld):\n", - tree_to_uhwi (type_size)); + (long) tree_to_uhwi (type_size)); debug_tree (t_dst_type); } tree t_bitcast = build1 (VIEW_CONVERT_EXPR, t_dst_type, t_expr);