From patchwork Tue May 20 14:31:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Zamyatin, Igor" X-Patchwork-Id: 350736 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 DB8EC14007F for ; Wed, 21 May 2014 00:33:00 +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:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=xgs qUabA3U4R2Qoca30S0erJLMSo5Fe4SO6SRYCopMbVLliDL8ZGauoKjjUD6kmu2dw YB003Jq2X1hnNtsTXb7SB4uf76VAoi3kQvL8CEnxLsjiZnBe8IcVZl/LYQ/GCvR9 s1TgR7jyTj2MLdNOkf9EYMrFZRGnB0F2k/9GSYaw= 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:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=/x2WGAxEK q/nRI27EeLaYxZl2gc=; b=rRJl9g+TOm+Dt6cYD0efexWIAYxEQ+BcOnjeNJxkq sp+0FeUJ2W2efZDY8QUB0+Wz9ol8VJIFnQ/GeeTGsph6oenaO4i5ObOCTHW88ehi 0QgDgKfL1UAVAk+9BaLhxKuwz5LQsz+995roFfG4j7jgWqrEnmRcCYi+zA361FP5 +8= Received: (qmail 11758 invoked by alias); 20 May 2014 14:32:50 -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 11648 invoked by uid 89); 20 May 2014 14:32:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, MIME_CHARSET_FARAWAY, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 May 2014 14:32:48 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 May 2014 07:32:47 -0700 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 20 May 2014 07:32:46 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.183]) by IRSMSX104.ger.corp.intel.com ([169.254.5.98]) with mapi id 14.03.0123.003; Tue, 20 May 2014 15:31:29 +0100 From: "Zamyatin, Igor" To: "GCC Patches (gcc-patches@gcc.gnu.org)" Subject: [PATCH, PR61191, Cilk+] Fix ICE on syntax error Date: Tue, 20 May 2014 14:31:29 +0000 Message-ID: <0EFAB2BDD0F67E4FB6CCC8B9F87D7569564313F5@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 X-IsSubscribed: yes Hi all! The following patch fixes the ICE for the cilk code with syntax error. Regtested on x86_64. Ok for trunk and 4.9? Thanks, Igor gcc/c/ChangeLog: 2014-05-20  Igor Zamyatin  * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid  function parameters. diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c index 0ac6ba8..127f9a1 100644 --- a/gcc/c/c-array-notation.c +++ b/gcc/c/c-array-notation.c @@ -229,6 +229,8 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)    /* Fully fold any EXCESSIVE_PRECISION EXPR that can occur in the function       parameter.  */    func_parm = c_fully_fold (func_parm, false, NULL); +  if (func_parm == error_mark_node) +    return error_mark_node;       location = EXPR_LOCATION (an_builtin_fn);