From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32328 invoked by alias); 27 Oct 2011 23:36:04 -0000 Received: (qmail 2335 invoked by uid 22791); 27 Oct 2011 23:33:44 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_40,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp25.services.sfr.fr (HELO smtp25.services.sfr.fr) (93.17.128.120) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 23:33:30 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id 089C0700004E; Fri, 28 Oct 2011 01:33:29 +0200 (CEST) Received: from gimli.local (145.15.72.86.rev.sfr.net [86.72.15.145]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id C4EC57000040; Fri, 28 Oct 2011 01:33:28 +0200 (CEST) X-SFR-UUID: 20111027233328806.C4EC57000040@msfrf2512.sfr.fr Content-Type: multipart/mixed; boundary="===============5961466135860979496==" MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027233328.18581.30601@gimli.local> In-Reply-To: <20111027233305.18581.72802@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027233305.18581.72802@gimli.local> Subject: [Patch, fortran] [60/66] inline sum and product: Update the scalarizer: Fix error markers. Date: Thu, 27 Oct 2011 23:36:00 -0000 X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg02559.txt.bz2 --===============5961466135860979496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-length: 365 This makes the necessary changes for the error markers to be generated at the right place in the testcase. that is for: foo( & sum(bar,1) & ) if sum(bar,1) requires a temporary, the warning is emitted on the second line instead of the first one, so that one can distinguish between array generated for the argument, for the function result, etc. OK? --===============5961466135860979496== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-60.CL" Content-length: 155 2011-10-19 Mikael Morin * array.c (match_subscript): Skip whitespaces before setting locus. * matchexp.c (match_level_1): Ditto. --===============5961466135860979496== Content-Type: text/x-diff; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-60.patch" Content-length: 626 diff --git a/array.c b/array.c index 3e6b9d2..a1449fd 100644 --- a/array.c +++ b/array.c @@ -70,6 +70,7 @@ match_subscript (gfc_array_ref *ar, int init, bool match_star) i = ar->dimen + ar->codimen; + gfc_gobble_whitespace (); ar->c_where[i] = gfc_current_locus; ar->start[i] = ar->end[i] = ar->stride[i] = NULL; diff --git a/matchexp.c b/matchexp.c index 8b99ce9..cd70dc0 100644 --- a/matchexp.c +++ b/matchexp.c @@ -201,6 +201,7 @@ match_level_1 (gfc_expr **result) locus where; match m; + gfc_gobble_whitespace (); where = gfc_current_locus; uop = NULL; m = match_defined_operator (&uop); --===============5961466135860979496==--