public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3812] [Ada] Add adequate guard before calling First_Rep_Item
@ 2021-09-22 15:11 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-09-22 15:11 UTC (permalink / raw)
To: gcc-cvs
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-22 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 15:11 [gcc r12-3812] [Ada] Add adequate guard before calling First_Rep_Item Pierre-Marie de Rodat
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).