public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4025] [Ada] Add missing guard before call to Interface_Present_In_Ancestor
@ 2021-10-01 6:16 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-10-01 6:16 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3a81dbb618e3ac6cd42ac6f296a96296e099ac1f
commit r12-4025-g3a81dbb618e3ac6cd42ac6f296a96296e099ac1f
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Thu Aug 12 18:12:40 2021 +0200
[Ada] Add missing guard before call to Interface_Present_In_Ancestor
gcc/ada/
* sem_type.adb (Specific_Type): Check that the type is tagged
before calling Interface_Present_In_Ancestor on it.
Diff:
---
gcc/ada/sem_type.adb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index 3ca2e302a8e..8e5b067bb76 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -3424,7 +3424,8 @@ package body Sem_Type is
-- Ada 2005 (AI-251): T1 is a concrete type that implements the
-- class-wide interface T2
- elsif Is_Class_Wide_Type (T2)
+ elsif Is_Tagged_Type (T1)
+ and then Is_Class_Wide_Type (T2)
and then Is_Interface (Etype (T2))
and then Interface_Present_In_Ancestor (Typ => T1,
Iface => Etype (T2))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-01 6:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 6:16 [gcc r12-4025] [Ada] Add missing guard before call to Interface_Present_In_Ancestor 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).