From patchwork Thu Apr 10 14:20:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zamyatin, Igor" X-Patchwork-Id: 338136 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 6648814007E for ; Fri, 11 Apr 2014 00:21:02 +1000 (EST) 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:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=Bny4UUUXs3PLI4Qnomn5On9qmFDIBEo9JpfogklzQfpMWSi2oph1+ /dI9mnY2K+/MvjrdzwX5kxZrz9opmXakouqbVkA5dJ8+LFT49oHqcgUCzw3NMIei 3QryDmANemINkhzJgLHZUJEmCfUlpIQK6ZBwux3sS4T0pYKTb3d1hM= 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:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=tXxUAkjYHCD2NUOc1v6euhlBngg=; b=WAS+B7QcUh+sGblAGZFPtXdoKOmi BiyZPCGt73agOtiP0DmmI6J5n5zA2QGDUUC8otHByMLZ4FkT2Ogo0cuhlWTlBwBY 2as1+cn4nXestPTBg57tbD2DOQA2fbbV/teRaDFsAmbxlWcKIRxN3BaGnCVgKUgl QNMR7D5HNnuEdSY= Received: (qmail 7075 invoked by alias); 10 Apr 2014 14:20:55 -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 7064 invoked by uid 89); 10 Apr 2014 14:20:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Apr 2014 14:20:53 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 10 Apr 2014 07:20:50 -0700 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 10 Apr 2014 07:20:49 -0700 Received: from irsmsx106.ger.corp.intel.com (163.33.3.31) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 10 Apr 2014 15:20:48 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.172]) by IRSMSX106.ger.corp.intel.com ([169.254.8.26]) with mapi id 14.03.0123.003; Thu, 10 Apr 2014 15:20:43 +0100 From: "Zamyatin, Igor" To: "GCC Patches (gcc-patches@gcc.gnu.org)" CC: "Iyer, Balaji V" , "Jakub Jelinek (jakub@redhat.com)" Subject: RE: [PATCH, PR60467, Cilk+] Fix for ICE with incorrect Cilk_spawn usage Date: Thu, 10 Apr 2014 14:20:42 +0000 Message-ID: <0EFAB2BDD0F67E4FB6CCC8B9F87D7569429DC101@IRSMSX103.ger.corp.intel.com> References: <0EFAB2BDD0F67E4FB6CCC8B9F87D7569429DBFD8@IRSMSX103.ger.corp.intel.com> In-Reply-To: <0EFAB2BDD0F67E4FB6CCC8B9F87D7569429DBFD8@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 X-IsSubscribed: yes Resending with correct Changelog. Is it OK? Thanks, Igor gcc/c-family/ChangeLog: 2014-04-10 Igor Zamyatin PR middle-end/60467 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL as possible argument for Cilk_spawn. gcc/testsuite/ChangeLog: 2014-04-10 Igor Zamyatin PR middle-end/60467 * c-c++-common/cilk-plus/CK/invalid_spawns.c: Add new invalid case to check. > -----Original Message----- > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches- > owner@gcc.gnu.org] On Behalf Of Zamyatin, Igor > Sent: Thursday, April 10, 2014 5:55 PM > To: GCC Patches (gcc-patches@gcc.gnu.org) > Cc: Iyer, Balaji V; Jakub Jelinek (jakub@redhat.com) > Subject: [PATCH, PR60467, Cilk+] Fix for ICE with incorrect Cilk_spawn usage > > Hi! > > This patch filters out another incorrect usage of Cilk_spawn keyword. > > Bootstrapped/regtested on x86_64. Ok for trunk? > > > Thanks, > Igor > diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c index 6a7bf4f..bf549ad 100644 --- a/gcc/c-family/cilk.c +++ b/gcc/c-family/cilk.c @@ -99,7 +99,6 @@ cilk_set_spawn_marker (location_t loc, tree fcall) it. */ return false; else if (TREE_CODE (fcall) != CALL_EXPR - && TREE_CODE (fcall) != FUNCTION_DECL /* In C++, TARGET_EXPR is generated when we have an overloaded '=' operator. */ && TREE_CODE (fcall) != TARGET_EXPR) diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c index ba9e619..5b43be7 100644 --- a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c +++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c @@ -8,6 +8,7 @@ int main (void) { int x; + _Cilk_spawn foo; /* { dg-error "only function calls can be spawned" } */ _Cilk_spawn x; /* { dg-error "only function calls can be spawned" } */ return x; }