summaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gcc.gnu.org>2001-12-17 22:19:32 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2001-12-17 22:19:32 +0100
commit79503fdd334db52e65b8550cce54031eadda249a (patch)
tree405209476eafde3f87744b76bb4787227777129a /gcc/ada/decl.c
parent855ff2e1e447affef1e407fe68b9e10d525f41f5 (diff)
downloadgcc-79503fdd334db52e65b8550cce54031eadda249a.tar.gz
* make.adb:
(Switches_Of): New function (Test_If_Relative_Path): New procedure (Add_Switches): Use new function Switches_Of (Collect_Arguments_And_Compile): Use new function Switches_Of. When using a project file, test if there are any relative search path. Fail if there are any. (Gnatmake): Only add switches for the primary directory when not using a project file. When using a project file, change directory to the object directory of the main project file. When using a project file, test if there are any relative search path. Fail if there are any. When using a project file, fail if specified executable is relative path with directory information, and prepend executable, if not specified as an absolute path, with the exec directory. Make sure that only one -o switch is transmitted to the linker. * prj-attr.adb (Initialization_Data): Add project attribute Exec_Dir * prj-nmsc.adb: (Ada_Check): Get Spec_Suffix_Loc and Impl_Suffix_Loc, when using a non standard naming scheme. (Check_Ada_Naming_Scheme): Make sure that error messages do not raise exceptions. (Is_Illegal_Append): Return True if there is no dot in the suffix. (Language_Independent_Check): Check the exec directory. * prj.adb (Project_Empty): Add new component Exec_Directory * prj.ads: (Default_Ada_Spec_Suffix, Default_Ada_Impl_Suffix): Add defaults. (Project_Data): Add component Exec_Directory * snames.adb: Updated to match snames.ads revision 1.215 * snames.ads: Added Exec_Dir * make.adb: Minor reformatting * prj-nmsc.adb: Minor reformatting * snames.adb: Updated to match snames.ads * snames.ads: Alphebetize entries for project file * trans.c (process_freeze_entity): Do nothing if the entity is a subprogram that was already elaborated. * decl.c (gnat_to_gnu_entity, object): Do not back-annotate Alignment and Esize if object is referenced via pointer. From-SVN: r48127
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 6207cb76054..9cf7815b7c0 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -1060,12 +1060,15 @@ gnat_to_gnu_entity (gnat_entity, gnu_expr, definition)
}
/* Back-annotate the Alignment of the object if not already in the
- tree. Likewise for Esize if the object is of a constant size. */
- if (Unknown_Alignment (gnat_entity))
+ tree. Likewise for Esize if the object is of a constant size.
+ But if the "object" is actually a pointer to an object, the
+ alignment and size are the same as teh type, so don't back-annotate
+ the values for the pointer. */
+ if (! used_by_ref && Unknown_Alignment (gnat_entity))
Set_Alignment (gnat_entity,
UI_From_Int (DECL_ALIGN (gnu_decl) / BITS_PER_UNIT));
- if (Unknown_Esize (gnat_entity)
+ if (! used_by_ref && Unknown_Esize (gnat_entity)
&& DECL_SIZE (gnu_decl) != 0)
{
tree gnu_back_size = DECL_SIZE (gnu_decl);