aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index a0d07c2..5902256 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -4263,7 +4263,11 @@ package body Einfo is
procedure Set_Initialization_Statements (Id : E; V : N) is
begin
- pragma Assert (Ekind_In (Id, E_Constant, E_Variable));
+ -- Tolerate an E_Void entity since this can be called while resolving
+ -- an aggregate used as the initialization expression for an object
+ -- declaration, and this occurs before the Ekind for the object is set.
+
+ pragma Assert (Ekind_In (Id, E_Void, E_Constant, E_Variable));
Set_Node28 (Id, V);
end Set_Initialization_Statements;