From f4be996776af67b5242e9ec5fc18ec1fe27d0efb Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 10 Oct 2019 22:18:05 +0200 Subject: vhdl: do not try to recognize mentor version of std_logic_arith. --- src/vhdl/vhdl-ieee-std_logic_arith.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vhdl') 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 -- cgit v1.2.3