This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mark test requiring pthreads
- From: Nathan Sidwell <nathan at acm dot org>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>, Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 18 Dec 2015 16:15:22 -0500
- Subject: Re: mark test requiring pthreads
- Authentication-results: sourceware.org; auth=none
- References: <56741838 dot 5080706 at mentor dot com> <yddmvt7x1ql dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <56741BC4 dot 5040903 at acm dot org> <yddio3vx148 dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <20151218145254 dot GX18720 at tucnak dot redhat dot com> <yddegejx0oo dot fsf at CeBiTec dot Uni-Bielefeld dot DE>
On 12/18/15 09:59, Rainer Orth wrote:
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...
committed the attached.
nathan
2015-12-18 Nathan Sidwell <nathan@acm.org>
* lib/target-supports.exp (check_effective_target_cilkplus): Not nvptx.
* c-c++-common/attr-simd-3.c: Require cilkplus.
* gcc.dg/graphite/id-28.c: Likewise.
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp (revision 231818)
+++ lib/target-supports.exp (working copy)
@@ -1441,6 +1441,12 @@ proc check_effective_target_cilkplus { }
if { [istarget avr-*-*] } {
return 0;
}
+
+ # No pthreads on NVPTX
+ if { [istarget nvptx-*-*] } {
+ return 0;
+ }
+
return 1
}
Index: c-c++-common/attr-simd-3.c
===================================================================
--- c-c++-common/attr-simd-3.c (revision 231818)
+++ c-c++-common/attr-simd-3.c (working copy)
@@ -1,6 +1,5 @@
-/* { dg-do compile } */
+/* { dg-do compile { target cilkplus } } */
/* { 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" } */
Index: gcc.dg/graphite/id-28.c
===================================================================
--- gcc.dg/graphite/id-28.c (revision 231818)
+++ gcc.dg/graphite/id-28.c (working copy)
@@ -1,5 +1,5 @@
+/* { dg-do compile { target cilkplus } } */
/* { dg-options "-fcilkplus -floop-nest-optimize -O3" } */
-/* { dg-require-effective-target pthread } */
#if HAVE_IO
#include <stdio.h>