diff options
author | Tristan Gingold | 2013-12-27 04:16:19 +0100 |
---|---|---|
committer | Tristan Gingold | 2013-12-27 04:16:19 +0100 |
commit | d19ad6fd2e14e8c3cb8b43a7eaed747031e9316d (patch) | |
tree | f9fcf11972a63a077e6de44b0cbce134a8e17c75 /sem_names.adb | |
parent | 9eb9f4f2023d4d968c0cbc4a103ad47332b288ae (diff) | |
download | ghdl-d19ad6fd2e14e8c3cb8b43a7eaed747031e9316d.tar.gz ghdl-d19ad6fd2e14e8c3cb8b43a7eaed747031e9316d.tar.bz2 ghdl-d19ad6fd2e14e8c3cb8b43a7eaed747031e9316d.zip |
Fix 'range'left & co.
Diffstat (limited to 'sem_names.adb')
-rw-r--r-- | sem_names.adb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sem_names.adb b/sem_names.adb index 8928a89..ef68aa1 100644 --- a/sem_names.adb +++ b/sem_names.adb @@ -2205,7 +2205,6 @@ package body Sem_Names is & "anonymous object", Attr); return Error_Mark; when Iir_Kinds_Object_Declaration - | Iir_Kind_Design_Unit | Iir_Kind_Type_Declaration | Iir_Kind_Subtype_Declaration | Iir_Kinds_Function_Declaration @@ -2216,6 +2215,8 @@ package body Sem_Names is | Iir_Kinds_Concurrent_Statement => -- FIXME: to complete null; + when Iir_Kind_Design_Unit => + Sem.Add_Dependence (Prefix); when others => Error_Kind ("sem_user_attribute", Prefix); end case; @@ -2400,7 +2401,13 @@ package body Sem_Names is -- Result Type: Same type as T. Set_Type (Res, Prefix_Type); end case; - Set_Expr_Staticness (Res, Get_Type_Staticness (Prefix_Type)); + case Get_Kind (Prefix) is + when Iir_Kind_Range_Array_Attribute + | Iir_Kind_Reverse_Range_Array_Attribute => + Set_Expr_Staticness (Res, Get_Expr_Staticness (Prefix)); + when others => + Set_Expr_Staticness (Res, Get_Type_Staticness (Prefix_Type)); + end case; return Res; end Sem_Predefined_Type_Attribute; |