From patchwork Wed Jan 10 13:03:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 186862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp774741dyi; Wed, 10 Jan 2024 05:04:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbpflajDn9CcXJlMEg1yZjysQCN/bop01zunVOqkutuNjM21qmo9VRmeZsVYk5RXa0/7V3 X-Received: by 2002:a9d:6e82:0:b0:6dd:eaa7:bf06 with SMTP id a2-20020a9d6e82000000b006ddeaa7bf06mr682129otr.4.1704891867339; Wed, 10 Jan 2024 05:04:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704891867; cv=pass; d=google.com; s=arc-20160816; b=qPJ46DZGl4vGPChYnsJ+MpmrCRS9gVXDZSkjbImXngwxAABvinfENAS9VG9xZCbEow oCHoO8mOCfaBUf3pdPfssHRz3pWMDnH3XYOymDx9ehKpvdWDaPYp7YNH1SB3yPBgu5dE QB0CScxj790GvngK+tzQ9bQmqX/M5Yye7l1MPgistisB3GNsI6vJwhCr5CxdefIJMmBA I1ThiCvTirKimJ82H1PGfmfoeeMzgZ0YDsw3Tht30Zl+EFiCv5hw7YU+PBnO6KVZm38r Ma9fDEj8DcvctK35fM+n3iChASCEIc+XB2wSM4udiZidksASdr+CWEeaCLVOY6EZBeT3 8ZmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:ironport-sdr :arc-filter:dmarc-filter:delivered-to; bh=R3SXhiNJkrVZkRoD3P7y3YD0tj891Hpbl9X26NT8eRQ=; fh=gk9A5O7Gbglvz1MjrRQ4hZ2i3c68kYkpOZJg1emXh+g=; b=s5kngGYIoMheguOy7M9Y5p62wknLWaHgCrf9cfY25o9dq8GHaQo1zUPdOka4+t5fkk B+t2Pf3w9WkmDaaOuopEZyUBGbs/c4EKcd/O/WqVyVc3vEwDKVm9plfUInH2zN/hBIxa +EVId0CqAXRGlxgldXyqfsJhfmFelBv0lx29bN69FECo0z8tE7i1x3Ov+iHnW/bHWTqI uB9LkNjSDMlUJ3hdkF1kMoFcuhLGCUQgz79WXIwcjEx0w1JGOJtp7qasT8+TpEypcEgi +IAF54k6iC/oGQLtWPY/ZI4eBIEIFMvaR6Fur4osoe1P+qWH4/qxm0y5p9bZ7i65d4Gj 2SLQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p10-20020a056102124a00b00467a854af38si515952vsg.108.2024.01.10.05.04.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 05:04:27 -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; arc=pass (i=1); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 015BE385842C for ; Wed, 10 Jan 2024 13:04:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 6A0663858C2C for ; Wed, 10 Jan 2024 13:03:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A0663858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A0663858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.129.153 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704891821; cv=none; b=XjSymDk7YDq5Gdx9KC70pYy3lRgNG1zXlL8rrS+lDZ9MHXCePSIqRCLhUSUHWWSAUEaOEDmlF0jaV/iyKuaRtUo67yNntC1LEt4vsSL+R+u+aWRQYaipKtRgOuoWkHZaMNRsuvv215omqM7VKla0jO4QKzPee5wYAgvJpel/hVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704891821; c=relaxed/simple; bh=4QGV9lUx9/z94ripxdPPlhLiaVONcqXOJtMf3IL3t5U=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VCYLZo96kz4+GjO5lDoJdfpxQEyDGX7r82x74msQIf40BHQlEim/fd3oqCYK6y61xjtZHbVXTcE0tV7bA74Ak8uLNFOmENmqIinVAXTYGWMSBEPKzv24Ok4Klq95BdXmFWOrQ0rpC8TVGa8uUG87Y+3B0DGOXYoGFw5Fr5ZBnfY= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: HGRDleWTQ3SXltsffIHPmA== X-CSE-MsgGUID: MxOHj3nNR0aBnmngKPmOVw== X-IronPort-AV: E=Sophos;i="6.04,184,1695715200"; d="scan'208";a="31178128" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 10 Jan 2024 05:03:35 -0800 IronPort-SDR: nX4hgw6vyqAJvKcmlbSx8nuZQpP9hpBX8C/sTbCQRIbYAvDWxJSS9xm7tXCJE8PHeqo11Yqv3e bRAB+0V45krdDrW0qeaS2fzvLbG8PqwQKpaxwvUxupYHMx/PgRN7f5xWczp5vGOmRUQRV5wM0A YQhlZ8Qpf6x/UscOwD+mxHFlqaaPAyR6rOrxHcbIpXUolD5kwuOUIvaeMLDp/cVHjqDqXXKKs1 j+Ky0kp6zs02If8lc90k0Zdo1mh+BXw7sCPJ6HPx/a9KEZ3D3IAP2TxL9pdAFeMmSSf/0B8YI3 qYM= From: Julian Brown To: Subject: [PATCH] OpenMP: Fix new lvalue-parsing map/to/from tests for 32-bit targets Date: Wed, 10 Jan 2024 13:03:18 +0000 Message-ID: <20240110130318.976927-1-julian@codesourcery.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787708694743890548 X-GMAIL-MSGID: 1787708694743890548 This patch fixes several tests introduced by the commit r14-7033-g1413af02d62182 for 32-bit targets. I will commit as obvious. 2024-01-10 Julian Brown gcc/testsuite/ * g++.dg/gomp/array-section-1.C: Fix scan output for 32-bit target. * g++.dg/gomp/array-section-2.C: Likewise. * g++.dg/gomp/bad-array-section-4.C: Adjust error output for 32-bit target. --- gcc/testsuite/g++.dg/gomp/array-section-1.C | 8 ++++---- gcc/testsuite/g++.dg/gomp/array-section-2.C | 8 ++++---- gcc/testsuite/g++.dg/gomp/bad-array-section-4.C | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/g++.dg/gomp/array-section-1.C b/gcc/testsuite/g++.dg/gomp/array-section-1.C index 023706b15c5..562475ab80e 100644 --- a/gcc/testsuite/g++.dg/gomp/array-section-1.C +++ b/gcc/testsuite/g++.dg/gomp/array-section-1.C @@ -8,10 +8,10 @@ void foo() { int arr1[40]; #pragma omp target map(arr1[x ? C : D]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[x ? C : D : D]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[1 : x ? C : D]) // { dg-final { scan-tree-dump {map\(tofrom:arr1\[1\] \[len: x != 0 \? [0-9]+ : [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: [0-9]+\]\)} "original" } } @@ -22,10 +22,10 @@ int main() { int arr1[40]; #pragma omp target map(arr1[x ? 3 : 5]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[x ? 3 : 5 : 5]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[1 : x ? 3 : 5]) // { dg-final { scan-tree-dump {map\(tofrom:arr1\[1\] [len: x != 0 ? [0-9]+ : [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: [0-9]+\]\)} "original" } } diff --git a/gcc/testsuite/g++.dg/gomp/array-section-2.C b/gcc/testsuite/g++.dg/gomp/array-section-2.C index 072108d1f89..e2be9791e81 100644 --- a/gcc/testsuite/g++.dg/gomp/array-section-2.C +++ b/gcc/testsuite/g++.dg/gomp/array-section-2.C @@ -16,10 +16,10 @@ int C::foo() /* There is a parsing ambiguity here without the space. We don't try to resolve that automatically (though maybe we could, in theory). */ #pragma omp target map(arr1[::x: ::y]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[::x:]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(40 - \(sizetype\) SAVE_EXPR \) \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(40 - \(sizetype\) SAVE_EXPR \) \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[: ::y]) // { dg-final { scan-tree-dump {map\(tofrom:arr1\[0\] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: 0\]\)} "original" } } @@ -40,10 +40,10 @@ void Ct::foo() { int arr1[40]; #pragma omp target map(arr1[::x: ::y]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[::x:]) -// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(40 - \(sizetype\) SAVE_EXPR \) \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \(long int\) &arr1\[SAVE_EXPR \] - \(long int\) &arr1\]\)} "original" } } +// { dg-final { scan-tree-dump {map\(tofrom:arr1\[SAVE_EXPR \] \[len: \(40 - \(sizetype\) SAVE_EXPR \) \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: \((?:long )?int\) &arr1\[SAVE_EXPR \] - \((?:long )?int\) &arr1\]\)} "original" } } { } #pragma omp target map(arr1[: ::y]) // { dg-final { scan-tree-dump {map\(tofrom:arr1\[0\] \[len: \(sizetype\) y \* [0-9]+\]\) map\(firstprivate:arr1 \[pointer assign, bias: 0\]\)} "original" } } diff --git a/gcc/testsuite/g++.dg/gomp/bad-array-section-4.C b/gcc/testsuite/g++.dg/gomp/bad-array-section-4.C index 707c2c31cb2..5d9f056bf7c 100644 --- a/gcc/testsuite/g++.dg/gomp/bad-array-section-4.C +++ b/gcc/testsuite/g++.dg/gomp/bad-array-section-4.C @@ -34,7 +34,7 @@ int main() // Reject array section in compound initialiser. #pragma omp target map( (struct S) { .ptr = (int *) arr[5:5] } ) // { dg-error {expected '\]' before ':' token} "" { target *-*-* } .-1 } -// { dg-warning {cast to pointer from integer of different size} "" { target *-*-* } .-2 } +// { dg-warning {cast to pointer from integer of different size} "" { target lp64 } .-2 } // { dg-error {expected primary-expression before 'struct'} "" { target *-*-* } .-3 } // { dg-error {expected '\)' before 'struct'} "" { target *-*-* } .-4 } { }