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 r12-3812] [Ada] Add adequate guard before calling First_Rep_Item Date: Wed, 22 Sep 2021 15:11:20 +0000 (GMT) [thread overview] Message-ID: <20210922151120.8ECA93858430@sourceware.org> (raw) https://gcc.gnu.org/g:5f325f5e6fd091f73f5be6ef30d27e22e4b59a74 commit r12-3812-g5f325f5e6fd091f73f5be6ef30d27e22e4b59a74 Author: Yannick Moy <moy@adacore.com> Date: Fri Jul 23 10:52:51 2021 +0200 [Ada] Add adequate guard before calling First_Rep_Item gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Add guard. Diff: --- gcc/ada/sem_ch13.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8bc84902982..595a741346f 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -10104,7 +10104,10 @@ package body Sem_Ch13 is -- If the type is private, check whether full view has inherited -- predicates. - if Is_Private_Type (Typ) and then No (Ritem) then + if Is_Private_Type (Typ) + and then No (Ritem) + and then Present (Full_View (Typ)) + then Ritem := First_Rep_Item (Full_View (Typ)); end if;
reply other threads:[~2021-09-22 15:11 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=20210922151120.8ECA93858430@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).