From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) From: Iain Sandoe X-Google-Original-From: Iain Sandoe To: gcc-patches@gcc.gnu.org Cc: dmalcolm@redhat.com, bouanto@zoho.com 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) Reply-To: iain@sandoe.co.uk MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-List-Received-Date: Thu, 14 Apr 2022 19:19:14 -0000 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); -- 2.24.3 (Apple Git-128)