[Ada] Reuse Is_Rewrite_Substitution where possible
[gcc.git] / gcc / ada / ChangeLog
index fe5b58b1b0e2a1fa094ebe36b6447ebe11dc5598..8a5b510269d022e03928546283a1e80af54a3ed2 100644 (file)
@@ -1,3 +1,185 @@
+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
+       that have no corresponding body and appear as attributes of the
+       corresponding wrapper package declaration.
+       (Register_Subprogram): New subprogram, used for subprogram bodies and
+       for subprogram instantiations to enter callable entity into Subp table.
+
+2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * libgnat/s-secsta.adb: Reimplement the secondary stack support.
+       * libgnat/s-secsta.ads: Update the documentation of all routines in the
+       public part of the package.  Reimplement the private part of the
+       package to account for the new secondary stack structure.  Add types
+       and subprograms for testing purposes.  Add several documentation
+       sections.
+
+2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
+       exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
+       libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
+       sem_disp.ads, sem_util.adb: Minor reformatting.
+
+2018-05-30  Arnaud Charlet  <charlet@adacore.com>
+
+       * gcc-interface/Makefile.in: Move special flags for Ada runtime files
+       from here...
+       * Makefile.rtl: ... to here.  Update comments.  Protect call to
+       "GCC_FOR_TARGET" in case target_os isn't defined.
+
+2018-05-30  Arnaud Charlet  <charlet@adacore.com>
+
+       * gcc-interface/Makefile.in: Move target pair settings from here...
+       * Makefile.rtl: ... to here.
+       (setup-rts): New target.
+
+2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
+       List of All Switches): Replace "modules" with "units".
+       (Subprogram Inlining Control): Likewise.
+       * gnat_ugn.texi: Regenerate.
+       * usage.adb (Usage): Fix description of -gnatn switch.
+
+2018-05-29  Arnaud Charlet  <charlet@adacore.com>
+
+       * gcc-interface/Makefile.in: Fix typos.
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
+       the finalizer procedure in the At_End handler, for use in LLVM
+       generation.
+
+2018-05-29  Javier Miranda  <miranda@adacore.com>
+
+       * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
+       subprogram Inherits_From_Tagged_Full_View to identify more reliably
+       untagged private types completed with a derivation of an untagged
+       private whose full view is a tagged type.
+       * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
+       subprogram.
+       (Collect_Primitive_Operations): Handle untagged private types completed
+       with a derivation of an untagged private type whose full view is a
+       tagged type. In such case, collecting the list of primitives we may
+       find two equality primitives: one associated with the untagged private
+       and another associated with the ultimate tagged type (and we must
+       remove from the returned list this latter one).
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_unst.adb (Visit_Node): Handle statement sequences that include an
+       At_End handler.
+
+2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * repinfo.adb (List_Entities): Also recurse into blocks without label.
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
+       exceptions if subprogram unnesting is in effect, because these branch
+       nodes are relevant only in the presence of nested subprograms.
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * libgnat/s-fatgen.adb (Succ, Pred):  Raise Constraint_Error
+       unconditionally when applied to the largest positive (resp. largest
+       negative) value of a floating-point type.
+
+2018-05-29  Ed Schonberg  <schonberg@adacore.com>
+
+       * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
+       discriminants and exceptions are never components of such.  The flag
+       Needs_Activation_Record is set on subprogram types, not on access to
+       them.
+
 2018-05-29  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch3.adb: Set scope of component of subtype.