diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-02-13 18:17:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-02-13 18:17:51 +0100 |
commit | b820177e2e0d74458ee1e28a74c7e461c8e41939 (patch) | |
tree | 21653002f1106d78de513cf10dfecfcd3f627985 /src/vhdl | |
parent | 5bcc890fe425ca6d63e12f4d462c63fb36c7c6e7 (diff) | |
download | ghdl-b820177e2e0d74458ee1e28a74c7e461c8e41939.tar.gz ghdl-b820177e2e0d74458ee1e28a74c7e461c8e41939.tar.bz2 ghdl-b820177e2e0d74458ee1e28a74c7e461c8e41939.zip |
vhdl-sem_expr: avoid a crash on incorrect qualified expr.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index f8950c133..8303a58f9 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -4169,6 +4169,12 @@ package body Vhdl.Sem_Expr is N_Type := Sem_Type_Mark (Get_Type_Mark (Expr)); Set_Type_Mark (Expr, N_Type); N_Type := Get_Type (N_Type); + if N_Type = Null_Iir then + -- Stop now in case of error. It is highly possible that the + -- expression is ambiguous. + return Null_Iir; + end if; + Set_Type (Expr, N_Type); if A_Type /= Null_Iir and then Are_Types_Compatible (A_Type, N_Type) = Not_Compatible |