diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-05-11 01:22:40 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-05-11 01:22:40 +0200 |
commit | ae9bf87f0ecb5f8e43f8e1df4ce9fdb5a16bff8d (patch) | |
tree | 5864c2abfab6318b4920d3c356de2d0a677cd232 /src/vhdl | |
parent | 4fb0d372c17309ed4c5e2f011d8fa11e89f3295e (diff) | |
download | ghdl-ae9bf87f0ecb5f8e43f8e1df4ce9fdb5a16bff8d.tar.gz ghdl-ae9bf87f0ecb5f8e43f8e1df4ce9fdb5a16bff8d.tar.bz2 ghdl-ae9bf87f0ecb5f8e43f8e1df4ce9fdb5a16bff8d.zip |
Fix thinko: reject incorrect association (positionnal match followed by
named match with the same formal).
Fix ticket 49.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_assocs.adb | 22 | ||||
-rw-r--r-- | src/vhdl/sem_expr.adb | 3 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index e9db31bb7..492e79a55 100644 --- a/src/vhdl/sem_assocs.adb +++ b/src/vhdl/sem_assocs.adb @@ -1129,8 +1129,7 @@ package body Sem_Assocs is end Sem_Formal; function Is_Valid_Conversion - (Func : Iir; Res_Base_Type : Iir; Param_Base_Type : Iir) - return Boolean + (Func : Iir; Res_Base_Type : Iir; Param_Base_Type : Iir) return Boolean is R_Type : Iir; P_Type : Iir; @@ -1171,8 +1170,7 @@ package body Sem_Assocs is end Is_Valid_Conversion; function Extract_Conversion - (Conv : Iir; Res_Type : Iir; Param_Type : Iir; Loc : Iir) - return Iir + (Conv : Iir; Res_Type : Iir; Param_Type : Iir; Loc : Iir) return Iir is List : Iir_List; Res_Base_Type : Iir; @@ -1211,9 +1209,8 @@ package body Sem_Assocs is return Res; end Extract_Conversion; - function Extract_In_Conversion (Conv : Iir; - Res_Type : Iir; Param_Type : Iir) - return Iir + function Extract_In_Conversion + (Conv : Iir; Res_Type : Iir; Param_Type : Iir) return Iir is Func : Iir; begin @@ -1233,9 +1230,8 @@ package body Sem_Assocs is end case; end Extract_In_Conversion; - function Extract_Out_Conversion (Conv : Iir; - Res_Type : Iir; Param_Type : Iir) - return Iir + function Extract_Out_Conversion + (Conv : Iir; Res_Type : Iir; Param_Type : Iir) return Iir is Func : Iir; Res : Iir; @@ -1588,7 +1584,7 @@ package body Sem_Assocs is end if; end Sem_Association_By_Expression; - -- Associate ASSOC with interface INTERFACE + -- Associate ASSOC with interface INTERFACE -- This sets MATCH. procedure Sem_Association (Assoc : Iir; Inter : Iir; Finish : Boolean; Match : out Boolean) is @@ -1755,9 +1751,9 @@ package body Sem_Assocs is if Finish then Error_Msg_Sem (Disp_Node (Inter) & " already associated", Assoc); - Match := False; - return; end if; + Match := False; + return; end if; else -- Individual association. diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index 341e7f73a..703c554c2 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -1176,8 +1176,7 @@ package body Sem_Expr is -- EXPR is a function or procedure call. function Sem_Subprogram_Call_Stage1 - (Expr : Iir; A_Type : Iir; Is_Func_Call : Boolean) - return Iir + (Expr : Iir; A_Type : Iir; Is_Func_Call : Boolean) return Iir is Imp : Iir; Nbr_Inter: Natural; |