From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id 6315D3858D32; Mon, 29 Jan 2024 22:19:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6315D3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6315D3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706566744; cv=none; b=LcLIWWvCzE//tYqs3i4pWZKr83EgBmTM7Y/tx5HP5amI7V+OgYqDgfDchVaEnfthpzKlQ+HIYCZGB2bUbNF6P7zCuV2RCBz+5hMmruffGI5o8pdWiwnT/gieiTvrC1QxqCbVC/JUByQKGBfhRt3OePB539EtTYHIOOusZIw60IY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706566744; c=relaxed/simple; bh=YOfs8CQzEbLv2rMVWuU2JxBjtF378BXJKBYNuLmA2ZM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=K6mW1Fm5k+sq4uxYtNJtxKwx7WxYVJUsteOjxkbT1hDYrCkw+9d4pjuMy/A5FLSawIO0GhyK63Q64DkaCtknoEFGsiJ7xdRGtERfdS03wHWVESBetYpCpt9mXbCEiILigr05lY7RqyAyQjl+h5qiFlKWTQOTr70g7kgo2hV0uTs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5102bbe87afso2595640e87.1; Mon, 29 Jan 2024 14:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706566740; x=1707171540; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=MgpW7UhywBDfSy7KMrG2mK7b0Upmj4dslaUyD7Mb6Hw=; b=B9AjNff9VZE98+AvnG7HUbVfPBeseuEYqEmZb0CPq4/K361W/7FoRthEo3mJizoEZ5 BZFVadra559BLS/hAw1q9Yg3fKLQZrdSMMZxrFkQzxyTptCfE9J1p7DlGrzLi8U7YvZy MX+RsjT6BQmt9rjIfCpIAGjF+r4W6VoB0C5laMtafImJOYvii9tV3pS51h57+IjG0oIi O7AJctvUxh8ch68S6q1vfZYIG1z4WpFCThVMBoYrasOi8JfQUZUA8236jmw54Z8LqaY9 f1PKLpxBJ87ksD4IfN4ib5269LinVIj/gTRBkcJtH8Frnx1m+oV1sV4P4ZbAvxw/Q8fL CSyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706566740; x=1707171540; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MgpW7UhywBDfSy7KMrG2mK7b0Upmj4dslaUyD7Mb6Hw=; b=Oe4ReDxU4303E6QGL6vTasYulNzXIHJR0BEbitnv/9JLayGOPQMfq5YlhG/GAH2t6W U19MpdyZMZM1l9YNURHcLbsXLsYiJpHPYBzZBvqXg3Y2POydo0zpYgdt4ATlFQC25Q02 ZiZBzWcRWcY8GdcYe8S0qoRhaCNjCDUIH2Pxlimj+jQP787pMrZFRWbcdW45g5aTKu7q fVok0cU0OFTHTp1uEFwYX5GUuMaJCiQWKyrJr0mQp2hZs9pgyy3QgV6N7hAsfMnqSPJk 3H8J67na8AdGWaANTBBXNX7jZLzn9FKoWhobXAtjthFtjiVc6nITEL+jpEFlrwjRpUt7 jJlw== X-Gm-Message-State: AOJu0Yx51agIqt1V8r4bK/d6jpJnQKDHbUF+6Ofeha/WqEG4vA1IY+gg VaRcBfeIkibq85cOUW3z+Ef638iMZ+2ijwEQyTm/MUnFVGNQHtGM X-Google-Smtp-Source: AGHT+IGZP88KMES6XEEqJxIPBsM3KpH1V786r3qdY9JGmr3mQMz4rwewtWopn2N/8m8YT304PX/Lcg== X-Received: by 2002:ac2:4f81:0:b0:510:c2e:e10 with SMTP id z1-20020ac24f81000000b005100c2e0e10mr4738017lfs.17.1706566739343; Mon, 29 Jan 2024 14:18:59 -0800 (PST) Received: from [127.0.0.1] (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id fk1-20020a056402398100b0055d19c9daf2sm4181344edb.15.2024.01.29.14.18.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jan 2024 14:18:58 -0800 (PST) Date: Mon, 29 Jan 2024 23:18:55 +0100 From: rep.dot.nop@gmail.com To: Harald Anlauf CC: Harald Anlauf via Fortran , gcc-patches@gcc.gnu.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_Fortran=3A_Mark_internal_sy?= =?US-ASCII?Q?mbols_as_artificial_=5BPR88009=2CPR68800=5D?= In-Reply-To: References: <20211114231748.376086cd@nbbrfq> <20211117091216.3a0ec44f@nbbrfq> <4842a7cf-48a2-cd34-e717-952d181abd84@gmx.de> <20240129214509.590a7fa0@nbbrfq.loc> Message-ID: <1D12FB9B-B7CD-44AD-994F-DA974CC29DBF@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: On 29 January 2024 22:06:04 CET, Harald Anlauf wrote: >Am 29=2E01=2E24 um 21:45 schrieb Bernhard Reutner-Fischer: >> On Wed, 17 Nov 2021 21:32:14 +0100 >> Harald Anlauf wrote: >>=20 >>> Do you have testcases/reproducers demonstrating that the patch actuall= y >>> fixes the issues you're describing? >>=20 >> 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=2E I did check that the memory leak in >> gfc_find_derived_vtab is fixed with the patch=2E >>=20 >> Ok for stage 1 if the rebased regression test passes? >>=20 >> thanks >>=20 >>>=20 >>> Am 17=2E11=2E21 um 09:12 schrieb Bernhard Reutner-Fischer via Gcc-patc= hes: >>>> On Tue, 16 Nov 2021 21:46:32 +0100 >>>> Harald Anlauf via Fortran wrote: >>>>=20 >>>>> Hi Bernhard, >>>>>=20 >>>>> I'm trying to understand your patch=2E What does it really try to s= olve? >>>>=20 >>>> Compiler generated symbols should be marked artificial=2E >>>> The fix for PR88009 ( f8add009ce300f24b75e9c2e2cc5dd944a020c28 , >>>> r9-5194 ) added artificial just to the _final component and left out = all the rest=2E >>>> Note that the majority of compiler generated symbols in class=2Ec >>>> already had artificial set properly=2E >>>> The proposed patch amends the other generated symbols to be marked >>>> artificial, too=2E >>>>=20 >>>> The other parts fix memory leaks=2E >>>>=20 >>>>>=20 >>>>> PR88009 is closed and seems to have nothing to do with this=2E >>>>=20 >>>> Well it marked only _final as artificial and forgot to adjust the >>>> others as well=2E >>>> We can remove the reference to PR88009 if you prefer? >>>>=20 >>>> thanks! >>>>>=20 >>>>> Harald >>>>>=20 >>>>> Am 14=2E11=2E21 um 23:17 schrieb Bernhard Reutner-Fischer via Fortra= n: >>>>>> Hi! >>>>>>=20 >>>>>> Amend fix for PR88009 to mark all these class components as artific= ial=2E >>>>>>=20 >>>>>> gcc/fortran/ChangeLog: >>>>>>=20 >>>>>> * class=2Ec (gfc_build_class_symbol, generate_finalizati= on_wrapper, >>>>>> (gfc_find_derived_vtab, find_intrinsic_vtab): Use string= pool for >>>>>> names=2E Mark internal symbols as artificial=2E >>>>>> * decl=2Ec (gfc_match_decl_type_spec, gfc_match_end): Fi= x >>>>>> indentation=2E >>>>>> (gfc_match_derived_decl): Fix indentation=2E Check exten= sion level >>>>>> before incrementing refs counter=2E >>>>>> * parse=2Ec (parse_derived): Fix style=2E >>>>>> * resolve=2Ec (resolve_global_procedure): Likewise=2E >>>>>> * symbol=2Ec (gfc_check_conflict): Do not ignore artific= ial symbols=2E >>>>>> (gfc_add_flavor): Reorder condition, cheapest first=2E >>>>>> (gfc_new_symbol, gfc_get_sym_tree, >>>>>> generate_isocbinding_symbol): Fix style=2E >>>>>> * trans-expr=2Ec (gfc_trans_subcomponent_assign): Remove >>>>>> restriction on !artificial=2E >>>>>> * match=2Ec (gfc_match_equivalence): Special-case CLASS_= DATA for >>>>>> warnings=2E >>>>>>=20 >>>>>> --- >>>>>> gfc_match_equivalence(), too, should not bail-out early on the firs= t >>>>>> error but should diagnose all errors=2E I=2Ee=2E not goto cleanup b= ut set >>>>>> err=3Dtrue and continue in order to diagnose all constraints of a >>>>>> statement=2E Maybe Sandra or somebody else will eventually find tim= e to >>>>>> tweak that=2E >>>>>>=20 >>>>>> I think it also plugs a very minor leak of name in gfc_find_derived= _vtab >>>>>> so i also tagged it [PR68800]=2E At least that was the initial >>>>>> motiviation to look at that spot=2E >>>>>> We were doing >>>>>> - name =3D xasprintf ("__vtab_%s", tname); >>>>>> =2E=2E=2E >>>>>> gfc_set_sym_referenced (vtab); >>>>>> - name =3D xasprintf ("__vtype_%s", tname); >>>>>>=20 >>>>>> Bootstrapped and regtested without regressions on x86_64-unknown-li= nux=2E >>>>>> Ok for trunk? >>>>>>=20 >>>>>=20 >>>>>=20 >>>>=20 >>>>=20 >>>=20 >>=20 >>=20 > >Can you please post the patch here so that we can review it? > I'm very sorry that I missed to provide an explicit reference, the initial= patch was submitted here: https://inbox=2Esourceware=2Eorg/fortran/20211114231748=2E376086cd@nbbrfq/ But I will follow-up with a rebased, tested patch ASAP during a weekend or= vacation=2E=20 But just to give context, that's what I was talking about=2E=2E thanks PS: IMHO a strcmp(=2E=2E,"_data") is inappropriate for you should check at= tr=2Eartificial and the path exploder to give hints should ideally deal wit= h this transparently -- IMHO