diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-06-16 10:19:51 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-06-16 12:19:51 +0200 |
commit | 36d3d5d3db9e70689f4eb47baf18f59d545e73ad (patch) | |
tree | 6345a720226036cb41895309c44054bab3970883 /gcc/ada/sem_util.ads | |
parent | 3455747810302e0540641aa7df9168443032ea71 (diff) | |
download | gcc-36d3d5d3db9e70689f4eb47baf18f59d545e73ad.zip gcc-36d3d5d3db9e70689f4eb47baf18f59d545e73ad.tar.gz gcc-36d3d5d3db9e70689f4eb47baf18f59d545e73ad.tar.bz2 |
sem_util.ads (Indexed_Component_Bit_Offset): Declare.
2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.ads (Indexed_Component_Bit_Offset): Declare.
* sem_util.adb (Indexed_Component_Bit_Offset): New
function returning the offset of an indexed component.
(Has_Compatible_Alignment_Internal): Call it.
* sem_ch13.adb (Offset_Value): New function returning the offset of an
Address attribute reference from the underlying entity.
(Validate_Address_Clauses): Call it and take the offset into
account for the size warning.
From-SVN: r237511
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index ea5f4e6..503c5eb 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1232,6 +1232,12 @@ package Sem_Util is -- partial view of the same entity. Note that Id may not have a partial -- view in which case the function returns Empty. + function Indexed_Component_Bit_Offset (N : Node_Id) return Uint; + -- Given an N_Indexed_Component node, return the first bit position of the + -- component if it is known at compile time. A value of No_Uint means that + -- either the value is not yet known before back-end processing or it is + -- not known at compile time after back-end processing. + procedure Inherit_Default_Init_Cond_Procedure (Typ : Entity_Id); -- Inherit the default initial condition procedure from the parent type of -- derived type Typ. |