aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-12-21 22:02:45 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-12-21 22:02:45 +0000
commit0e5b9de3128a989de7438db0930b9800e7e0f4c8 (patch)
treec6dbdab5d4331e0b739e2aad47318d678ab59109 /gcc/ada
parent92cd3a86d1fc9d60a7733b82d01f9ff1d2a91547 (diff)
downloadgcc-0e5b9de3128a989de7438db0930b9800e7e0f4c8.zip
gcc-0e5b9de3128a989de7438db0930b9800e7e0f4c8.tar.gz
gcc-0e5b9de3128a989de7438db0930b9800e7e0f4c8.tar.bz2
decl.c (gnat_to_gnu_entity): Always take into account the Esize if it is known.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always take into account the Esize if it is known. From-SVN: r255958
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 13a0c80..c95d1fc 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always take
+ into account the Esize if it is known.
+
2017-12-21 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 20d35f3..ab5fb0e 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -723,7 +723,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
TYPE_ALIGN (gnu_type));
/* Likewise, if a size is specified, use it if valid. */
- if (Known_Esize (gnat_entity) && No (Address_Clause (gnat_entity)))
+ if (Known_Esize (gnat_entity))
gnu_size
= validate_size (Esize (gnat_entity), gnu_type, gnat_entity,
VAR_DECL, false, Has_Size_Clause (gnat_entity));