From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117485 invoked by alias); 6 Jul 2015 19:42:54 -0000 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 Received: (qmail 117463 invoked by uid 89); 6 Jul 2015 19:42:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 06 Jul 2015 19:42:52 +0000 Received: from [192.168.0.4] ([84.63.202.252]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MGEv5-1ZHRTK1NWZ-00FBog; Mon, 06 Jul 2015 21:42:49 +0200 In-Reply-To: References: <20150706145823.7e58cba2@vepi2> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Patch, fortran, pr66578, v1] [F2008] Invalid free on allocate(...,source=a(:)) in block From: Andre Vehreschild Date: Mon, 06 Jul 2015 19:42:00 -0000 To: Paul Richard Thomas CC: GCC-Patches-ML ,GCC-Fortran-ML ,Mikael Morin Message-ID: <8551C1A9-7974-47F1-8F9D-F4CD5C611637@gmx.de> X-UI-Out-Filterresults: notjunk:1;V01:K0:UkFFmSfQYIc=:/R6vpGKuVVmldt2kNLIe6z emcWPh4hMem7Yv3SkLfvjqMNhCS0qTlw2efUiIU9//12cev4B/kRJU2d5DUcTRIcaixCKQhv9 z9QAYTyfN1I1CZgOiDDTkYVyZeXGMRLz6/seu92xaKKZnv0k0s5ygod5M0CNRtHFLpm1R5zTu +dG+zAOrhdNsWB2LlWYdeNvgPO7kIFrbn6A928/jSuwtMy5ZiwJjkp1yp9yByhkE9uMdL+OLw KJ61nHFI9DjR+JJTlEt8KygS+9ueDqKXJnx+ZgHGeXSBrju0lXdkb8uK5ja+eTx8uE4VUtewQ mWXuLyPHGn5ZVHqAM80q52fhZ8bCDROz13eKhYvI8gvtQ2Bk6e7JB1ZJ68w1Oheo1zW1WEB0z VH9LTeUXkT5AktLHd90dGGCulfK3JxsnyXM0kOgVs7Ow0Hs+rgxMDAsrQ3qTZK6AH9fhdFUtO Qdp4ynsWXILCrYy7lSA3P48lHcChh+LbRFBXLD7f+kWaJenLxXoy2mBNC5Sudv6V6Ip99+H7i LBz2FyBl9WUA3CZOif+8bNRJ28xC+FRtU5MjGNs1ntuUgw0Is3u+hv761wEfIBm7luL0SDY4R 3whagrZ/LR1rJKvbPRruDmIvuzUlcC/Bxi5vklTnsGMr6jINwK1m3RBSDXD+aRDuC//NR8g6H 7mywGy0nFWYYOk8Fekayc/RJOvPvEHOHcGKhHzMIoA8k257vITspeBvpxGfvzweCabj4= X-SW-Source: 2015-07/txt/msg00406.txt.bz2 Hi Paul, Thanks for the review, but I don't understand the regexp. rank_remap =3D ss= ->dimen < ndim !=3D 0 in my eyes is not a legal expression. Did you mean so= mething like rank_remap =3D ss->dimen < ndim && ndim !=3D 0, or the like? Regards, Andre Am 6. Juli 2015 21:36:18 MESZ, schrieb Paul Richard Thomas : >Dear Andre, > >Whilst it is probably OK in most circumstances, I would change: >s/rank_remap =3D ss->dimen < ndim/rank_remap =3D ss->dimen < ndim !=3D 0 > >Apart from that, it is indeed OK for trunk, in spite of your >expectations :-) > >Thanks for the patch > >Paul > >On 6 July 2015 at 14:58, Andre Vehreschild wrote: >> Hi all, >> >> this is a proposal to patch PR 66578 >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66578 . It extends work >of Mikael >> Morin. The patch fixes two issues: >> >> 1. a source'd allocate in a block: allocate(c, source=3Da(:)). The >issues occurs >> because due to the new handling of source-expressions in >trans_allocate() an >> array descriptor is created where previously just a plain array was >used. I.e., >> GFC_DESCRIPTOR_TYPE_P (source) is true now and GFC_ARRAY_TYPE_P >(source) false, >> which made gfortran use the wrong bounds for the descriptor >(zero-based instead >> of one-based). This was fixed by Mikael's proposal. >> >> 2. a two-level array addressing lead to a segfault. I.e., when in a >> source-expression an array was used to index another object, then the >offset >> was computed incorrectly. >> >> Bootstraps and regtests fine on x86_64-linux-gnu/f21. >> >> Comments welcome! >> >> Regards, >> Andre >> >> PS: Experience shows that asking whether this ok for trunk is useless >;-) There >> is always something that could be improved. Open for suggestions. >> -- >> Andre Vehreschild * Email: vehre ad gmx dot de --=20 Andre Vehreschild * Kreuzherrenstr. 8 * 52062 Aachen Mail: vehre@gmx.de * Tel.: +49 241 9291018