diff mbox

cilkplus fails without pthreads for me

Message ID 77D1E479-4C62-4764-BD62-FB9D9BF89473@comcast.net
State New
Headers show

Commit Message

Mike Stump Jan. 1, 2016, 6:13 p.m. UTC
cilkplus fails without pthreads for me:

xg++: error: unrecognized command line option '-pthread'
compiler exited with status 1
output is:
xg++: error: unrecognized command line option '-pthread'

FAIL: c-c++-common/attr-simd-3.c  -std=gnu++14 PR68158 (test for errors, line 5)

I suspect pthreads is a fairly hard requirement.  Either a test compile and link needs to be done, or we need to be able to whack out the tests on non-pthread systems.

Ok?

Comments

Bernd Schmidt Jan. 4, 2016, 3:06 p.m. UTC | #1
On 01/01/2016 07:13 PM, Mike Stump wrote:
> cilkplus fails without pthreads for me:
>
> xg++: error: unrecognized command line option '-pthread' compiler
> exited with status 1 output is: xg++: error: unrecognized command
> line option '-pthread'

 > @@ -1450,6 +1450,10 @@ proc check_effective_target_cilkplus { } {
 >          return 0;
 >       }
 >
 > +    if { ! [check_effective_target_pthread] } {
 > +       return 0;
 > +    }
 > +

I think you'll also want to revert Nathan's earlier change that adds 
just nvptx for the same reason. Ok with that change.


Bernd
Nathan Sidwell Jan. 4, 2016, 3:22 p.m. UTC | #2
On 01/01/16 13:13, Mike Stump wrote:
> cilkplus fails without pthreads for me:
>
> xg++: error: unrecognized command line option '-pthread'
> compiler exited with status 1
> output is:
> xg++: error: unrecognized command line option '-pthread'
>
> FAIL: c-c++-common/attr-simd-3.c  -std=gnu++14 PR68158 (test for errors, line 5)
>
> I suspect pthreads is a fairly hard requirement.  Either a test compile and link needs to be done, or we need to be able to whack out the tests on non-pthread systems.
>
> Ok?

Probably not.  See  the discussion at 
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01882.html  Admittedly, that was 
annotating the test directly,  but Rainer's comment suggests to me that 
requiring pthreads would be too great a hammer.

You don't say what target -- is it a system where a target triplet is 
insufficient for this check?

nathan
Nathan Sidwell Jan. 4, 2016, 5:09 p.m. UTC | #3
On 01/04/16 10:06, Bernd Schmidt wrote:
> On 01/01/2016 07:13 PM, Mike Stump wrote:
>> cilkplus fails without pthreads for me:
>>
>> xg++: error: unrecognized command line option '-pthread' compiler
>> exited with status 1 output is: xg++: error: unrecognized command
>> line option '-pthread'
>
>  > @@ -1450,6 +1450,10 @@ proc check_effective_target_cilkplus { } {
>  >          return 0;
>  >       }
>  >
>  > +    if { ! [check_effective_target_pthread] } {
>  > +       return 0;
>  > +    }
>  > +
>
> I think you'll also want to revert Nathan's earlier change that adds just nvptx
> for the same reason. Ok with that change.

Yes please.

nathan
Mike Stump Jan. 4, 2016, 7:19 p.m. UTC | #4
On Jan 4, 2016, at 9:09 AM, Nathan Sidwell <nathan@acm.org> wrote:
> On 01/04/16 10:06, Bernd Schmidt wrote:
>> On 01/01/2016 07:13 PM, Mike Stump wrote:
>>> cilkplus fails without pthreads for me:
>>> 
>>> xg++: error: unrecognized command line option '-pthread' compiler
>>> exited with status 1 output is: xg++: error: unrecognized command
>>> line option '-pthread'
>> 
>> > @@ -1450,6 +1450,10 @@ proc check_effective_target_cilkplus { } {
>> >          return 0;
>> >       }
>> >
>> > +    if { ! [check_effective_target_pthread] } {
>> > +       return 0;
>> > +    }
>> > +
>> 
>> I think you'll also want to revert Nathan's earlier change that adds just nvptx
>> for the same reason. Ok with that change.
> 
> Yes please.

I believe that patch has:

+/* { dg-do compile { target cilkplus } } */

in it, and this I believe is required for the test to be skipped on my target?
Nathan Sidwell Jan. 4, 2016, 7:28 p.m. UTC | #5
On 01/04/16 14:19, Mike Stump wrote:

> I believe that patch has:
>
> +/* { dg-do compile { target cilkplus } } */
>
> in it, and this I believe is required for the test to be skipped on my target?

that bit is still necessary.  It's the bit in the .exp file testing nvptx-*-* 
that's no longer needed.

nathan
diff mbox

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 144e4e9..6d25666 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1450,6 +1450,10 @@  proc check_effective_target_cilkplus { } {
        return 0;
     }
 
+    if { ! [check_effective_target_pthread] } {
+       return 0;
+    }
+
     return 1
 }