aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-10 22:18:05 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-10 22:18:05 +0200
commitf4be996776af67b5242e9ec5fc18ec1fe27d0efb (patch)
tree775e1aca86df3546a911399e3098bc9bf709a2f5 /src/vhdl
parent4144afe6e495e7893e08b5e1f84acdfa8c983dc0 (diff)
downloadghdl-f4be996776af67b5242e9ec5fc18ec1fe27d0efb.tar.gz
ghdl-f4be996776af67b5242e9ec5fc18ec1fe27d0efb.tar.bz2
ghdl-f4be996776af67b5242e9ec5fc18ec1fe27d0efb.zip
vhdl: do not try to recognize mentor version of std_logic_arith.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-ieee-std_logic_arith.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-ieee-std_logic_arith.adb b/src/vhdl/vhdl-ieee-std_logic_arith.adb
index ab6ba9646..abb7218d2 100644
--- a/src/vhdl/vhdl-ieee-std_logic_arith.adb
+++ b/src/vhdl/vhdl-ieee-std_logic_arith.adb
@@ -82,6 +82,13 @@ package body Vhdl.Ieee.Std_Logic_Arith is
begin
Decl := Get_Declaration_Chain (Pkg);
+ if Decl /= Null_Iir
+ and then Get_Kind (Decl) = Iir_Kind_Use_Clause
+ then
+ -- Mentor version. Don't extract and don't crash.
+ return;
+ end if;
+
-- The first declaration should be type Unsigned.
if not (Decl /= Null_Iir
and then Get_Kind (Decl) = Iir_Kind_Type_Declaration