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: 1884974 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T97Kg2Nh4z1yPp for ; Thu, 11 Jan 2024 00:04:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2B1E3858C2C for ; Wed, 10 Jan 2024 13:04:04 +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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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 } { }