diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-01-10 11:05:31 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-01-11 21:26:34 +0100 |
commit | 15cf5147f7a97759ac3385d214533d5500b3f9c3 (patch) | |
tree | a8fadfb9f535115e30eee9add144a5b3219e6e30 /src/vhdl/sem_names.adb | |
parent | 4e110147adc921386c8b4e9cf4d1a9a5d20ee4ec (diff) | |
download | ghdl-15cf5147f7a97759ac3385d214533d5500b3f9c3.tar.gz ghdl-15cf5147f7a97759ac3385d214533d5500b3f9c3.tar.bz2 ghdl-15cf5147f7a97759ac3385d214533d5500b3f9c3.zip |
Set type staticness for a constant declaration and attribute specification.
Fix for issue 10.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r-- | src/vhdl/sem_names.adb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 1ffb51e52..114bb68e6 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -897,7 +897,6 @@ package body Sem_Names is Index_Type : Iir; Prefix : Iir; Prefix_Name : Iir; - Staticness : Iir_Staticness; begin -- LRM93 14.1 -- Parameter: A locally static expression of type universal_integer, the @@ -999,18 +998,7 @@ package body Sem_Names is -- formed by imposing on an unconstrained array type a globally static -- index constraint. - Staticness := Get_Type_Staticness (Prefix_Type); - - -- In relaxed mode, also consider that globally static expressions have - -- a globally static subtype. - if Is_Type_Name (Prefix_Name) = Null_Iir - and then Staticness = None - and then (Flag_Relaxed_Rules or Vhdl_Std = Vhdl_93c) - then - Staticness := Iir_Staticness'Min (Globally, - Get_Expr_Staticness (Prefix)); - end if; - Set_Expr_Staticness (Attr, Staticness); + Set_Expr_Staticness (Attr, Get_Type_Staticness (Prefix_Type)); end Finish_Sem_Array_Attribute; procedure Finish_Sem_Scalar_Type_Attribute @@ -2905,9 +2893,9 @@ package body Sem_Names is function Sem_Array_Attribute_Name (Attr : Iir_Attribute_Name) return Iir is use Std_Names; - Prefix: Iir; Prefix_Name : constant Iir := Get_Prefix (Attr); Prefix_Type : Iir; + Prefix : Iir; Res : Iir; Res_Type : Iir; begin |