diff mbox series

[committed,PR90859] Document status quo for "[OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }'" (was: [committed] Test cases to verify OpenACC 'firstprivate' mappings)

Message ID 87lfxyfqnm.fsf@euler.schwinge.homeip.net
State New
Headers show
Series [committed,PR90859] Document status quo for "[OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }'" (was: [committed] Test cases to verify OpenACC 'firstprivate' mappings) | expand

Commit Message

Thomas Schwinge June 18, 2019, 10:57 p.m. UTC
Hi!

On Wed, 19 Jun 2019 00:47:27 +0200, I wrote:
> I committed to trunk in r272451 a few "Test cases to verify OpenACC
> 'firstprivate' mappings"

> --- /dev/null
> +++ b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c

> +static void
> +vla (int array_li)
> +{
> +  _Complex double array[array_li];
> +  uint32_t array_so;
> +#pragma acc parallel \
> +  copyout (array_so)
> +  /* The gimplifier has created an implicit 'firstprivate' clause for the array
> +     length.
> +     { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\)} omplower { target { ! c++ } } } }
> +     { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(} omplower { target { c++ } } } }
> +     (C++ computes an intermediate value, so can't scan for 'firstprivate(array_li)'.)  */
> +  {
> +    array_so = sizeof array;
> +  }
> +  if (array_so != sizeof array)
> +    __builtin_abort ();
> +}

It doesn't resolve PR90859, but at least in trunk r272452 we now
'Document status quo for "[OMP] Mappings for VLA different depending on
'target { c && { ! lp64 } }'"', see attached.


Grüße
 Thomas
diff mbox series

Patch

From 75fdd6636c07a400578f53fb9d87aa13274819c4 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 18 Jun 2019 22:15:16 +0000
Subject: [PATCH] [PR90859] Document status quo for "[OMP] Mappings for VLA
 different depending on 'target { c && { ! lp64 } }'"

	gcc/testsuite/
	PR middle-end/90859
	* c-c++-common/goacc/firstprivate-mappings-1.c: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272452 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                                    | 3 +++
 gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bffa899c7676..59d39e8c179a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@ 
 2019-06-18  Thomas Schwinge  <thomas@codesourcery.com>
 
+	PR middle-end/90859
+	* c-c++-common/goacc/firstprivate-mappings-1.c: Update.
+
 	* c-c++-common/goacc/firstprivate-mappings-1.c: New file.
 	* g++.dg/goacc/firstprivate-mappings-1.C: Likewise.
 
diff --git a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c
index c8270472a9c5..33576c50ecab 100644
--- a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c
+++ b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c
@@ -426,6 +426,9 @@  vla (int array_li)
      { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\)} omplower { target { ! c++ } } } }
      { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(} omplower { target { c++ } } } }
      (C++ computes an intermediate value, so can't scan for 'firstprivate(array_li)'.)  */
+  /* For C, non-LP64, the gimplifier has also created a mapping for the array
+     itself; PR90859.
+     { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\) map\(tofrom:\(\*array.[0-9]+\) \[len: D\.[0-9]+\]\) map\(firstprivate:array \[pointer assign, bias: 0\]\) \[} omplower { target { c && { ! lp64 } } } } } */
   {
     array_so = sizeof array;
   }
-- 
2.20.1