diff options
Diffstat (limited to 'src/vhdl/sem_specs.adb')
-rw-r--r-- | src/vhdl/sem_specs.adb | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb index d4713b264..e1584d904 100644 --- a/src/vhdl/sem_specs.adb +++ b/src/vhdl/sem_specs.adb @@ -569,6 +569,11 @@ package body Sem_Specs is -- beyond the immediate declarative part, such as design unit or -- interfaces. if Is_Designator then + if Is_Error (Name) then + pragma Assert (Flags.Flag_Force_Analysis); + return True; + end if; + -- LRM 5.1 Attribute specification -- An attribute specification for an attribute of a design unit -- (i.e. an entity declaration, an architecture, a configuration @@ -823,6 +828,9 @@ package body Sem_Specs is (Warnid_Specs, +Spec, "attribute specification apply to no named entity"); end if; + elsif List = Null_Iir_Flist then + pragma Assert (Flags.Flag_Force_Analysis); + null; else -- o If a list of entity designators is supplied, then the -- attribute specification applies to the named entities denoted @@ -1021,12 +1029,17 @@ package body Sem_Specs is for I in Flist_First .. Flist_Last (List) loop El := Get_Nth_Element (List, I); - Sem_Name (El); - El := Finish_Sem_Name (El); - Set_Nth_Element (List, I, El); + if Is_Error (El) then + Sig := Null_Iir; + else + Sem_Name (El); + El := Finish_Sem_Name (El); + Set_Nth_Element (List, I, El); + + Sig := Get_Named_Entity (El); + Sig := Name_To_Object (Sig); + end if; - Sig := Get_Named_Entity (El); - Sig := Name_To_Object (Sig); if Sig /= Null_Iir then Set_Type (El, Get_Type (Sig)); Prefix := Get_Object_Prefix (Sig); @@ -1074,7 +1087,9 @@ package body Sem_Specs is -- Each signal must be declared in the declarative part -- enclosing the disconnection specification. -- FIXME: todo. - elsif Get_Designated_Entity (El) /= Error_Mark then + elsif not Is_Error (El) + and then Get_Designated_Entity (El) /= Error_Mark + then Error_Msg_Sem (+El, "name must designate a signal"); end if; end loop; @@ -1313,13 +1328,16 @@ package body Sem_Specs is (Parent_Stmts : Iir; Spec : Iir; Primary_Entity_Aspect : out Iir) is function Apply_Component_Specification - (Chain : Iir; Check_Applied : Boolean) - return Boolean + (Chain : Iir; Check_Applied : Boolean) return Boolean is Comp : constant Iir := Get_Named_Entity (Get_Component_Name (Spec)); El : Iir; Res : Boolean; begin + if Chain = Null_Iir then + return False; + end if; + El := Get_Concurrent_Statement_Chain (Chain); Res := False; while El /= Null_Iir loop |