summaryrefslogtreecommitdiffstats
path: root/gcc/ada/layout.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:36:48 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:36:48 +0000
commitcd6ff0dc9a005fa0c84bea8177045526ceeb00e1 (patch)
tree6574dd19dcce4e6014fb5f03a9ea6662d5ab98bd /gcc/ada/layout.adb
parenta332b73e33f660121b73f7f025e88d153f769da0 (diff)
downloadppe42-gcc-cd6ff0dc9a005fa0c84bea8177045526ceeb00e1.tar.gz
ppe42-gcc-cd6ff0dc9a005fa0c84bea8177045526ceeb00e1.zip
2007-04-20 Robert Dewar <dewar@adacore.com>
* layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package spec from body (Layout_Type): Fix recomputation of size from alignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r--gcc/ada/layout.adb13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index 22ef17d2e55..faff2d5edc0 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,6 +31,7 @@ with Einfo; use Einfo;
with Errout; use Errout;
with Exp_Ch3; use Exp_Ch3;
with Exp_Util; use Exp_Util;
+with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
@@ -70,11 +71,6 @@ package body Layout is
-- Local Subprograms --
-----------------------
- procedure Adjust_Esize_Alignment (E : Entity_Id);
- -- E is the entity for a type or object. This procedure checks that the
- -- size and alignment are compatible, and if not either gives an error
- -- message if they cannot be adjusted or else adjusts them appropriately.
-
function Assoc_Add
(Loc : Source_Ptr;
Left_Opnd : Node_Id;
@@ -2486,9 +2482,8 @@ package body Layout is
declare
A : constant Uint := Alignment_In_Bits (E);
S : constant SO_Ref := RM_Size (E);
-
begin
- Set_Esize (E, (S * A + A - 1) / A);
+ Set_Esize (E, (S + A - 1) / A * A);
end;
end if;
@@ -2605,7 +2600,7 @@ package body Layout is
if Has_Object_Size_Clause (E) then
Error_Msg_Uint_1 := RM_Size (E);
Error_Msg_F
- ("object size is too small, minimum is ^",
+ ("object size is too small, minimum allowed is ^",
Expression (Get_Attribute_Definition_Clause
(E, Attribute_Object_Size)));
end if;
OpenPOWER on IntegriCloud