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-412] [Ada] Fix incorrect call to inherited function with limited return type Date: Fri, 13 May 2022 08:09:43 +0000 (GMT) [thread overview] Message-ID: <20220513080943.492D9385142A@sourceware.org> (raw) https://gcc.gnu.org/g:c77e4873b14bd84fc6715db8980ce14886b28906 commit r13-412-gc77e4873b14bd84fc6715db8980ce14886b28906 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Sat Mar 5 19:18:18 2022 +0100 [Ada] Fix incorrect call to inherited function with limited return type This is a return convention mismatch coming from a discrepancy of the Returns_By_Ref flag for the inherited function. gcc/ada/ * sem_ch3.adb (Derive_Subprogram): For a function, also copy the Returns_By_Ref flag from the parent. Diff: --- gcc/ada/sem_ch3.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index b81216c9f29..054648b34f4 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -16333,6 +16333,7 @@ package body Sem_Ch3 is if Ekind (New_Subp) = E_Function then Set_Mechanism (New_Subp, Mechanism (Parent_Subp)); + Set_Returns_By_Ref (New_Subp, Returns_By_Ref (Parent_Subp)); end if; -- Ada 2022 (AI12-0279): If a Yield aspect is specified True for a
reply other threads:[~2022-05-13 8:09 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=20220513080943.492D9385142A@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).