From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44482 invoked by alias); 11 Dec 2019 10:52:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 44463 invoked by uid 89); 11 Dec 2019 10:52:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.1 spammy=Burnus, tobiascodesourcerycom, sk:tobias, sk:tobias@ X-HELO: esa4.mentor.iphmx.com Received: from esa4.mentor.iphmx.com (HELO esa4.mentor.iphmx.com) (68.232.137.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2019 10:51:58 +0000 IronPort-SDR: uboq7/UOERtR5LgNZ/5R8/y9rcEEtA1dJgkXqKmoI9RmLETTmPMEYVdmVWwxGKIrln2zNzQf1T vLz4OsbFY12gEOKRktwSO8q09e2sRskP7Sg0XnvMTEEwspKTLOPHlvBgjoHvHrpo0TV76b1yZ0 kwzNI8be9CmiyoUXlW7bUDqFIYfp7tSVV1kBcF9EYS5Wkf7qStTZJqqz5UmK/l7a72wOcAQw2K TCxmGoTKLKheNcW3qV8PK1uVYAdB72U6uH7xFO+KSaDodqjP7zJcxOH6gYTfhE8/xH8mc3HF9y LkY= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 11 Dec 2019 02:51:57 -0800 IronPort-SDR: 6GR/QoK9SpTRrIyMjg86B5XQJV1lUHL66fVpYvRFcaiSA3TrHywztrBSDUcBGNjGUJvT8ppHfz TNck9z1eDRxcQ2AMq8QIORKioibyfmati4/DgWY7UGjVZXIf/Rmb+qRuHokuClKWCjczkYt8Pq aLvIo1UAa9u3RMQp10iy30FpnhOXc/QnRKes3voJjD5nZtgySI0ii1WJxnoDvFryG/gKbqvN8d PeQrWLLIhUJJR/AinwgQsR+7BK4n7X7XiZBkPMZgUMHFm8eykVACcIjJy2pRgB2Woa7SrlyUPy zVk= Subject: Re: [Patch][OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments To: Thomas Schwinge CC: , , Jakub Jelinek References: <87lfrylp8k.fsf@euler.schwinge.homeip.net> <8be82276-81b1-817c-fcd2-51f24f5fe2d2@codesourcery.com> <87wob82ntl.fsf@euler.schwinge.homeip.net> From: Tobias Burnus Message-ID: Date: Wed, 11 Dec 2019 10:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <87wob82ntl.fsf@euler.schwinge.homeip.net> Content-Type: multipart/mixed; boundary="------------7C6BD7ABD5BE8E14305988DB" Return-Path: tobias@codesourcery.com X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00761.txt.bz2 --------------7C6BD7ABD5BE8E14305988DB Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-length: 2375 Hi Thomas, [Attached patch committed as Rev. 279217] [One OpenMP (+OpenACC) patch and one OpenACC-only patch pending review are linked below.] On 12/7/19 3:49 PM, Thomas Schwinge wrote: > I'm seeing: > [-PASS:-]{+FAIL:+} libgomp.fortran/use_device_addr-3.f90 -O1 execution test Whether it passed or not depended whether the stack was NULL for the local "array_arg.0" variable (which got assigned "array_arg->data" if the argument was present). Fixed by the following patch, which also fixes some more corner cases: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00707.html – pending Jakub's review >> Except for trivial changes to libgomp/oacc-mem.c > Just because something is just a few lines of code doesn't mean that it's > trivial. I had asked you to first resolve that issue separately > (referencing PR92726) I vaguely remembered the this email – but couldn't find it in the thread. (This thread has 24 emails!) Turned out that you wrote tht email in a different thread – and while this patch is mainly about Fortran, your email was also not set to fortran@ (arguably, your quoted text didn't include any Fortran bits). Pending OpenACC review the thread you mentedion: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00062.html >> --- /dev/null >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-cache.f95 >> @@ -0,0 +1,23 @@ >> +! Test that the cache directives work with optional arguments. [...] > Missing '{ dg-do run }'. Fixed/committed. >> +! of giving a non-present argument to the cache directive is not tested as >> +! it is undefined. […] >> +! The effect of >> +! non-present aguments in firstprivate clauses is undefined […] The effect of >> +! non-present arguments in reduction clauses is undefined > Once you've got access, please file a ticket at > so this gets clarified. I will try to remember this – it's now on my to-do list. >> +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-reduction.f90 >> +! { dg-additional-options "-w" } > Why that? No idea (was added by Kwok) – I do see warnings with "-Wall", but not with default options. (It then shows warnings like: "‘rg.25’ is used uninitialized in this function [-Wuninitialized]".) I have now also removed this line → committed after testing that it runs through with nvptx. Tobias --------------7C6BD7ABD5BE8E14305988DB Content-Type: text/x-patch; charset="UTF-8"; name="committed.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="committed.diff" Content-length: 2439 commit 6d8c93a07d3844bfcf646d3e53a8d57eb034c509 Author: burnus Date: Wed Dec 11 10:40:11 2019 +0000 [OpenMP/OpenACC/Fortran] Fix mapping of optional (present|absent) arguments * testsuite/libgomp.oacc-fortran/optional-cache.f95: Add 'dg-do run'. * testsuite/libgomp.oacc-fortran/optional-reduction.f90: Remove unnecessary 'dg-additional-options "-w"'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@279217 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 83227032f88..14154088c95 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-11 Tobias Burnus + + * testsuite/libgomp.oacc-fortran/optional-cache.f95: Add 'dg-do run'. + * testsuite/libgomp.oacc-fortran/optional-reduction.f90: Remove + unnecessary 'dg-additional-options "-w"'. + 2019-12-09 Thomas Schwinge Julian Brown @@ -11109,7 +11115,7 @@ PR libgomp/30546 * configure.ac: Add check for makeinfo * Makefile.am: Redefined target libgomp.info, build libgomp.info only - if an appropiate version of makeinfo is found. + if an appropriate version of makeinfo is found. * aclocal.m4: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. diff --git a/libgomp/testsuite/libgomp.oacc-fortran/optional-cache.f95 b/libgomp/testsuite/libgomp.oacc-fortran/optional-cache.f95 index 00f7472ae6e..0d48e2bd786 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/optional-cache.f95 +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-cache.f95 @@ -1,3 +1,4 @@ +! { dg-do run } ! Test that the cache directives work with optional arguments. The effect ! of giving a non-present argument to the cache directive is not tested as ! it is undefined. The test is based on gfortran.dg/goacc/cache-1.f95. diff --git a/libgomp/testsuite/libgomp.oacc-fortran/optional-reduction.f90 b/libgomp/testsuite/libgomp.oacc-fortran/optional-reduction.f90 index b76db3ef6d3..29f92c0d4c3 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/optional-reduction.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-reduction.f90 @@ -3,7 +3,6 @@ ! for. The tests are based on those in reduction-1.f90. ! { dg-do run } -! { dg-additional-options "-w" } program optional_reduction implicit none --------------7C6BD7ABD5BE8E14305988DB--