From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 6F8473858C2D; Mon, 29 Jan 2024 21:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F8473858C2D 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 6F8473858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706562370; cv=none; b=rxXeJCVW42a+9vlkCdDpt5wHC1lPzI4SEk8oJiKKEcjQ2oByOZcMYQ+WKOrbqszWlJek9/0L5q8b8y6X+hkDiYB4wl0dWD4jbJbCxDpxl7lNYg41BVqSATPsFbHi6pIZCZuBYSQqwMSro0kNbjIeuJtkfFs7tMd4E6HeXBP1ZFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706562370; c=relaxed/simple; bh=xtaaDHCLnnyEkXjPgOfbWhqh49Fi3x0pKQLrBTOTzc4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=gaShhVPpa7Hh6ZR1Pc2zGwn4NqyD6e5zaYtvqNu+UmjFyHdPLdjRcn+vySYk5oIRsuMnFQABsVe/XSIaupRXaacehWYI7msJOWsCHfGlycX8/9d2zaaDObr+zq4xofAoQl4khJUpVyzwmnPvHiByq1r8hXPsc9933MchdYNTl6s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1706562365; x=1707167165; i=anlauf@gmx.de; bh=xtaaDHCLnnyEkXjPgOfbWhqh49Fi3x0pKQLrBTOTzc4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=P2ZV/xqdkKZtIVolINN4GC/kQJSngk4qA+IkQpDmWt6kd5Sdy3/Ov/my3n4N9bc3 RuLlhbzGrpyHkSs3OvLm4DaKEjFLabr/ZLsvIo6/biEJvC1JUN86oOte+strtVkrm 37QV9H43zJS7d9nJx162mM0inKw6o+hVlH3ivEbRsMaAbHuHa04S1h2ngtYDBMynA gMZnUu+D+HEBpXojsvj/FGgAlyYXLvBwE+KhRvWekW4b523FPH6yoNXEKrTNuk+qs v2DIJ4rfkr2MTib7MRtb+hLnvdsoelJEp3KBN5L4mdiEMoj5MTTTm7YSzE5OHxdYL 8fRYUgD33f4UDw4KxA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.151.157]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MQe5u-1rjSoN1CwY-00NhVE; Mon, 29 Jan 2024 22:06:05 +0100 Message-ID: Date: Mon, 29 Jan 2024 22:06:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fortran: Mark internal symbols as artificial [PR88009,PR68800] To: Bernhard Reutner-Fischer Cc: Harald Anlauf via Fortran , gcc-patches@gcc.gnu.org Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <20211114231748.376086cd@nbbrfq> <20211117091216.3a0ec44f@nbbrfq> <4842a7cf-48a2-cd34-e717-952d181abd84@gmx.de> <20240129214509.590a7fa0@nbbrfq.loc> Content-Language: en-US From: Harald Anlauf In-Reply-To: <20240129214509.590a7fa0@nbbrfq.loc> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:gCF9+RGuZ+GJbmfNzJ7yoEbbTJa8T+cAy7uZSlnAP1wgABCYg4V NnevcvCVXamC/UPUYyGyItPaxZvspsb+jWzlu46dcvbfbOj9oGPvCrwyQgpOvuTN9X7Rhiv 0HjnfpAAvFw/1ft+ftdWruP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e 0WQwJjdAeLdOfcYWYLK6OvTbpgQ= X-Spam-Status: No, score=-5.4 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Am 29.01.24 um 21:45 schrieb Bernhard Reutner-Fischer: > On Wed, 17 Nov 2021 21:32:14 +0100 > Harald Anlauf wrote: > >> Do you have testcases/reproducers demonstrating that the patch actually >> fixes the issues you're describing? > > I believe that marking artificial symbols as such is obvious and i did > use the existing tests to verify that the changes do not regress but > behave as intended. I did check that the memory leak in > gfc_find_derived_vtab is fixed with the patch. > > Ok for stage 1 if the rebased regression test passes? > > thanks > >> >> Am 17.11.21 um 09:12 schrieb Bernhard Reutner-Fischer via Gcc-patches: >>> On Tue, 16 Nov 2021 21:46:32 +0100 >>> Harald Anlauf via Fortran wrote: >>> >>>> Hi Bernhard, >>>> >>>> I'm trying to understand your patch. What does it really try to solv= e? >>> >>> Compiler generated symbols should be marked artificial. >>> The fix for PR88009 ( f8add009ce300f24b75e9c2e2cc5dd944a020c28 , >>> r9-5194 ) added artificial just to the _final component and left out a= ll the rest. >>> Note that the majority of compiler generated symbols in class.c >>> already had artificial set properly. >>> The proposed patch amends the other generated symbols to be marked >>> artificial, too. >>> >>> The other parts fix memory leaks. >>> >>>> >>>> PR88009 is closed and seems to have nothing to do with this. >>> >>> Well it marked only _final as artificial and forgot to adjust the >>> others as well. >>> We can remove the reference to PR88009 if you prefer? >>> >>> thanks! >>>> >>>> Harald >>>> >>>> Am 14.11.21 um 23:17 schrieb Bernhard Reutner-Fischer via Fortran: >>>>> Hi! >>>>> >>>>> Amend fix for PR88009 to mark all these class components as artifici= al. >>>>> >>>>> gcc/fortran/ChangeLog: >>>>> >>>>> * class.c (gfc_build_class_symbol, generate_finalization_= wrapper, >>>>> (gfc_find_derived_vtab, find_intrinsic_vtab): Use stringp= ool for >>>>> names. Mark internal symbols as artificial. >>>>> * decl.c (gfc_match_decl_type_spec, gfc_match_end): Fix >>>>> indentation. >>>>> (gfc_match_derived_decl): Fix indentation. Check extensio= n level >>>>> before incrementing refs counter. >>>>> * parse.c (parse_derived): Fix style. >>>>> * resolve.c (resolve_global_procedure): Likewise. >>>>> * symbol.c (gfc_check_conflict): Do not ignore artificial= symbols. >>>>> (gfc_add_flavor): Reorder condition, cheapest first. >>>>> (gfc_new_symbol, gfc_get_sym_tree, >>>>> generate_isocbinding_symbol): Fix style. >>>>> * trans-expr.c (gfc_trans_subcomponent_assign): Remove >>>>> restriction on !artificial. >>>>> * match.c (gfc_match_equivalence): Special-case CLASS_DAT= A for >>>>> warnings. >>>>> >>>>> --- >>>>> gfc_match_equivalence(), too, should not bail-out early on the first >>>>> error but should diagnose all errors. I.e. not goto cleanup but set >>>>> err=3Dtrue and continue in order to diagnose all constraints of a >>>>> statement. Maybe Sandra or somebody else will eventually find time t= o >>>>> tweak that. >>>>> >>>>> I think it also plugs a very minor leak of name in gfc_find_derived_= vtab >>>>> so i also tagged it [PR68800]. At least that was the initial >>>>> motiviation to look at that spot. >>>>> We were doing >>>>> - name =3D xasprintf ("__vtab_%s", tname); >>>>> ... >>>>> gfc_set_sym_referenced (vtab); >>>>> - name =3D xasprintf ("__vtype_%s", tname); >>>>> >>>>> Bootstrapped and regtested without regressions on x86_64-unknown-lin= ux. >>>>> Ok for trunk? >>>>> >>>> >>>> >>> >>> >> > > Can you please post the patch here so that we can review it?