This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [commit, testsuite] g++.dg/torture/pr46111.C requires pthread support
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 04 Jan 2011 01:17:28 +0000
- Subject: Re: [commit, testsuite] g++.dg/torture/pr46111.C requires pthread support
- References: <201101032320.p03NKF50009957@d06av02.portsmouth.uk.ibm.com>
On 03/01/2011 23:20, Ulrich Weigand wrote:
> Hello,
>
> the g++.dg/torture/pr46111.C test fails on SPU because the target does
> not support threads.
>
> Fixed by adding a dg-require-effective-target pthread statement,
That's not the right way to do it; pthreads != threads, and so
"dg-require-effective-target pthread" doesn't check if the target supports
threads, nor even if the target supports the pthreads API; it checks if the
target compiler supports the -pthread option, which is not even required by
all pthreads-api-supporting targets. The restriction is over-conservative.
> just like all other -ftree-parallelize-loops tests already have.
They're all wrong too, I'm afraid you chose a bad example to follow.
Could you just XFAIL it on SPU instead?
cheers,
DaveK