diff options
Diffstat (limited to 'src/vhdl/translate/trans-chap8.adb')
-rw-r--r-- | src/vhdl/translate/trans-chap8.adb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/vhdl/translate/trans-chap8.adb b/src/vhdl/translate/trans-chap8.adb index 35654ca95..db60ab086 100644 --- a/src/vhdl/translate/trans-chap8.adb +++ b/src/vhdl/translate/trans-chap8.adb @@ -210,8 +210,11 @@ package body Trans.Chap8 is Ret_Type := Get_Return_Type (Chap2.Current_Subprogram); Ret_Info := Get_Info (Ret_Type); case Ret_Info.Type_Mode is - when Type_Mode_Scalar => + when Type_Mode_Scalar + | Type_Mode_Acc + | Type_Mode_Bounds_Acc => -- * if the return type is scalar, simply returns. + -- * access: no range. declare V : O_Dnode; R : O_Enode; @@ -233,15 +236,6 @@ package body Trans.Chap8 is Gen_Return_Value (R); end if; end; - when Type_Mode_Acc - | Type_Mode_Bounds_Acc => - -- * access: no range. - declare - Res : O_Enode; - begin - Res := Chap7.Translate_Expression (Expr, Ret_Type); - Gen_Return_Value (Res); - end; when Type_Mode_Unbounded_Array | Type_Mode_Unbounded_Record => -- * if the return type is unconstrained: allocate an area from |