public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite] Fix PR68629: attr-simd-3.c failure on arm-none-eabi targets
@ 2015-12-09  9:56 Thomas Preud'homme
  2015-12-10 21:50 ` Jeff Law
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Preud'homme @ 2015-12-09  9:56 UTC (permalink / raw)
  To: gcc-patches

c-c++-common/attr-simd-3.c fails to compile on arm-none-eabi targets due to -fcilkplus needing -pthread which is not available for those targets. This patch solves this issue by adding a condition to the cilkplus effective target that compiling with -fcilkplus succeeds and requires cilkplus as an effective target for attr-simd-3.c testcase.

ChangeLog entry is as follows:


*** gcc/testsuite/ChangeLog ***

2015-12-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>

        PR testsuite/68629
        * lib/target-supports.exp (check_effective_target_cilkplus): Also
        check that compiling with -fcilkplus does not give an error.
        * c-c++-common/attr-simd-3.c: Require cilkplus effective target.


diff --git a/gcc/testsuite/c-c++-common/attr-simd-3.c b/gcc/testsuite/c-c++-common/attr-simd-3.c
index d61ba82..1970c67 100644
--- a/gcc/testsuite/c-c++-common/attr-simd-3.c
+++ b/gcc/testsuite/c-c++-common/attr-simd-3.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target "cilkplus" } */
 /* { dg-options "-fcilkplus" } */
 /* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
 
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4e349e9..95b903c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1432,7 +1432,12 @@ proc check_effective_target_cilkplus { } {
     if { [istarget avr-*-*] } {
 	return 0;
     }
-    return 1
+    return [ check_no_compiler_messages_nocache fcilkplus_available executable {
+	#ifdef __cplusplus
+	extern "C"
+	#endif
+	    int dummy;
+	} "-fcilkplus" ]
 }
 
 proc check_linker_plugin_available { } {


Testsuite shows no regression when run with
  + an arm-none-eabi GCC cross-compiler targeting Cortex-M3
  + a bootstrapped x86_64-linux-gnu GCC native compiler

Is this ok for trunk?

Best regards,

Thomas


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-17  8:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09  9:56 [PATCH, testsuite] Fix PR68629: attr-simd-3.c failure on arm-none-eabi targets Thomas Preud'homme
2015-12-10 21:50 ` Jeff Law
2015-12-15 16:45 ` Thomas Schwinge
2015-12-17  8:03   ` Thomas Schwinge
2015-12-17  8:26     ` Jakub Jelinek
2015-12-17  8:34       ` Thomas Preud'homme
2015-12-17  8:44 ` Thomas Preud'homme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).