From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id E216D385481A; Wed, 10 Mar 2021 20:18:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E216D385481A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: E4RCsuh7oQovz3O+fbVqfX5FVxCx+it5pd+VAV5VezUGfANj+uf0e3W8USfhdelA7TKsiJZXPg w3GDHPXgNEr2BkS20O5YAfVp+2A9yqkr0Ps39P+AbVglNrzZILb5kIf+BDZ2z7DVwGn/m9/oj0 fZkU9g1JKdNPn5gR9QOgZq63rJn0gM78XrFFntleeob8JLuGxwYoIPAtX/+iwCUB2EPsaY+sd3 Ae46lUzQlucf6weiGY4gFH/wB6aAWg0hrtVxdMYF8DM2A9y35do8z4ZoS4BKyqFhPGiF76LIGN WBg= X-IronPort-AV: E=Sophos;i="5.81,238,1610438400"; d="scan'208";a="59093911" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 10 Mar 2021 12:18:09 -0800 IronPort-SDR: 76jxgHGn//gidlpwPBNHvFj/R0LKNu1nN++vvhpN1YfDYCGZ2ktnWj98Yd8nt6KkGiALlYMfAo w7IJmCSVttwHHzM6MCESnD8BxBdn08I8/cqRyqCsaKLhuQT6XpslTBk6Qo6Be18Q11d0nRydmj RcnPb3RJ7kimkHaiWx+nk4uotUyreUvTXl0U2wXonpMKA6mHNE+rGpUqG20hPJlEli3UFFVB25 72+GmHpcS/Ayamj7ycNiiiihtk+6jjcHdJlN3J5S8xkW4ElZoJPWabjq8epTTp5ez+FKEvQUP5 Zc4= Subject: Re: [PATCH] PR fortran/99205 - [10/11 Regression] Out of memory with undefined character length To: Harald Anlauf CC: fortran , gcc-patches References: <8a63eb89-91e6-1e8d-870e-8a2f7a6750df@codesourcery.com> From: Tobias Burnus Message-ID: Date: Wed, 10 Mar 2021 21:18:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.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-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 20:18:12 -0000 Dear Harald, On 10.03.21 20:43, Harald Anlauf wrote: >> In the following variant of the program, the invalid >> variable declaration of 'c' itself is avoided by using >> a block: >> >> integer :: ll >> ll =3D 4 >> block >> character(ll) :: c(2), cc(2) >> character(ll) :: c2(2), cc2(2) >> data c /'a', 'b'/ >> data c2(:)(1:1) /'a', 'b'/ >> common /block/ cc, cc2 >> end block >> end > No, this example is invalid Of course this example is invalid =E2=80=93 I only wrote that it avoids the issues with the declaration of 'C' itself not that the code as a whole is valid. Regarding: > C1107(R1107) A block-specification-part shall not contain a COMMON, EQUIV= ALENCE, INTENT, NAMELIST, > OPTIONAL, statement function, or VALUE statement. That could be mended by removing the 'common' line. Especially as I forgot to actually use 'cc'/'cc2' in a data statement ... Or by using a host-associated 'll' instead of a block. But that still will have the automatic issue for common, hence, removing common is probably best. One the other hand: In any case, there are hundreds of ways to write invalid code =E2=80=93 cho= se one you like for the testcase :-) Thanks for this patch =E2=80=93 and all the belated patch work! Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen R= egistergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas H= eurung, Frank Th=C3=BCrauf