+2019-08-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Object_Declaration): If actual type is
+ private and distinct from nominal type in declaration, propagate
+ flags Is_Constr_Subt_For_U_Nominal and _UN_Aliased to full view
+ of private type.
+
2019-08-20 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_Loop_Entry_Attribute): When expanding a
-- Save the Ghost-related attributes to restore on exit
Related_Id : Entity_Id;
+ Full_View_Present : Boolean := False;
-- Start of processing for Analyze_Object_Declaration
Act_T := Find_Type_Of_Object (Object_Definition (N), N);
end if;
+ -- Propagate attributes to full view when needed.
+
Set_Is_Constr_Subt_For_U_Nominal (Act_T);
+ if Is_Private_Type (Act_T) and then Present (Full_View (Act_T))
+ then
+ Full_View_Present := True;
+ end if;
+
+ if Full_View_Present then
+ Set_Is_Constr_Subt_For_U_Nominal (Full_View (Act_T));
+ end if;
+
if Aliased_Present (N) then
Set_Is_Constr_Subt_For_UN_Aliased (Act_T);
+
+ if Full_View_Present then
+ Set_Is_Constr_Subt_For_UN_Aliased (Full_View (Act_T));
+ end if;
end if;
Freeze_Before (N, Act_T);