On Thu, Dec 17, 2015 at 09:02:39AM +0100, Thomas Schwinge wrote: > On Tue, 15 Dec 2015 17:44:59 +0100, I wrote: > > On Wed, 9 Dec 2015 17:56:13 +0800, "Thomas Preud'homme" > > <thomas.preudho...@arm.com> wrote: > > > 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. > > > > > 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. > > > > > --- 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" ] > > > }
That change has been obviously bad. If anything, you want to make it compile time only, i.e. check_no_compiler_messages_nocache fcilkplus_available assembly Just look at cilk-plus.exp: It checks check_effective_target_cilkplus, and performs lots of tests if it it returns true, and then checks check_libcilkrts_available and performs further tests. So, if any use of -fcilkplus fails on your target, then putting it into check_effective_target_cilkplus is fine, you won't lose any Cilk+ testing that way. Otherwise, if it is conditional say only some constructs, say array notation is fine, but _Cilk_for is not, then even that is wrong. In any case, IMHO the attr-simd-3.c test just should be moved into c-c++-common/cilk-plus/SE/ directory. Jakub