aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_expr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r--src/vhdl/sem_expr.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index 1fc98c592..605530067 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -2597,6 +2597,18 @@ package body Sem_Expr is
end if;
end;
+ -- LRM93 7.3.2.2 Array aggregates
+ -- An others choice is locally static if the applicable index constraint
+ -- if locally static.
+ if Info.Nbr_Choices > 0
+ and then Info.Others_Choice /= Null_Iir
+ and then Get_Type_Staticness (Choice_Type) /= Locally
+ then
+ Warning_Msg_Sem
+ (Warnid_Static, +Info.Others_Choice,
+ "'others' choice allowed only if the index constraint is static");
+ end if;
+
if Reorder_Choices then
declare
Ngroups : Int32;