[commit, testsuite] g++.dg/torture/pr46111.C requires pthread support
Dave Korn
dave.korn.cygwin@gmail.com
Tue Jan 4 03:01:00 GMT 2011
On 04/01/2011 01:17, Dave Korn wrote:
> 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.
Sorry, I was wrong there. It turns out that although the tests all compile
on those targets, they don't actually parallelize, but just silently ignore
the option. It does in fact depend on -pthread internally, so this is the
correct test after all. Apologies for the noise.
cheers,
DaveK
More information about the Gcc-patches
mailing list