summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch9.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-19 10:54:36 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-19 10:54:36 +0000
commitd4b026c15fdd0957de6d579ec01628981ade8fdd (patch)
tree3dc69a796350c5398ef3695ee47179b993e295a9 /gcc/ada/exp_ch9.adb
parent64cdcce7804020ce87ad330052dd25eeb5d0a3ca (diff)
downloadgcc-d4b026c15fdd0957de6d579ec01628981ade8fdd.tar.gz
2009-06-19 Robert Dewar <dewar@adacore.com>
* sem_type.ads, sem_ch12.adb: Minor reformatting * s-wchcnv.adb (UTF_32_To_Char_Sequence): Handle invalid data properly 2009-06-19 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Wrapper_Spec): Handle properly an overridden primitive operation of a rivate extension whose controlling argument is an out parameter. * sem.adb (Walk_Library_Units): exclude generic package declarations from check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r--gcc/ada/exp_ch9.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index ddaa632f0ba..aa69402723a 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -2073,14 +2073,15 @@ package body Exp_Ch9 is
Parameter_Type => Obj_Param_Typ);
-- If we are dealing with a primitive declared between two views,
- -- create a default parameter.
+ -- create a default parameter. The mode of the parameter must
+ -- match that of the primitive operation.
else pragma Assert (Is_Private_Primitive_Subprogram (Subp_Id));
Obj_Param :=
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uO),
- In_Present => True,
+ In_Present => In_Present (Parent (First_Entity (Subp_Id))),
Out_Present => Ekind (Subp_Id) /= E_Function,
Parameter_Type => New_Reference_To (Obj_Typ, Loc));
end if;