From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36244 invoked by alias); 9 Dec 2015 09:56:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35607 invoked by uid 89); 9 Dec 2015 09:56:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Dec 2015 09:56:37 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-17-aJ8YNGQbQAKF_lxN_tVSgg-1; Wed, 09 Dec 2015 09:56:31 +0000 Received: from SHAWIN202 ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Dec 2015 09:56:30 +0000 From: "Thomas Preud'homme" To: Subject: [PATCH, testsuite] Fix PR68629: attr-simd-3.c failure on arm-none-eabi targets Date: Wed, 09 Dec 2015 09:56:00 -0000 Message-ID: <000301d13267$d8d086e0$8a7194a0$@arm.com> MIME-Version: 1.0 X-MC-Unique: aJ8YNGQbQAKF_lxN_tVSgg-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00965.txt.bz2 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 ta= rget that compiling with -fcilkplus succeeds and requires cilkplus as an ef= fective target for attr-simd-3.c testcase. ChangeLog entry is as follows: *** gcc/testsuite/ChangeLog *** 2015-12-08 Thomas Preud'homme 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\]* w= as not declared in this scope" } */ =20 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/targ= et-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 execut= able { + #ifdef __cplusplus + extern "C" + #endif + int dummy; + } "-fcilkplus" ] } =20 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