From 719597478b507d1c4f83918e210870a94bc67b7f Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 31 Jul 2014 12:26:19 +0000 Subject: 2014-07-31 Ed Schonberg * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb. * sem_util.adb (Find_Specific_Type): If type is untagged private, retrieve full view so that primitive operations can be located. * exp_disp.adb Move Find_Specific_Type to sem_util. * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use Find_Specific_Type to locate primitive equality. * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent type does not require initialization. * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance body all visibility is established, and the enclosing package declarations must not be installed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213345 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/exp_util.adb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gcc/ada/exp_util.adb') diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index c50a6cd2f4c..a61efab750d 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -5860,10 +5860,14 @@ package body Exp_Util is Set_Is_Class_Wide_Equivalent_Type (Equiv_Type); + -- A class_wide equivalent type does not require initialization + + Set_Suppress_Initialization (Equiv_Type); + if not Is_Interface (Root_Typ) then Append_To (Comp_List, Make_Component_Declaration (Loc, - Defining_Identifier => + Defining_Identifier => Make_Defining_Identifier (Loc, Name_uParent), Component_Definition => Make_Component_Definition (Loc, @@ -5882,9 +5886,9 @@ package body Exp_Util is Append_To (List_Def, Make_Full_Type_Declaration (Loc, Defining_Identifier => Equiv_Type, - Type_Definition => + Type_Definition => Make_Record_Definition (Loc, - Component_List => + Component_List => Make_Component_List (Loc, Component_Items => Comp_List, Variant_Part => Empty)))); -- cgit v1.2.1