From patchwork Tue Jan 27 14:55:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 433533 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 3FD7B14012A for ; Wed, 28 Jan 2015 01:55:36 +1100 (AEDT) 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:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=kkJL4j0L4T4HWmyE NsBRu32WrV3JKABNBuBbD/hhRowgh/+BmUpkO5sLb6WM0BOfjghEGqkw+pf1ZRgw lPgiHTfypMIZczmMH3n+UV+rzHg8ccnlYT/7At4kNA6h3iQ9KXZXgKZge4HLNNRA cHzUgzeHthtF145bheVGMlwxB0o= 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:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=Bpw/8WFogJ/oNlr/xc7g6A +onfo=; b=DRd7aiR6inWjZUnwRJugzUKXSi9Qg6I45rT464GZ+4d7oQRB0W/61X EzKdGN24y9iHQU9idi/i3bwgWwmm9EPwfUlcGgJxinygjArq0euY1rp/vITwNHMj TMBO8w27zmKdUPGjOSoemo9lYKMClyEyCQ7TR0eZD2tfVaOwnbU3w= Received: (qmail 11519 invoked by alias); 27 Jan 2015 14:55:28 -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 11250 invoked by uid 89); 27 Jan 2015 14:55:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jan 2015 14:55:23 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id C2E7A2987; Tue, 27 Jan 2015 15:55:20 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gWPmeg+y1N+1; Tue, 27 Jan 2015 15:55:18 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 586872986; Tue, 27 Jan 2015 15:55:18 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.7+Sun/8.14.7/Submit) id t0REtHPs021870; Tue, 27 Jan 2015 15:55:17 +0100 (CET) From: Rainer Orth To: Steve Kargl Cc: Tobias Burnus , gcc-patches , gfortran , Alessandro Fanfarillo Subject: Re: [Patch, Fortran] PR64771 - Fix coarray ICE References: <54C3D2A0.5090905@net-b.de> <20150124201153.GA83897@troutmask.apl.washington.edu> Date: Tue, 27 Jan 2015 15:55:17 +0100 In-Reply-To: <20150124201153.GA83897@troutmask.apl.washington.edu> (Steve Kargl's message of "Sat, 24 Jan 2015 12:11:53 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Steve Kargl writes: > On Sat, Jan 24, 2015 at 06:13:04PM +0100, Tobias Burnus wrote: >> if (s1->as->type == AS_EXPLICIT) >> - for (i = 0; i < s1->as->rank + s1->as->corank; i++) >> + for (i = 0; i < s1->as->rank + std::max(0, s1->as->corank-1); i++) > > Doesn't this require '#include '? > I suspect that you are depending on namespace pollution > via some other header (coretypes.h?). It was committed with that change, which unfortunately broke Solaris bootstrap: In file included from ./config.h:6:0, from /vol/gcc/src/hg/trunk/local/gcc/fortran/interface.c:68: ./auto-host.h:2055:0: error: "_FILE_OFFSET_BITS" redefined [-Werror] #define _FILE_OFFSET_BITS 64 ^ In file included from /usr/include/iso/stdlib_iso.h:24:0, from /usr/include/stdlib.h:11, from /var/gcc/regression/trunk/11-gcc/build/prev-i386-pc-solaris2.11/libstdc++-v3/include/cstdlib:72, from /var/gcc/regression/trunk/11-gcc/build/prev-i386-pc-solaris2.11/libstdc++-v3/include/bits/stl_algo.h:59, from /var/gcc/regression/trunk/11-gcc/build/prev-i386-pc-solaris2.11/libstdc++-v3/include/algorithm:62, from /vol/gcc/src/hg/trunk/local/gcc/fortran/interface.c:66: /var/gcc/regression/trunk/11-gcc/build/prev-gcc/include-fixed/sys/feature_tests.h:213:0: note: this is the location of the previous definition #define _FILE_OFFSET_BITS 32 ^ The problem is (as so often) that was included *before* config.h. Moving it after the other includes allows interface.c to compile without warnings. Ok for mainline? Rainer 2015-01-27 Rainer Orth gcc/fortran: * interface.c: Include after config.h diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -63,8 +63,6 @@ along with GCC; see the file COPYING3. formal argument list points to symbols within the same namespace as the program unit name. */ -#include /* For std::max. */ - #include "config.h" #include "system.h" #include "coretypes.h" @@ -73,6 +71,8 @@ along with GCC; see the file COPYING3. #include "match.h" #include "arith.h" +#include /* For std::max. */ + /* The current_interface structure holds information about the interface currently being parsed. This structure is saved and restored during recursive interfaces. */