From patchwork Tue Mar 29 15:15:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 602984 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qZDqh1QL8z9sBM for ; Wed, 30 Mar 2016 02:15:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uN0vsSBZ; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=A+fEEQV64RcpCEv5 XopzfNOlKfCKMiOBC+VDU7NGUa700flXji9Y/3A68tIaJ0MOSZJRlr3pErIgjMTc NXxpOosIFRbspy10NMdlT9WxxIaUmV3Hus7V46ZMfUfAoqchInzUCwf8lXMgD8Jp 0NHPupgQ+P3S4zJX1jO7ruKf6MA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=MmrwsR9ur+43FVLUfC/2bM a+T0w=; b=uN0vsSBZdvReyjG/fZ2Vxqhg2XKBFhRCdyrS57117VWzZwPCZ+Ud6i 1FM1lWP5ZhgBJ348PJBPZKClDQ/kRzONOAJCgcuylGJFe89t7PLiAihmhKpk1T+o C1JD6OwHsDAUx8KOr0o33SNG1sEp08aGNRXo+F95XR7CVrZORGfL4= Received: (qmail 79492 invoked by alias); 29 Mar 2016 15:15:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 79458 invoked by uid 89); 29 Mar 2016 15:15:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=D*lps.ens.fr, D*ens.fr, sk:dominiq, dominiq@lps.ens.fr X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 29 Mar 2016 15:15:21 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1akvMV-0007fE-OV from Thomas_Schwinge@mentor.com ; Tue, 29 Mar 2016 08:15:19 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Tue, 29 Mar 2016 08:15:19 -0700 Received: by tftp-cs (Postfix, from userid 49978) id DAE0DC1D97; Tue, 29 Mar 2016 08:15:18 -0700 (PDT) From: Thomas Schwinge To: Ilya Verbin , CC: "Zamyatin, Igor" , Kirill Yukhin , , Jakub Jelinek Subject: Re: FW: [PATCH] Cilk Keywords (_Cilk_spawn and _Cilk_sync) for C In-Reply-To: <20160328164022.GA52596@msticlxl57.ims.intel.com> References: <5214DD51.9030709@redhat.com> <521641C6.6060807@redhat.com> <87vbof3gji.fsf@kepler.schwinge.homeip.net> <6B86B7F2A4026246AA81BA1ABF9756905C4FF96C@FMSMSX105.amr.corp.intel.com> <8761g6g0je.fsf@kepler.schwinge.homeip.net> <6B86B7F2A4026246AA81BA1ABF9756905C50C72F@fmsmsx107.amr.corp.intel.com> <87vbo67ba6.fsf@schwinge.name> <542979B8.5060000@redhat.com> <20160328164022.GA52596@msticlxl57.ims.intel.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Tue, 29 Mar 2016 17:15:11 +0200 Message-ID: <87y491pb7k.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Mon, 28 Mar 2016 19:40:22 +0300, Ilya Verbin wrote: > Do you plan to commit this patch? :) Well, I'm also still waiting for you guys to merge (via the upstream Intel sources repository) my GNU Hurd portability patches; submitted to GCC in and the following messages, dated 2014-09-26. Upon request of Barry M Tannenbaum then submitted to the Intel web site, and then never heard of again... ;-( > On Mon, Sep 29, 2014 at 09:24:40 -0600, Jeff Law wrote: > > On 09/29/14 08:26, Thomas Schwinge wrote: > > > Audit Cilk Plus tests for CILK_NWORKERS=1. > > > > > > gcc/testsuite/ > > > * c-c++-common/cilk-plus/CK/spawning_arg.c (main): Call > > > __cilkrts_set_param to set two workers. > > > * c-c++-common/cilk-plus/CK/steal_check.c (main): Likewise. > > > * g++.dg/cilk-plus/CK/catch_exc.cc (main): Likewise. Thanks for reminding me about this. I confirmed that the problem still reproduces, and the very same patch still fixes it; now committed in r234523: commit 4abd94105ecb1d026406648a37ff2fb43bb26d7c Author: tschwinge Date: Tue Mar 29 14:39:33 2016 +0000 [PR testsuite/64177] Audit Cilk Plus tests for CILK_NWORKERS=1 PR testsuite/64177 gcc/testsuite/ * c-c++-common/cilk-plus/CK/spawning_arg.c (main): Call __cilkrts_set_param to set two workers. * c-c++-common/cilk-plus/CK/steal_check.c (main): Likewise. * g++.dg/cilk-plus/CK/catch_exc.cc (main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234523 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 8 ++++++++ .../c-c++-common/cilk-plus/CK/spawning_arg.c | 15 +++++++++++++++ gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c | 17 ++++++++++++++--- gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc | 14 ++++++++++++++ 4 files changed, 51 insertions(+), 3 deletions(-) Grüße Thomas diff --git gcc/testsuite/ChangeLog gcc/testsuite/ChangeLog index 11d6863..f9b4b00 100644 --- gcc/testsuite/ChangeLog +++ gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2016-03-29 Thomas Schwinge + + PR testsuite/64177 + * c-c++-common/cilk-plus/CK/spawning_arg.c (main): Call + __cilkrts_set_param to set two workers. + * c-c++-common/cilk-plus/CK/steal_check.c (main): Likewise. + * g++.dg/cilk-plus/CK/catch_exc.cc (main): Likewise. + 2016-03-28 Dominique d'Humieres g++.dg/ext/fnname5.C: Update the test for Darwin. diff --git gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c index 95e6cab..138b82c 100644 --- gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c +++ gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c @@ -2,6 +2,17 @@ /* { dg-options "-fcilkplus" } */ /* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */ +#ifdef __cplusplus +extern "C" { +#endif + +extern int __cilkrts_set_param (const char *, const char *); + +#ifdef __cplusplus +} +#endif + + void f0(volatile int *steal_flag) { int i = 0; @@ -32,6 +43,10 @@ void f3() int main() { + /* Ensure more than one worker. */ + if (__cilkrts_set_param("nworkers", "2") != 0) + __builtin_abort(); + f3(); return 0; } diff --git gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c index 6e28765..6b41c7f 100644 --- gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c +++ gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c @@ -2,8 +2,16 @@ /* { dg-options "-fcilkplus" } */ /* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */ -// #include -extern void __cilkrts_set_param (char *, char *); +#ifdef __cplusplus +extern "C" { +#endif + +extern int __cilkrts_set_param (const char *, const char *); + +#ifdef __cplusplus +} +#endif + void foo(volatile int *); @@ -11,7 +19,10 @@ void main2(void); int main(void) { - // __cilkrts_set_param ((char *)"nworkers", (char *)"2"); + /* Ensure more than one worker. */ + if (__cilkrts_set_param("nworkers", "2") != 0) + __builtin_abort(); + main2(); return 0; } diff --git gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc index 0633d19..09ddf8b 100644 --- gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc +++ gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc @@ -10,6 +10,16 @@ #endif #include +#ifdef __cplusplus +extern "C" { +#endif + +extern int __cilkrts_set_param (const char *, const char *); + +#ifdef __cplusplus +} +#endif + void func(int volatile* steal_me) { @@ -59,6 +69,10 @@ void my_test() int main() { + /* Ensure more than one worker. */ + if (__cilkrts_set_param("nworkers", "2") != 0) + __builtin_abort(); + my_test(); #if HAVE_IO printf("PASSED\n");