summaryrefslogtreecommitdiff
path: root/sem.adb
diff options
context:
space:
mode:
authorTristan Gingold2013-12-31 19:01:48 +0100
committerTristan Gingold2013-12-31 19:01:48 +0100
commit5f41fdc72fccd7169dc812c8690e82222ae1aca1 (patch)
tree2e2cddb257b071ec30b79c0672e2320f5421468d /sem.adb
parent2fe0a5359e1bdf6dfdab20bea121db8f4e54ffe9 (diff)
downloadghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.gz
ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.bz2
ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.zip
Fix bug21274.
WIP for VHDL08.
Diffstat (limited to 'sem.adb')
-rw-r--r--sem.adb23
1 files changed, 17 insertions, 6 deletions
diff --git a/sem.adb b/sem.adb
index 3700ac7..c6b2149 100644
--- a/sem.adb
+++ b/sem.adb
@@ -18,6 +18,7 @@
with Ada.Unchecked_Conversion;
with Errorout; use Errorout;
with Std_Package; use Std_Package;
+with Ieee.Std_Logic_1164;
with Libraries;
with Std_Names;
with Sem_Scopes; use Sem_Scopes;
@@ -1770,8 +1771,8 @@ package body Sem is
-- Purity/wait/all-sensitized is unknown (recursion).
Update_Pure_Unknown
);
- function Update_And_Check_Pure_Wait (Subprg : Iir)
- return Update_Pure_Status
+
+ function Update_And_Check_Pure_Wait (Subprg : Iir) return Update_Pure_Status
is
procedure Error_Wait (Caller : Iir; Callee : Iir) is
begin
@@ -1880,9 +1881,10 @@ package body Sem is
-- Second loop: recurse if a state is not known.
if J = 1
and then
- (Get_Purity_State (Callee) = Unknown
- or else Get_Wait_State (Callee) = Unknown
- or else Get_All_Sensitized_State (Callee) = Unknown)
+ ((Get_Kind (Callee) = Iir_Kind_Procedure_Declaration
+ and then Get_Purity_State (Callee) = Unknown)
+ or else Get_Wait_State (Callee) = Unknown
+ or else Get_All_Sensitized_State (Callee) = Unknown)
then
Res1 := Update_And_Check_Pure_Wait (Callee);
if Res1 = Update_Pure_Missing then
@@ -1962,7 +1964,8 @@ package body Sem is
-- Keep in list.
if Callee_Bod = Null_Iir
or else
- (Get_Purity_State (Callee) = Unknown
+ (Get_Kind (Callee) = Iir_Kind_Procedure_Declaration
+ and then Get_Purity_State (Callee) = Unknown
and then Depth /= Iir_Depth_Impure)
or else
(Get_Wait_State (Callee) = Unknown
@@ -2179,6 +2182,14 @@ package body Sem is
Set_Visible_Flag (Unit, True);
Xref_Decl (Decl);
+ -- Identify IEEE.Std_Logic_1164 for VHDL08.
+ if Get_Identifier (Decl) = Std_Names.Name_Std_Logic_1164
+ and then (Get_Identifier (Get_Library (Get_Design_File (Unit)))
+ = Std_Names.Name_Ieee)
+ then
+ Ieee.Std_Logic_1164.Std_Logic_1164_Pkg := Decl;
+ end if;
+
-- LRM93 10.1 Declarative Region
-- 4. A package declaration, together with the corresponding
-- body (if any).