diff mbox

mark test requiring pthreads

Message ID 56741838.5080706@mentor.com
State New
Headers show

Commit Message

Nathan Sidwell Dec. 18, 2015, 2:29 p.m. UTC
c-c++-common/attr-simd-3.c's use of -fcilkplus means it requires pthreads.

nathan

Comments

Rainer Orth Dec. 18, 2015, 2:36 p.m. UTC | #1
Hi Nathan,

>  c-c++-common/attr-simd-3.c's use of -fcilkplus means it requires pthreads.

why would this matter for a compile test?  What happens without?

	Rainer
Nathan Sidwell Dec. 18, 2015, 2:44 p.m. UTC | #2
On 12/18/15 09:36, Rainer Orth wrote:
> Hi Nathan,
>
>>   c-c++-common/attr-simd-3.c's use of -fcilkplus means it requires pthreads.
>
> why would this matter for a compile test?  What happens without?

Executing on host: nvptx-none-gcc 
/scratch/nsidwell/openacc/trunk-ptx-shared/src/gcc-mainline/gcc/testsuite/c-c++-common/attr-simd-3.c 
  -fno-diagnostics-show-caret -fdiagnostics-color=never   -Wc++-compat 
-fcilkplus -DSTACK_SIZE=8192 -DNO_TRAMPOLINES -DNO_LABEL_VALUES 
-DSIGNAL_SUPPRESS -S    -o attr-simd-3.s    (timeout = 600)
nvptx-none-gcc: error: unrecognized command line option '-pthread'

compiler exited with status 1
output is:
nvptx-none-gcc: error: unrecognized command line option '-pthread'


FAIL: c-c++-common/attr-simd-3.c  -Wc++-compat  PR68158 (test for errors, line 5)
FAIL: c-c++-common/attr-simd-3.c  -Wc++-compat  (test for excess errors)
Excess errors:
nvptx-none-gcc: error: unrecognized command line option '-pthread'

nathan
Rainer Orth Dec. 18, 2015, 2:49 p.m. UTC | #3
Hi Nathan,

> On 12/18/15 09:36, Rainer Orth wrote:
>> Hi Nathan,
>>
>>>   c-c++-common/attr-simd-3.c's use of -fcilkplus means it requires pthreads.
>>
>> why would this matter for a compile test?  What happens without?
>
> Executing on host: nvptx-none-gcc
> /scratch/nsidwell/openacc/trunk-ptx-shared/src/gcc-mainline/gcc/testsuite/c-c++-common/attr-simd-3.c
> -fno-diagnostics-show-caret -fdiagnostics-color=never   -Wc++-compat
> -fcilkplus -DSTACK_SIZE=8192 -DNO_TRAMPOLINES -DNO_LABEL_VALUES
> -DSIGNAL_SUPPRESS -S    -o attr-simd-3.s    (timeout = 600)
> nvptx-none-gcc: error: unrecognized command line option '-pthread'
>
> compiler exited with status 1
> output is:
> nvptx-none-gcc: error: unrecognized command line option '-pthread'
>
>
> FAIL: c-c++-common/attr-simd-3.c -Wc++-compat PR68158 (test for errors,
> line 5)
> FAIL: c-c++-common/attr-simd-3.c  -Wc++-compat  (test for excess errors)
> Excess errors:
> nvptx-none-gcc: error: unrecognized command line option '-pthread'

ok, I see.  I'm uncomfortable declaring the requirement this
indirectly/unobviously.  I'd rather add a requirement on cilkplus (we
have that effective-target keyword already) and update
check_effective_target_cilkplus in target-supports.exp for nvptx.

	Rainer
Jakub Jelinek Dec. 18, 2015, 2:52 p.m. UTC | #4
On Fri, Dec 18, 2015 at 03:49:59PM +0100, Rainer Orth wrote:
> Hi Nathan,
> 
> > On 12/18/15 09:36, Rainer Orth wrote:
> >> Hi Nathan,
> >>
> >>>   c-c++-common/attr-simd-3.c's use of -fcilkplus means it requires pthreads.
> >>
> >> why would this matter for a compile test?  What happens without?
> >
> > Executing on host: nvptx-none-gcc
> > /scratch/nsidwell/openacc/trunk-ptx-shared/src/gcc-mainline/gcc/testsuite/c-c++-common/attr-simd-3.c
> > -fno-diagnostics-show-caret -fdiagnostics-color=never   -Wc++-compat
> > -fcilkplus -DSTACK_SIZE=8192 -DNO_TRAMPOLINES -DNO_LABEL_VALUES
> > -DSIGNAL_SUPPRESS -S    -o attr-simd-3.s    (timeout = 600)
> > nvptx-none-gcc: error: unrecognized command line option '-pthread'
> >
> > compiler exited with status 1
> > output is:
> > nvptx-none-gcc: error: unrecognized command line option '-pthread'
> >
> >
> > FAIL: c-c++-common/attr-simd-3.c -Wc++-compat PR68158 (test for errors,
> > line 5)
> > FAIL: c-c++-common/attr-simd-3.c  -Wc++-compat  (test for excess errors)
> > Excess errors:
> > nvptx-none-gcc: error: unrecognized command line option '-pthread'
> 
> ok, I see.  I'm uncomfortable declaring the requirement this
> indirectly/unobviously.  I'd rather add a requirement on cilkplus (we
> have that effective-target keyword already) and update
> check_effective_target_cilkplus in target-supports.exp for nvptx.

That is what we have in the tree until yesterday and it has been very buggy
(disabled all Cilk+ testing on all architectures).
See PR68629 or the gcc-patches discussions about this for details.

	Jakub
Rainer Orth Dec. 18, 2015, 2:59 p.m. UTC | #5
Hi Jakub,

>> ok, I see.  I'm uncomfortable declaring the requirement this
>> indirectly/unobviously.  I'd rather add a requirement on cilkplus (we
>> have that effective-target keyword already) and update
>> check_effective_target_cilkplus in target-supports.exp for nvptx.
>
> That is what we have in the tree until yesterday and it has been very buggy
> (disabled all Cilk+ testing on all architectures).
> See PR68629 or the gcc-patches discussions about this for details.

I didn't mean to introduce a compile test like this, but simply return 0
for nvptx-*-* like we already do for avr-*-*.  The compile test is the
correct approach, actually, but would need to be done right...

Besides, doing the -fcilkplus as a link test had been wrong, anyway,
given that many cilkplus tests are compile only...

	Rainer
diff mbox

Patch

2015-12-18  Nathan Sidwell  <nathan@acm.org>

	* c-c++-common/attr-simd-3.c: Requires pthreads.

Index: c-c++-common/attr-simd-3.c
===================================================================
--- c-c++-common/attr-simd-3.c	(revision 231815)
+++ c-c++-common/attr-simd-3.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fcilkplus" } */
 /* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
+/* { dg-require-effective-target pthread } */
 
 void f () __attribute__((__simd__, __vector__)); /* { dg-error "in the same function marked as a Cilk Plus" "PR68158" } */