From d5bb46796808a12e9b3a6953cc7bb42e311b5038 Mon Sep 17 00:00:00 2001 From: jakub Date: Thu, 26 Jul 2018 16:12:58 +0000 Subject: [PATCH] PR testsuite/86660 * testsuite/libgomp.c++/for-15.C (results): Include it in omp declare target region. (main): Use map (always, tofrom: results) instead of map (tofrom: results). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263011 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog | 6 ++++++ libgomp/testsuite/libgomp.c++/for-15.C | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 0a2a051c9e8..09a459deb8c 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,11 @@ 2018-07-26 Jakub Jelinek + PR testsuite/86660 + * testsuite/libgomp.c++/for-15.C (results): Include it in + omp declare target region. + (main): Use map (always, tofrom: results) instead of + map (tofrom: results). + PR middle-end/86660 * testsuite/libgomp.c/pr86660.c: New test. diff --git a/libgomp/testsuite/libgomp.c++/for-15.C b/libgomp/testsuite/libgomp.c++/for-15.C index d48fa37beb0..ddb9ce629dd 100644 --- a/libgomp/testsuite/libgomp.c++/for-15.C +++ b/libgomp/testsuite/libgomp.c++/for-15.C @@ -88,11 +88,9 @@ private: template const I &J::begin () { return b; } template const I &J::end () { return e; } -#pragma omp end declare target int results[2000]; -#pragma omp declare target template void baz (I &i) @@ -186,37 +184,37 @@ main () a[i] = i; #pragma omp target data map (to: a) { - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[75], &a[1945]); f1 (j); } check (i >= 75 && i < 1945 && (i - 75) % 3 == 0); - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[63], &a[1949]); f2 (j); } check (i >= 63 && i < 1949); - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[58], &a[1979]); f3 <2> (j); } check (i >= 58 && i < 1979 && (i - 58) % 6 == 0); - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[59], &a[1981]); f4 <9> (j); } check (i >= 59 && i < 1981 && (i - 59) % 9 == 0); - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[52], &a[1972]); f5 (j); } check (i >= 52 && i < 1972 && (i - 52) % 4 == 0); - #pragma omp target teams map (tofrom: results) + #pragma omp target teams map (always, tofrom: results) { J j (&a[31], &a[1827]); f6 (j); -- 2.11.4.GIT