From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21997 invoked by alias); 17 Dec 2015 08:26:03 -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 21985 invoked by uid 89); 17 Dec 2015 08:26:02 -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_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=cilk-plus, constructs, Hx-languages-length:2081 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 17 Dec 2015 08:26:01 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4F790AAA; Thu, 17 Dec 2015 08:26:00 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-113-142.phx2.redhat.com [10.3.113.142]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBH8Pwwg006570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Dec 2015 03:25:59 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tBH8Ps8p018721; Thu, 17 Dec 2015 09:25:55 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tBH8Pn63018719; Thu, 17 Dec 2015 09:25:49 +0100 Date: Thu, 17 Dec 2015 08:26:00 -0000 From: Jakub Jelinek To: Thomas Schwinge Cc: "Thomas Preud'homme" , Jeff Law , gcc-patches@gcc.gnu.org, Tobias Burnus , Rainer Orth Subject: Re: [PATCH, testsuite] Fix PR68629: attr-simd-3.c failure on arm-none-eabi targets Message-ID: <20151217082549.GR18720@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <000301d13267$d8d086e0$8a7194a0$@arm.com> <877fkfhd9w.fsf@kepler.schwinge.homeip.net> <87fuz1pko0.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fuz1pko0.fsf@kepler.schwinge.homeip.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg01703.txt.bz2 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" 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