From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <fortran@gcc.gnu.org>
Subject: Add 'libgomp.oacc-fortran/pr94358-1.f90' [PR94358] (was: [PATCH, OpenACC] Rework OpenACC Fortran DO loop initialization)
Date: Fri, 13 Nov 2020 23:06:53 +0100 [thread overview]
Message-ID: <87ima8di82.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <31e3dfc5-1bbe-0d11-c7c8-16a0cefa0b45@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
Hi!
The whole topic of GCC PR94358 "[OMP] Privatize internal array variables
introduced by the Fortran FE" is yet to be resolved, but we may already
now add Gergő's testcase:
On 2019-01-25T15:13:48+0100, Gergö Barany <gergo_barany@mentor.com> wrote:
> --- /dev/null
> +++ b/libgomp/testsuite/libgomp.oacc-fortran/initialize_kernels_loops.f90
> @@ -0,0 +1,31 @@
> +[...]
... to document the status quo, and so that it may help highlight any
behavioral changes later on. I've pushed "Add
'libgomp.oacc-fortran/pr94358-1.f90' [PR94358]" to master branch in
commit d1ba078d9bcc3457d36ba12695cfef29eb3ca942, see attached.
Grüße
Thomas
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-libgomp.oacc-fortran-pr94358-1.f90-PR94358.patch --]
[-- Type: text/x-diff, Size: 1630 bytes --]
From d1ba078d9bcc3457d36ba12695cfef29eb3ca942 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gerg=C3=B6=20Barany?= <gergo@codesourcery.com>
Date: Mon, 21 Jan 2019 03:08:57 -0800
Subject: [PATCH] Add 'libgomp.oacc-fortran/pr94358-1.f90' [PR94358]
Document status quo re PR94358 "[OMP] Privatize internal array variables
introduced by the Fortran FE".
libgomp/
PR fortran/94358
* testsuite/libgomp.oacc-fortran/pr94358-1.f90: New.
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
---
.../libgomp.oacc-fortran/pr94358-1.f90 | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
new file mode 100644
index 00000000000..5013c5ba04b
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-fortran/pr94358-1.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+! { dg-additional-options "-fopt-info-omp-all" }
+
+subroutine kernel(lo, hi, a, b, c)
+ implicit none
+ integer :: lo, hi, i
+ real, dimension(lo:hi) :: a, b, c
+
+ !$acc kernels copyin(lo, hi) ! { dg-optimized "assigned OpenACC seq loop parallelism" }
+ !$acc loop independent
+ do i = lo, hi
+ b(i) = a(i)
+ end do
+ !$acc loop independent
+ do i = lo, hi
+ c(i) = b(i)
+ end do
+ !$acc end kernels
+end subroutine kernel
+
+program main
+ integer :: n = 20
+ real, dimension(1:20) :: a, b, c
+
+ a(:) = 1
+ b(:) = 2
+ c(:) = 3
+
+ call kernel(1, n, a, b, c)
+
+ do i = 1, n
+ if (c(i) .ne. 1) call abort
+ end do
+end program main
--
2.17.1
prev parent reply other threads:[~2020-11-13 22:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 20:12 [gomp4] privatize internal array variables introduced by the fortran FE Cesar Philippidis
2015-10-13 20:29 ` Jakub Jelinek
2015-10-13 20:40 ` Cesar Philippidis
2015-10-14 11:51 ` Paul Richard Thomas
2016-01-13 1:50 ` [gomp4] arrays inside modules Cesar Philippidis
2019-01-25 14:19 ` [PATCH, OpenACC] Rework OpenACC Fortran DO loop initialization Gergö Barany
2019-01-28 20:15 ` Thomas Schwinge
2019-02-19 12:28 ` [PATCH, OpenACC, og8] Fix incorrect test case Gergö Barany
2020-11-13 22:06 ` Thomas Schwinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ima8di82.fsf@euler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).