From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by sourceware.org (Postfix) with ESMTPS id 43EB23858D1E; Sat, 30 Mar 2024 14:52:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 43EB23858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 43EB23858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.15.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711810372; cv=none; b=piA87SnRjGX4wygx4GPT9p/3WG2DoKVJPQ5MY4OnfEs3boNwICg0caLMapTuti1lezDizmY2Ppmk8MkoCh3UePBP/TS+HxlKtdLF+XPYsOyiUXLzaDOGBxCbxM1gX+DsqN5dPJOJGyBYQEVjBtzJTnqXvTNHbwG39w1Deh9KZoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711810372; c=relaxed/simple; bh=gQ774gY0qDFTdD31ZBgud5ae8cnc2LqlWRXFF6lvZ4Y=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=m8QMS8JKG/rSSRUu1Laf2VeIu+8vOWb1Ofil1vq+YoAKwJzf1rQRje/qAG/qJdeHXT7adMHHLXiZ21VyqMJCGdE0tGlZH2qfCmM4Z1mSJWkxkt24Lyu07c3XLa1MXal8hTOm6F1196BOGP9V1e5s7wpz2N6Wjr/5QqEMS6gAH/0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1711810366; x=1712415166; i=anlauf@gmx.de; bh=XaW+GUVBncZmFlUCtQCc8QqKicB+T/mu3uQ1TdnBe4E=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=kHmVd0KiMpy3MV6zK7OIq6hTMzaP6ozwOlwKvnfW455qS9MN3VWA0eC2bESFl1Fj Fsps9sW5LoW50iZFY7ix3A/HVh+dOSqI9YqsEv+8oqv+cTZr8gfwzuzoO9nDW2H+W eXIr/FPKyNj40DzwTTIkTC3EEkxPIfn8gkyrk4oO5dVw9/LujqJSlHHKwB+6DXG2E nEo9YfkbrJy10IW1UItUkj2Lq8BPudtvmVPawidjj6QOgS3LaJnlFXvcKIDPQqcCD Gfs9fuCPgkbEnKojgbexWhuxqVHgtnaauamVxfeccnCVwl6vTIWtDHjGcy7lfPB8z cg9lrLg2vAclXINNmA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.144.239]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mdeb5-1sQBsF2Vs1-00Ze0e; Sat, 30 Mar 2024 15:52:46 +0100 Message-ID: Date: Sat, 30 Mar 2024 15:52:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Patch, fortran] PR112407 - [13/14 Regression] Fix for PR37336 triggers an ICE in gfc_format_decoder while constructing a vtab To: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches Cc: trnka@scm.com Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:6kBS9WVyqqEZAnVdpiERpglrxxOz7APhg1vFxFve7uMSLu3MqF9 V60XsjFsa+cShOJTZdGUJUhUvlq3gOgGzUtoVte8V+EA3UrPb0t5aFYGT6682iuma3pWZrJ LYvG6oC/Dpvhv9sUmd8rBrurmVMyLJVFd6zuD38SsHEjXBjyHf0TcGOZ80aGO9RCvQhlNw6 W0MWcnGgSJy0BCkrlqGZA== UI-OutboundReport: notjunk:1;M01:P0:Tm5XLrg40ss=;pV+pSp/7AMTkNUCzYLJJlauuRbE Urb4VPxYy5T6gKv0XRwAmbjEmiTxidPZgLFZaFBKbWyauf7bPEOAoHX9BMyPESIEU7GK+EqJp wMOrDXhs0ZY4Og/J7Q6N3Divjiuf5U7yl8DtJ1YuSx58RHKCdzKEb2ttKolTfOz9oJQXbk0iJ +RO7Pq6UkMh7WWt8w6hMfAveZ2ksSb69Z6AoJdVhGAvjjs+NGeEhTChUT6L8BD8OwxdazOPvK hn3EJChNk9GLMomYM7TXDcNxTIft7onwsdHMwTUIRux6gQMwgy7M+/dupxV1mCPPvZm/9IfGJ 7q/F05MMXzdeznHSsjhtgYDAgfjoi+oebewvSX8aKja8ha11szZx5RnYvnd3KkaMI2PIyq8BD GTCfUfm0UZjkakhYmNLTpdj+3AuO/tE/zKyXRPoYKAiUdKiKsoKy96xd+LvQdHZG6PXMircPL 4tKM52dv8yj8KHeByGE5xKrKHhdEeyjpbtyn3+5pUfDJWOL6/7sX+dD2S78qzkUj1owBN4TVo uhmKdkYunB6VjznTrb2Xs/NwtTQsfT1o/eYh8pa12PitxkX9dEjXLsvtOY6+jSOv7jvYm+DDP tkNC378QNO37g0p9mDhyY4BV9WEW7s19BdlD/CqU5tMur8HWkW7QLojjmMlV2aEj1MSu6CraO UWnDBO4CFwTUtCRY6XMDQnl/G5+ikijFzYQBXwFV/PrE64ah2n7DyPeWpy/111CwVAC4/RJ/i rPDzYUAcngyLXnJpmKiA/sDBNr2J1UdPkparM/6B9QzjhRu6CBnTPQIFffwfJeI3PJ6a6GvlY sn7Q2vN8rCvtFYJHq2Y3U+wtg6sQNbdQrv5uJsaen1bP8= X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Paul, I had only a quick glance at your patch. I guess you unintentionally forgot to remove those parts that you already committed for PR110987, along with the finalize-testcases. I am still trying to find the precise paragraph in the standard you refer to regarding INTENT(OUT) and default initialization. While at it, I think I found a minor nit in testcase pr112407a.f90: component x%i appears undefined the first time it is printed. This can be verified by either adding an explicit x% i =3D -42 in the main after the allocate(x). Alternatively, running the code with Intel and using MALLOC_PERTURB_ shows a random arg1%i, but is otherwise fine. However, if by chance (random memory) x% i =3D +42 then the test would likely fail everywhere. Cheers, Harald Am 30.03.24 um 10:06 schrieb Paul Richard Thomas: > Hi All, > > This bug emerged in a large code and involves possible recursion with a > "hidden" module procedure; ie. where the symtree name starts with '@'. T= his > throws the format decoder. As the last message in the PR shows, I have > vacillated between silently passing on the possible recursion or adding = an > alternative warning message. In the end, as a conservative choice I went > for emitting the message. > > In the course of trying to develop a compact test case, I found that typ= e > bound procedures were not being tested for recursion and that class > dummies, with intent out, were being incorrectly initialized with an emp= ty > default initializer. Both of these have been fixed. > > Unfortunately, the most compact reproducer that Tomas was able to come u= p > with required more than 100kbytes of module files. I tried from the bott= om > up but failed. Both the tests check the fixes for the other bugs. > > Regtests on x86_64 - OK for mainline and, in a couple of weeks, 13-branc= h? > > Paul > > Fortran: Fix wrong recursive errors and class initialization [PR112407] > > 2024-03-30 Paul Thomas > > gcc/fortran > PR fortran/112407 > *resolve.cc (resolve_procedure_expression): Change the test for > for recursion in the case of hidden procedures from modules. > (resolve_typebound_static): Add warning for possible recursive > calls to typebound procedures. > * trans-expr.cc (gfc_trans_class_init_assign): Do not apply > default initializer to class dummy where component initializers > are all null. > > gcc/testsuite/ > PR fortran/112407 > * gfortran.dg/pr112407a.f90: New test. > * gfortran.dg/pr112407b.f90: New test. >