From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id E4C91385800D; Mon, 17 Jan 2022 14:01:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4C91385800D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mentor.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 5X1paE37s40PGg+HgVsdElJ8Q0oYAsUgbf8O9Sl/BmMgLbqFm5V64vGhOces5yY9XdONT7ks1N vTrTfaAu3qSaj9BqIPSct8LhpYaCovOSuVXtq7HXoM9jveDuSh3aPXM31CcaUKI9NG+E8skx2a kQEnGPEzVPv26ejfAaecoUYH1nsO4sNIRiExe5o2jHvXUXBi2QVUyO0D5QO+nexiTFoco8JoWH 6fWYoDCRh4Wr33TJHhdZT/XWkB6Q733xkCC7ieikWiFnNtK9RUcaN2EE+Gv4k2VG3C5DHdlfrL eSk= X-IronPort-AV: E=Sophos;i="5.88,295,1635235200"; d="scan'208";a="73385982" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 17 Jan 2022 06:01:14 -0800 IronPort-SDR: MEuncdveG4FcybtZsXaG4TOqoOm+F0eUmx9e7dWaPYk60Ww3l24L0Rgic9VuXJzn7rD3UVE3zT S6aVLCec7gnZpNK8weWlGnNVTFeZM+MBnbCzOuz9FYy7VXquRUqDne90zdKhLsh8nC9C/zEJLM cFWBTUKTfHbhNnp2Tn04eXZcUk4XIu67m7yxRscUFI+IhPp6DAsBNI5cdRWKxdJKKDL0N8bpHN 4j2/08RdW7j6MMXhL7ZEoEhehafE6LiqYWrFDNIZBQxCH3XRRnDWZPnJW2sdlwXLKstLMGEZow mDQ= Subject: Re: [PATCH] [gfortran] Add support for allocate clause (OpenMP 5.0). To: Tobias Burnus , Jakub Jelinek , Thomas Schwinge CC: , References: <20211022130502.2211568-1-abidh@codesourcery.com> <20211102162714.GF304296@tucnak> <20211220200650.GN2646553@tucnak> <87bl0evg25.fsf@euler.schwinge.homeip.net> <20220114115557.GK2646553@tucnak> From: Hafiz Abid Qadeer Message-ID: <5973569d-2668-b805-36fe-bfaba1a8fab2@mentor.com> Date: Mon, 17 Jan 2022 14:01:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 14:01:19 -0000 On 14/01/2022 12:20, Tobias Burnus wrote: > On 14.01.22 12:55, Jakub Jelinek via Fortran wrote: >> If we want to check intptr_t, we should guard the dg-error with >> "" { target { lp64 || llp64 } } >> or so. > > Well, if we want to use intptr_t, we could use be explicitly as with: > >   use iso_c_binding, only: c_intptr_t >   ! use omp_lib, only: omp_allocator_handle_kind >   ...  ('implicit none' etc.) >   integer, parameter :: omp_allocator_handle_kind = c_intptr_t >   ... >   integer(kind=omp_allocator_handle_kind) > > (@Abid: The 'use omp_lib' line is commented as in gcc/testsuite/*/gomp/, > the OpenMP module/header from libgomp is not available - and then a > stub parameter is created.) > >> Otherwise yes, we can add some other kind and hope it is not the >> same as omp_allocator_handle_kind.  Or we can do both, >> keep the current one with the target lp64 || llp64 and >> add another one with some integer(kind=1). > > For just testing something invalid, I think it makes more sense to just set it to kind=1. > > For checking the valid value, using c_intptr_t seems to make more sense than restricting it to (l)l64. Problem was with the literal 0 having same kind as c_intptr_t for m32. So there was no diagnostic in that case. I am going to change it 0_1 to make the test more robust. Thanks, -- Hafiz Abid Qadeer Mentor, a Siemens Business