diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-06 10:20:44 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-06 10:20:44 +0000 |
commit | 7e0d01bfbc5f5610cd3448e71cb4c595c3aff091 (patch) | |
tree | 19e553bfc8fc773dca0168fb2791706a2c396f13 /gcc/ada/exp_disp.adb | |
parent | 86affdbda25a17db8f0915990768d3d69dcd4fc0 (diff) | |
download | gcc-7e0d01bfbc5f5610cd3448e71cb4c595c3aff091.tar.gz |
2015-01-06 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
order to native from default, make sure to also adjust bit order.
* exp_aggr.adb: Minor reformatting.
2015-01-06 Robert Dewar <dewar@adacore.com>
* s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
s-valrea.adb, s-valrea.ads: Add some additional guards for
Str'Last = Positive'Last.
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
subprograms.
2015-01-06 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219250 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_disp.adb')
-rw-r--r-- | gcc/ada/exp_disp.adb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 99105e0ea4f..905311b6eb9 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -1138,6 +1138,25 @@ package body Exp_Disp is Operand_Typ := Base_Type (Corresponding_Record_Type (Operand_Typ)); end if; + -- No displacement of the pointer to the object needed when the type of + -- the operand is not an interface type and the interface is one of + -- its parent types (since they share the primary dispatch table). + + declare + Opnd : Entity_Id := Operand_Typ; + + begin + if Is_Access_Type (Opnd) then + Opnd := Designated_Type (Opnd); + end if; + + if not Is_Interface (Opnd) + and then Is_Ancestor (Iface_Typ, Opnd, Use_Full_View => True) + then + return; + end if; + end; + -- Evaluate if we can statically displace the pointer to the object declare |