aboutsummaryrefslogtreecommitdiffstats
path: root/post_sems.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-07-18 20:29:28 +0200
committerTristan Gingold <tgingold@free.fr>2014-07-18 20:29:28 +0200
commit415befa3bfe945bc069fd1ce73d8efd91e3b459f (patch)
tree3e3d901d415f99cac031079d0f0671fbf1593717 /post_sems.adb
parentcaba1d1b21d9756ede50f40d53fbc816d3b84320 (diff)
downloadghdl-415befa3bfe945bc069fd1ce73d8efd91e3b459f.tar.gz
ghdl-415befa3bfe945bc069fd1ce73d8efd91e3b459f.tar.bz2
ghdl-415befa3bfe945bc069fd1ce73d8efd91e3b459f.zip
Fix implicit conversion in conversion association.
Fix attribute on library units.
Diffstat (limited to 'post_sems.adb')
-rw-r--r--post_sems.adb10
1 files changed, 7 insertions, 3 deletions
diff --git a/post_sems.adb b/post_sems.adb
index 27fafd5df..151be334e 100644
--- a/post_sems.adb
+++ b/post_sems.adb
@@ -24,7 +24,7 @@ with Flags; use Flags;
package body Post_Sems is
procedure Post_Sem_Checks (Unit : Iir_Design_Unit)
is
- Lib_Unit : Iir;
+ Lib_Unit : constant Iir := Get_Library_Unit (Unit);
Lib : Iir_Library_Declaration;
Id : Name_Id;
@@ -32,7 +32,11 @@ package body Post_Sems is
Spec : Iir_Attribute_Specification;
Attr_Decl : Iir_Attribute_Declaration;
begin
- Lib_Unit := Get_Library_Unit (Unit);
+ -- No checks on package bodies.
+ if Get_Kind (Lib_Unit) = Iir_Kind_Package_Body then
+ return;
+ end if;
+
Id := Get_Identifier (Lib_Unit);
Lib := Get_Library (Get_Design_File (Unit));
@@ -49,7 +53,7 @@ package body Post_Sems is
-- Look for VITAL attributes.
if Flag_Vital_Checks then
- Value := Get_Attribute_Value_Chain (Unit);
+ Value := Get_Attribute_Value_Chain (Lib_Unit);
while Value /= Null_Iir loop
Spec := Get_Attribute_Specification (Value);
Attr_Decl := Get_Attribute_Designator (Spec);