From 3563739bcd2982f43e3c9c5818c8e0d2ad971394 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 24 Apr 2009 16:35:21 +0200 Subject: [multiple changes] 2009-04-24 Emmanuel Briot * 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 * sem_ch12.adb: Minor reformatting * g-trasym.adb: Minor reformatting * exp_ch6.adb: Minor reformatting 2009-04-24 Robert Dewar * layout.adb (Layout_Type): For packed array type, copy unset size/alignment fields from the referenced Packed_Array_Type. 2009-04-24 Bob Duff * 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 --- gcc/ada/layout.adb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gcc/ada/layout.adb') 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); -- cgit v1.1