From 58b3b8a09770e36e36d2d6f870dac2df00457b14 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 11 May 2019 07:14:28 +0200 Subject: vhdl: adjust aggregate staticness if not constrained. Fix #817 --- src/vhdl/vhdl-sem_expr.adb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index 8f8333cec..2c977a52b 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -3809,6 +3809,12 @@ package body Vhdl.Sem_Expr is Set_Aggregate_Expand_Flag (Aggr, False); end if; else + -- If the array is not constrained, expression cannot be more + -- static than the type. In particular, if the type is not + -- constrained, the expression cannot be locally static. + Set_Expr_Staticness (Aggr, Min (Get_Type_Staticness (Aggr_Type), + Get_Expr_Staticness (Aggr))); + -- Free unused indexes subtype. for I in Infos'Range loop declare -- cgit v1.2.3