Message ID | 20211215155447.19379-39-frederik@codesourcery.com |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA8E1385840B for <patchwork@sourceware.org>; Wed, 15 Dec 2021 16:19:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id DF6A83857C48 for <gcc-patches@gcc.gnu.org>; Wed, 15 Dec 2021 15:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF6A83857C48 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: +vaZjWmXAtWHvbJIX2B9I2Vi01xHP9X+U9hDUJAhrukqVCXMlAjbN54lsazu25Wo1WEzo8GqKz HJMqw1T4gvq4YBUF3lMpKPoSMb7tiKep38D4NKoMCp7/vEKEIaKY5b2bcgpQVnMFgJTRdAEnu/ JMVpw3fvn667N3fRbw3prdwz8MCTYbMBNsk6IYEwHUDmQIYeH6LVFJ4+yqAj+wARRaIgRT+4HZ z4MS3avDT9t0BFpCl5NPIseQifWhS1bB5+F7SCRO9IEpBBXzj/GxxEXsCdm7JREfKr3TrDCffo BHW6Vv7z/pQIIbLOx0nsxZrC X-IronPort-AV: E=Sophos;i="5.88,207,1635235200"; d="scan'208";a="69584657" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 15 Dec 2021 07:57:28 -0800 IronPort-SDR: x4QSE3kaDv8+t4xAJdAudtSK+026LeXz5WJMIN+xd/WONMxjPfb4LhXz8GG0N5PW9179OZcyCZ 7pipuULen2Hkc7x0+6jBuHbDhiNTvh9R+E6syBNew9o6zjE3FjX70qgwUU/2l8Rm+0bk5O3qGI o6eqJ7EEfS0YbFr+P2jfJcZmI2dRzIHtdjBbnVpFicju8Y1OQISOB0vqOo/iYofBtBvqalaTA7 yi+NasH2NGxBp3aBV3ezdAJZTBkHD1npYYbCHjx0Upffc/r11Sn4yrtQi6fijg5OlBWLOO+VFx gVI= From: Frederik Harwath <frederik@codesourcery.com> To: <gcc-patches@gcc.gnu.org> Subject: [PATCH 38/40] openacc: fix privatization of by-reference arrays Date: Wed, 15 Dec 2021 16:54:45 +0100 Message-ID: <20211215155447.19379-39-frederik@codesourcery.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211215155447.19379-1-frederik@codesourcery.com> References: <20211215155447.19379-1-frederik@codesourcery.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: Tobias Burnus <tobias@codesourcery.com>, thomas@codesourcery.com Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
OpenACC "kernels" Improvements
|
|
Commit Message
Frederik Harwath
Dec. 15, 2021, 3:54 p.m. UTC
From: Tobias Burnus <tobias@codesourcery.com>
Replacing of a by-reference variable in a private clause by a local variable
makes sense; however, for arrays, the size is not directly known by the type.
This causes an ICE via create_tmp_var which indirectly invokes
force_constant_size in this case - but the latter only handled Ada.
gcc/ChangeLog:
* gimplify.c (localize_reductions): Do not create local
variable for privatized arrays.
---
gcc/gimplify.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.33.0
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index a0137089496b..952bc449a7db 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -11982,8 +11982,9 @@ localize_reductions (tree clauses, tree body) if (!lang_hooks.decls.omp_privatize_by_reference (var)) continue; - type = TREE_TYPE (TREE_TYPE (var)); + if (TREE_CODE (type) == ARRAY_TYPE) + continue; new_var = create_tmp_var (type, IDENTIFIER_POINTER (DECL_NAME (var))); pr.ref_var = var;