[testsuite, committed, PR68063] Add missing private clause in libgomp.c++/member-2.C
Thomas Schwinge
thomas@codesourcery.com
Tue Oct 27 09:21:00 GMT 2015
Hi Jakub!
On Fri, 23 Oct 2015 12:48:57 +0200, Tom de Vries <Tom_deVries@mentor.com> wrote:
> this patch adds a missing private clause in libgomp.c++/member-2.C (as
> you suggested in the PR).
>
> This allows the test to succeed consistently.
I'm seeing occasional (very rarely) failure of libgomp.c++/member-1.C
(without anything in libgomp.log, unfortunately). I have not made an
attempt to properly understand what it's doing, but this:
[...]
150 #pragma omp parallel private (f)
151 {
152 f = false;
153 #pragma omp single
154 #pragma omp taskloop lastprivate (a, t, b, n)
155 for (int i = 0; i < 30; i++)
156 {
157 int q = omp_get_thread_num ();
158 if (f && (a != 7 * q || b != 8 * q || r != 9 * q || t != 10 * q))
159 __builtin_abort ();
160 take (a, r, t, b);
161 A::a = 7 * q;
162 A::b = 8 * q;
163 R::r = 9 * q;
[...]
... looks a bit as if it might need to get the same patch applied that
Tom has applied to libgomp.c++/member-2.C:
> --- a/libgomp/testsuite/libgomp.c++/member-2.C
> +++ b/libgomp/testsuite/libgomp.c++/member-2.C
> @@ -154,7 +154,7 @@ A<Q>::m1 ()
> {
> f = false;
> #pragma omp single
> - #pragma omp taskloop lastprivate (a, T<Q>::t, b, n)
> + #pragma omp taskloop lastprivate (a, T<Q>::t, b, n) private (R::r)
> for (int i = 0; i < 30; i++)
> {
> int q = omp_get_thread_num ();
Could you please review that, and while at it, could there possibly be
any other races of r or R::r, or other objects?
Grüße
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151027/a0382c85/attachment.sig>
More information about the Gcc-patches
mailing list