From ae9bf87f0ecb5f8e43f8e1df4ce9fdb5a16bff8d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 11 May 2015 01:22:40 +0200 Subject: Fix thinko: reject incorrect association (positionnal match followed by named match with the same formal). Fix ticket 49. --- src/vhdl/sem_assocs.adb | 22 +++++++++------------- src/vhdl/sem_expr.adb | 3 +-- 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index e9db31b..492e79a 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 341e7f7..703c554 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; -- cgit