From 2168d7cc3ba6f3b2280bfefcc8a789ea4d8d90a5 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 12 Jan 2017 15:40:14 +0100 Subject: [multiple changes] 2017-01-12 Hristian Kirtchev * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb, sem_ch13.adb: Minor reformatting. 2017-01-12 Hristian Kirtchev * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing adjustment primitive when the ancestor type was not properly frozen. (Gen_Assign): Guard against a missing initialization primitive when the component type was not properly frozen. (Initialize_Array_Component): Guard against a missing adjustment primitive when the component type was not properly frozen. (Initialize_Record_Component): Guard against a missing adjustment primitive when the component type was not properly frozen. (Process_Transient_Component_Completion): The transient object may not be finalized when its associated type was not properly frozen. * exp_ch3.adb (Build_Assignment): Guard against a missing adjustment primitive when the component type was not properly frozen. (Build_Initialization_Call): Guard against a missing initialization primitive when the associated type was not properly frozen. (Expand_N_Object_Declaration): Guard against a missing adjustment primitive when the base type was not properly frozen. (Predefined_Primitive_Bodies): Create an empty Deep_Adjust body when there is no adjustment primitive available. Create an empty Deep_Finalize body when there is no finalization primitive available. * exp_ch4.adb (Apply_Accessibility_Check): Guard against a missing finalization primitive when the designated type was not properly frozen. (Expand_N_Allocator): Guard against a missing initialization primitive when the designated type was not properly frozen. * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call only when the corresponding adjustment primitive is available. * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the adjustment/finalization statements only when there is an available primitive to carry out the action. (Build_Initialize_Statements): Generate the initialization/finalization statements only when there is an available primitive to carry out the action. (Make_Adjust_Call): Do not generate a call when the underlying type is not present due to a possible missing full view. (Make_Final_Call): Do not generate a call when the underlying type is not present due to a possible missing full view. (Make_Finalize_Address_Stmts): Generate an empty body when the designated type lacks a finalization primitive. (Make_Init_Call): Do not generate a call when the underlying type is not present due to a possible missing full view. (Process_Component_For_Adjust): Add the adjustment call only when the corresponding adjustment primitive is available. (Process_Component_For_Finalize): Add the finalization call only when the corresponding finalization primitive is available. (Process_Object_Declaration): Use a null statement to emulate a missing call to the finalization primitive of the object type. * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage. (Make_Final_Call): Update the comment on usage. (Make_Init_Call): Update the comment on usage. * exp_util.adb (Build_Transient_Object_Statements): Code reformatting. 2017-01-12 Arnaud Charlet * einfo.ads: Update documentation of Address_Taken. * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute [Access_Attribute]): Only consider 'Access/'Unchecked_Access for subprograms when setting Address_Taken flag. 2017-01-12 Patrick Bernardi * sem_ch10.adb (Analyze_With_Clause): Removed code that turned Configurable_Run_Time_Mode off when analysing with'ed predefined libraries. From-SVN: r244365 --- gcc/ada/sem_prag.adb | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'gcc/ada/sem_prag.adb') diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 6bf680f..37c206e 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -11828,33 +11828,30 @@ package body Sem_Prag is -- processing is required here. when Pragma_Assertion_Policy => Assertion_Policy : declare - procedure Resolve_Suppressible (Policy : Node_Id); -- Converts the assertion policy 'Suppressible' to either Check or - -- Ignore based on whether checks are suppressed via -gnatp or ??? + -- Ignore based on whether checks are suppressed via -gnatp. -------------------------- -- Resolve_Suppressible -- -------------------------- procedure Resolve_Suppressible (Policy : Node_Id) is + Arg : constant Node_Id := Get_Pragma_Arg (Policy); Nam : Name_Id; - ARG : constant Node_Id := Get_Pragma_Arg (Policy); begin - if Chars (Expression (Policy)) = Name_Suppressible then - - -- Rewrite the policy argument node to either Ignore or - -- Check. This is done because the argument is referenced - -- directly later during analysis. + -- Transform policy argument Suppressible into either Ignore or + -- Check depending on whether checks are enabled or suppressed. + if Chars (Arg) = Name_Suppressible then if Suppress_Checks then Nam := Name_Ignore; else Nam := Name_Check; end if; - Rewrite (ARG, Make_Identifier (Sloc (ARG), Nam)); + Rewrite (Arg, Make_Identifier (Sloc (Arg), Nam)); end if; end Resolve_Suppressible; @@ -20608,9 +20605,8 @@ package body Sem_Prag is Arg := Get_Pragma_Arg (Arg1); Ent := Defining_Identifier (Parent (P)); - -- The expression must be analyzed in the special - -- manner described in "Handling of Default Expressions" - -- in sem.ads. + -- The expression must be analyzed in the special manner + -- described in "Handling of Default Expressions" in sem.ads. Preanalyze_Spec_Expression (Arg, Any_Integer); -- cgit v1.1