From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102015 invoked by alias); 1 Oct 2018 13:36:30 -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 101997 invoked by uid 89); 1 Oct 2018 13:36:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*codesourcery.com, H*i:sk:efd5e6a, H*f:sk:efd5e6a, H*r:0700 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Oct 2018 13:36:28 +0000 Received: from svr-orw-mbx-04.mgc.mentorg.com ([147.34.90.204]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g6yN6-0000gM-UF from Cesar_Philippidis@mentor.com ; Mon, 01 Oct 2018 06:36:24 -0700 Received: from [127.0.0.1] (147.34.91.1) by SVR-ORW-MBX-04.mgc.mentorg.com (147.34.90.204) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 1 Oct 2018 06:36:22 -0700 Subject: Re: [patch,wip] warn on noncontiguous pointers To: Thomas Koenig , "Bader, Reinhold" , "fortran@gcc.gnu.org" References: <6c7d4e6ddec64bd8a326a95591b2bb47@lrz.de> <2e72ca261ac34d0b839c112f8cee3600@lrz.de> From: Cesar Philippidis Message-ID: Date: Mon, 01 Oct 2018 13:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00003.txt.bz2 On 09/30/2018 11:12 AM, Thomas Koenig wrote: > Am 28.09.18 um 07:12 schrieb Bader, Reinhold: >>   Looking at 5.3.8.1 (Fortran 2008 for the sake of this discussion), >> we have that >> an object that has the DIMENSION attribute is an array. array-spec >> includes deferred-shape-spec-list, >> so any object declared with deferred shape is an array. > > OK, I see, so this code is indeed legal.  Thanks! > > @Cesar:  The idea behind your patch is sound.  I think this would > fit into the "legal, but can sometimes bite you" category, > so I think would be better with -Wextra (where we accept that > there might be quite a few false positives). > > Could you adapt your patch accordingly and also add two test cases, > one testing for the absence of the warning/error with normal > options, and one for the warning with -Wextra? Yes, sure. Thanks, Cesar