diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-07 13:59:41 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-07 13:59:41 +0000 |
commit | 9c7948d7a0a3e5f334d33429484856ff2d29f9e2 (patch) | |
tree | 5922899f31cfff187cacf2e6f7dd4da6e87ec94a /gcc/ada/exp_ch7.adb | |
parent | e20c756c7a9b6ecbfc8ce0be8df0773e796370c0 (diff) | |
download | gcc-9c7948d7a0a3e5f334d33429484856ff2d29f9e2.tar.gz |
2014-11-07 Arnaud Charlet <charlet@adacore.com>
* debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding'
a keyword in Ada 95 mode when -gnatd.D is used.
* gnat_ugn.texi: Document -gnatd.D.
2014-11-07 Vasiliy Fofanov <fofanov@adacore.com>
* gnatls.adb: Lower severity of the program's return value in
some common cases.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Decorate_Type): The limited view of a tagged
type has an empty list of primitive operations.
2014-11-07 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK
RM.
(Process_Full_View): Update references to SPARK RM.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references
to SPARK RM.
(Analyze_Subprogram_Body_Helper): Update references
to SPARK RM.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update references
to SPARK RM.
* sem_prag.adb (Check_Ghost_Constituent): Update references to
SPARK RM.
* sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM.
(Resolve_Actuals): Ensure that the actual parameter of a Ghost
subprogram whose formal is of mode IN OUT or OUT is Ghost.
* sem_util.adb (Check_Ghost_Completion): Update references to
SPARK RM.
2014-11-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Make_Final_Call): If type of designated object is
derived from that of the formal of the Deep_Finalize procedure,
add an unchecked conversion to prevent spurious type error.
2014-11-07 Robert Dewar <dewar@adacore.com>
* table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb,
exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads:
Minor reformatting.
2014-11-07 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 8d5dd36aee8..4b2a4120949 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -3662,6 +3662,15 @@ package body Exp_Ch7 is Set_Etype (Arg, Ftyp); return Arg; + -- Otherwise, introduce a conversion when the designated object + -- has a type derived from the formal of the controlled routine. + + elsif Is_Private_Type (Ftyp) + and then Present (Atyp) + and then Is_Derived_Type (Underlying_Type (Base_Type (Atyp))) + then + return Unchecked_Convert_To (Ftyp, Arg); + else return Arg; end if; @@ -4769,11 +4778,14 @@ package body Exp_Ch7 is -- Generate: -- [Deep_]Finalize (Obj_Ref); + -- Set type of dereference, so that proper conversion are + -- generated when operation is inherited. Obj_Ref := New_Occurrence_Of (Obj_Id, Loc); if Is_Access_Type (Obj_Typ) then Obj_Ref := Make_Explicit_Dereference (Loc, Obj_Ref); + Set_Etype (Obj_Ref, Directly_Designated_Type (Obj_Typ)); end if; Append_To (Stmts, |