public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1423] [Ada] Plug loophole for built-in-place return with limited_with clause Date: Mon, 4 Jul 2022 07:49:57 +0000 (GMT) [thread overview] Message-ID: <20220704074957.10618385BAC8@sourceware.org> (raw) https://gcc.gnu.org/g:bdd5056736b642f0124e6cb26f9c2fd8be028908 commit r13-1423-gbdd5056736b642f0124e6cb26f9c2fd8be028908 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Tue May 24 01:14:18 2022 +0200 [Ada] Plug loophole for built-in-place return with limited_with clause When the result type of a function requiring built-in-place return is only visible through a limited_with clause, the compiled needs to wait for the nonlimited view to be available in order to compute whether the built-in-place return is needed, and this comprises tagging the function with the Returns_By_Ref flag. gcc/ada/ * exp_ch6.adb (Build_In_Place_Formal): Also compute Returns_By_Ref for the function if the extra formals were not built initially. Diff: --- gcc/ada/exp_ch6.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 15a20392457..88157b946ea 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -850,11 +850,12 @@ package body Exp_Ch6 is -- The return type in the function declaration may have been a limited -- view, and the extra formals for the function were not generated at -- that point. At the point of call the full view must be available and - -- the extra formals can be created. + -- the extra formals can be created and Returns_By_Ref computed. if No (Extra_Formal) then Create_Extra_Formals (Func); Extra_Formal := Extra_Formals (Func); + Compute_Returns_By_Ref (Func); end if; -- We search for a formal with a matching suffix. We can't search
reply other threads:[~2022-07-04 7:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220704074957.10618385BAC8@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@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).