aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 45a71aa..a4fd1f4 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -3110,6 +3110,18 @@ package body Sem_Ch6 is
end if;
end;
end if;
+
+ -- Freezing an access type does not freeze the designated
+ -- type, but freezing conversions between access to interfaces
+ -- requires that the interface types themselves be frozen, so
+ -- that dispatch table entities are properly created.
+ -- Unclear whether a more general rule is needed ???
+
+ elsif Nkind (Node) = N_Type_Conversion
+ and then Is_Access_Type (Etype (Node))
+ and then Is_Interface (Designated_Type (Etype (Node)))
+ then
+ Freeze_Before (N, Designated_Type (Etype (Node)));
end if;
return OK;