From patchwork Tue Jun 5 16:24:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iyer, Balaji V" X-Patchwork-Id: 163106 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]) by ozlabs.org (Postfix) with SMTP id BAFEAB6EE7 for ; Wed, 6 Jun 2012 02:25:00 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1339518302; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:Content-Type: MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=q0AD3Zw Gm7EIgU9MHXWAxVnG1ZM=; b=piAWjH26HTy3w82EiSKHrtSCRl0tXqGASRSPgCQ R5lEdngDJfTZWR3Kl6nYR0QJuSexhXet/COFR8WQctb7ThNAeUH1nfQ8EvSXgeqE kCJOUtg3N/AjQIqlrjgHqqRh3id5Ap8665WTmWEnRh/YCM5yCj0L8fqjcoN3p9Cu m5D0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-ExtLoop1:Received:Received:Received:From:To:Subject:Date:Message-ID:Content-Type:MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=OFt8okmj8Iwuv7Xx7X0i7d6f3TeV8ZHeChAR0eSAfWe20cLSmhd0OfcJaD0sKx y0qEGX8l6dHTpQ1VoSciIv9E0Ltclj8nNnCETirKIWT4piSFoAvLm9Fw9sZOqTN6 lHcbtwsybfI0JdLLr0JBedLyoAX9kOkfaFKVAORY4E7cs=; Received: (qmail 10081 invoked by alias); 5 Jun 2012 16:24:55 -0000 Received: (qmail 10072 invoked by uid 22791); 5 Jun 2012 16:24:52 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga03.intel.com (HELO mga03.intel.com) (143.182.124.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jun 2012 16:24:40 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 05 Jun 2012 09:24:40 -0700 X-ExtLoop1: 1 Received: from azsmsx601.amr.corp.intel.com ([10.2.121.193]) by azsmga001.ch.intel.com with ESMTP; 05 Jun 2012 09:24:39 -0700 Received: from fmsmsx107.amr.corp.intel.com (10.19.9.54) by azsmsx601.amr.corp.intel.com (10.2.121.193) with Microsoft SMTP Server (TLS) id 8.2.255.0; Tue, 5 Jun 2012 09:24:39 -0700 Received: from fmsmsx102.amr.corp.intel.com ([169.254.2.199]) by FMSMSX107.amr.corp.intel.com ([169.254.9.158]) with mapi id 14.01.0355.002; Tue, 5 Jun 2012 09:24:37 -0700 From: "Iyer, Balaji V" To: "gcc-patches@gcc.gnu.org" Subject: [PATCH][Cilkplus] Patch to fix array notation bug Date: Tue, 5 Jun 2012 16:24:36 +0000 Message-ID: MIME-Version: 1.0 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 Hello Everyone, This patch is for the Cilkplus branch affecting the C++ compiler. This patch will fix some cases were array notation is not decomposed correctly in parser. Thanking You, Yours Sincerely, Balaji V. Iyer. Index: gcc/cp/parser.c =================================================================== --- gcc/cp/parser.c (revision 188243) +++ gcc/cp/parser.c (working copy) @@ -18045,6 +18045,11 @@ cp_parser_function_body (parser, in_function_try_block); if (check_body_p) check_constexpr_ctor_body (last, list); + + if (flag_enable_cilk) + if (contains_array_notation_expr (body)) + body = fix_array_notation_exprs (body); + /* Finish the function body. */ finish_function_body (body); Index: gcc/cp/ChangeLog.cilk =================================================================== --- gcc/cp/ChangeLog.cilk (revision 188243) +++ gcc/cp/ChangeLog.cilk (working copy) @@ -1,3 +1,8 @@ +2012-06-05 Balaji V. Iyer + + * parser.c (cp_parser_ctor_initializer_opt_and_function_body): Added a + check for array notation expressions. If so, then decompose them. + 2012-06-04 Balaji V. Iyer * cilk.c (cp_make_cilk_frame): Removed adding body to the orig body's