From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 58A653858C27; Wed, 17 Nov 2021 08:12:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 58A653858C27 Received: by mail-wm1-x32e.google.com with SMTP id n33-20020a05600c502100b0032fb900951eso4035411wmr.4; Wed, 17 Nov 2021 00:12:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XmwzBFgCNW0OEQZaUZ62e1DhbCEp/accqqWT5YNQuxU=; b=ebiK80ryyMIAalnfevqHfzLJnlcRidE2GvMELsO7h1cBIrrlLKS0T5LhKEp303FVDo OkGioT68Ct9E2Y3KzqLgBlzd4PwY70KgXzqDSr91fzthOTBoLC1a58MCtCW1TglZV+ez pRYOv4+frUyIwNpid8iOFcBplnYnfpN7QOvwwAXJypLr32jXk8l/3L3V6yJDkJgViDOZ j+qkTSmj9ma9FiGEL/9fIJY+8EQLCJjHbCFwdR5oYF6alKvUhozF6hKYtZTr1f78EXLi ku5y0Ave6MQenbGr+yH6xdyRZQJbHiHIKoSMPg6p1S4iM4jY1lcnr5VFEBlsyBHBAXPw WALQ== X-Gm-Message-State: AOAM531Th3KQJqMHVAUqPduqhR09vewURNYLpQ2ijpiBmg+uOf2sQFmv Amax9RSuupCxThj7Qz2iMJI= X-Google-Smtp-Source: ABdhPJzIHQe2Wb4rsMF5iVwcPP4YlfFhtsG89eMysMWwa+siRDAiwnyFT47DIHRQYF2HglyNj0tN8Q== X-Received: by 2002:a05:600c:350c:: with SMTP id h12mr14994685wmq.123.1637136740195; Wed, 17 Nov 2021 00:12:20 -0800 (PST) Received: from nbbrfq (91-119-98-250.dsl.dynamic.surfer.at. [91.119.98.250]) by smtp.gmail.com with ESMTPSA id l26sm5407055wms.15.2021.11.17.00.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 00:12:19 -0800 (PST) Date: Wed, 17 Nov 2021 09:12:16 +0100 From: Bernhard Reutner-Fischer To: Harald Anlauf via Fortran Cc: rep.dot.nop@gmail.com, Harald Anlauf , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fortran: Mark internal symbols as artificial [PR88009,PR68800] Message-ID: <20211117091216.3a0ec44f@nbbrfq> In-Reply-To: References: <20211114231748.376086cd@nbbrfq> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 17 Nov 2021 08:12:23 -0000 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 solve? Compiler generated symbols should be marked artificial. The fix for PR88009 ( f8add009ce300f24b75e9c2e2cc5dd944a020c28 , r9-5194 ) added artificial just to the _final component and left out all 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 artificial. > > > > gcc/fortran/ChangeLog: > > > > * class.c (gfc_build_class_symbol, generate_finalization_wrapper, > > (gfc_find_derived_vtab, find_intrinsic_vtab): Use stringpool 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 extension 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_DATA 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=true and continue in order to diagnose all constraints of a > > statement. Maybe Sandra or somebody else will eventually find time to > > 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 = xasprintf ("__vtab_%s", tname); > > ... > > gfc_set_sym_referenced (vtab); > > - name = xasprintf ("__vtype_%s", tname); > > > > Bootstrapped and regtested without regressions on x86_64-unknown-linux. > > Ok for trunk? > > > >