public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/113893] finalization of object allocated by anonymous access type designating local type Date: Mon, 26 Feb 2024 12:23:43 +0000 [thread overview] Message-ID: <bug-113893-4-toodeTWYOk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113893-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113893 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>: https://gcc.gnu.org/g:1a915f6ab52eff19eb3c890a127c6693c8ce4f65 commit r12-10178-g1a915f6ab52eff19eb3c890a127c6693c8ce4f65 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Mon Feb 26 13:13:34 2024 +0100 Finalization of object allocated by anonymous access designating local type The finalization of objects dynamically allocated through an anonymous access type is deferred to the enclosing library unit in the current implementation and a warning is given on each of them. However this cannot be done if the designated type is local, because this would generate dangling references to the local finalization routine, so the finalization needs to be dropped in this case and the warning adjusted. gcc/ada/ PR ada/113893 * exp_ch7.adb (Build_Anonymous_Master): Do not build the master for a local designated type. * exp_util.adb (Build_Allocate_Deallocate_Proc): Force Needs_Fin to false if no finalization master is attached to an access type and assert that it is anonymous in this case. * sem_res.adb (Resolve_Allocator): Mention that the object might not be finalized at all in the warning given when the type is an anonymous access-to-controlled type. gcc/testsuite/ * gnat.dg/access10.adb: New test.
next prev parent reply other threads:[~2024-02-26 12:23 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-12 20:35 [Bug ada/113893] New: Finalization exception issue with anonymous access object p.p11 at orange dot fr 2024-02-14 15:54 ` [Bug ada/113893] finalization issue with anonymous access object of local type ebotcazou at gcc dot gnu.org 2024-02-14 15:55 ` ebotcazou at gcc dot gnu.org 2024-02-14 16:13 ` ebotcazou at gcc dot gnu.org 2024-02-14 17:36 ` ebotcazou at gcc dot gnu.org 2024-02-26 12:20 ` [Bug ada/113893] finalization of object allocated by anonymous access type designating " cvs-commit at gcc dot gnu.org 2024-02-26 12:22 ` cvs-commit at gcc dot gnu.org 2024-02-26 12:23 ` cvs-commit at gcc dot gnu.org [this message] 2024-02-26 12:24 ` cvs-commit at gcc dot gnu.org 2024-02-26 12:26 ` ebotcazou at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113893-4-toodeTWYOk@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).