diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/sem_names.adb | 14 | ||||
-rw-r--r-- | src/vhdl/sem_names.ads | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 1e1c74321..f524020b9 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -1149,9 +1149,7 @@ package body Sem_Names is when others => raise Internal_Error; end case; - if Get_Parameter (Attr) /= Null_Iir then - raise Internal_Error; - end if; + pragma Assert (Get_Parameter (Attr) = Null_Iir); if Parameter = Null_Iir then Set_Parameter (Attr, Param); Set_Expr_Staticness (Attr, None); @@ -1692,11 +1690,11 @@ package body Sem_Names is Free_Parenthesis_Name (Name, Res); end if; return Res; - when Iir_Kinds_Type_Attribute => + when Iir_Kinds_Type_Attribute + | Iir_Kind_Base_Attribute => + pragma Assert (Get_Kind (Name) = Iir_Kind_Attribute_Name); Free_Iir (Name); return Res; - when Iir_Kind_Base_Attribute => - return Res; when Iir_Kind_Simple_Name_Attribute | Iir_Kind_Path_Name_Attribute | Iir_Kind_Instance_Name_Attribute => @@ -1714,7 +1712,7 @@ package body Sem_Names is Error_Kind ("finish_sem_name_1", Res); end case; - -- Finish prefix. + -- The name has a prefix, finish it. Prefix := Get_Prefix (Res); Name_Prefix := Get_Prefix (Name); Prefix := Finish_Sem_Name_1 (Name_Prefix, Prefix); @@ -3018,6 +3016,8 @@ package body Sem_Names is Set_Expr_Staticness (Res, Get_Expr_Staticness (Prefix)); when Iir_Kind_Base_Attribute => -- Base_Attribute is already finished. + pragma Assert (Get_Kind (Prefix_Name) = Iir_Kind_Attribute_Name); + Free_Iir (Prefix_Name); Prefix_Type := Get_Type (Prefix); Set_Expr_Staticness (Res, Get_Type_Staticness (Prefix_Type)); when others => diff --git a/src/vhdl/sem_names.ads b/src/vhdl/sem_names.ads index 812d5d6e2..bfe3e3e63 100644 --- a/src/vhdl/sem_names.ads +++ b/src/vhdl/sem_names.ads @@ -48,9 +48,9 @@ package Sem_Names is -- is displayed and the named entity is error_mark. procedure Sem_Name (Name : Iir; Keep_Alias : Boolean := False); - -- Finish semantisation of NAME, if necessary. The named entity must not + -- Finish analysis of NAME, if necessary. The named entity must not -- be an overload list (ie the overload resolution must have been done). - -- This make remaining checks, transforms function names into calls... + -- Do remaining checks, transform function names into calls... function Finish_Sem_Name (Name : Iir) return Iir; -- Analyze NAME as a type mark. NAME must be either a simple name or an |