From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id B82C53994830; Wed, 28 Jul 2021 10:23:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B82C53994830 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: csn0Bao1oHzeb5/A/CNhQpa/hOTOidp2zpWL3Ymyq880O3E8/VA9ZlaJSFyb1E32gimdgvQWDZ Q1SR8RZa7ddMTfIAoXV0bZNfb8QmWYHnmWN3RnCnbAmR8Qq4bSngg37YPJOk4uZ13+Nhkzxk7e mSpY/YxY1HvwFtSvJim+maJZM+Qrz95WoS9V2FDrHBS8BmSaaaPVCukCJ5zrkLYAr+eA/lWkIG mMWq6zerU8u0hrqFMr8vTXeWMdQj+o7i6vpmUkUGdEVEE0qO9DWEDE+uKMsGiX1CkToce+CjUh o9fpE1nn8Fzxc9VVNjDZgIzF X-IronPort-AV: E=Sophos;i="5.84,276,1620720000"; d="scan'208";a="66462494" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 28 Jul 2021 02:23:47 -0800 IronPort-SDR: COipD2CFO8YH1fz2prE1Mxhxq+PEKFc7KsKoTvOUZo8+iWqbhr7d9BBafDVLx3PgvdjWcgK7Sy j88CuuNFz6F9cyRu9D531ne77VOiTpGkEShspsmY7Gb0P0L7IZT323VFtDHZgsROnA+c7E8rZY PPVKdFiXFTORByh7WJJHKeMjLkjCSeeHc6bXr+Et23EoY4npO10v6/nfny82nTby7/u/4kecW+ pwHvTNh7oQ70BKk7A/T0gscSNz3mEF/xA7OKgGtm3lgZTZOlVhWwMLq3phDOPXBCNhcohDwRGU JAs= Subject: Re: [PATCH] PR fortrsn/101564 - ICE in resolve_allocate_deallocate, at fortran/resolve.c:8169 To: Harald Anlauf CC: fortran , gcc-patches References: <9b6187f0-d3dd-bb2d-d6f3-ada831cdecf0@codesourcery.com> <217aa918-f12a-ebb5-2941-63b87c84b69c@codesourcery.com> <6ed7f80c-c59f-026a-c67f-933f5a3ea89c@codesourcery.com> From: Tobias Burnus Message-ID: <7f67fe55-78b2-ee0f-6cf6-275bf9349740@codesourcery.com> Date: Wed, 28 Jul 2021 12:23:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 10:23:49 -0000 Hi Harald, On 27.07.21 23:42, Harald Anlauf wrote: > This almost worked, needing only a restriction to %KIND and %LEN. > Note that %RE and %IM are usually definable. Well spotted :-) > Regtested on x86_64-pc-linux-gnu. OK? >> LGTM - except [...] feel free add them and commit without further review= . >> [...] > I have added the updated "final" version of the patch to give > everybody another 24h to have a look, and will commit if nobody > complains. LGTM - thanks again. > [...] with fixing a few issues on the way before Gerhard finds them... :-) Tobias > Fortran: ICE in resolve_allocate_deallocate for invalid STAT argument > > gcc/fortran/ChangeLog: > > PR fortran/101564 > * expr.c (gfc_check_vardef_context): Add check for KIND and LEN > parameter inquiries. > * match.c (gfc_match): Fix comment for %v code. > (gfc_match_allocate, gfc_match_deallocate): Replace use of %v code > by %e in gfc_match to allow for function references as STAT and > ERRMSG arguments. > * resolve.c (resolve_allocate_deallocate): Avoid NULL pointer > dereferences and shortcut for bad STAT and ERRMSG argument to > (DE)ALLOCATE. Remove bogus parts of checks for STAT and ERRMSG. > > gcc/testsuite/ChangeLog: > > PR fortran/101564 > * gfortran.dg/allocate_stat_3.f90: New test. > * gfortran.dg/allocate_stat.f90: Adjust error messages. > * gfortran.dg/implicit_11.f90: Likewise. > * gfortran.dg/inquiry_type_ref_3.f90: Likewise. ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955