aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/layout.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-24 16:35:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-24 16:35:21 +0200
commit3563739bcd2982f43e3c9c5818c8e0d2ad971394 (patch)
treefb3fc87fa6c935ed02ccd6b3f65c3a662b29c471 /gcc/ada/layout.adb
parent806b956fed0026c5431340ee15e770dd513684a8 (diff)
downloadgcc-3563739bcd2982f43e3c9c5818c8e0d2ad971394.zip
gcc-3563739bcd2982f43e3c9c5818c8e0d2ad971394.tar.gz
gcc-3563739bcd2982f43e3c9c5818c8e0d2ad971394.tar.bz2
[multiple changes]
2009-04-24 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, make.adb, mlib-prj.adb, prj.adb, prj.ads, clean.adb, prj-nmsc.adb, prj-env.adb (Project_List_Table, Project_Element): removed. Lists of projects are now implemented via standard malloc rather than through the table. 2009-04-24 Thomas Quinot <quinot@adacore.com> * sem_ch12.adb: Minor reformatting * g-trasym.adb: Minor reformatting * exp_ch6.adb: Minor reformatting 2009-04-24 Robert Dewar <dewar@adacore.com> * layout.adb (Layout_Type): For packed array type, copy unset size/alignment fields from the referenced Packed_Array_Type. 2009-04-24 Bob Duff <duff@adacore.com> * lib-load.adb (Make_Instance_Unit): Revert previous change, no longer needed after sem_ch12 changes. * sem.adb (Walk_Library_Items): Include with's in some debugging printouts. From-SVN: r146727
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r--gcc/ada/layout.adb24
1 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index 4e72153..6cce7b9 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -2501,6 +2501,29 @@ package body Layout is
-- Non-elementary (composite) types
else
+ -- For packed arrays, take size and alignment values from the packed
+ -- array type if a packed array type has been created and the fields
+ -- are not currently set.
+
+ if Is_Array_Type (E) and then Present (Packed_Array_Type (E)) then
+ declare
+ PAT : constant Entity_Id := Packed_Array_Type (E);
+
+ begin
+ if Unknown_Esize (E) then
+ Set_Esize (E, Esize (PAT));
+ end if;
+
+ if Unknown_RM_Size (E) then
+ Set_RM_Size (E, RM_Size (PAT));
+ end if;
+
+ if Unknown_Alignment (E) then
+ Set_Alignment (E, Alignment (PAT));
+ end if;
+ end;
+ end if;
+
-- If RM_Size is known, set Esize if not known
if Known_RM_Size (E) and then Unknown_Esize (E) then
@@ -2678,7 +2701,6 @@ package body Layout is
procedure Rewrite_Integer (N : Node_Id; V : Uint) is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
-
begin
Rewrite (N, Make_Integer_Literal (Loc, Intval => V));
Set_Etype (N, Typ);