projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54be41
)
[Ada] Add missing guard before call to Interface_Present_In_Ancestor
author
Eric Botcazou
<ebotcazou@adacore.com>
Thu, 12 Aug 2021 16:12:40 +0000
(18:12 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Fri, 1 Oct 2021 06:13:38 +0000
(06:13 +0000)
gcc/ada/
* sem_type.adb (Specific_Type): Check that the type is tagged
before calling Interface_Present_In_Ancestor on it.
gcc/ada/sem_type.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_type.adb
b/gcc/ada/sem_type.adb
index
3ca2e30
..
8e5b067
100644
(file)
--- 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))