aboutsummaryrefslogtreecommitdiffstats
path: root/sem_assocs.adb
diff options
context:
space:
mode:
authorgingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-10-02 04:33:36 +0000
committergingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7>2006-10-02 04:33:36 +0000
commita81f695b15865268fea6ee062a381ba8e43a02b4 (patch)
tree8bc86734eda054c31b705ceab4f4762e96422750 /sem_assocs.adb
parentf51d97cdfbb61a3c1b0456b32b5076d03ba5f8ac (diff)
downloadghdl-a81f695b15865268fea6ee062a381ba8e43a02b4.tar.gz
ghdl-a81f695b15865268fea6ee062a381ba8e43a02b4.tar.bz2
ghdl-a81f695b15865268fea6ee062a381ba8e43a02b4.zip
direct drivers and bugs fix
Diffstat (limited to 'sem_assocs.adb')
-rw-r--r--sem_assocs.adb9
1 files changed, 7 insertions, 2 deletions
diff --git a/sem_assocs.adb b/sem_assocs.adb
index 09fc2c975..7b96eb603 100644
--- a/sem_assocs.adb
+++ b/sem_assocs.adb
@@ -148,7 +148,7 @@ package body Sem_Assocs is
Actual := Get_Actual (Assoc);
Object := Name_To_Object (Actual);
if Object /= Null_Iir then
- Prefix := Get_Base_Name (Object);
+ Prefix := Get_Object_Prefix (Object);
else
Prefix := Actual;
end if;
@@ -1230,9 +1230,9 @@ package body Sem_Assocs is
Res_Type : Iir;
Assoc_Kind : Param_Assoc_Type;
begin
- -- Sem formal.
Formal := Get_Formal (Assoc);
+ -- Handle open association.
if Get_Kind (Assoc) = Iir_Kind_Association_Element_Open then
if Formal /= Null_Iir then
Assoc_Kind := Sem_Formal (Formal, Inter);
@@ -1259,6 +1259,7 @@ package body Sem_Assocs is
return;
end if;
+ -- Pre-semantize formal and extract out conversion.
if Formal /= Null_Iir then
Assoc_Kind := Sem_Formal (Formal, Inter);
if Assoc_Kind = None then
@@ -1368,6 +1369,7 @@ package body Sem_Assocs is
return;
end if;
+ -- Semantize formal.
if Get_Formal (Assoc) /= Null_Iir then
Set_Type (Formal, Null_Iir);
Sem_Name (Formal, False);
@@ -1379,6 +1381,9 @@ package body Sem_Assocs is
Free_Name (Formal);
Set_Formal (Assoc, Expr);
Formal_Type := Get_Type (Expr);
+ if Out_Conv = Null_Iir and In_Conv = Null_Iir then
+ Res_Type := Formal_Type;
+ end if;
end if;
Set_Out_Conversion (Assoc, Out_Conv);