aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/sem.adb')
-rw-r--r--src/vhdl/sem.adb17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb
index 1664d67e1..39916bb76 100644
--- a/src/vhdl/sem.adb
+++ b/src/vhdl/sem.adb
@@ -1479,6 +1479,12 @@ package body Sem is
when Iir_Kinds_Monadic_Operator =>
return Are_Trees_Equal (Get_Operand (Left), Get_Operand (Right));
+ when Iir_Kind_Function_Call =>
+ return Are_Trees_Equal (Get_Prefix (Left), Get_Prefix (Right))
+ and then
+ Are_Trees_Chain_Equal (Get_Parameter_Association_Chain (Left),
+ Get_Parameter_Association_Chain (Right));
+
when Iir_Kind_Access_Type_Definition
| Iir_Kind_Record_Type_Definition
| Iir_Kind_Array_Type_Definition
@@ -2867,9 +2873,14 @@ package body Sem is
-- FIXME: unless the parent is a package declaration library unit, the
-- design unit depends on the body.
- if Get_Need_Body (Pkg) then
- Bod := Libraries.Load_Secondary_Unit
- (Get_Design_Unit (Pkg), Null_Identifier, Decl);
+ if Get_Need_Body (Pkg) and then not Is_Nested_Package (Pkg) then
+ Bod := Get_Package_Body (Pkg);
+ if Is_Null (Bod) then
+ Bod := Libraries.Load_Secondary_Unit
+ (Get_Design_Unit (Pkg), Null_Identifier, Decl);
+ else
+ Bod := Get_Design_Unit (Bod);
+ end if;
if Is_Null (Bod) then
Error_Msg_Sem (+Decl, "cannot find package body of %n", +Pkg);
else