aboutsummaryrefslogtreecommitdiffstats
path: root/evaluation.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-07-17 20:34:57 +0200
committerTristan Gingold <tgingold@free.fr>2014-07-17 20:34:57 +0200
commitcaba1d1b21d9756ede50f40d53fbc816d3b84320 (patch)
treeee0b8459472a8e7aba4ab7465bc46c74be56cd33 /evaluation.adb
parent1bc00453a725214de4964add2b7f8423d1a5d2da (diff)
downloadghdl-caba1d1b21d9756ede50f40d53fbc816d3b84320.tar.gz
ghdl-caba1d1b21d9756ede50f40d53fbc816d3b84320.tar.bz2
ghdl-caba1d1b21d9756ede50f40d53fbc816d3b84320.zip
vhdl 2008: visibility, more implicit subprograms, alias...
Use Type_Definition in type_declarator.
Diffstat (limited to 'evaluation.adb')
-rw-r--r--evaluation.adb11
1 files changed, 6 insertions, 5 deletions
diff --git a/evaluation.adb b/evaluation.adb
index 61ec39f12..1815c2b7c 100644
--- a/evaluation.adb
+++ b/evaluation.adb
@@ -1221,7 +1221,7 @@ package body Evaluation is
| Iir_Predefined_Attribute_Last_Active
| Iir_Predefined_Attribute_Driving
| Iir_Predefined_Attribute_Driving_Value
- | Iir_Predefined_Array_To_String
+ | Iir_Predefined_Array_Char_To_String
| Iir_Predefined_Bit_Vector_To_Ostring
| Iir_Predefined_Bit_Vector_To_Hstring =>
-- Not binary or never locally static.
@@ -1981,11 +1981,11 @@ package body Evaluation is
when Iir_Kind_Pred_Attribute =>
Res := Eval_Incdec (Eval_Static_Expr (Get_Parameter (Expr)), -1);
- Eval_Check_Bound (Res, Get_Type (Get_Prefix (Expr)));
+ Eval_Check_Bound (Res, Get_Type_Of_Type_Mark (Get_Prefix (Expr)));
return Res;
when Iir_Kind_Succ_Attribute =>
Res := Eval_Incdec (Eval_Static_Expr (Get_Parameter (Expr)), +1);
- Eval_Check_Bound (Res, Get_Type (Get_Prefix (Expr)));
+ Eval_Check_Bound (Res, Get_Type_Of_Type_Mark (Get_Prefix (Expr)));
return Res;
when Iir_Kind_Leftof_Attribute
| Iir_Kind_Rightof_Attribute =>
@@ -1995,7 +1995,7 @@ package body Evaluation is
Prefix_Type : Iir;
Res : Iir;
begin
- Prefix_Type := Get_Type (Get_Prefix (Expr));
+ Prefix_Type := Get_Type_Of_Type_Mark (Get_Prefix (Expr));
Rng := Eval_Range (Prefix_Type);
case Get_Direction (Rng) is
when Iir_To =>
@@ -2426,9 +2426,10 @@ package body Evaluation is
Natural (Eval_Pos (Get_Parameter (Expr))) - 1);
end;
when Iir_Kind_Subtype_Declaration
- | Iir_Kind_Type_Declaration
| Iir_Kind_Base_Attribute =>
return Eval_Range (Get_Type (Expr));
+ when Iir_Kind_Type_Declaration =>
+ return Eval_Range (Get_Type_Definition (Expr));
when others =>
Error_Kind ("eval_range", Expr);
end case;