aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_expr.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-06 18:38:50 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-07 14:54:18 +0200
commit40acfa4b8258fda8d0bac3cd82a990eef468575f (patch)
tree5997cfdf5858cb5fd825b3a22ef292cf74aa9abd /src/vhdl/vhdl-sem_expr.adb
parent2886f0582984bc4948f716d82762c50fc3302064 (diff)
downloadghdl-40acfa4b8258fda8d0bac3cd82a990eef468575f.tar.gz
ghdl-40acfa4b8258fda8d0bac3cd82a990eef468575f.tar.bz2
ghdl-40acfa4b8258fda8d0bac3cd82a990eef468575f.zip
vhdl: consider fully static record aggregates. Fix #2051
Diffstat (limited to 'src/vhdl/vhdl-sem_expr.adb')
-rw-r--r--src/vhdl/vhdl-sem_expr.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb
index 425d2bf80..ceb7af3b3 100644
--- a/src/vhdl/vhdl-sem_expr.adb
+++ b/src/vhdl/vhdl-sem_expr.adb
@@ -3219,8 +3219,7 @@ package body Vhdl.Sem_Expr is
-- records.
Add_Constraints : Boolean;
begin
- -- Not yet handled.
- Set_Aggregate_Expand_Flag (Aggr, False);
+ Set_Aggregate_Expand_Flag (Aggr, True);
Ok := True;
Assoc_Chain := Get_Association_Choices_Chain (Aggr);
@@ -3312,6 +3311,9 @@ package body Vhdl.Sem_Expr is
then
Add_Constraints := True;
end if;
+ if not Is_Static_Construct (Expr) then
+ Set_Aggregate_Expand_Flag (Aggr, False);
+ end if;
else
Ok := False;
end if;
@@ -3326,6 +3328,11 @@ package body Vhdl.Sem_Expr is
El := Get_Chain (El);
end loop;
+ if Has_Named then
+ -- TODO: support named element on expanded aggregate
+ Set_Aggregate_Expand_Flag (Aggr, False);
+ end if;
+
-- Check for missing associations.
for I in Matches'Range loop
if Matches (I) = Null_Iir then