aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-10-16 06:45:09 +0200
committerTristan Gingold <tgingold@free.fr>2022-10-16 06:45:09 +0200
commit49167cfb56845554946e5f04aae9cced23936aa0 (patch)
tree1ce6cfd3a4f8da1bfd89a70dcd4d1127d9da1471
parent0a671eac348e780033dfe63c82724ae2a772b4f9 (diff)
downloadghdl-49167cfb56845554946e5f04aae9cced23936aa0.tar.gz
ghdl-49167cfb56845554946e5f04aae9cced23936aa0.tar.bz2
ghdl-49167cfb56845554946e5f04aae9cced23936aa0.zip
vhdl-sem_expr.adb: avoid crash after error on aggregate. Fix #2218
-rw-r--r--src/vhdl/vhdl-sem_expr.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb
index b4218d076..3f4d7890b 100644
--- a/src/vhdl/vhdl-sem_expr.adb
+++ b/src/vhdl/vhdl-sem_expr.adb
@@ -4778,8 +4778,14 @@ package body Vhdl.Sem_Expr is
procedure Check_Read_Aggregate (Aggr : Iir)
is
+ Atype : constant Iir := Get_Type (Aggr);
Choice : Iir;
begin
+ if Atype /= Null_Iir and then Is_Error (Atype) then
+ -- No check in case of error.
+ return;
+ end if;
+
Choice := Get_Association_Choices_Chain (Aggr);
while Choice /= Null_Iir loop
case Iir_Kinds_Choice (Get_Kind (Choice)) is