aboutsummaryrefslogtreecommitdiffstats
path: root/translate
diff options
context:
space:
mode:
authorBrian Drummond <brian@shapes.demon.co.uk>2013-12-02 17:03:33 +0000
committerBrian Drummond <brian@shapes.demon.co.uk>2013-12-02 17:03:33 +0000
commitdd6ad2adb25264864383871c060101084a7bbb1d (patch)
tree5c26e523f9c48e2c3a43a46602eb7337c503829a /translate
parent0161db14ee47b9d3e631cf58c02aad30f728aea4 (diff)
downloadghdl-dd6ad2adb25264864383871c060101084a7bbb1d.tar.gz
ghdl-dd6ad2adb25264864383871c060101084a7bbb1d.tar.bz2
ghdl-dd6ad2adb25264864383871c060101084a7bbb1d.zip
Fix for bug #19195, https://gna.org/bugs/?19195
Diffstat (limited to 'translate')
-rw-r--r--translate/translation.adb15
1 files changed, 15 insertions, 0 deletions
diff --git a/translate/translation.adb b/translate/translation.adb
index 24bd3853c..d529076d7 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;