aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/trans.c
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2007-09-26 12:42:20 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-09-26 12:42:20 +0200
commit6e818918f2c6dab5258d709562aad8a836feaa1f (patch)
tree781d59ae00b077715bca0d62ce1d0e3e26fa5570 /gcc/ada/trans.c
parente29bd38f96e9c8a9bd6ba0d12a73dee3794f4895 (diff)
downloadgcc-6e818918f2c6dab5258d709562aad8a836feaa1f.zip
gcc-6e818918f2c6dab5258d709562aad8a836feaa1f.tar.gz
gcc-6e818918f2c6dab5258d709562aad8a836feaa1f.tar.bz2
a-tags.adb:
2007-09-26 Javier Miranda <miranda@adacore.com> Eric Botcazou <ebotcazou@adacore.com> * a-tags.adb: (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of indirection added to the HT_Link component of the TSD. This is required to statically allocate the TSD. * a-tags.ads: Minor reordering of the declarations in the private part. Required to add a level of indirection to the contents of the TSD component HT_Link. This is required to statically allocate the TSD. * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with Is_Statically_Allocated set from constant objects. Do not make exported constants created by the compiler volatile. (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken as read-only. * trans.c (Identifier_to_gnu): For constants, unshare initializers before returning them. * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the public part of the package. (Make_DT): Move HT_Link component out of the TSD record. For this purpose Make_DT now declares a separate object that stores the HT_Link value, and initializes the TSD component with the address of this new object. The addition of this level of indirection is required to statically allocate the TSD because the TSD cannot have variable components. (Expand_Interface_Conversion): Improve the expanded code. (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity. * sem_disp.adb (Check_Dispatching_Operation): In case of a body declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---, if we are building static dispatch tables then we must not generate extra code to register the primitive because the dispatch table will be built at the end of the library package; otherwise we notify that we cannot build the static dispatch table. From-SVN: r128784
Diffstat (limited to 'gcc/ada/trans.c')
-rw-r--r--gcc/ada/trans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index e6f9ef8..36177e2 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -626,7 +626,7 @@ Identifier_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p)
Is_Aliased (gnat_temp));
if (!object || !parent_requires_lvalue)
- gnu_result = DECL_INITIAL (gnu_result);
+ gnu_result = unshare_expr (DECL_INITIAL (gnu_result));
}
*gnu_result_type_p = gnu_result_type;