diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-24 18:24:53 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-25 11:28:48 +0200 |
commit | 4033dd795927a4953879bdc92d395788893a5468 (patch) | |
tree | bba2f7f43a0f47a45dc86dc7e26b1a34da46cd63 /src/vhdl | |
parent | ae383534fe253f0d10d0d6e2f3352bda924b0b39 (diff) | |
download | ghdl-4033dd795927a4953879bdc92d395788893a5468.tar.gz ghdl-4033dd795927a4953879bdc92d395788893a5468.tar.bz2 ghdl-4033dd795927a4953879bdc92d395788893a5468.zip |
vhdl-sem_lib: avoid a crash in explain_obsolete.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-sem_lib.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_lib.adb b/src/vhdl/vhdl-sem_lib.adb index 7144d7725..d0db163ca 100644 --- a/src/vhdl/vhdl-sem_lib.adb +++ b/src/vhdl/vhdl-sem_lib.adb @@ -323,7 +323,10 @@ package body Vhdl.Sem_Lib is It := List_Iterate (List); while Is_Valid (It) loop El := Get_Element (It); - if Get_Date (El) = Date_Obsolete then + -- Just handle design unit; but there could also be entity aspects. + if Get_Kind (El) = Iir_Kind_Design_Unit + and then Get_Date (El) = Date_Obsolete + then Error_Obsolete (Loc, "%n is obsoleted by %n", (+Design_Unit, +El)); return; end if; |