diff options
-rw-r--r-- | translate/translation.adb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/translate/translation.adb b/translate/translation.adb index 24bd385..d529076 100644 --- a/translate/translation.adb +++ b/translate/translation.adb @@ -10277,6 +10277,11 @@ package body Translation is when Mode_Value => Atype := Tinfo.Ortho_Ptr_Type (Mode_Value); end case; + when Type_Mode_Record => + -- part 1 of fix for https://gna.org/bugs/?19195 + -- Create an object pointer. + -- At elaboration: copy base from name. + Atype := Tinfo.Ortho_Ptr_Type (Info.Alias_Kind); when others => raise Internal_Error; end case; @@ -10336,6 +10341,12 @@ package body Translation is New_Assign_Stmt (Get_Var (Alias_Info.Alias_Var), M2E (Name_Node)); end case; + when Type_Mode_Record => + -- part 2 of fix for https://gna.org/bugs/?19195 + Open_Temp; + Stabilize (Name_Node); + New_Assign_Stmt (Get_Var (Alias_Info.Alias_Var), M2Addr (Name_Node)); + Close_Temp; when others => raise Internal_Error; end case; @@ -13207,6 +13218,10 @@ package body Translation is else return Lp2M (R, Type_Info, Name_Info.Alias_Kind); end if; + when Type_Mode_Record => + -- part 3 of fix for https://gna.org/bugs/?19195 + R := Get_Var (Name_Info.Alias_Var); + return Lp2M (R, Type_Info, Name_Info.Alias_Kind); when others => raise Internal_Error; end case; |