From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101641 invoked by alias); 21 Nov 2015 20:07:39 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 101620 invoked by uid 89); 21 Nov 2015 20:07:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 21 Nov 2015 20:07:37 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id tALK7ZlH055474 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 21 Nov 2015 12:07:35 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id tALK7ZiQ055473; Sat, 21 Nov 2015 12:07:35 -0800 (PST) (envelope-from sgk) Date: Sat, 21 Nov 2015 20:07:00 -0000 From: Steve Kargl To: "H.J. Lu" Cc: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT Message-ID: <20151121200735.GA55464@troutmask.apl.washington.edu> References: <20151120005836.GA53763@troutmask.apl.washington.edu> <20151120200947.GA61350@troutmask.apl.washington.edu> <20151121162657.GA23304@troutmask.apl.washington.edu> <20151121182014.GA23753@troutmask.apl.washington.edu> <20151121192622.GA81197@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151121192622.GA81197@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00133.txt.bz2 > > > > > > Perhaps, bootstrap needs to set appropriate warning levels. > > > > https://gcc.gnu.org/ml/gcc-regression/2015-11/msg00648.html > > > > See 5 lines up. > Committed. Index: ChangeLog =================================================================== --- ChangeLog (revision 230709) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ 2015-11-21 Steven G. Kargl + * simplify.c (gfc_simplify_cshift): Work around bootstrap issues + due to inappropriate warning options. + +2015-11-21 Steven G. Kargl + * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT for rank=1 arrays. (gfc_simplify_spread): Remove a FIXME and add error condition. Index: simplify.c =================================================================== --- simplify.c (revision 230709) +++ simplify.c (working copy) @@ -1869,6 +1869,15 @@ gfc_simplify_cshift (gfc_expr *array, gf else { /* FIXME: Deal with rank > 1 arrays. For now, don't leak memory. */ + + /* GCC bootstrap is too stupid to realize that the above code for dm + is correct. First, dim can be specified for a rank 1 array. It is + not needed in this nor used here. Second, the code is simply waiting + for someone to implement rank > 1 simplification. For now, add a + pessimization to the code that has a zero valid reason to be here. */ + if (dm > array->rank) + gcc_unreachable (); + gfc_free_expr (a); } -- Steve