aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2021-03-08 07:11:32 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-17 10:32:17 -0400
commit7ba8725fc35c88d8e049ffd6b3e206b747588419 (patch)
tree10c4527a64ec11fd16296919534fa3750bc46d63 /gcc
parent59d5d8cdb95479231e675a03e5baec955b7095c2 (diff)
downloadgcc-7ba8725fc35c88d8e049ffd6b3e206b747588419.zip
gcc-7ba8725fc35c88d8e049ffd6b3e206b747588419.tar.gz
gcc-7ba8725fc35c88d8e049ffd6b3e206b747588419.tar.bz2
[Ada] Crash on overriding of an abstract primitive on an incomplete type
gcc/ada/ * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Protect against no Primitive_Operations.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch3.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 6720d41..d807b10 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -3072,6 +3072,7 @@ package body Sem_Ch3 is
and then Ekind (Prev) = E_Incomplete_Type
and then Is_Tagged_Type (Prev)
and then Is_Tagged_Type (T)
+ and then Present (Primitive_Operations (Prev))
then
Elmt := First_Elmt (Primitive_Operations (Prev));
while Present (Elmt) loop