[Ada] Reuse Is_Rewrite_Substitution where possible
[gcc.git] / gcc / ada / ChangeLog
index e5b1868f67c5216805b0c0d6065eed4ff48e8313..8a5b510269d022e03928546283a1e80af54a3ed2 100644 (file)
@@ -1,3 +1,87 @@
+2018-05-30  Piotr Trojanek  <trojanek@adacore.com>
+
+       * errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
+       sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
+       (Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
+
+2018-05-30  Piotr Trojanek  <trojanek@adacore.com>
+
+       * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
+
+2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
+       in a separate routine.
+       (Is_Atomic_Object_Entity): New routine.
+       (Is_Atomic_Prefix): Cleaned up.
+       (Is_Synchronized_Object): Check that the object is atomic, or its type
+       is atomic.
+       (Object_Has_Atomic_Components): Removed.
+       * sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
+       (Is_Atomic_Object_Entity): New routine.
+
+2018-05-30  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Access_Subprogram_Declaration): The flag
+       Needs_Activation_Record is only needed on a subprogram type, not on a
+       pointer to such.
+       * sem_res.adb (Resolve_Selected_Component): If the context type and the
+       component type are anonymous access to subprograms, use the component
+       type to obtain the proper value of Needs_Activation_Record flag for the
+       expression.
+
+2018-05-30  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
+       comment about the memset case.
+
+2018-05-30  Bob Duff  <duff@adacore.com>
+
+       * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
+       to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
+       We need to analyze it as part of analyzing the block, so that if the
+       call to Element that initializes Elmt_Decl returns on the secondary
+       stack, the block will ss_mark/ss_release. This block is inside the
+       loop; we don't want to leak memory until the loop exits.  The purpose
+       of analyzing Elmt_Decl first was to catch the error of modifying it,
+       which is illegal because it's a loop parameter. The above causes us to
+       miss that error.  Therefore, we add a flag Is_Loop_Parameter, and set
+       it on the Element entity, so we end up with an E_Variable node with the
+       flag set.
+       * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
+       * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
+       parameter not allowed" error if Is_Loop_Parameter.
+       * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
+       trigger the call to Diagnose_Non_Variable_Lhs.
+
+2018-05-30  Arnaud Charlet  <charlet@adacore.com>
+
+       * checks.adb (Apply_Scalar_Range_Check):
+       * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
+       range values for System.Priority in CodePeer mode since the actual
+       target compiler may provide a wider range.
+
+2018-05-30  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_unst.adb: Search specification of main unit as well, for
+       unnesting.
+
+2018-05-30  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
+       a package body that is a compilation unit may contain blocks that
+       declare local subprograms.  In Subprogram_Unnesting Mode such
+       subprograms must be handled as nested inside the (implicit) elaboration
+       procedure that executes that statement part. To handle properly uplevel
+       references we construct that subprogram explicitly, to contain blocks
+       and inner subprograms, The statement part of the compilation unit
+       becomes a call to this subprogram. This is only done if blocks are
+       present in the statement list of the body.
+
+2018-05-30  Bob Duff  <duff@adacore.com>
+
+       * exp_ch7.adb: Minor comment fix.
+
 2018-05-30  Ed Schonberg  <schonberg@adacore.com>
 
        * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations