Age | Commit message (Collapse) | Author | Files | Lines |
|
2017-10-14 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
enabling b-i-p for nonlimited controlled types (but disabled).
2017-10-14 Justin Squirek <squirek@adacore.com>
* sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
Has_Warnings_Off with Warnings_Off.
2017-10-14 Piotr Trojanek <trojanek@adacore.com>
* sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
enclosing package at the end of the visible declarations.
* sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
an initialization item which is undefined due to some illegality.
2017-10-14 Patrick Bernardi <bernardi@adacore.com>
* ali.adb: Add new ALI line 'T' to read the number of tasks contain
within each unit that require a default-sized primary and secondary
stack to be generated by the binder.
(Scan_ALI): Scan new 'T' lines.
* ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
* bindgen.adb (Gen_Output_File): Count the number of default-sized
stacks within the closure that are to be created by the binder.
(Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
stacks and record these in System.Secodnary_Stack.
(Resolve_Binder_Options): Check if System.Secondary_Stack is in the
closure of the program being bound.
* bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
* exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
(Expand_N_Object_Declaration): Count the number of default-sized stacks
used by task objects contained within the object whose declaration is
being expanded. Only performed when either the restrictions
No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
effect.
* exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
(Expand_N_Task_Type_Declaration): Create a secondary stack as part of
the expansion of a task type if the size of the stack is known at
run-time and the restrictions No_Implicit_Heap_Allocations or
No_Implicit_Task_Allocations are in effect.
(Make_Task_Create_Call): If using a restricted profile provide
secondary stack parameter: either the statically created stack or null.
* lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
Unit_Record initialization expressions.
* lib-writ.adb (Add_Preprocessing_Dependency,
Ensure_System_Dependency): Include Primary_Stack_Count and
Sec_Stack_Count in Unit_Record initialization expression.
(Write_ALI): Write T lines.
(Write_Unit_Information): Do not output 'T' lines if there are no
stacks for the binder to generate.
* lib-writ.ads: Updated library information documentation to include
new T line entry.
* lib.adb (Increment_Primary_Stack_Count): New routine.
(Increment_Sec_Stack_Count): New routine.
(Primary_Stack_Count): New routine.
(Sec_Stack_Count): New routine.
* lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
Unit_Record and updated documentation.
(Increment_Primary_Stack_Count): New routine along with pragma Inline.
(Increment_Sec_Stack_Count): New routine along with pragma Inline.
(Primary_Stack_Count): New routine along with pragma Inline.
(Sec_Stack_Count): New routine along with pragma Inline.
* opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
redefined. New flag Default_Sec_Stack_Size and
Quantity_Of_Default_Size_Sec_Stacks.
* rtfinal.c Fixed erroneous comment.
* rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
* sem_util.adb (Number_Of_Elements_In_Array): New routine.
* sem_util.ads (Number_Of_Elements_In_Array): New routine.
* switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
* libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
(Set_Sec_Stack_Addr): Removed routine.
(Get_Sec_Stack): New routine.
(Set_Sec_Stack): New routine.
(Init_Tasking_Soft_Links): Update System.Soft_Links reference to
reflect new procedure and global names.
* libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
parameter profile to allow the secondary stack size to be specified.
* libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
call to remove Secondary_Stack_Size reference. Add secondary stack
address and size to SSL.Create_TSD call.
(Task_Wrapper): Remove secondary stack creation.
* libgnarl/s-tarest.ads (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Update parameter profile to include
Sec_Stack_Address and clarify the Size parameter.
* libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
from profile and body.
(Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
* libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
Common_ATCB.
(Initialize_ATCB): Update the parameter profile to remove
Secondary_Stack_Size.
* libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
call to Initialize_ATCB. Add secondary stack address and size to
SSL.Create_TSD call, and catch any storage exception from the call.
(Finalize_Global_Tasks): Update System.Soft_Links references to reflect
new subprogram and component names.
(Task_Wrapper): Remove secondary stack creation.
(Vulnerable_Complete_Master): Update to reflect TSD changes.
* libgnarl/s-tassta.ads: Reformat comments.
(Create_Task): Update parameter profile.
* libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
profile to include secondary stack size. Remove secondary size
parameter from Initialize_ATCB call and add it to Create_TSD call.
* libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
* libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
Sec_Stack_Dynamic.
(Default_Sec_Stack_Size): New routine.
* libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
now Preelaborate.
* libgnat/s-soflin.adb: Removed unused with-clauses. With
System.Soft_Links.Initialize to initialize non-tasking TSD.
(Create_TSD): Update parameter profile. Initialize the TSD and
unconditionally call SS_Init.
(Destroy_TSD): Update SST.SS_Free call.
(Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
Set_Sec_Stack_Addr_Soft): Remove routines.
(Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
Set_Sec_Stack_Soft): Add routines.
(NT_TSD): Move to private part of package specification.
* libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
objects to *_Sec_Stack_*. TSD: removed warning suppression and
component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
(Create_TSD): Update parameter profile.
(NT_TSD): Move to private section from body.
* libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
* libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
* libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
Remove routine.
(Get_Sec_Stack, Set_Sec_Stack): Add routine.
(Thread_Body_Enter): Update parameter profile and body to adapt to new
System.Secondary_Stack.
(Init_RTS): Update body for new System.Soft_Links names.
* gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
s-soliin.o.
From-SVN: r253754
|
|
2017-10-09 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb: Rename Uses_Unseen_Priv into
Contains_Lib_Incomplete_Type.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
sem_ch10.adb, par-ch8.adb: Minor reformatting.
From-SVN: r253566
|
|
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
Defining_Identifier (Obj_Decl) in two places, because it might have
changed.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
involving 'Input on (not visibly) derived types.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* atree.adb: Add new soft link Rewriting_Proc.
(Rewrite): Invoke the subprogram attached to the rewriting soft link.
(Set_Rewriting_Proc): New routine.
* attree.ads: Add new access-to-subprogram type Rewrite_Proc.
(Set_Rewriting_Proc): New routine.
* checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
for *E*laboration flag to maintain consistency with other elaboration
flag generating subprograms.
* debug.adb: Document the new usage of flag -gnatdL.
* einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
as Protected_Subprogram. Flag148 is now used as
Is_Elaboration_Checks_OK_Id. Flag302 is now used as
Is_Initial_Condition_Procedure.
(Is_Elaboration_Checks_OK_Id): New routine.
(Is_Initial_Condition_Procedure): New routine.
(Protected_Subprogram): New routine.
(Receiving_Entry): New routine.
(SPARK_Pragma): Update assertion.
(SPARK_Pragma_Inherited): Update assertion.
(Suppress_Elaboration_Warnings): Removed.
(Set_Is_Elaboration_Checks_OK_Id): New routine.
(Set_Is_Initial_Condition_Procedure): New routine.
(Set_Protected_Subprogram): New routine.
(Set_Receiving_Entry): New routine.
(Set_SPARK_Pragma): Update assertion.
(Set_SPARK_Pragma_Inherited): Update assertion.
(Write_Entity_Flags): Update the output for Flag148 and Flag302.
(Write_Field19_Name): Add output for Receiving_Entry.
(Write_Field39_Name): Add output for Protected_Subprogram.
(Write_Field40_Name): Update the output for SPARK_Pragma.
* einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
Remove attribute Suppress_Elaboration_Warnings. Update the stricture
of various entities.
(Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
(Is_Initial_Condition_Procedure): New routine along with pragma Inline.
(Protected_Subprogram): New routine along with pragma Inline.
(Receiving_Entry): New routine along with pragma Inline.
(Suppress_Elaboration_Warnings): Removed.
(Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
Inline.
(Set_Is_Initial_Condition_Procedure): New routine along with pragma
Inline.
(Set_Protected_Subprogram): New routine along with pragma Inline.
(Set_Receiving_Entry): New routine along with pragma Inline.
(Set_Suppress_Elaboration_Warnings): Removed.
* exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
consistency with other finalizer generating subprograms.
(Default_Initialize_Object): Mark the block which wraps the call to
finalize as being part of initialization.
* exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
Initial_Condition.
(Expand_N_Package_Body): Directly expand pragma Initial_Condition.
(Next_Suitable_Statement): Update the comment on usage. Skip over call
markers generated by the ABE mechanism.
* exp_ch9.adb (Activation_Call_Loc): New routine.
(Add_Accept): Link the accept procedure to the original entry.
(Build_Protected_Sub_Specification): Link the protected or unprotected
version to the original subprogram.
(Build_Task_Activation_Call): Code cleanup. Use a source location which
is very close to the "begin" or "end" keywords when generating the
activation call.
* exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
* exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
process loops.
(Expand_SPARK_N_Loop_Statement): New routine.
(Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
call to the Default_Initial_Condition procedure.
(Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
* exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
effect.
(Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
(Insert_Actions): Add processing for N_Call_Marker.
(Kill_Dead_Code): Explicitly kill an elaboration scenario.
* exp_util.ads (Make_Invariant_Call): Update the comment on usage.
* frontend.adb: Initialize Sem_Elab. Process all saved top level
elaboration scenarios for ABE issues.
* gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
nodes.
* lib.adb (Earlier_In_Extended_Unit): New variant.
* sem.adb (Analyze): Ignore N_Call_Marker nodes.
(Preanalysis_Active): New routine.
* sem.ads (Preanalysis_Active): New routine.
* sem_attr.adb (Analyze_Access_Attribute): Save certain
elaboration-related attributes. Save the scenario for ABE processing.
* sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
effect. Save certain elaboration-related attributes.
* sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
attributes. Save the scenario for ABE processing.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
mode in effect. Save certain elaboration-related attributes.
(Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
locating the first real statement.
(Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
certain elaboration-related attributes.
* sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
elaboration warnings.
* sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
generated for purposes of wrapping an attribute used as a generic
actual.
(Find_Direct_Name): Save certain elaboration-related attributes. Save
the scenario for ABE processing.
(Find_Expanded_Name): Save certain elaboration-related attributes. Save
the scenario for ABE processing.
* sem_ch9.adb (Analyze_Entry_Declaration): Save certain
elaboration-related attributes.
(Analyze_Requeue): Save certain elaboration-related attributes. Save
the scenario for ABE processing.
(Analyze_Single_Task_Declaration): Save certain elaboration-related
attributes.
(Analyze_Task_Type_Declaration): Save certain elaboration-related
attributes.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
elaboration-related attributes.
(Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
effect. Save certain elaboration-related attributes.
(Analyze_Package_Instantiation): Save certain elaboration-related
attributes. Save the scenario for ABE processing. Create completing
bodies in case the instantiation results in a guaranteed ABE.
(Analyze_Subprogram_Instantiation): Save certain elaboration-related
attributes Save the scenario for ABE processing. Create a completing
body in case the instantiation results in a guaranteed ABE.
(Provide_Completing_Bodies): New routine.
* sem_elab.ads: Brand new implementation.
* sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
Elaborate_Body): Do not suppress elaboration warnings.
* sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
operator.
(Resolve_Call): Save certain elaboration-related attributes. Save the
scenario for ABE processing.
(Resolve_Entity_Name): Do not perform any ABE processing here.
(Resolve_Entry_Call): Inherit certain attributes from the original call.
* sem_util.adb (Begin_Keyword_Location): New routine.
(Defining_Entity): Update the parameter profile. Add processing for
concurrent subunits that are rewritten as null statements.
(End_Keyword_Location): New routine.
(Find_Enclosing_Scope): New routine.
(In_Instance_Visible_Part): Code cleanup.
(In_Subtree): Update the parameter profile. Add new version.
(Is_Preelaborable_Aggregate): New routine.
(Is_Preelaborable_Construct): New routine.
(Mark_Elaboration_Attributes): New routine.
(Scope_Within): Update the parameter profile.
(Scope_Within_Or_Same): Update the parameter profile.
* sem_util.ads (Begin_Keyword_Location): New routine.
(Defining_Entity): Update the parameter profile and the comment on
usage.
(End_Keyword_Location): New routine.
(Find_Enclosing_Scope): New routine.
(In_Instance_Visible_Part): Update the parameter profile.
(In_Subtree): Update the parameter profile. Add new version.
(Is_Preelaborable_Aggregate): New routine.
(Is_Preelaborable_Construct): New routine.
(Mark_Elaboration_Attributes): New routine.
(Scope_Within): Update the parameter profile and the comment on usage.
(Scope_Within_Or_Same): Update the parameter profile and the comment on
usage.
* sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
to determine whether a loop has meaningful condition actions.
(Has_Condition_Actions): New routine.
* sinfo.adb (ABE_Is_Certain): Removed.
(Is_Declaration_Level_Node): New routine.
(Is_Dispatching_Call): New routine.
(Is_Elaboration_Checks_OK_Node): New routine.
(Is_Initialization_Block): New routine.
(Is_Known_Guaranteed_ABE): New routine.
(Is_Recorded_Scenario): New routine.
(Is_Source_Call): New routine.
(Is_SPARK_Mode_On_Node): New routine.
(No_Elaboration_Check): Removed.
(Target): New routine.
(Was_Attribute_Reference): New routine.
(Set_ABE_Is_Certain): Removed.
(Set_Is_Declaration_Level_Node): New routine.
(Set_Is_Dispatching_Call): New routine.
(Set_Is_Elaboration_Checks_OK_Node): New routine.
(Set_Is_Initialization_Block): New routine.
(Set_Is_Known_Guaranteed_ABE): New routine.
(Set_Is_Recorded_Scenario): New routine.
(Set_Is_Source_Call): New routine.
(Set_Is_SPARK_Mode_On_Node): New routine.
(Set_No_Elaboration_Check): Removed.
(Set_Target): New routine.
(Set_Was_Attribute_Reference): New routine.
* sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
Do_Discriminant_Check now utilizes Flag3. Attribute
No_Side_Effect_Removal now utilizes Flag17. Add new node
N_Call_Marker. Update the structure of various nodes.
(ABE_Is_Certain): Removed along with pragma Inline.
(Is_Declaration_Level_Node): New routine along with pragma Inline.
(Is_Dispatching_Call): New routine along with pragma Inline.
(Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
(Is_Initialization_Block): New routine along with pragma Inline.
(Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
(Is_Recorded_Scenario): New routine along with pragma Inline.
(Is_Source_Call): New routine along with pragma Inline.
(Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
(No_Elaboration_Check): Removed along with pragma Inline.
(Target): New routine along with pragma Inline.
(Was_Attribute_Reference): New routine along with pragma Inline.
(Set_ABE_Is_Certain): Removed along with pragma Inline.
(Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
(Set_Is_Dispatching_Call): New routine along with pragma Inline.
(Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
Inline.
(Set_Is_Initialization_Block): New routine along with pragma Inline.
(Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
(Set_Is_Recorded_Scenario): New routine along with pragma Inline.
(Set_Is_Source_Call): New routine along with pragma Inline.
(Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
(Set_No_Elaboration_Check): Removed along with pragma Inline.
(Set_Target): New routine along with pragma Inline.
(Set_Was_Attribute_Reference): New routine along with pragma Inline.
* sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
From-SVN: r253559
|
|
2017-09-25 Justin Squirek <squirek@adacore.com>
* aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
Removal of ineffective use-clauses.
* exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
constant folded barriers.
* ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
Subtype_Marks and Names list in use-clause nodes to their new singular
counterparts (e.g. Subtype_Mark, Name).
* par.adb, par-ch8.adb (Append_Use_Clause): Created to set
Prev_Ids and More_Ids in use-clause nodes.
(P_Use_Clause): Modify to take a list as a parameter.
(P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
subtype_marks within an aggregate use-clauses into individual clauses.
* par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
P_Use_Clause to match its new behavior.
* sem.adb (Analyze): Mark use clauses for non-overloaded entities.
* sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
errors.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
the declarative region.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
after analysis (Analyze_Package_Specification): Update use clause chain
when there is no body.
* sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
parameter to determine weither the installation of scopes should also
propagate on the use-clause "chain".
(Mark_Use_Clauses): Created to traverse use-clause chains and determine
what constitutes a valid "use" of a clause.
(Update_Use_Clause_Chain): Created to aggregate common machinary used
to clean up use-clause chains (and warn on ineffectiveness) at the end
of declaritive regions.
* sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
package name from a use-package clause.
(Analyze_Package_Name_List): Created to perform analysis on a list of
package names (similar to Analyze_Package_Name).
(Find_Most_Prev): Created to traverse to the beginning of a given
use-clause chain.
(Most_Decendant_Use_Clause): Create to identify which clause from a
given set is highest in scope (not always the most prev).
(Use_One_Package, Use_One_Type): Major cleanup and reorganization to
handle the new chaining algorithm, also many changes related to
redundant clauses. A new parameter has also been added to force
installation to handle certain cases.
* sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
Analyze_Task_Body): Mark use clauses on relevant entities.
* sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
Install_Parents): Add parameter to determine weither the installation
of scopes should also propagate on the use-clause "chain".
* sem_ch12.adb (Inline_Instance_Body): Add flag in call to
Install_Context to avoid redundant chaining of use-clauses.
* sem_ch13.adb: Minor reformatting.
* sem_res.adb (Resolve): Mark use clauses on operators.
(Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
entities.
* sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
represent any given clause's usage/reference/necessity.
(Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
nodes to allow loose chaining of redundant clauses.
(Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
Set_More_Ids, Set_Name): Modify set procedure calls to reflect
reorganization in node fields.
* types.ads (Source_File_Index): Adjust index bounds.
(No_Access_To_Source_File): New constant.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
the expression to be used in the generated attribute specification
(rather than relocating it) to avoid resolving a potentially malformed
tree when the expression is resolved through an ASIS-specific call to
Resolve_Aspect_Expressions. This manifests itself as a crash on a
function with parameter associations.
From-SVN: r253144
|
|
types in the access-to-access case.
gcc/ada/
2017-09-18 Bob Duff <duff@adacore.com>
* sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
reference types in the access-to-access case.
2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
of the "aliased" keyword on the prefix from here to...
(Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
to Check_No_Implicit_Aliasing.
* sinfo.ads (Non_Aliased_Prefix): Delete.
(Set_Non_Aliased_Prefix): Likewise.
* sinfo.adb (Non_Aliased_Prefix): Delete.
(Set_Non_Aliased_Prefix): Likewise.
2017-09-18 Bob Duff <duff@adacore.com>
* exp_ch5.adb (Build_Formal_Container_Iteration,
Expand_Formal_Container_Element_Loop): Convert the container to the
root type before passing it to the iteration operations, so it will be
of the right type.
2017-09-18 Bob Duff <duff@adacore.com>
* einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2017-09-18 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
and it's a bit-packed array, pass False to the Consider_IS parameter of
Needs_Simple_Initialization.
2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
the preexisting body.
* sem_prag.adb (Check_Inline_Always_Placement): New routine.
(Process_Inline): Verify the placement of pragma Inline_Always. The
pragma must now appear on the initial declaration of the related
subprogram.
2017-09-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
declarative list in a subprogram body, analyze aspext specifications to
provide basic semantic information, because otherwise the aspect
specifications might only be snalyzed during expansion, when related
subprograms are generated.
2017-09-18 Bob Duff <duff@adacore.com>
* exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
validity checks have rewritten the tree.
2017-09-18 Bob Duff <duff@adacore.com>
* sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2017-09-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Save_References_In_Aggregate): When constructing a
qualified exxpression for an aggregate in a generic unit, verify that
the scope of the type is itself visible and not hidden, so that the
qualified expression is correctly resolved in any instance.
gcc/testsuite/
2017-09-18 Bob Duff <duff@adacore.com>
* gnat.dg/validity_check.adb: New testcase.
2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/overload.ads, gnat.dg/overload.adb: New testcase.
2017-09-18 Bob Duff <duff@adacore.com>
* gnat.dg/tagged_prefix_call.adb: New testcase.
From-SVN: r252916
|
|
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Copy_Node_With_Replacement):
Update the Renamed_Object field of a replicated object renaming
declaration.
2017-09-08 Patrick Bernardi <bernardi@adacore.com>
* exp_ch9.adb (Is_Pure_Barrier): Allow type
conversions and components of objects. Simplified the detection
of the Count attribute by identifying the corresponding run-time
calls.
2017-09-08 Yannick Moy <moy@adacore.com>
* exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
sem_type.adb, sinfo.ads: Minor reformatting.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
of Freeze_Profile, used to inhibit the freezing of the profile
of an expression function declared within a nested package, when
some type in the profile depends on a private type declared in
an enclosing package.
2017-09-08 Bob Duff <duff@adacore.com>
* gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
the subunit case. It's still OK to set it in the "missing subunits"
case, because that won't cause the obsolete .ali files that cause
confusion.
2017-09-08 Bob Duff <duff@adacore.com>
* sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
unclear why this didn't cause a warning.
* a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
pragmas. It's unclear why this didn't cause an error.
From-SVN: r251869
|
|
2017-05-02 Tristan Gingold <gingold@adacore.com>
* s-trasym.ads: Add comment.
2017-05-02 Bob Duff <duff@adacore.com>
* sem_elab.adb, sem_elab.ads: Minor comment fixes.
* sem_ch4.adb: Minor reformatting.
* s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
* s-taspri-posix-noaltstack.ads: Minor refactoring.
* sinput.ads: Minor typo fix.
2017-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Discriminated_Size): Moved to sem_util.
* sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
here from exp_ch9, to recognize objects whose creation requires
dynamic allocation, so that the proper warning can be emitted
when restriction No_Implicit_Heap_Allocation is in effect.
* sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
to emit proper warning when an object that requires dynamic
allocation is declared.
From-SVN: r247472
|
|
2017-04-28 Bob Duff <duff@adacore.com>
* sem_util.ads, sem_util.adb (Might_Raise): New function
that replaces Is_Exception_Safe, but has the opposite
sense. Is_Exception_Safe was missing various cases -- calls inside
a pragma Debug, calls inside an 'if' or assignment statement,
etc. Might_Raise now walks the entire subtree looking for things
that can raise.
* exp_ch9.adb (Is_Exception_Safe): Remove.
(Build_Protected_Subprogram_Body): Replace call to
Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
constants where possible).
* exp_ch7.adb: Rename Is_Protected_Body -->
Is_Protected_Subp_Body. A protected_body is something different
in the grammar.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
* par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
(P_Discrete_Choice_List): Initialize Expr_Node variable.
* par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
(P_Protected): Likewise.
* sem_case.adb (Check_Duplicates):
Add pragma Warnings on variable.
* sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
* sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
* sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
(Analyze_Exit_Statement): Initialize Scope_Id variable.
(Analyze_Iterator_Specification): Initialize Bas variable.
* sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
(Analyze_Accept_Statement): Initialize Task_Nam.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Install_Primitive_Elaboration_Check):
Do not generate an elaboration check if all checks have been
suppressed.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case
Interrupt_Handler and Attach_Handler): Generate reference
to protected operation to prevent spurious warnings about
unreferenced entities. Previous scheme failed with style checks
enabled.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
that follows an expression function must not be relocated to
the generated body, because it applies to the code that follows.
From-SVN: r247387
|
|
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
initialize Block_Decls variable.
(Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
(Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
* exp_disp.adb (Expand_Interface_Actuals): Initialize
Formal_DDT and Actual_DDT variables.
(Expand_Interface_Thunk): Initialize Iface_Formal.
(Make_DT): Initialize Size_Comp.
(Make_Select_Specific_Data_Table): Initialize Decls.
* exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
Also initialize more RPC_Receiver_* variables.
(Build_To_Any_Function): Initialize Cstr_Formal.
* exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
node between access types, freeze the designated type as well,
so that dispatch table pointers are created in the proper scope,
and not in the constructed body of the expression function.
2017-04-28 Bob Duff <duff@adacore.com>
* alloc.ads (Nodes_Initial): Go back to previous value. The large
value makes large compilations faster, but small compilations slower.
2017-04-28 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb: minor typos in Is_Child_Or_Sibling.
2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
* erroutc.adb (Compilation_Errors): Do not consider info messages
as suitable warnings when warnings must be treated as errors.
* sem_ch7.adb (Analyze_Package_Specification): Do not consider
internally-generated packages when outputting completion
information.
* errout.adb (Output_Messages): Do not consider info messages as
suitable warnings when warnings must be treated as errors.
* errutil.adb (Finalize): Do not consider info messages as
suitable warnings when warnings must be treated as errors.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* warnsw.ads: Minor fix for incorrect wording in comment.
2017-04-28 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (In_Instance_Code): New predicate in
Valid_Conversion, to determine whether a type conversion appears
as (or within) an actual for a formal object. Type conversions
in instances are not rechecked in Valid_Conversion because
visibility changes between generic location andi instance may
lead to spurious errors, but conversions within an actual must be
fully checked, and they are not fully resolved when pre-analyzing
the actuals.
From-SVN: r247385
|
|
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb (Expand_Entry_Barrier): Code
cleanup. Do not perform the optimization which removes the
declarations of the discriminant and component renamings when
validity checks on operands and attributes are in effect.
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
a-cfhama.ads, a-cofove.ads: Minor reformatting.
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
pointer dereference.
* g-spipat.adb (Dump): Code clean up. Protect against a possible
null pointer dereference.
From-SVN: r247326
|
|
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
Minor reformatting and code cleanups.
From-SVN: r247319
|
|
2017-04-27 Steve Baird <baird@adacore.com>
* exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
flag when it is declared in order to avoid confusing CodePeer about
the possibility of an uninitialized variable read.
2017-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
no dimensionality error if the subtype of the expression is
identical to the nominal subtype in the declaration, even though
the expression itself may have been constant-folded and lack a
dimension vector.
* sem_dim.ads: Add comments on setting of dimension vectors and
its interaction with node rewritings and side-effect removal.
2017-04-27 Bob Duff <duff@adacore.com>
* debug.adb: Minor comment correction.
* sem_dim.ads: Minor reformatting and typo fixes.
2017-04-27 Bob Duff <duff@adacore.com>
* g-table.adb, g-table.adsa, scos.h: From the C side, access First and
Last of the tables via function calls, rather than relying on layout
of data structures.
2017-04-27 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb: No wrapper in GNATprove mode.
2017-04-27 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Comparison_Op): Always
evaluate comparisons between values of universal types.
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Check_Internal_Call_Continue): Do not generate
an elaboration counter nor a check when in GNATprove mode.
* sem_util.adb (Build_Elaboration_Entity): Do not create an
elaboration counter when in GNATprove mode.
From-SVN: r247317
|
|
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Post_State): A reference to a
generic in out parameter is considered a change in the post-state
of a subprogram.
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
declaration of a subprogram instance within its wrapper package,
skip over null statements that may result from the rewriting of
ignored pragmas.
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_Attribute_Reference, case 'Read):
If the type is an unchecked_union, replace the attribute with
a Raise_Program_Error (rather than inserting such before the
attribute reference) to handle properly the case where we are
processing a component of a larger record, and we need to prevent
further expansion for the unchecked union.
(Expand_Attribute_Reference, case 'Write): If the type is
an unchecked_union, check whether enclosing scope is a Write
subprogram. Replace attribute with a Raise_Program_Error if the
discriminants of the unchecked_union type have not default values
because such a use is erroneous..
2017-04-25 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Expand_N_Task_Type_Declaration):
Add relative_deadline to task record on edf profile.
(Make_Initialize_Protection): Pass deadline_floor value on edf profile.
(Make_Task_Create_Call): Pass relative_deadline value.
* par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
* s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
(Profile_Info): Add info for GNAT_Ravenscar_EDF.
* sem_prag.adb (Set_Ravenscar_Profile): Handle
GNAT_Ravenscar_EDF (set scheduling policy).
(Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
pragma.
(Sig_Flags): Add choice for Pragma_Deadline_Floor.
* snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
New names.
(Pragma_Deadline_Floor): New pragma.
* targparm.adb (Get_Target_Parameters): Recognize
GNAT_Ravenscar_EDF profile.
From-SVN: r247221
|
|
derived type with unknown discriminants that...
2017-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Primitive_Operations,
Is_Valid_First_Argument_Of): argument is valid if it is a derived
type with unknown discriminants that matches its underlying
record view.
* exp_util.adb (Expand_Subtype_From_Expr): Do not expand
expression if its type is derived from a limited type with
unknown discriminants, because the expansion (which is a call)
must be expanded in the enclosing context to add the proper build-
in-place parameters to the call.
* lib.ads, exp_ch9.adb: Minor fixes in comments.
From-SVN: r244790
|
|
2017-01-23 Yannick Moy <moy@adacore.com>
* frontend.adb (Frontend): Do not load runtime
unit for GNATprove when parsing failed.
* exp_ch9.adb: minor removal of extra whitespace
* exp_ch6.adb: minor typo in comment
* sem_util.adb: Code cleanup.
* exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
* a-ngcefu.adb: minor style fix in whitespace
2017-01-23 Thomas Quinot <quinot@adacore.com>
* scos.ads: Document usage of 'd' as default SCO kind for
declarations.
* par_sco.adb (Traverse_Declarations_Or_Statements.
Traverse_Degenerate_Subprogram): New supporting routine for expression
functions and null procedures.
(Traverse_Declarations_Or_Statements.Traverse_One): Add
N_Expression_Function to the subprogram case; add required
support for null procedures and expression functions.
2017-01-23 Bob Duff <duff@adacore.com>
* namet.ads (Bounded_String): Decrease the size of type
Bounded_String to avoid running out of stack space.
* namet.ads (Append): Don't ignore buffer overflow; raise
Program_Error instead.
From-SVN: r244789
|
|
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
reformatting.
* exp_ch9.adb: minor style fix in comment.
2017-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
for a limited record extension with unknown discriminants whose
full view has no discriminants.
2017-01-23 Yannick Moy <moy@adacore.com>
* exp_spark.adb: Alphabetize with clauses.
From-SVN: r244788
|
|
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
spaces from error messages.
2017-01-23 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Check_Large_Modular_Array): New procedure,
subsidiary to Expand_N_Object_ Declaration, to compute a guard on
an object declaration for an array type with a modular index type
with the size of Long_Long_Integer. Special processing is needed
in this case to compute reliably the size of the object, and
eventually to raise Storage_Error, when wrap-around arithmetic
might compute a meangingless size for the object.
2017-01-23 Justin Squirek <squirek@adacore.com>
* a-wtenau.adb, par-endh.adb, sem_prag.adb,
sem_type.adb: Code cleanups.
From-SVN: r244775
|
|
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb: minor style fixes in comments.
* sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
relative statement introduces an implicit dependency on
Ada.Real_Time.Clock_Time.
* sem_util.adb: Minor reformatting.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
must be treated as delayed aspect even if the expression is
a literal, because the aspect affects the freezing and the
elaboration of the object to which it applies.
2017-01-20 Tristan Gingold <gingold@adacore.com>
* s-osinte-vxworks.ads (Interrup_Range): New subtype.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Generate_Reference): Do not warn about the
presence of a pragma Unreferenced if the entity appears as the
actual in a procedure call that does not come from source.
2017-01-20 Pascal Obry <obry@adacore.com>
* expect.c, terminals.c: Fix some warnings about unused variables.
* gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
of the runtime.
2017-01-20 Bob Duff <duff@adacore.com>
* exp_attr.adb (Constrained): Apply an access check (check that
the prefix is not null) when the prefix denotes an object of an
access type; that is, when there is an implicit dereference.
2017-01-20 Gary Dismukes <dismukes@adacore.com>
* s-rident.ads (constant Profile_Info): Remove
No_Calendar from GNAT_Extended_Ravenscar restrictions.
2017-01-20 Tristan Gingold <gingold@adacore.com>
* s-maccod.ads: Add pragma No_Elaboration_Code_All
From-SVN: r244718
|
|
identify an expansion of the 'Count attribute.
2017-01-19 Justin Squirek <squirek@adacore.com>
* exp_ch9.adb (Is_Pure_Barrier): Create function
Is_Count_Attribute to identify an expansion of the 'Count
attribute.
From-SVN: r244631
|
|
2017-01-13 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): New subprogram.
(Analyze_Subprogram_Body_Helper): At the occurrence of an
expression function declaration that is a completion, its
expression causes freezing (AI12-0103).
2017-01-13 Vadim Godunko <godunko@adacore.com>
* a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
Reference functions of Ada.Containers.Indefinite_Holders.
2017-01-13 Bob Duff <duff@adacore.com>
* s-os_lib.ads: Minor comment fixes.
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Do not default
initialize an object when it is of a task type and restriction
No_Tasking is in effect because the initialization is obsolete.
* exp_ch9.adb (Build_Master_Entity): Do not generate a master when
restriction No_Tasking is in effect.
(Build_Master_Renaming): Do not rename a master when restriction
No_Tasking is in effect.
From-SVN: r244418
|
|
style for case alternatives.
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
statements to reflect the new style for case alternatives. Various
code clean up and reformatting.
From-SVN: r244406
|
|
2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
* 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 <kirtchev@adacore.com>
* 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 <charlet@adacore.com>
* 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 <bernardi@adacore.com>
* sem_ch10.adb (Analyze_With_Clause): Removed code that turned
Configurable_Run_Time_Mode off when analysing with'ed predefined
libraries.
From-SVN: r244365
|
|
2017-01-12 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
reformatting.
* debug.adb: Minor comment fixes.
From-SVN: r244360
|
|
2017-01-12 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Unique_Entity): For concurrent
bodies that are defined with stubs and complete a declaration
of a single concurrent object return the entity of an implicit
concurrent type, not the entity of the anonymous concurrent
object.
* debug.adb: -gnatd.J is no longer used.
* make.adb (Globalize): Removed, no longer used.
* sem_ch9.adb: minor typo in comment for entry index
2017-01-12 Patrick Bernardi <bernardi@adacore.com>
* aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
* exp_ch3.adb (Build_Init_Statements): As part of initialising
the value record of a task, set its _Secondary_Stack_Size field
if present.
* exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
a _Secondary_Stack_Size field in the value record of
the task if a Secondary_Stack_Size rep item is present.
(Make_Task_Create_Call): Include secondary stack size
parameter. If No_Secondary_Stack restriction is in place, passes
stack size of 0.
* par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
Secondary_Stack_Size.
* s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
function to define the overhead of the secondary stack.
* s-tarest.adb (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Functions now include
Secondary_Stack_Size parameter to pass to Initialize_ATCB.
* s-tarest.adb (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
include Secondary_Stack_Size parameter.
(Task_Wrapper): Secondary stack now allocated to the size specified by
the Secondary_Stack_Size parameter in the task's ATCB.
* s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
Secondary_Stack_Size component.
* s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Function now include
Secondary_Stack_Size parameter.
(Task_Wrapper): Secondary stack now allocated to the size
specified by the Secondary_Stack_Size parameter in the task's
ATCB.
* s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
to include Secondary_Stack_Size parameter.
* sem_ch13.adb (Analyze_Aspect_Specification): Add support for
Secondary_Stack_Size aspect, turning the aspect into its corresponding
internal attribute.
(Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
* snames.adb-tmpl, snames.ads-tmpl: Added names
Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
From-SVN: r244358
|
|
2017-01-12 Bob Duff <duff@adacore.com>
* contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
Change name to Pragma_Name_Unmapped.
(Pragma_Name_Mapped): Change name to Pragma_Name.
This is because the "mapped" version should be the usual case.
From-SVN: r244352
|
|
2017-01-06 Patrick Bernardi <bernardi@adacore.com>
* aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
Reverted previous change for now.
From-SVN: r244148
|
|
2017-01-06 Patrick Bernardi <bernardi@adacore.com>
* aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
* exp_ch3.adb (Build_Init_Statements): As part of initialising
the value record of a task, set its _Secondary_Stack_Size field
if present.
* exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
a _Secondary_Stack_Size field in the value record of
the task if a Secondary_Stack_Size rep item is present.
(Make_Task_Create_Call): Include secondary stack size
parameter. If No_Secondary_Stack restriction is in place, passes
stack size of 0.
* par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
Secondary_Stack_Size.
* s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
function to define the overhead of the secondary stack.
* s-tarest.adb (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Functions now include
Secondary_Stack_Size parameter to pass to Initialize_ATCB.
* s-tarest.adb (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
now include Secondary_Stack_Size parameter.
(Task_Wrapper):
Secondary stack now allocated to the size specified by the
Secondary_Stack_Size parameter in the task's ATCB.
* s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
Secondary_Stack_Size component.
* s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Function now include
Secondary_Stack_Size parameter.
(Task_Wrapper): Secondary stack
now allocated to the size specified by the Secondary_Stack_Size
parameter in the task's ATCB.
* sem_ch13.adb (Analyze_Aspect_Specification): Add support
for Secondary_Stack_Size aspect, turning the aspect into its
corresponding internal attribute.
(Analyze_Attribute_Definition):
Process Secondary_Stack_Size attribute.
* snames.adb-tmpl, snames.ads-tmpl: Added names
Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
From-SVN: r244146
|
|
2017-01-06 Bob Duff <duff@adacore.com>
* snames.ads-tmpl (Renamed): New name for the pragma argument.
* par-ch2.adb: Allow the new pragma (with analysis deferred
to Sem_Prag).
* sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
Keep a mapping from new pragma names to old names.
* sem_prag.adb: Check legality of pragma Rename_Pragma, and
implement it by calling Map_Pragma_Name.
* checks.adb, contracts.adb, einfo.adb, errout.adb,
* exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
* exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
* inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
* sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
* sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
* sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
as appropriate.
From-SVN: r244144
|
|
2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb: Minor reformatting.
From-SVN: r244143
|
|
2017-01-06 Tristan Gingold <gingold@adacore.com>
* exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
* rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
(RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
(unused).
* s-taskin.ads, s-taskin.adb (Set_Entry_Names,
Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
* s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
From-SVN: r244142
|
|
2017-01-06 Bob Duff <duff@adacore.com>
* sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
dummy implementation of Map_Pragma_Name.
2017-01-06 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
entry_body variable constant.
* s-taprob.ads (Entry_Body_Access): Move to s-tposen.
* s-tpoben.ads (Protected_Entry_Body_Access): Now access
to constant.
* s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
now access to constant.
From-SVN: r244141
|
|
2017-01-06 Justin Squirek <squirek@adacore.com>
* sem_attr.adb (Analyze_Attribute): Modify semantic checks for
Finalization_Size to allow a prefix of any non-class-wide type.
* sem_attr.ads Modify comment for Finalization_Size to include
definite type use case.
2017-01-06 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
on procedures that are wrappers created for entries that have
preconditions.
* sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
body is an entry_wrapper, compile it in the context of the
synchronized type, because a precondition may refer to funtions
of the type.
* exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
body entity.
* exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
within an Entry_Wrapper this is an external call whose target
is the synchronized object that is the actual in the call to
the wrapper.
From-SVN: r244138
|
|
2017-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
iterator specification with a serious syntactic error, transform
construct into an infinite loop in order to continue analysis
and prevent a compiler abort.
2017-01-06 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
max_queue_lengths_array if unused.
2017-01-06 Bob Duff <duff@adacore.com>
* errout.adb (Set_Msg_Text): Protect against out-of-bounds
array access, in case "\" is at the end of Text.
* stylesw.adb (Set_Style_Check_Options): Don't include input
characters in the error message template, because they could
be control characters such as "\", which Errout will try to
interpret.
2017-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
For a private type examine the visible declarations that follow
the partial view, not just the private declarations that follow
the full view.
2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
code cleanup.
From-SVN: r244133
|
|
2017-01-06 Tristan Gingold <gingold@adacore.com>
* s-rident.ads (Profile_Info): Remove No_Entry_Queue from
Gnat_Extended_Ravenscar.
* exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
2017-01-06 Gary Dismukes <dismukes@adacore.com>
* sem_util.ads: Minor typo fix and reformatting.
From-SVN: r244130
|
|
2017-01-06 Yannick Moy <moy@adacore.com>
* ghost.adb Minor fixing of references to SPARK RM.
(Check_Ghost_Context): Check whether reference is to a lvalue
before issuing an error about violation of SPARK RM 6.9(13)
when declaration has Ghost policy Check and reference has Ghost
policy Ignore.
* sem_util.adb Minor indentation.
* sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
* sem_util.ads (Unique_Defining_Entity): Document the result
for package body stubs.
2017-01-06 Tristan Gingold <gingold@adacore.com>
* raise-gcc.c (abort): Macro to call Abort_Propagation.
* s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
constant.
* exp_ch9.adb (Expand_N_Protected_Type_Declaration):
Do not generate the Entry_Max_Queue_Lengths_Array if all default
values.
* exp_util.adb (Corresponding_Runtime_Package): Consider
Max_Queue_Length pragma.
From-SVN: r244129
|
|
2017-01-06 Justin Squirek <squirek@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Type_Declaration):
Remove declaration generation in the case of
System_Tasking_Protected_Objects_Single_Entry being used,
and add a warning message when this is detected to occur.
(Make_Initialize_Protection): Remove reference pass in the case
of System_Tasking_Protected_Objects_Single_Entry.
* rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
* s-tposen.adb (Initialize_Protection_Entry): Remove
Entry_Queue_Max parameter.
* s-tposen.ads: Remove the types use to store the entry queue
maximum.
* sem_prag.adb (Analyze_Pragma): Remove entry families restriction
2017-01-06 Yannick Moy <moy@adacore.com>
* sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
behavior of function, to also accept out of range positions
and raise Constraint_Error in such case, and to copy sloc from
literal if No_Location passed as location.
* uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
of functions to raise Constraint_Error in case of value not in
appropriate range.
2017-01-06 Tristan Gingold <gingold@adacore.com>
* sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
Invalidate_Stack_Cache.
2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
* s-os_lib.adb: Minor fix to the signature of Readlink.
2017-01-06 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Conforming_Types): Handle another
confusion between views in a nested instance with an actual
private type whose full view is not in scope.
2017-01-06 Arnaud Charlet <charlet@adacore.com>
* exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
mark a rewritten if statement as explicit (Comes_From_Source).
From-SVN: r244128
|
|
2017-01-06 Tristan Gingold <gingold@adacore.com>
* ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_case.adb: Minor reformatting.
2017-01-06 Thomas Quinot <quinot@adacore.com>
* g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
2017-01-06 Justin Squirek <squirek@adacore.com>
* aspects.adb: Register aspect in Canonical_Aspect.
* aspects.ads: Associate qualities of Aspect_Max_Queue_Length
into respective tables.
* einfo.ads, einfo.adb: Add a new attribute for
handling the parameters for Pragma_Max_Entry_Queue
(Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
for accessing and setting were added as well.
* par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
declaration for pramga arguments and store them in the protected
type node.
(Make_Initialize_Protection): Pass a reference to
the Entry_Max_Queue_Lengths_Array in the protected type node to
the runtime.
* rtsfind.adb: Minor grammar fix.
* rtsfind.ads: Register new types taken from the
runtime libraries RE_Protected_Entry_Queue_Max and
RE_Protected_Entry_Queue_Max_Array
* s-tposen.adb, s-tpoben.adb
(Initialize_Protection_Entry/Initialize_Protection_Entries):
Add extra parameter and add assignment to local object.
* s-tposen.ads, s-tpoben.ads: Add new types to
store entry queue maximums and a field to the entry object record.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
for Aspect_Max_Queue_Length.
(Check_Aspect_At_Freeze_Point):
Add aspect to list of aspects that don't require delayed analysis.
* sem_prag.adb (Analyze_Pragma): Add case statement for
Pragma_Max_Queue_Length, check semantics, and register arugments
in the respective entry nodes.
* sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
and Has_Max_Queue_Length
* snames.ads-tmpl: Add constant for the new aspect-name
Name_Max_Queue_Length and corrasponding pragma.
2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Is_Controlled_Function_Call):
Reimplemented. Consider any node which has an entity as the
function call may appear in various ways.
From-SVN: r244126
|
|
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function):
Remove the aspects of the original expression function has been
rewritten into a subprogram declaration or a body. Reinsert the
aspects once they have been analyzed.
2016-10-13 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Expand_N_Asynchronous_Select): Return immediately
on restricted profile.
2016-10-13 Javier Miranda <miranda@adacore.com>
* sem_prag.adb
(Process_Compile_Time_Warning_Or_Error): Register the pragma
for its validation after the backend has been called only if its
expression has some occurrence of attributes 'size or 'alignment
* table.ads (Release_Threshold): New formal.
(Release): Adding documentation of its new functionality.
* table.adb (Release): Extend its functionality with a
Release_Threshold.
* nlists.adb (Next_Node table): Set its Release_Threshold.
* atree.adb (Orig_Nodes table): Set its Release_Threshold.
* atree.ads (Nodes table): Set its Release_Threshold.
(Flags table): Set its Release_Threshold.
* alloc.ads (Nodes_Release_Threshold): New constant declaration.
(Orig_Nodes_Release_Threshold): New constant declaration.
* debug.adb (switch d.9): Left free.
* gnat1drv.adb (Post_Compilation_Validation_Checks): Enable
validation of pragmas Compile_Time_Error and Compile_Time_Warning.
From-SVN: r241117
|
|
2016-10-12 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, sem_ch3.adb, exp_ch9.adb, a-tags.adb, sem_prag.adb,
sem_ch12.adb, xref_lib.adb, a-strunb-shared.adb, rtsfind.adb,
freeze.adb, sem_attr.adb, sem_case.adb, exp_ch4.adb, ghost.adb,
exp_ch6.adb, sem_ch4.adb, restrict.adb, s-os_lib.adb: Minor
reformatting.
From-SVN: r241041
|
|
2016-10-12 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support
for a secondary procedure in case of missing Ada.Calendar.Delays
* rtsfind.ads (RTU_Id): Add System_Relative_Delays.
(RE_Id): Add RO_RD_Delay_For.
* rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX.
* s-rident.ads: Remove No_Relative_Delays
restriction for GNAT_Extended_Ravenscar.
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* sem_elab.adb (Within_Initial_Condition): When deternining
the context of the expression, use the original node if it is
a pragma, because Check pragmas are rewritten as conditionals
when assertions are not enabled.
2016-10-12 Bob Duff <duff@adacore.com>
* spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add
"overriding".
2016-10-12 Bob Duff <duff@adacore.com>
* a-strunb-shared.ads, a-strunb-shared.adb (Finalize):
Make sure Finalize is idempotent.
(Unreference): Check for
Empty_Shared_String, in case the reference count of the empty
string wraps around.
Also add "not null" in various places that can't be null.
2016-10-12 Jerome Lambourg <lambourg@adacore.com>
* init.c: Fix sigtramp with the x86_64-vx7-vxsim target on
Windows host.
2016-10-12 Vadim Godunko <godunko@adacore.com>
* s-os_lib.ads (Is_Owner_Readable_File): Renamed from
Is_Readable_File.
(Is_Owner_Writable_File): Renamed from Is_Writable_File.
(Is_Readable_File): Renames Is_Read_Accessible_File.
(Is_Writable_File): Renames Is_Write_Accessible_File.
From-SVN: r241035
|
|
without a parent only if...
2016-10-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
formal entity without a parent only if the corresponding actual
entity has a different kind.
* exp_ch9.adb (Build_Class_Wide_Master): If the master is
declared locally, insert the renaming declaration after the
master declaration, to prevent access before elaboration in gigi.
From-SVN: r241029
|
|
From-SVN: r238107
|
|
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb Remove with and use clauses for Exp_Ch11 and Inline.
(Initialize_Array_Component): Protect the initialization
statements in an abort defer / undefer block when the associated
component is controlled.
(Initialize_Record_Component): Protect the initialization statements
in an abort defer / undefer block when the associated component is
controlled.
(Process_Transient_Component_Completion): Use Build_Abort_Undefer_Block
to create an abort defer / undefer block.
* exp_ch3.adb Remove with and use clauses for Exp_ch11 and Inline.
(Default_Initialize_Object): Use Build_Abort_Undefer_Block to
create an abort defer / undefer block.
* exp_ch5.adb (Expand_N_Assignment_Statement): Mark an abort
defer / undefer block as such.
* exp_ch9.adb (Find_Enclosing_Context): Do not consider an abort
defer / undefer block as a suitable context for an activation
chain or a master.
* exp_util.adb Add with and use clauses for Exp_Ch11.
(Build_Abort_Undefer_Block): New routine.
* exp_util.ads (Build_Abort_Undefer_Block): New routine.
* sinfo.adb (Is_Abort_Block): New routine.
(Set_Is_Abort_Block): New routine.
* sinfo.ads New attribute Is_Abort_Block along with occurrences
in nodes.
(Is_Abort_Block): New routine along with pragma Inline.
(Set_Is_Abort_Block): New routine along with pragma Inline.
2016-07-06 Justin Squirek <squirek@adacore.com>
* sem_ch4.adb (Analyze_One_Call): Add a conditional to handle
disambiguation.
From-SVN: r238045
|
|
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* atree.ads, atree.adb (Elist29): New routine.
(Set_Elist29): New routine.
* atree.h New definition for Elist29.
* einfo.adb Subprograms_For_Type is now an Elist rather than
a node. Has_Invariants is now a synthesized attribute
and does not require a flag. Has_Own_Invariants
is now Flag232. Has_Inherited_Invariants is
Flag291. Is_Partial_Invariant_Procedure is Flag292.
(Default_Init_Cond_Procedure): Reimplemented.
(Has_Inherited_Invariants): New routine.
(Has_Invariants): Reimplemented.
(Has_Own_Invariants): New routine.
(Invariant_Procedure): Reimplemented.
(Is_Partial_Invariant_Procedure): New routine.
(Partial_Invariant_Procedure): Reimplemented.
(Predicate_Function): Reimplemented.
(Predicate_Function_M): Reimplemented.
(Set_Default_Init_Cond_Procedure): Reimplemented.
(Set_Has_Inherited_Invariants): New routine.
(Set_Has_Invariants): Removed.
(Set_Has_Own_Invariants): New routine.
(Set_Invariant_Procedure): Reimplemented.
(Set_Is_Partial_Invariant_Procedure): New routine.
(Set_Partial_Invariant_Procedure): Reimplemented.
(Set_Predicate_Function): Reimplemented.
(Set_Predicate_Function_M): Reimplemented.
(Set_Subprograms_For_Type): Reimplemented.
(Subprograms_For_Type): Reimplemented.
(Write_Entity_Flags): Output Flag232 and Flag291.
* einfo.ads Add new attributes Has_Inherited_Invariants
Has_Own_Invariants Is_Partial_Invariant_Procedure
Partial_Invariant_Procedure Change the documentation
of attributes Has_Inheritable_Invariants Has_Invariants
Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
(Has_Inherited_Invariants): New routine along with pragma Inline.
(Has_Own_Invariants): New routine along with pragma Inline.
(Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
(Partial_Invariant_Procedure): New routine.
(Set_Has_Inherited_Invariants): New routine along with pragma Inline.
(Set_Has_Invariants): Removed along with pragma Inline.
(Set_Has_Own_Invariants): New routine along with pragma Inline.
(Set_Is_Partial_Invariant_Procedure): New routine
along with pragma Inline.
(Set_Partial_Invariant_Procedure): New routine.
(Set_Subprograms_For_Type): Update the signature.
(Subprograms_For_Type): Update the signature.
* exp_ch3.adb Remove with and use clauses for Sem_Ch13.
(Build_Array_Invariant_Proc): Removed.
(Build_Record_Invariant_Proc): Removed.
(Freeze_Type): Build the body of the invariant procedure.
(Insert_Component_Invariant_Checks): Removed.
* exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
and Stringt.
(Build_Invariant_Procedure_Body): New routine.
(Build_Invariant_Procedure_Declaration): New routine.
* exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
(Build_Invariant_Procedure_Declaration): New routine.
* exp_ch9.adb (Build_Corresponding_Record): Do not propagate
attributes related to invariants to the corresponding record
when building the corresponding record. This is done by
Build_Invariant_Procedure_Declaration.
* exp_util.adb (Make_Invariant_Call): Reimplemented.
* freeze.adb (Freeze_Array_Type): An array type requires an
invariant procedure when its component type has invariants.
(Freeze_Record_Type): A record type requires an invariant
procedure when at least one of its components has an invariant.
* sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
invariant-related attributes.
(Analyze_Subtype_Declaration):
Inherit invariant-related attributes.
(Build_Derived_Record_Type): Inherit invariant-related attributes.
(Check_Duplicate_Aspects): Reimplemented.
(Get_Partial_View_Aspect): New routine.
(Process_Full_View): Inherit invariant-related attributes. Reimplement
the check on hidden inheritance of class-wide invariants.
(Remove_Default_Init_Cond_Procedure): Reimplemented.
* sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
the controlling type for an invariant procedure declaration
or body.
(Is_Invariant_Procedure_Or_Body): New routine.
* sem_ch7.adb (Analyze_Package_Specification): Build the partial
invariant body in order to preanalyze and resolve all invariants
of a private type at the end of the visible declarations. Build
the full invariant body in order to preanalyze and resolve
all invariants of a private type's full view at the end of
the private declarations.
(Preserve_Full_Attributes): Inherit invariant-related attributes.
* sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
aspects are analyzed with the proper view when the protected type
is a completion of a private type. Inherit invariant-related attributes.
(Analyze_Task_Type_Declaration): Ensure that
aspects are analyzed with the proper view when the task type
is a completion of a private type. Inherit invariant-related
attributes.
* sem_ch13.adb Remove with and use clauses for Stringt.
(Build_Invariant_Procedure_Declaration): Removed.
(Build_Invariant_Procedure): Removed.
(Freeze_Entity_Checks): Do not build the body of the invariant
procedure here.
The body is built when the type is frozen in Freeze_Type.
(Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
related to invariants here because this leads to erroneous
inheritance.
(Replace_Node): Rename to Replace_Type_Ref.
* sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
(Build_Invariant_Procedure): Removed.
* sem_prag.adb Add with and use clauses for Exp_Ch7.
(Analyze_Pragma): Reimplement the analysis of pragma Invariant.
* sem_res.adb (Resolve_Actuals): Emit a specialized error when
the context is an invariant.
* sem_util.adb (Get_Views): New routine.
(Incomplete_Or_Partial_View): Consider generic packages when
examining declarations.
(Inspect_Decls): Consider full type
declarations because they may denote a derivation from a
private type.
(Propagate_Invariant_Attributes): New routine.
* sem_util.ads (Get_Views): New routine.
(Propagate_Invariant_Attributes): New routine.
2016-06-16 Arnaud Charlet <charlet@adacore.com>
* pprint.adb (Expression_Image): Add better handling of UCs,
we don't want to strip them all for clarity.
From-SVN: r237596
|
|
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
reformatting.
2016-06-16 Bob Duff <duff@adacore.com>
* sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
(Full_T) crashes when assertions are on.
* sem_ch12.adb (Matching_Actual): Correctly handle the case where
"others => <>" appears in a generic formal package, other than
by itself.
2016-06-16 Arnaud Charlet <charlet@adacore.com>
* usage.adb: Remove confusing comment in usage line.
* bindgen.adb: Fix binder generated file in codepeer mode wrt
recent additions.
2016-06-16 Javier Miranda <miranda@adacore.com>
* restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
never-ending loop, code cleanup; adding also support for Text_IO.
* sem_ch8.adb (Find_Expanded_Name): Invoke
Check_Restriction_No_Use_Entity.
2016-06-16 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb: Minor comment fix.
* einfo.ads (Has_Protected): Clarify comment.
* sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
consider private protected types declared in the runtime for
the No_Local_Protected_Types restriction.
From-SVN: r237507
|
|
the corresponding record type before that of the...
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
declaration of the corresponding record type before that of the
unprotected version of the subprograms that operate on it.
(Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
just before the original type.
* sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
declaration to the newly created declaration for the primitive.
(Analyze_Subtype_Declaration): Remove obsolete code forcing the
freezing of the subtype before its declaration.
(Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
declaration in the nearest enclosing scope for formal parameters too.
(Build_Derived_Access_Type): Restore the status of the created Itype
after it is erased by Copy_Node.
* sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
(Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
the specification is present.
Move around the code changing the designated view of the return type
and save the original view. Restore it on exit.
* sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
the declaration right after that of the type.
From-SVN: r237118
|
|
2016-05-02 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
fixes.
From-SVN: r235741
|
|
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): If the designated type
is a private derived type with no discriminants, examine its
underlying_full_view to determine whether the full view has
defaulted discriminants, so their defaults can be used in the
call to the initialization procedure for the designated object.
From-SVN: r235740
|
|
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb, comperr.adb: Minor reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
unchecked conversion if the source size is 0 (indicating that
its RM size is unknown). This will happen with packed arrays of
non-discrete types, in which case the component type is known
to match.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* debug.adb: Reserve -gnatd.V.
2016-05-02 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Process_Full_View): Remove from visibility
wrappers of synchronized types to avoid spurious errors with
their wrapped entity.
* exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
if no interface primitive is covered by the subprogram and this is
not a primitive declared between two views; see Process_Full_View.
(Build_Protected_Sub_Specification): Link the dispatching
subprogram with its original non-dispatching protected subprogram
since their names differ.
(Expand_N_Protected_Type_Declaration):
If a protected subprogram overrides an interface primitive then
do not build a wrapper if it was already built.
* einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
* sem_ch4.adb (Names_Match): New subprogram.
* sem_ch6.adb (Check_Synchronized_Overriding): Moved
to library level and defined in the public part of the
package to invoke it from Exp_Ch9.Build_Wrapper_Spec
(Has_Matching_Entry_Or_Subprogram): New subprogram.
(Report_Conflict): New subprogram.
From-SVN: r235739
|
|
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
* sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
to publicly visible routine in Sem_Util.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
the check if the type of the actual is By_Reference.
From-SVN: r235199
|