This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [committed] Fix OpenMP class iterators in distribute parallel for (PR c++/86443)

On Tue, Jul 10, 2018 at 09:18:18AM +0200, Jakub Jelinek wrote:
> Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

I found two small issues and one big issue (results being declare target)
which break the test if using non-shared memory offloading.

This should fix it, tested on x86_64-linux, committed to trunk.

2018-07-11  Jakub Jelinek  <>

	PR c++/86443
	* testsuite/libgomp.c++/for-15.C (a): Remove unused variable.
	(results): Make sure the variable is not inside declare target region.
	(qux): Remove unused function.

--- libgomp/testsuite/libgomp.c++/for-15.C	(revision 262551)
+++ libgomp/testsuite/libgomp.c++/for-15.C	(working copy)
@@ -88,10 +88,11 @@ private:
 template <typename T> const I<T> &J<T>::begin () { return b; }
 template <typename T> const I<T> &J<T>::end () { return e; }
+#pragma omp end declare target
-int a[2000];
 int results[2000];
+#pragma omp declare target
 template <typename T>
 baz (I<T> &i)
@@ -110,13 +111,6 @@ baz (int i)
-qux (I<int> &i)
-  if (*i != 1931)
-    abort ();
 f1 (J<int> j)
 #pragma omp distribute parallel for default(none)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]