From patchwork Mon Dec 19 12:53:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 34535 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2368266wrn; Mon, 19 Dec 2022 04:54:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7OE3b2+ZzMCcTwxdzNTVBHY6Nd+i3/KggoWBek0NxzplDNSXhyFvzoo//MZn4YzYj4qQNa X-Received: by 2002:aa7:d905:0:b0:46d:1c38:1537 with SMTP id a5-20020aa7d905000000b0046d1c381537mr35943235edr.29.1671454483266; Mon, 19 Dec 2022 04:54:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671454483; cv=none; d=google.com; s=arc-20160816; b=HuDI215BRZcqTOvqXrH5JkFvPLoENC0sdKzv1kleLOAMz8Z9uiwVuMrPrS/gXK0oqS PayyTMtKqymcvkvfKypFvzASG6mBjk/fuh3XoBRHXvq7nDug0S/FX4+ZJESgQCie7LQz SWHvHcH81VzuAWoMWw3RC4mqzwkqPQ9Ilt+7SSAUR9Jx75ovKg8erFkO6KpCXfp5T1Al yWUXteRxc1z4fm326EIaXVHmc4wDY+eeE0nGKt/TH+a7QlilT5Z20Sa2el3oH9+Cv/yt 6qXprHRTxlOTZR2M06zqm0pgy554gkumgKasHmbnHRMOW/HZ/tqOr7v7Es/FbKrtcmkZ mp6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=AiTAGjRqlhrw8beeaHukr0rHewGO0SSjBnFFdAcxzvY=; b=fFrfuN+OkXupSzqJO89JOJMnMYzaRwxBeSEDC8KBMo5q22r8j4oNFfCs0giFuN878U Gpk9ckPdZNPzFQ5sIGR+SV7p8ShzTHIf+vzTf0sPwuZbK/kMqcZu2yAKz4RLo/sowUUY 1Od7Nw98ZOuUtm1ADpRdapVwP9N7qU03HSS6qgS5zsy9igKyjSsiAzmjdLsgkZyb3ZHC uSKYtVsOtlWiFTv1kdeH9H3r3bRcc5qCHyXGLGmbRRQB1iQ+45g87CJSOdTzbOmFh3AG gofaZMGEjLXj09l06a3e4/vLtCH6Wt0VhnGTTr8VYamMAibHqJc/xzcRfQHXgF/cQ8S8 aP6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CZqiq7df; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p37-20020a056402502500b0047b4f311f0asi722886eda.285.2022.12.19.04.54.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 04:54:43 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=CZqiq7df; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47B843858D3C for ; Mon, 19 Dec 2022 12:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47B843858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671454482; bh=AiTAGjRqlhrw8beeaHukr0rHewGO0SSjBnFFdAcxzvY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=CZqiq7dfyFJ5L5XwTM+10pgUzlRWQz1yLfZailBAIb9KnIbXecc46f5bzdZiBs9RL 9njVIg8Veg/axhsbFyt2Fkxo1RLD+zUU8CyZRC9viBgsUpl0bo46MNF7uLipmnMAEq lt1iVzsahxvRQOPN4ijDG1eIlfgfjW4QSlKp0XR4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 691853858D1E for ; Mon, 19 Dec 2022 12:53:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 691853858D1E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-606-tVk9HZCmPtK1z1yVAY3usQ-1; Mon, 19 Dec 2022 07:53:50 -0500 X-MC-Unique: tVk9HZCmPtK1z1yVAY3usQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B15018A6460 for ; Mon, 19 Dec 2022 12:53:50 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD6BA492B00 for ; Mon, 19 Dec 2022 12:53:49 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2BJCrl6v778046 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Mon, 19 Dec 2022 13:53:47 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2BJCrksu778045 for gcc-patches@gcc.gnu.org; Mon, 19 Dec 2022 13:53:46 +0100 Date: Mon, 19 Dec 2022 13:53:46 +0100 To: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Fix up pr64536.c for LLP64 targets [PR108151] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752647056255193775?= X-GMAIL-MSGID: =?utf-8?q?1752647056255193775?= Hi! The test casts a pointer to long, which is ok for ilp32 and lp64 targets but not for llp64 targets. Nothing reads the values later, it is a link test, so all we care about is that it is the same cast on s390x-linux where it used to fail before the PR64536 fix, and that we don't warn about it. Tested on x86_64-linux -m32/-m64 and with a cross to s390x-linux, committed to trunk as obvious. 2022-12-19 Jakub Jelinek PR testsuite/108151 * gcc.dg/pr64536.c (bar): Use casts to __INTPTR_TYPE__ rather than long when casting pointer to integral type. Jakub --- gcc/testsuite/gcc.dg/pr64536.c.jj 2020-01-12 11:54:37.489397175 +0100 +++ gcc/testsuite/gcc.dg/pr64536.c 2022-12-19 13:44:42.608091278 +0100 @@ -41,7 +41,7 @@ bar (int x) } else i = (long *) (h->q = *f); - *c++ = (long) f; + *c++ = (__INTPTR_TYPE__) f; e += 6; } else @@ -55,7 +55,7 @@ bar (int x) } else i = (long *) (h->q = *f); - *c++ = (long) f; + *c++ = (__INTPTR_TYPE__) f; e += 6; } }