blob: bf899e2311970f687c3d57cbd428a95970ed29fa [file] [log] [blame]
2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/83091
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
type for the implementation type of a packed array.
2017-11-23 Mike Stump <mikestump@comcast.net>
Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
operand to ANNOTATE_EXPR and also pass unrolling hints.
2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/83016
* gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
(Usage): Adjust.
* gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
(common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
the invocations of $(GNATLINK).
(../../gnatdll$(exeext)): Likewise.
(../../vxaddr2line$(exeext)): Likewise.
(gnatmake-re): Likewise.
(gnatlink-re): Likewise.
2017-11-16 Doug Rupp <rupp@adacore.com>
* gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
2017-11-16 Steve Baird <baird@adacore.com>
* debug.adb: Update another comment to indicate gnat2scil's use of the
-gnatd.7 switch.
2017-11-16 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
the case of nested build-in-place calls.
2017-11-16 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
available in gnatsymbolize.
2017-11-16 Steve Baird <baird@adacore.com>
* debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
switch.
2017-11-16 Gary Dismukes <dismukes@adacore.com>
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
sem_elab.adb: Minor editorial corrections.
* gnat_ugn.texi: Regenerate.
2017-11-16 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
gnatsymbolize documentation.
* gnat_ugn.texi: Regenerate.
2017-11-16 Steve Baird <baird@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
"Scope (Parent_Type)" with "Scope (Parent_Base)".
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* opt.ads: Elaboration warnings are now on by default. Add a comment
explaining why this is needed.
* sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
warnings.
* sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
elaboration warnings.
(Analyze_Subprogram_Instantiation): Preserve the status of elaboration
warnings.
* sem_elab.adb: Update the structure of Call_Attributes and
Instantiation_Attributes.
(Build_Call_Marker): Propagate the status of elaboration warnings from
the call to the marker.
(Extract_Call_Attributes): Extract the status of elaboration warnings.
(Extract_Instantiation_Attributes): Extract the status of elaboration
warnings.
(Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
now dependent on the status of elaboration warnings.
(Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
dependent on the status of elaboration warnings.
(Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
are now dependent on the status of elaboration warnings.
(Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
for formal Call_Attrs. Elaboration diagnostics are now dependent on the
status of elaboration warnings.
(Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
dependent on the status of elaboration warnings.
(Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
dependent on the status of elaboration warnings.
* sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
concerning pragma Elaborate.
* sem_res.adb (Resolve_Call): Preserve the status of elaboration
warnings.
(Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
from the procedure call to the entry call.
* sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
Warnings.
(Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
warnings
* sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
Warnings. Update the comment on usage.
* sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
(Is_Elaboration_Warnings_OK_Node): New routine.
(Set_Is_Dispatching_Call): Update to use Flag6.
(Set_Is_Elaboration_Warnings_OK_Node): New routine.
* sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
attribute Is_Elaboration_Warnings_OK_Node along with occurrences
in nodes.
(Is_Elaboration_Warnings_OK_Node): New routine along with pragma
Inline.
(Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
Inline.
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
sections to indicate how to suppress elaboration warnings. Document
switches -gnatwl and -gnatwL.
* gnat_ugn.texi: Regenerate.
2017-11-16 Sylvain Dailler <dailler@adacore.com>
* sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
lower than 0.
2017-11-16 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
System'To_Address.
2017-11-16 Yannick Moy <moy@adacore.com>
* sem_elab.adb (Include): Fix mode of parameter Curr to out.
2017-11-16 Piotr Trojanek <trojanek@adacore.com>
* sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
Context_Id denotes a record type.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
instantiations.
2017-11-16 Doug Rupp <rupp@adacore.com>
Initial gnat port to aarch64-wrs-vxworks7
* libgnarl/s-vxwork__aarch64.ads,
libgnat/system-vxworks7-aarch64-rtp-smp.ads,
libgnat/system-vxworks7-aarch64.ads: New files
* sigtramp-vxworks-target.inc (aarch64): New section.
* tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Include): Including a node which is also a compilation
unit terminates the search because there are no more lists to examine.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
declaration does not define a primitive operation of a tagged type for
SPARK.
(Check_SPARK_Primitive_Operation): New routine.
2017-11-16 Arnaud Charlet <charlet@adacore.com>
* libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
message when using -E binder switch.
2017-11-16 Piotr Trojanek <trojanek@adacore.com>
* errout.ads: Fix minor typo in comment.
2017-11-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Process_Subtype): If the subtype indication does not
syntactically denote a type, return Any_Type to prevent subsequent
compiler crashes or infinite loops.
2017-11-16 Steve Baird <baird@adacore.com>
* lib-writ.adb: Fix bug which causes Program_Error to be raised in some
cases when writing out a .ali file when a Rename_Pragma pragma is in
effect.
* lib-writ.adb (Write_Unit_Information): Replace call to
Pragma_Name_Unmapped with call to Pragma_Name.
2017-11-16 Gary Dismukes <dismukes@adacore.com>
* sem_elab.adb: Minor typo fixes.
2017-11-16 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Allocator): Correct warning messages and make
them more explicit.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* atree.ads (Nkind_In): Add 10 and 11 parameter versions.
* checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
the elaboration flag as elaboration code.
* einfo.adb (Contract): Update the comments.
(Ignore_SPARK_Mode_Pragmas): Update the comments.
(SPARK_Aux_Pragma): Update the comments.
(SPARK_Aux_Pragma_Inherited): Update the comments.
(SPARK_Pragma): Update the comments. The attribute now applies
to all types and abstract states.
(SPARK_Pragma_Inherited): Update the comments. The attribute now
applies to all types and abstract states.
(Set_Contract): Update the comments.
(Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
(Set_SPARK_Aux_Pragma): Update the comments.
(Set_SPARK_Aux_Pragma_Inherited): Update the comments.
(Set_SPARK_Pragma): Update the comments. The attribute now applies to
all types and abstract states.
(Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
applies to all types and abstract states.
(Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
type and abstract states.
* einfo.ads: Update the documentation of attributes SPARK_Pragma and
SPARK_Pragma_Inherited. Both of them now apply to all types and
abstract states.
* exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
elaboration flag as elaboration code.
* sem_ch3.adb: Add with and use clauses for Sem_Elab.
(Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
a derived type for later processing by the ABE mechanism.
(Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
(Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
type.
* sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
the type.
* sem_elab.adb: Define the term "early call region". Update the
terminology for "scenario" and "target". Update the architecture of
the ABE mechanism. Update the steps which must be taken when adding a
new scenario. Update the section on debugging ABE issues. Add new
hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
table SPARK_Scenarios. Hash table Elaboration_Context is now
Elaboration_Statuses. The majority of Process_xxx routines have been
updated to better reflect their role.
(Add_Unit): Reimplemented.
(Check_Elaboration_Constituent): New routine.
(Check_Elaboration_Scenarios): Verify previously recorded scenarios for
conditional ABE issues. Verify previously recorded SPARK scenarios.
(Check_SPARK_Derived_Type): New routine.
(Check_SPARK_Instantiation): New routine.
(Check_SPARK_Scenario): New routine.
(Check_SPARK_Refined_State_Pragma): New routine.
(Early_Call_Region): New routine.
(Elaboration_Status): New routine.
(Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
implicit Elabotate[_All] pragma is now specified via Prag_Nam.
(Find_Early_Call_Region): New routine.
(Info_Scenario): Add output for refinement constituents.
(Is_Recorded_SPARK_Scenario): New routine.
(Is_Suitable_SPARK_Derived_Type): New routine.
(Is_Suitable_SPARK_Instantiation): New routine.
(Is_Suitable_SPARK_Refined_State_Pragma): New routine.
(Is_Visited_Body): New routine.
(Kill_Elaboration_Scenario): Reimplemented.
(Output_Active_Scenarios): Add output for pragma Refined_State.
(Output_SPARK_Refined_State_Pragma): New routine.
(Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
is now achieved by different means.
(Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
the subprogram body appears within the early call region of the body.
Either ensure the prior elaboration of external subprograms or verify
that the context meets the suitable elaboration requirement.
(Process_Conditional_ABE_Instantiation_SPARK): New routine.
(Record_Elaboration_Scenario): Reimplement the portion which enforces
the level restrictions of the static model. Add support for SPARK
scenarios.
(Record_SPARK_Elaboration_Scenario): New routine.
(Reset_Visited_Bodies): New routine.
(Set_Early_Call_Region): New routine.
(Set_Elaboration_Status): New routine.
(Set_Is_Recorded_SPARK_Scenario): New routine.
(Update_Elaboration_Scenario): Reimplemented.
* sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
* sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
for examination by the ABE Processing phase.
(Create_Abstract_State): Save the SPARK_Mode from the context.
* sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
* sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
* sinfo.adb (Is_Elaboration_Code): New routine.
(Set_Is_Elaboration_Code): New routine.
(Nkind_In): Add 10 and 11 parameter versions.
* sinfo.ads: Add new attribute Is_Elaboration_Code along with
occurrences in nodes.
(Is_Elaboration_Code): New routine along with pragma Inline.
(Set_Is_Elaboration_Code): New routine along with pragma Inline.
(Nkind_In): Add 10 and 11 parameter versions.
2017-11-16 Justin Squirek <squirek@adacore.com>
* sem.adb (Analyze): Remove requirement that the original node of N be
an operator in the case that analysis on the node yields the relevant
operator - so prefer it instead.
2017-11-16 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
formal must not have a designated type that is the full view coming
from a limited-with'ed package.
* sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
function called from sem_ch6.
* sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
specially for b-i-p cases.
2017-11-10 Martin Sebor <msebor@redhat.com>
PR c/81117
* adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
* argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
not fall through to the next case.
<ARRAY_TYPE>: Deal specially with a dereference from another array
type with the same element type.
2017-11-09 Gary Dismukes <dismukes@adacore.com>
* exp_util.adb, freeze.adb: Minor reformatting.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu): Add processing for
N_Variable_Reference_Marker nodes.
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
the pragma Compile_Time_Error when it appears in a generic package
declaration and uses an expanded name to denote the current unit.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
* tracebak.c: Add support for tracebacks in QNX.
2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
2017-11-09 Yannick Moy <moy@adacore.com>
* erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
justification.
2017-11-09 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/platform_specific_information.rst: Document packages
needed on GNU/Linux by GNAT.
* gnat_ugn.texi: Regenerate.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Contracts): Remove the three parameter
version. This routine now only analyzes contracts and does not perform
any freezing actions.
(Analyze_Previous_Contracts): Removed.
(Freeze_Previous_Contracts): New routine.
* contracts.ads (Analyze_Previous_Contracts): Removed.
(Freeze_Previous_Contracts): New routine.
* sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
enclosing package spec regardless of whether the list denotes the
visible or private declarations. Fix the removal of partial state
refinements when the context is a package spec.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
contracts.
* sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
* sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
(Analyze_Protected_Body): Freeze previous contracts.
(Analyze_Task_Body): Freeze previous contracts.
* sem_prag.adb: Comment reformatting.
2017-11-09 Bob Duff <duff@adacore.com>
* libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
Export this so users can use it without importing
System.Tasking.Utilities.
* libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
that fails when Make_Independent is called on a user task.
* libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
capitalization style ((style) bad casing of "Master_of_Task").
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
uninitialized variable uncovered by Codepeer.
2017-11-09 Arnaud Charlet <charlet@adacore.com>
* namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
2017-11-09 Javier Miranda <miranda@adacore.com>
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
(Static_Dispatch_Tables): Minor rewording.
* gnat_rm.texi: Regenerate.
2017-11-09 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
use_clauses within instances.
(Use_One_Package): Add condition to check for "hidden" open scopes to
avoid skipping over packages that have not been properly installed even
though they are visible.
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
private operation of a protected type, when the type has no visible
operations.
2017-11-09 Javier Miranda <miranda@adacore.com>
* rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
* exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
if available.
2017-11-09 Bob Duff <duff@adacore.com>
* exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
variables.
2017-11-09 Yannick Moy <moy@adacore.com>
* exp_disp.adb (Make_DT): Default initialize Ifaces_List and
Ifaces_Comp_List.
2017-11-09 Pascal Obry <obry@adacore.com>
* libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
only for foreign threads. We initialize the thread handle only if not
yet initialized. This happens in Enter_Task for foreign threads only.
But for native threads (Ada tasking) we do want to keep the real
handle (from Create_Task) to be able to free the corresponding
resources in Finalize_TCB (CloseHandle).
2017-11-09 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
P_Base_Type.
(Error_Attr_P): Fix name in pragma No_Return.
(Unexpected_Argument): Add pragma No_Return.
(Placement_Error): Add pragma No_Return.
2017-11-09 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
dispatch table is statically built.
(Make_DT): Declare constant the Interface_Table object associated with
an statically built dispatch table. For this purpose the Offset_To_Top
value of each interface is computed using the dummy object.
* exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
the Offset_To_Top field of secondary dispatch tables when the dispatch
table is statically built.
(Initialize_Tag): Do not generate calls to Register_Interface_Offset
when the dispatch table is statically built.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
Document the new GNAT restriction Static_Dispatch_Tables.
* gnat_rm.texi: Regenerate.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
to avoid a dormant bug.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
as such capability is not available on the OS.
* link.c: Make sure linker options for QNX are correct.
* libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
* libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
in particular a workaround with locks priority ceiling where a higher
priority task is allowed to lock a lower ceiling priority lock. This
also fixes the scheduling of FIFO tasks when the priority of a task is
lowered.
* libgnat/system-qnx-aarch64.ads: Fix priority ranges.
2017-11-09 Yannick Moy <moy@adacore.com>
* erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
message.
* gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
condition.
* namet.adb (Copy_One_Character): Add assumption for static analysis,
as knowledge that Hex(2) is in the range 0..255 is too complex for
CodePeer.
(Finalize): Add assumption for static analysis, as the fact that there
are symbols in the table depends on a global invariant at this point in
the program.
* set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
* stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
true.
2017-11-09 Javier Miranda <miranda@adacore.com>
* libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
* exp_disp.adb (Building_Static_DT): Check restriction.
(Building_Static_Secondary_DT): Check restriction.
(Make_DT): Initialize the HT_Link to No_Tag.
* opt.ads (Static_Dispatch_Tables): Rename flag...
(Building_Static_Dispatch_Tables): ... into this. This will avoid
conflict with the restriction name.
* gnat1drv.adb: Update.
* exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
* exp_ch3.adb (Expand_N_Object_Declaration): Update.
2017-11-09 Pascal Obry <obry@adacore.com>
* libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
named number.
2017-11-09 Yannick Moy <moy@adacore.com>
* binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
* checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
use. Default initialize Hi, Lo.
(Selected_Range_Checks): Retype Num_Checks more precisely.
(Determine_Range, Determine_Range_R): Default initialize Hi_Right,
Lo_Right.
* contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
Unmodified.
(Process_Postconditions): Mark parameter Stmts as Unmodified.
* exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
* exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
(Expand_Concatenate): Default initialize High_Bound.
(Optimize_Length_Comparison): Default initialize Ent, Index.
* exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
L_Lo.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
Return_Stmt.
* exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
remove pragma Warnings(Off).
* exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
* exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
* freeze.adb (Check_Component_Storage_Order): Default initialize
Comp_Byte_Aligned rather than silencing messages with pragma
Warnings(Off), which does not work for CodePeer initialization
messages, and given that here the possible read of an unitialized value
depends on a proper use of parameters by the caller.
* inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
* sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
* sem_ch3.adb (Build_Derived_Array_Type): Default initialize
Implicit_Base.
* sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
pragma Warnings(Off).
(Analyze_Case_Expression): Rescope checking block within branch where
Others_Present is set by the call to Check_Choices.
* sem_ch5.adb (Analyze_Assignment): Default initialize
Save_Full_Analysis.
* sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
and restructure code to defend against previous errors, so that, in
that case, control does not flow to the elsif condition which read an
uninitialized Obj_Decl.
* sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
(Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
which seem to be left uninitialized and possibly read in some cases.
* sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
precisely. This requires to exchange the test for exiting in case of
too many positions and the increment to Position, inside the loop.
* sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
which cannot be read uninitialized, but the reasons for that are quite
subtle.
* sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
* sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
Spec_Id.
* sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
and test for presence of non-null Opnd_Type before testing its scope,
in a test which would read its value uninitialized, and is very rarely
exercized (it depends on the presence of an extension of System).
* sem_spark.ads: Update comment to fix name of main analysis procedure.
* sem_warn.adb (Warn_On_Known_Condition): Default initialize
Test_Result.
* set_targ.adb (FailN): Mark procedure with No_Return.
* stylesw.adb (Save_Style_Check_Options): Delete useless code to
initialize all array Options to white space, as there is already code
doing the same for the remaining positions in Options at the end of the
procedure.
2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
generic instantiations either.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Part_Of): Reword error message.
(Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
SPARK_Mode appears with an illegal mode, treat this as a non-existent
mode.
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
a limited view of a type T declared in unit U1, when the function is
declared in another unit U2 and the call appears in a procedure within
another unit.
2017-11-09 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
when processing generic instances.
2017-11-09 Bob Duff <duff@adacore.com>
* namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
Error_Name and No_Name. Use this (versus Name_Id) to indicate which
objects can have those special values. Valid_Name_Id could usefully be
used all over the compiler front end, but that's too much trouble for
now. If we did that, we might want to rename:
Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
For parameters of type Valid_Name_Id, remove some redundant tests,
including the ones found by CodePeer. Use Is_Valid_Name instead of
membership test when appropriate.
(Error_Name_Or_No_Name): Delete this; it's no longer needed.
* sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
"in Error_Name_Or_No_Name".
(Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
Error_Name_Or_No_Name".
2017-11-09 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
mode here unless -gnateC is specified.
* switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
-gnatC here.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
part of the ALI writing; they are now processed directly from memory
when requested by the backend.
* lib-xref.ads (Collect_SPARK_Xrefs): Remove.
(Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
* lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
(Add_SPARK_File): Remove.
(Add_SPARK_Xref): Refactored from removed code; filters xref entries
that are trivially uninteresting to the SPARK backend.
* spark_xrefs.ads: Remove code that is no longer needed.
* spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb: Update the documentation on adding a new elaboration
schenario. Add new hash table Recorded_Top_Level_Scenarios.
(Is_Check_Emitting_Scenario): Removed.
(Is_Recorded_Top_Level_Scenario): New routine.
(Kill_Elaboration_Scenario): Reimplemented.
(Record_Elaboration_Scenario): Mark the scenario as recorded.
(Set_Is_Recorded_Top_Level_Scenario): New routine.
(Update_Elaboration_Scenario): Reimplemented.
* sinfo.adb (Is_Recorded_Scenario): Removed.
(Set_Is_Recorded_Scenario): Removed.
* sinfo.ads: Remove attribute Is_Recorded_Scenario along with
occurrences in nodes.
(Is_Recorded_Scenario): Removed along with pragma Inline.
(Set_Is_Recorded_Scenario): Removed along with pragma Inline.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
error message.
2017-11-09 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Allocator): Add warning messages corresponding
to the allocation of an anonymous access-to-controlled object.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-qnx.c: Fix obvious typo.
2017-11-09 Doug Rupp <rupp@adacore.com>
* libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve): If expression is an entity whose type has
implicit dereference, generate reference to it, because no reference is
generated for an overloaded entity during analysis, given that its
identity may not be known.
2017-11-09 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
offset-to-top field by addition.
(Make_Secondary_DT): Initialize the offset-to-top field with a negative
offset.
* exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
return a negative offset-to-top value.
(Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
Set_Static_Offset_To_Top passing a negative offet-to-top value;
initialize also the offset-to-top field with a negative offset.
* libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
an addition since the offset-to-top field is now a negative value.
(Displace): Displace the pointer to the object means of a substraction
since it is now a negative value.
(Set_Dynamic_Offset_to_top): Displace the pointer to the object by
means of a substraction since it is now a negative value.
2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
* gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
before Errout.Output_Messages also in the case of compilation errors.
2017-11-09 Javier Miranda <miranda@adacore.com>
* doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
the Class Level): Fix error interfacing with C strings.
* gnat_ugn.texi: Regenerate.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* system-qnx-aarch64.ads: Fix the priority constants.
* s-osinte__qnx.ads: Fix constants for handling the locking protocols
and scheduling.
* s-osinte__qnx.adb: New file , prevents the use of priority 0 that
corresponds to an idle priority on QNX.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
comments.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
in expression funtions that are expanded into variables.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb: Minor whitespace cleanup.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
s-taprop version rather than a custom one.
* sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref.ads, lib-xref-spark_specific.adb
(Traverse_Compilation_Unit): Move declaration to package body.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
the type of the renaming from its defining entity, rather then the
subtype mark as there may not be a subtype mark.
2017-11-08 Jerome Lambourg <lambourg@adacore.com>
* adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
terminals.c: Initial port of GNAT for aarch64-qnx
2017-11-08 Elisa Barboni <barboni@adacore.com>
* exp_util.adb (Find_DIC_Type): Move...
* sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
2017-11-08 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Allocator): Add info messages corresponding to
the owner and corresponding coextension.
2017-11-08 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
following separate procedures.
(Resolve_Delta_Array_Aggregate): Previous code form
Resolve_Delta_Aggregate.
(Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
ARG decisions on the legality rules for delta aggregates for records:
in the case of a variant record, components from different variants
cannot be specified in the delta aggregate, and this must be checked
statically.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
removed component.
2017-11-08 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb: Minor typo fix.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
Spec_Scope_Num components.
* spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
removed components.
(Collect_SPARK_Xrefs): Skip setting proper values of removed
components.
2017-11-08 Gary Dismukes <dismukes@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
name is a discriminant in check for unconditional accessibility
violation within instances.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
for constants (with variable input).
(Is_Constant_Object_Without_Variable_Input): Remove.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
cross-references.
(dspark): Remove hardcoded table bound.
2017-11-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
the type of the base of the construct to determine the type (or
candidate interpretations) of the delta aggregate. This allows the
construct to appear in a context that expects a private extension.
* sem_res.adb (Resolve): Handle properly a delta aggregate with an
overloaded base.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
with Entity_Id of the reference.
* spark_xrefs.adb (dspark): Adapt pretty-printing routine.
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
reference, not the file and scope indices.
2017-11-08 Arnaud Charlet <charlet@adacore.com>
* errout.ads (Current_Node): New.
* errout.adb (Error_Msg): Use Current_Node.
* par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
when relevant.
* style.adb: Call Error_Msg_N when possible.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
Entity.
* lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
the Scope_Id record component.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_File_Record): Remove string components.
* spark_xrefs.adb (dspark): Remove pretty-printing of removed
SPARK_File_Record components.
* lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
representation of files/units.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
Remove Inside_Stubs parameter.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
represented by Entity_Id.
(SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
represented by Entity_Id; this information is not repeated as
Scope_Entity.
(Heap): Moved from lib-xref-spark_specific.adb, to reside next to
Name_Of_Heap_Variable.
* spark_xrefs.adb (dspark): Adapt debug routine to above changes in
data types.
* lib-xref-spark_specific.adb: Adapt routines for populating SPARK
scope and xrefs tables to above changes in data types.
2017-11-08 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
primitives of generic actuals.
(Mark_Use_Type): Add recursive call to properly mark class-wide type's
base type clauses as per ARM 8.4 (8.2/3).
2017-11-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
categorization dependency of the body, as is done for non-generic
units.
(New_Overloaded_Entity, Visible_Part_Type): Remove linear search
through declarations (Simple optimization, no behavior change).
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
(SPARK_Scope_Record): Remove inessential components.
* spark_xrefs.adb (dspark): Remove pretty-printing of removed record
components.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
removed record components.
(Add_SPARK_Xrefs): Remove setting of removed record components.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
empty entities.
2017-11-08 Javier Miranda <miranda@adacore.com>
* sem_disp.adb (Is_Inherited_Public_Operation): Extend the
functionality of this routine to handle multiple levels of derivations.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Elist36 is now used as Nested_Scenarios.
(Nested_Scenarios): New routine.
(Set_Nested_Scenarios): New routine.
(Write_Field36_Name): New routine.
* einfo.ads: Add new attribute Nested_Scenarios along with occurrences
in entities.
(Nested_Scenarios): New routine along with pragma Inline.
(Set_Nested_Scenarios): New routine along with pragma Inline.
* sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
(Process_Nested_Scenarios): New routine.
(Traverse_Body): When a subprogram body is traversed for the first
time, find, save, and process all suitable scenarios found within.
Subsequent traversals of the same subprogram body utilize the saved
scenarios.
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
protected operations.
(Add_SPARK_Xrefs): Simplify detection of empty entities.
* get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
reading and testing SPARK cross-references stored in the ALI files.
* lib-xref.ads (Output_SPARK_Xrefs): Remove.
* lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
ALI file.
* spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
with description of the SPARK xrefs ALI format.
* gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
and put_spark_refs.o.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
when the associated access type is subject to pragma
No_Heap_Finalization.
* exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
designated type in case it comes from a limited withed unit.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
SPARK-related flags. Add ??? comment.
* exp_util.adb (Insert_Actions): Add an entry for node
N_Variable_Reference_Marker.
* sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
* sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
and record a variable reference marker for the current name.
(Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
a variable reference marker for the current name.
* sem_elab.adb (Build_Variable_Reference_Marker): New routine.
(Extract_Variable_Reference_Attributes): Reimplemented.
(Info_Scenario): Add output for variable references and remove output
for variable reads.
(Info_Variable_Read): Removed.
(Info_Variable_Reference): New routine.
(Is_Suitable_Scenario): Variable references are now suitable scenarios
while variable reads are not.
(Output_Active_Scenarios): Add output for variable references and
remove output for variable reads.
(Output_Variable_Read): Removed.
(Output_Variable_Reference): New routine.
(Process_Variable_Read): Removed.
(Process_Variable_Reference): New routine.
(Process_Variable_Reference_Read): New routine.
* sem_elab.ads (Build_Variable_Reference_Marker): New routine.
* sem_res.adb (Resolve_Actuals): Build and record a variable reference
marker for the current actual.
* sem_spark.adb (Check_Node): Add an entry for node
N_Variable_Reference_Marker.
* sem_util.adb (Within_Subprogram_Call): Moved to the library level.
* sem_util.ads (Within_Subprogram_Call): Moved to the library level.
* sinfo.adb (Is_Read): New routine.
(Is_Write): New routine.
(Target): Updated to handle variable reference markers.
(Set_Is_Read): New routine.
(Set_Is_Write): New routine.
(Set_Target): Updated to handle variable reference markers.
* sinfo.ads: Add new attributes Is_Read and Is_Write along with
occurrences in nodes. Update attribute Target. Add new node
kind N_Variable_Reference_Marker.
(Is_Read): New routine along with pragma Inline.
(Is_Write): New routine along with pragma Inline.
(Set_Is_Read): New routine along with pragma Inline.
(Set_Is_Write): New routine along with pragma Inline.
* sprint.adb (Sprint_Node_Actual): Add an entry for node
N_Variable_Reference_Marker.
2017-11-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Subprogram_Name): Append suffix for overloaded
subprograms.
2017-11-08 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
about unused use-type or use-package clauses inside inlined bodies.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
In_Partial_Fin along with a comment on its usage. Do not guarantee the
prior elaboration of a unit when the need came from a partial
finalization context.
(In_Initialization_Context): Relocated to Process_Call.
(Is_Partial_Finalization_Proc): New routine.
(Process_Access): Add new parameter In_Partial_Fin along with a comment
on its usage.
(Process_Activation_Call): Add new parameter In_Partial_Fin along with
a comment on its usage.
(Process_Activation_Conditional_ABE_Impl): Add new parameter
In_Partial_Fin along with a comment on its usage. Do not emit any ABE
diagnostics when the activation occurs in a partial finalization
context.
(Process_Activation_Guaranteed_ABE_Impl): Add new parameter
In_Partial_Fin along with a comment on its usage.
(Process_Call): Add new parameter In_Partial_Fin along with a comment
on its usage. A call is within a partial finalization context when it
targets a finalizer or primitive [Deep_]Finalize, and the call appears
in initialization actions. Pass this information down to the recursive
steps of the Processing phase.
(Process_Call_Ada): Add new parameter In_Partial_Fin along with a
comment on its usage. Remove the guard which suppresses the generation
of implicit Elaborate[_All] pragmas. This is now done in
Ensure_Prior_Elaboration.
(Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
with a comment on its usage. Do not emit any ABE diagnostics when the
call occurs in a partial finalization context.
(Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
comment on its usage.
(Process_Instantiation): Add new parameter In_Partial_Fin along with a
comment on its usage.
(Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
with a comment on its usage.
(Process_Instantiation_Conditional_ABE): Add new parameter
In_Partial_Fin along with a comment on its usage. Do not emit any ABE
diagnostics when the instantiation occurs in a partial finalization
context.
(Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
with a comment on its usage.
(Process_Scenario): Add new parameter In_Partial_Fin along with a
comment on its usage.
(Process_Single_Activation): Add new parameter In_Partial_Fin along
with a comment on its usage.
(Traverse_Body): Add new parameter In_Partial_Fin along with a comment
on its usage.
2017-11-08 Arnaud Charlet <charlet@adacore.com>
* sem_ch13.adb: Add optional parameter to Error_Msg.
2017-11-08 Jerome Lambourg <lambourg@adacore.com>
* fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
for the Interfaces.* hierarchy as longer unit names are now allowed.
2017-11-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
subprogram as well. Support more cases of entities.
(Append_Entity_Name): Add some defensive code.
2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
PR ada/82785
* gcc-interface/Makefile.in (m68k/Linux): Fix typo.
2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
(convert): Do not use an unchecked conversion for converting from a
type to another type padding it.
2017-10-20 Doug Rupp <rupp@adacore.com>
* libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
needed for using monotonic clock.
* libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
changes.
* libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
out monotonic clock related functions body.
(Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
Compute_Deadline): Move to...
* libgnarl/s-tpopmo.adb: ... here. New separate package body.
2017-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
case where the controlling formal is an anonymous access to interface
type.
* exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
access type, handle properly the the constructed dereference that
designates the object used in the rewritten synchronized call.
(Parameter_Block_Pack): If the type of the actual is by-copy, its
generated declaration in the parameter block does not need an
initialization even if the type is a null-excluding access type,
because it will be initialized with the value of the actual later on.
(Parameter_Block_Pack): Do not add controlling actual to parameter
block when its type is by-copy.
2017-10-20 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
scope stack traversal into the context clause.
2017-10-20 Bob Duff <duff@adacore.com>
* sinfo.ads: Fix a comment typo.
2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
warning against usage in conjunction with -gnatn.
(-fdump-xref): Delete entry.
* doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
-fdump-xref switch.
* gnat_ugn.texi: Regenerate.
2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
Minor reformatting.
2017-10-20 Yannick Moy <moy@adacore.com>
* sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
compare a dimensioned expression with a literal.
(Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
special value zero.
* doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
dimensionality system in GNAT.
* gnat_ugn.texi: Regenerate.
2017-10-20 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
inadequate silencing of errors.
* sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
checking the subprogram body generated from an expression function,
when this is done as part of the preanalysis done on expression
functions, as the subprogram body may not yet be attached in the AST.
The error if any will be issued later during the analysis of the body.
(Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
2017-10-20 Arnaud Charlet <charlet@adacore.com>
* sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
warning on ineffective use clause.
2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
* exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
to issue the warning on the absence of local raise.
(Possible_Local_Raise): Do not issue the warning for Call_Markers.
(Warn_If_No_Local_Raise): New procedure to issue the warning on the
absence of local raise.
* sem_elab.adb: Add with and use clauses for Exp_Ch11.
(Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
where a scenario could give rise to raising Program_Error.
* sem_elab.adb: Typo fixes.
* fe.h (Warn_If_No_Local_Raise): Declare.
* gcc-interface/gigi.h (get_exception_label): Change return type.
* gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
simple vector of Entity_Id.
(gnu_storage_error_label_stack): Likewise.
(gnu_program_error_label_stack): Likewise.
(gigi): Adjust to above changes.
(Raise_Error_to_gnu): Likewise.
(gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
(N_Push_Constraint_Error_Label): Push the label onto the stack.
(N_Push_Storage_Error_Label): Likewise.
(N_Push_Program_Error_Label): Likewise.
(N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
a warning on the absence of local raise.
(N_Pop_Storage_Error_Label): Likewise.
(N_Pop_Program_Error_Label): Likewise.
(push_exception_label_stack): Delete.
(get_exception_label): Change return type to Entity_Id and adjust.
* gcc-interface/utils2.c (build_goto_raise): Change type of first
parameter to Entity_Id and adjust. Set TREE_USED on the label.
(build_call_raise): Adjust calls to get_exception_label and also
build_goto_raise.
(build_call_raise_column): Likewise.
(build_call_raise_range): Likewise.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
Document actual default behavior.
2017-10-20 Piotr Trojanek <trojanek@adacore.com>
* einfo.ads: Minor consistent punctuation in comment. All numbered
items in the comment of Is_Internal are now terminated with a period.
2017-10-20 Piotr Trojanek <trojanek@adacore.com>
* exp_util.adb (Build_Temporary): Mark created temporary entity as
internal.
2017-10-20 Piotr Trojanek <trojanek@adacore.com>
* sem_type.adb (In_Generic_Actual): Simplified.
2017-10-20 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
verify a renaming exists for a generic formal before comparing it to
the actual as defaulted formals will not have a renamed_object.
2017-10-20 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Replace_Returns): Fix wrong management of
N_Block_Statement nodes.
2017-10-20 Bob Duff <duff@adacore.com>
* exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
component of an array aggregate if it is initialized by a
build-in-place function call.
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
bip for nonlimited types.
* debug.adb: Document -gnatd.9.
2017-10-20 Bob Duff <duff@adacore.com>
* sem_ch12.adb: Remove redundant setting of Parent.
2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
of the operands is a string literal.
2017-10-20 Bob Duff <duff@adacore.com>
* einfo.ads: Comment fix.
2017-10-20 Clement Fumex <fumex@adacore.com>
* switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
2017-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Extract_Power): Accept dimension values that are not
non-negative integers when the dimensioned base type is an Integer
type.
2017-10-20 Bob Duff <duff@adacore.com>
* sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
that an allocator came from a b-i-p return statement.
* exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
object of a nonlimited build-in-place function call.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
Alloc_For_BIP_Return flag on generated allocators.
* sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
If the N_Assignment_Statement has been transformed into something else,
then Should_Transform_BIP_Assignment won't work.
* exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
"Remove Adjust if we're building the return object of an extended
return statement in place." Back out that part of the change, because
the Alloc_For_BIP_Return flag is now used for that.
2017-10-19 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
should be "T". Handle case of a subtype of a class-wide type.
2017-10-19 Bob Duff <duff@adacore.com>
* exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
which node kinds can legitimately be ignored, and raise Program_Error
for others.
2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
instantiation that acts as a compilation unit.
(Find_Code_Unit): Reimplemented.
(Find_Top_Unit): Reimplemented.
(Find_Unit_Entity): New routine.
(Process_Instantiation_SPARK): Correct the elaboration requirement a
package instantiation imposes on a unit.
2017-10-19 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
for a narrow set of controlled types.
2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
* sinput.ads (Line_Start): Add pragma Inline.
* widechar.ads (Is_Start_Of_Wide_Char): Likewise.
2017-10-19 Bob Duff <duff@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Disable
Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
build-in-place function call so that the temp is declared in the right
place.
2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_tree_size): Move around.
* gcc-interface/utils.c (max_size): Deal with SSA names.
2017-10-17 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/misc.c (gnat_tree_size): New function.
(LANG_HOOKS_TREE_SIZE): Redefine.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (In_Preelaborated_Context): A generic package subject to
Remote_Call_Interface is not a suitable preelaboratd context when the
call appears in the package body.
2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
* layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
* layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
alignment for consistency. If Align is non-zero, use the minimum of
Align and M for the alignment.
* cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
setting the alignment directly.
2017-10-14 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
optional string in an Assert pragma until the expansion of the pragma
has rewritten it as a conditional statement, so that the string
argument is only evaluaed if the assertion fails. This is mandated by
RM 11.4.2.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* debug.adb: Switch -gnatd.v and associated flag are now used to
enforce the SPARK rules for elaboration in SPARK code.
* sem_elab.adb: Describe switch -gnatd.v.
(Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
(Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
in effect.
(Process_Variable_Assignment): Clarify why variable assignments are
processed reglardless of whether -gnatd.v is in effect.
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
sections on elaboration code and compilation switches.
* gnat_ugn.texi: Regenerate.
2017-10-14 Gary Dismukes <dismukes@adacore.com>
* exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
sem_warn.adb: Minor reformattings.
2017-10-14 Ed Schonberg <schonberg@adacore.com>
* doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
for reverse iteration over formal containers.
* gnat_rm.texi: Regenerate.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
Ensure_Prior_Elaboration_Dynamic for consistency reasons.
(Ensure_Static_Prior_Elaboration): Renamed to
Ensure_Prior_Elaboration_Static for consistency reasons.
(Info_Variable_Reference): Renamed to Info_Variable_Read in order to
reflect its new purpose.
(Is_Initialized): New routine.
(Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
in order to reflect its new purpose.
(Is_Variable_Read): New routine.
(Output_Variable_Reference): Renamed to Output_Variable_Read in order
to reflect its new purpose.
(Process_Variable_Assignment): This routine now acts as a top level
dispatcher for variable assignments.
(Process_Variable_Assignment_Ada): New routine.
(Process_Variable_Assignment_SPARK): New routine.
(Process_Variable_Reference): Renamed to Process_Variable_Read in order
to reflects its new purpose. A reference to a variable is now suitable
for ABE processing only when it is a read. The logic in the routine now
reflects the latest SPARK elaboration rules.
2017-10-14 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
triggers marking on formal subprograms.
2017-10-14 Javier Miranda <miranda@adacore.com>
* checks.adb (Ensure_Valid): Do not skip adding the validity check on
renamings of objects that come from the sources.
2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
* cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
parameter and set the alignment of the type to Align.
(Copy_Float_Type): Adjust call to Build_Float_Type.
(Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
call to Build_Float_Type and do not set RM_Size and Alignment.
2017-10-14 Patrick Bernardi <bernardi@adacore.com>
* Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
GNATRTL_NONTASKING_OBJ.
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.
2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
* gcc-interface/decl.c (annotate_value): Use wi::to_wide when
operating on trees as wide_ints.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
as a scoping construct when it is byproduct of exception handling.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
semantic field Target of node N_Call_Marker.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Allocator): Reject properly an allocator that
attempts to copy a limited value, when the allocator is the expression
in an expression function.
2017-10-09 Joel Brobecker <brobecker@adacore.com>
* doc/share/conf.py: Tell the style checker that this is a Python
fragment, and therefore that pyflakes should not be run to validate
this file.
2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Boolean_Type): Add pragma Inline.
(Is_Entity_Name): Likewise.
(Is_String_Type): Likewise.
* sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
and remove useless comparisons on the base types.
(Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
on T2. Always test Is_Private_Type before Full_View_Covers.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch4.adb: Minor refactoring.
2017-10-09 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Replace_Components): Browse the list of discriminants,
not components.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
are verified only in the static model.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification,
Check_Reverse_Iteration): Check that the domain of iteration supports
reverse iteration when it is a formal container. This requires the
presence of a Previous primitive in the Iterable aspect.
* sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
primitives Last and Previous to support reverse iteration over formal
containers.
(Validate_Iterable_Aspect): Add check for reverse iteration operations.
* exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
for reverse iteration using primitives Last and Previous in generated
loop.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Subprogram_Name): If this is a child unit, use the name
of the Defining_Program_Unit_Name, which is an identifier, in order to
construct the string for the fully qualified name.
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.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
in the static model.
(Is_Suitable_Variable_Assignment): This scenario is now only relevant
in the static model.
(Is_Suitable_Variable_Reference): This scenario is now only relevant in
the static model.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
expressions when the enclosing scope is a subprogram body and the next
declaration is a body that freezes entities previously declared in the
scope.
2017-10-09 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
ghost packages and living packages in use clauses.
(Use_One_Type, Note_Redundant_Use): Correct warning messages
2017-10-09 Justin Squirek <squirek@adacore.com>
* osint.ads: Document new parameter FD for Read_Source_File.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Make_Predicate_Call): If the type of the expression to
which the predicate check applies is tagged, convert the expression to
that type. This is in most cases a no-op, but is relevant if the
expression is clas-swide, because the predicate function being invoked
is not a primitive of the type and cannot take a class-wide actual.
2017-10-09 Gary Dismukes <dismukes@adacore.com>
* exp_disp.adb: Minor reformatting.
2017-10-09 Arnaud Charlet <charlet@adacore.com>
* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
GNATprove.
(Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
immediately if the call has already been processed (by a previous call
to Make_Build_In_Place_Call_In_Anonymous_Context).
* sem_elab.adb: Minor typo fixes.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
predicate, do not replace an identifier that matches the type if the
identifier is a selector in a selected component, because this
indicates a reference to some homograph of the type itself, and not to
the current occurence in the predicate.
2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Record_Layout): Tweak formatting.
(Write_Val): Remove superfluous spaces in back-end layout mode.
2017-10-09 Piotr Trojanek <trojanek@adacore.com>
* sem_res.adb (Property_Error): Remove.
(Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
current wording of the rule.
2017-10-09 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
before analyzing a given scope due to an expression function.
(Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
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.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2017-10-09 Bob Duff <duff@adacore.com>
* freeze.ads: Minor comment fixed.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
care of unchecked conversions in addition to regular conversions. This
takes care of a case where a type is derived from a private untagged
type that is completed by a tagged controlled type.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
rewriting a class-wide condition, handle properly the case where the
controlling argument of the operation to which the condition applies is
an access to a tagged type, and the condition includes a dispatching
call with an implicit dereference.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
the code at the end of this procedure that was setting the type of a
class-wide object to the specific type returned by a function call.
Treat this case as indefinite instead.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
Suppress spurious ambiguity error when two traversals of the homonym
chain (first directly, and then through an examination of relevant
interfaces) retrieve the same operation, when other irrelevant homonyms
of the operatioh are also present.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Object_Access_Level): If the object is the return
statement of an expression function, return the level of the function.
This is relevant when the object involves an implicit conversion
between access types and the expression function is a completion, which
forces the analysis of the expression before rewriting it as a body, so
that freeze nodes can appear in the proper scope.
2017-10-09 Bob Duff <duff@adacore.com>
* atree.adb: Make nnd apply to everything "interesting", including
Rewrite. Remove rrd.
2017-10-09 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
processing the declaration of the dummy object internally created by
Make_DT to compute the offset to the top of components referencing
secondary dispatch tables.
(Initialize_Tag): Do not initialize the offset-to-top field if it has
been initialized initialized.
* exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
* exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
(Make_DT): Create a dummy constant object if we can statically build
secondary dispatch tables.
(Make_Secondary_DT): For statically allocated secondary dispatch tables
use the dummy object to compute the offset-to-top field value by means
of the attribute 'Position.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
code so if BIPAlloc is not passed in, it will likely raise
Program_Error instead of cause miscellaneous chaos.
(Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
as for the other Is_B-I-P... functions.
* sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
aggregate whose ancestor part is a build-in-place call returning a
nonlimited type, transform the assignment to the ancestor part to use a
temp.
* sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
creating an Itype for a library unit entity.
(Check_Initialization): Avoid spurious error message on
internally-generated call.
* sem_ch5.adb (Analyze_Assignment): Handle the case where the
right-hand side is a build-in-place call. This didn't happen when b-i-p
was only for limited types.
* sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
implies >= Ada 2005.
* sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
repeatedly.
* sem_util.adb (Next_Actual): Handle case of build-in-place call.
2017-10-09 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2017-10-09 Piotr Trojanek <trojanek@adacore.com>
* libgnarl/s-taprob.adb: Minor whitespace fix.
2017-10-09 Bob Duff <duff@adacore.com>
* namet.ads: Minor comment fix.
2017-10-09 Piotr Trojanek <trojanek@adacore.com>
* sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
just like other program units listed in Ada RM 10.1(1).
2017-10-09 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
actual for a formal package is an instantiation of a child unit, create
a freeze node for the instance of the parent if it appears in the same
scope and is not frozen yet.
2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
* exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
in-source documentation for tagged types's Offset_To_Top.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
confusing. Same for N_Loc. Remove assumption that b-i-p implies
limited. This is for the case of a function call that occurs as the
default for a record component.
(Expand_N_Object_Declaration): Deal with the case where expansion has
created an object declaration initialized with something like
F(...)'Reference.
* exp_ch3.adb: Minor reformatting.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
the attribute is an object, but it may appear within a conversion. The
object itself must be retrieved when generating the range test that
implements the validity check on a scalar type.
2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
PR ada/82393
* mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
* sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
Pierre-Marie de Rodat <derodat@adacore.com>
PR ada/82384
* libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
(time_t): Change from derived type to subtype.
(timeval): Use suseconds_t for tv_usec.
* libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
* gcc-interface/decl.c (annotate_value): Use wi::to_widest when
handling the form (plus/mult (convert @0) @1).
2017-09-29 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
what we had before.
(Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
change. Set the Etype in the class-wide case. This fixes a regression
in the libadalang test suite.
2017-09-29 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
in comment markup.
* gnat_ugn.texi: Regenerate.
2017-09-29 Justin Squirek <squirek@adacore.com>
* ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
for checking source file status and error message and/or call to
Read_Source_File.
* libgnat/s-os_lib.ads: Add new potential value constant for
uninitialized file descriptors.
* osint.adb, osint.ads (Read_Source_File): Add extra parameter to
return result of IO to encompass a read access failure in addition to a
file-not-found error.
2017-09-29 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
functions returning nonlimited types. Allow for qualified expressions
and type conversions.
(Expand_N_Extended_Return_Statement): Correct the computation of
Func_Bod to allow for child units.
(Expand_Simple_Function_Return): Remove assumption that b-i-p implies
limited (initialization of In_Place_Expansion), and implies >= Ada
2005.
(Is_Build_In_Place_Result_Type): New function to accompany
Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
sometimes we just have the type on our hands, not the function. For
now, does the same thing as the old version, so build-in-place is
disabled for nonlimited types, except that you can use -gnatd.9 to
enable it.
* exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
accompany Is_Build_In_Place_Function and
Is_Build_In_Place_Function_Call, because sometimes we just have the
type on our hands, not the function.
(Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
cases.
(Make_Build_In_Place_Call_In_Object_Declaration): Remove the
questionable code at the end that was setting the Etype.
* exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
determine whether "return (...agg...);" is returning from a
build-in-place function.
(Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
Remove assumption that b-i-p implies limited (initialization of
In_Place_Expansion).
(Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
an unchecked conversion. Add assertions.
(Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
secondary stack here, just because the type needs finalization. That
code is obsolete.
(Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
For "return (...agg...);" don't assume b-i-p implies limited.
Needs_Finalization does not imply secondary stack.
(Expand_Array_Aggregate): Named notation. Reverse the sense of
Component_OK_For_Backend -- more readability with fewer double
negatives.
* exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
b-i-p implies >= Ada 2005.
* exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
object of an extended return statement in place.
* exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
b-i-p implies >= Ada 2005.
* exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
b-i-p implies >= Ada 2005.
* exp_ch7.adb: Comment fix.
* exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
assumptions that b-i-p implies >= Ada 2005.
* exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
b-i-p implies >= Ada 2005.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
(Expr), in case Pool_Id is not set.
(Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
qualified or converted.
(Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
(Param)) = N_Identifier; that's all it could be.
* sinfo.ads: Comment fixes.
* snames.ads-tmpl: Comment fixes.
* debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2017-09-29 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
all cases related to marking entity identifiers.
2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
* adaint.c (win32_wait): Properly handle error and take into account
the WIN32 limitation on the number of simultaneous wait objects.
2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
* cal.c: Minor proofreading.
2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
* gnat_ugn.texi: Regenerate.
2017-09-29 Bob Duff <duff@adacore.com>
* lib-xref.ads: Comment fix.
2017-09-29 Bob Duff <duff@adacore.com>
* exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
Discriminants can't need finalization.
2017-09-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
for types in expression if the function is within a generic unit.
* sem_res.adb (Resolve): In a generic context do not freeze an
expression, unless it is an entity. This exception is solely for the
purpose of detecting illegal uses of deferred constants in generic
units.
* sem_res.adb: Minor reformatting.
2017-09-29 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
redundant warnings.
2017-09-29 Yannick Moy <moy@adacore.com>
* sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
* doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
Document the effect of pragma Optimize_Alignment (Space) on non-packed
record types.
* gnat_rm.texi: Regenerate.
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.
2017-09-25 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK_Indexed_Component,
Expand_SPARK_Selected_Component): New procedures to insert explicit
dereference if required.
(Expand_SPARK): Call the new procedures.
2017-09-25 Patrick Bernardi <bernardi@adacore.com>
* libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
* adaint.c (win32_wait): Properly handle error and take into account
the WIN32 limitation on the number of simultaneous wait objects.
2017-09-25 Yannick Moy <moy@adacore.com>
* sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
invariant procedure in GNATprove mode.
* sem_ch5.adb (Analyze_Assignment): Likewise.
2017-09-25 Piotr Trojanek <trojanek@adacore.com>
* adabkend.adb (Call_Back_End): Fix wording of "front-end" and
"back-end" in comments.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
call that appears in a classwide precondition and that mentions an
access formal of the subprogram, must use the accessibility level of
the actual in the call. This is one case in which a reference to a
formal parameter appears outside of the body of the subprogram.
2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
for GNATprove.
(Resolve_Entry): Clean up predicate
2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
than Program_Error because U_E is more in line with respect to the
intended behavior.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
Storage_Size does not freeze, and thus can include references to
deferred constants.
2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
reference when it appears within a pragma of no significance to SPARK.
(In_Insignificant_Pragma): New routine.
* sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
actual is a renaming, indicate that it is the renamed package that must
be frozen before the instantiation.
2017-09-25 Yannick Moy <moy@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
of dimensionality system in GNAT UG.
* gnat_ugn.texi: Regenerate.
2017-09-25 Yannick Moy <moy@adacore.com>
* gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
GNATprove_Mode when switch -gnatdF used.
2017-09-25 Piotr Trojanek <trojanek@adacore.com>
* adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
the backend.
2017-09-25 Javier Miranda <miranda@adacore.com>
* exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
expansion of user-defined enumeration types when the generation of
names for enumeration literals is suppressed.
2017-09-25 Gary Dismukes <dismukes@adacore.com>
* libgnarl/s-taprop__linux.adb: Minor reformatting.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
that appear as selector names of parameter associations, as these are
never resolved by visibility.
2017-09-25 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Entry): Generate reference for index entities.
2017-09-25 Doug Rupp <rupp@adacore.com>
* libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2017-09-25 Javier Miranda <miranda@adacore.com>
* exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
(Expand_User_Defined_Enumeration_Image): New subprogram.
(Expand_Image_Attribute): Enable speed-optimized expansion of
user-defined enumeration types when we are compiling with optimizations
enabled.
2017-09-25 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
routine is already provided by Einfo.
* einfo.adb (Has_Null_Abstract_State): Replace with the body from
Sem_Util, which had better comments and avoided double calls to
Abstract_State.
2017-09-25 Bob Duff <duff@adacore.com>
* exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2017-09-25 Doug Rupp <rupp@adacore.com>
* libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
(Compute_Base_Monotonic_Clock): New function.
(Timed_Sleep): Adjust to use Base_Monotonic_Clock.
(Timed_Delay): Likewise.
(Monotonic_Clock): Likewise.
* s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Save_References_In_Aggregate): Small correction to
previous change.
2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
Minor reformatting.
2017-09-20 Alexandre Oliva <aoliva@redhat.com>
* gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
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.
2017-09-18 Bob Duff <duff@adacore.com>
* sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
mark refers to the current instance. Set the type to Any_Type in that
case, to avoid later crashes.
2017-09-18 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Replace_Discriminant_References): New procedure,
subsidiary of Build_Assignment, used to handle the initialization code
for a mutable record component whose default value is an aggregate that
sets the values of the discriminants of the components.
2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
the entity as being volatile for an overlay that toggles the scalar
storage order.
2017-09-18 Fedor Rybin <frybin@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
options -U main and --harness-only are not compatible.
2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
2017-09-18 Piotr Trojanek <trojanek@adacore.com>
* einfo.ads (Is_Imported): Update comment, as this
routine also applies to constants.
2017-09-18 Yannick Moy <moy@adacore.com>
* sem_util.adb (Find_Placement_In_State_Space): Allow generic package
holding state.
2017-09-18 Justin Squirek <squirek@adacore.com>
* sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
constant indication for Pragma_Linker_Section.
2017-09-18 Bob Duff <duff@adacore.com>
Alternate fix for PR ada/71358
* libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
Instead, make a local copy of Config, and if it's null, allocate an
empty Command_Line_Configuration_Record, so we won't crash on null
pointer dereference.
2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
* libgnarl/a-intnam__rtems.ads: Update copyright date.
* libgnarl/s-interr__hwint.adb: Likewise.
* libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
* libgnarl/s-osinte__rtems.adb: Likewise.
* libgnarl/s-osinte__rtems.ads: Likewise.
2017-09-13 Nicolas Roche <roche@adacore.com>
* Make-lang.in: In the fallback mechanim, parse the associated .ali
file and try to guess the locations of dependencies.
2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
the suppression status of Alignment_Check on the current scope.
(Alignment_Checks_Suppressed): New function to use the saved instead of
the current suppression status of Alignment_Check.
(Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
(Analyze_Attribute_Definition_Clause): Instead of manually appending to
the table, call Register_Address_Clause_Check.
(Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
recorded address clause instead of its entity.
2017-09-13 Jerome Guitton <guitton@adacore.com>
* libgnarl/s-tpopsp__vxworks-tls.adb,
libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
(Self): Register thread if task id is null.
2017-09-13 Arnaud Charlet <charlet@adacore.com>
* libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
2017-09-13 Arnaud Charlet <charlet@adacore.com>
* lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
from an entity to only scope index, as a mapping from an entity to the
same entity was useless.
(Get_Scope_Num): refactor as a simple renaming; rename parameter from N
to E.
(Set_Scope_Num): refactor as a simple renaming; rename parameter from N
to E.
(Is_Constant_Object_Without_Variable_Input): remove local "Result"
variable, just use return statements.
2017-09-13 Arnaud Charlet <charlet@adacore.com>
* libgnarl/s-vxwext__kernel-smp.adb,
libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
New file.
2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag42 is now Is_Controlled_Active.
(Is_Controlled): This attribute is now synthesized.
(Is_Controlled_Active): This attribute is now an explicit flag rather
than a synthesized attribute. (Set_Is_Controlled): Removed.
(Set_Is_Controlled_Active): New routine.
(Write_Entity_Flags): Update the output for Flag42.
* einfo.ads: Update the documentation of the following attributes:
Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
and Is_Controlled_Active have swapped their functionality.
(Is_Controlled): Renamed to Is_Controlled_Active.
(Is_Controlled_Active): Renamed to Is_Controlled.
(Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
* exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
Is_Controlled.
* exp_util.adb (Has_Some_Controlled_Component): Code clean up.
(Needs_Finalization): Code clean up. Remove the tests for
Disable_Controlled because a) they were incorrect as they would reject
a type which is sublect to the aspect, but may contain controlled
components, and b) they are no longer necessary.
* exp_util.ads (Needs_Finalization): Update comment on documentation.
* freeze.adb (Freeze_Array_Type): Restore the original use of
Is_Controlled.
(Freeze_Record_Type): Restore the original use of Is_Controlled.
* sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
Is_Controlled.
(Array_Type_Declaration): Restore the original use of Is_Controlled.
(Build_Derived_Private_Type): Restore the original use of
Is_Controlled.
(Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
type derived from Ada.Finalization.[Limited_]Controlled.
(Build_Derived_Type): Restore the original use of Is_Controlled.
(Record_Type_Definition): Restore the original use of Is_Controlled.
* sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
Is_Controlled.
* sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
(Analyze_Aspect_Specifications): Use routine
Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
2017-09-13 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Fix error when looking for target
of <target>-gnatclean
2017-09-13 Javier Miranda <miranda@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
expanded name that designates the current instance of a child unit in
its own body and appears as the prefix of a reference to an entity
local to the child unit.
2017-09-12 Bob Duff <duff@adacore.com>
* sem_warn.adb: Minor comment.
2017-09-12 Bob Duff <duff@adacore.com>
* libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
be Default_Initialized_Item, and apply pragma Unmodified to it,
to suppress the warning.
2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
for access types.
2017-09-12 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
together with Global when ignoring one in CodePeer mode.
2017-09-12 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Analyze_Declarations): In nested
package declarations that have a private part enable missing check
of the RM rule 13.1.1(11/3): usage names in aspect definitions are
resolved at the end of the immediately enclosing declaration list.
2017-09-12 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
Empty.
2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
* debug.adb: Reserving flag -gnatdF for safe pointer checking.
* gnat1drv.adb (gnat1drv): Adding the call to the analysis on
dF flag.
* sem_spark.adb, sem_spark.ads: Implementation of the analysis,
in preparation for the evolution of the SPARK language that
includes a pointer analysis for checking non-aliasing of access
types. The Check_Safe_Pointers function is the entry point, and
will traverse the AST and raise compile-time errors everytime
it detects non-begign aliasing. Detailed comments are present
in the sem_spark.ads file.
* sem_util.adb, sem_util.ads (First_Global, Next_Global): New
functions to iterate over the list of globals of a subprogram.
* libgnat/system.ads: Add restriction No_Finalization.
* gcc-interface/Make-lang.in: Add new file sem_spark.adb and
dependency on g-dynhta.adb.
2017-09-12 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Call
Check_Dynamically_Tagged_Expression.
* sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
"and then Is_Tagged_Type (Typ)" because there is an earlier
"Assert (Is_Tagged_Type (Typ))".
2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
2017-09-11 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
* doc/gnat_ugn/platform_specific_information.rst: Remove doc
for no longer supported platforms.
* doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
description of the semantics for dimensionality analysis.
* gnat_ugn.texi: Regenerated.
2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Has_Incomplete_Compoent): Delete.
(Freeze_Profile):
Do not inhibit the freezing of the profile of an expression
function here.
(Freeze_Subprogram): Do not re-create extra formals.
* sem_ch6.adb (Analyze_Expression_Function): Always
pre-analyze the expression if the function is not a completion.
(Analyze_Subprogram_Body_Helper): For the body generated
from an expression function that is not a completion, do
not freeze the profile and temporary mask the types declared
outside the expression that are not yet frozen.
* sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
during the pre-analysis of an expression function.
2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
(gigi): Likewise.
2017-09-11 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb: Minor rewrite.
2017-09-11 Jerome Lambourg <lambourg@adacore.com>
* libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
renaming into account.
2017-09-11 Jerome Lambourg <lambourg@adacore.com>
* libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
* gcc-interface/Makefile.in: Take this renaming into account.
2017-09-11 Arnaud Charlet <charlet@adacore.com>
* s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
longer used.
2017-09-11 Yannick Moy <moy@adacore.com>
* sem_util.adb (Check_Result_And_Post_State):
Do not issue a warning about missing reference to an outcome if
the subprogram is ghost and has no outputs.
* lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
reformatting.
2017-09-11 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Set
Check_Validity_Of_Parameters to False in GNATprove mode.
* opt.ads (Check_Validity_Of_Parameters): Document switch to
set option.
2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
generate debug info for inner record types if -fgnat-encodings=minimal.
(gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
type as the debug type.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Do not reorder in non-
packed record types if pragma Optimize_Alignment (Space) is enabled.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
limits for expression functions.
(gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
layout of the record from the parent type only if both are or are not
unchecked unions.
(is_stored_discriminant): Return false for an unchecked union.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
return NULL_EXPR.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (promote_object_alignment): New function taken
from...
(gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
(gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
create a padding type on success before doing the atomic check.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
promotion to static memory earlier in the processing.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
and TYPE_BY_REFERENCE_P flags on types after various promotions.
* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
Consider all kinds of entities.
2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert): When converting to a padding type,
reuse an existing CONSTRUCTOR if it has got the right size.
2017-09-08 Nicolas Roche <roche@adacore.com>
* gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
source in libgnat/
* a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
to libgnat subdirectory.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
return the entity associated with the call.
* sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
Replace the internal Get_Function_Id with the new
Sem_Aux.Get_Called_Entity.
(Iterate_Call_Parameters): New
procedure to iterate on formals and actuals at the same time.
* sem_ch12.adb (Analyze_Subprogram_Instantiation):
Set SPARK_Mode from spec when set, for analysis
of instance. Restore after analysis of instance.
(Instantiate_Subprogram_Body): Set SPARK_Mode from body when
set, for analysis of body instance. Restored automatically at
the end of the subprogram.
* gnat1drv.adb (Adjust_Global_Switches): Set
Check_Validity_Of_Parameters to False in GNATprove mode.
* opt.ads (Check_Validity_Of_Parameters): Document switch to
set option.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.adb (NCT_Tables_In_Use): Move to library level from...
(New_Copy_Tree): ...there. Reset the hash tables only if they
were used in the previous invocation.
* s-htable.adb: Fix typo.
2017-09-08 Bob Duff <duff@adacore.com>
* a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_aggr.adb: minor style fix.
2017-09-08 Bob Duff <duff@adacore.com>
* sprint.adb (Write_Corresponding_Source): Ignore if there is
no current source file.
(Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
Print something helpful in case N is invalid.
* sprint.ads: Minor comment fix.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
access types.
2017-09-08 Bob Duff <duff@adacore.com>
* par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
Ada_2020, along the same lines as the other Ada version pragmas.
2017-09-08 Gary Dismukes <dismukes@adacore.com>
* sem_ch12.adb: Minor typo fixes and reformatting.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate):
Rewrite bounds of aggregate subexpressions which may depend on
discriminants of the enclosing aggregate.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_ch5.adb: Prevent assertion failure on illegal code.
2017-09-08 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
calling Renamed_Entity on an entity which cannot be a renaming.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb: Add with & use clause for Urealp.
(Aggr_Assignment_OK_For_Backend): Accept (almost all)
elementary types instead of just discrete types.
* sem_eval.adb (Expr_Value): Deal with N_Null for access types.
* gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
Be prepared for the FP zero value in the memset case. Add small
guard.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* s-htable.adb (Static_HTable.Reset): Use aggregate instead
of loop.
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
of New_Copy because the latter leaves the syntactic structure of
the tree inconsistent (a child is accessible through two parents)
and prevents proper replication of itypes by subsequent calls
to New_Copy_Tree.
* exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
New_Copy because the latter leaves the syntactic structure of the
tree inconsistent (a child is accessible through two parents)
and prevents proper replication of itypes by subsequent calls
to New_Copy_Tree.
* sem_util.adb (In_Subtree): New routine.
(New_Copy_Tree): Reimplemented.
* sem_util.ads (In_Subtree): New routine.
(New_Copy_Tree): Reimplemented.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Resolve_Aspect_Expressions): The expression
for aspect Default_Value is a static scalar value, but it does
not freeze the type. Yhis allows for subsequent representation
clauses for the type.
2017-09-08 Javier Miranda <miranda@adacore.com>
* sem_ch8.adb (Find_Direct_Name.Undefined): Do
not add entries into the undefined reference table when we are
compiling with errors ignored.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
check if the instance is within an enclosing instance body. The
formal package was legal in the enclosing generic, and is
legal in the enclosing instantiation. This optimisation may be
applicable elsewhere, and it also removes spurious errors that
may arise with on-the-fly processing of instantiations that
contain Inline_Always subprograms.
2017-09-08 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Disregard empty argument of GNAT driver.
2017-09-08 Justin Squirek <squirek@adacore.com>
* checks.adb (Insert_Valid_Check): Manually decorate
the generated temporary for range valdity checks.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
2017-09-08 Justin Squirek <squirek@adacore.com>
* switch-c.adb (Scan_Front_End_Switches): Add new warning switch
case to handle underscore flags.
* warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
new procedure to handle underscores.
2017-09-08 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
divisions with fixed point results to avoid generating twice
the runtime check on divide by zero.
* checks.adb (Apply_Divide_Checks): Ensure that operands are
not evaluated twice (once for their runtime checks and once for
their regular computation).
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Part_Of): Add missing
return statements after issuing errors. Add detection of
out-of-order item and single concurrent type.
2017-09-08 Nicolas Roche <roche@adacore.com>
* gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* doc/share/conf.py, doc/share/latex_elements.py,
doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
highlighting.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_ugn/getting_started_with_gnat.rst,
doc/gnat_ugn/inline_assembler.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
doc/gnat_ugn/about_this_guide.rst,
doc/gnat_ugn/platform_specific_information.rst,
doc/gnat_ugn/example_of_binder_output.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_rm/implementation_of_specific_ada_features.rst,
doc/gnat_rm/interfacing_to_other_languages.rst,
doc/gnat_rm/implementation_defined_aspects.rst,
doc/gnat_rm/intrinsic_subprograms.rst,
doc/gnat_rm/implementation_defined_characteristics.rst,
doc/gnat_rm/implementation_advice.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/compatibility_and_porting_guide.rst,
doc/gnat_rm/standard_library_routines.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/representation_clauses_and_pragmas.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/obsolescent_features.rst,
doc/gnat_rm/about_this_guide.rst,
doc/gnat_rm/the_implementation_of_standard_i_o.rst,
doc/gnat_rm/implementation_of_ada_2012_features.rst,
doc/gnat_ugn.rst,
doc/gnat_rm.rst: Update documentation.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
* gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
2017-09-08 Bob Duff <duff@adacore.com>
* s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
New routine to read the Tag robustly.
* exp_attr.adb (Input): Change the expansion of 'Input,
in the class-wide case, to call String_Input_Tag instead of
String_Input_Blk_IO.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* s-rident.ads (Restriction_Id): reorder enum
literals, so that Pure_Barriers is no longer in range of the
Cunit_Boolean_Restrictions subtype.
2017-09-08 Nicolas Roche <roche@adacore.com>
* a-taster.ads, a-taster.adb: Move to libgnarl
* gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
Add support for files in libgnarl.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
accessibility check to an interface conversion, whose purpose
is to perform a pointer adjustment in a dispatching call.
* exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
when the actual is a construct that involves a dereference of an
expression that includes a formal of the enclosing subprogram,
In such cases, the accessibility level of the actual is that of
the corresponding formal, which is passed in as an additional
actual in the outer call.
2017-09-08 Bob Duff <duff@adacore.com>
* exp_intr.adb (Add_Source_Info): Do not decode
file names; they were not encoded in the first place.
2017-09-08 Bob Duff <duff@adacore.com>
* a-tags.adb (Internal_Tag): Unsuppress checks, so we get
exceptions instead of crashes. Check for absurdly long strings
and empty strings. Empty strings cause trouble because they can
have super-null ranges (e.g. 100..10), which causes Ext_Copy to
be empty, which causes an array index out of bounds.
* s-ststop.adb (Input): Unsuppress checks, so we get exceptions
instead of crashes.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Is_CCT_Instance): allow use in
the context of protected types.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* a-tigeli.adb: minor remove extra whitespace.
2017-09-08 Gary Dismukes <dismukes@adacore.com>
* par-ch4.adb: Reformatting of an error message.
2017-09-08 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
identifiers to ensure their correct decoration of names on
aspect expressions.
2017-09-08 Yannick Moy <moy@adacore.com>
* exp_attr.adb (Expand_Loop_Entry_Attribute): Do
not skip a loop coming from source which is rewritten into a loop.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Wrap_Imported_Subprogram): Indicate that the
wrapper has convention Ada, to prevent spurious warnings on
unconstrained array parameters.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
(Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* exp_intr.adb (Append_Entity_Name): Move to ...
* sem_util.ads, sem_util.adb: ... here to share it.
(Subprogram_Name): New subprogram, to compute the name of the enclosing
subprogram/entity.
* errutil.adb (Error_Msg): Fill new field Node.
* erroutc.ads (Subprogram_Name_Ptr): New.
(Error_Msg_Object): New field Node.
* erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
* errout.adb (Error_Msg): New variant with node id parameter.
Fill new parameter Node when emitting messages. Revert previous
changes for Include_Subprogram_In_Messages.
* sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
generating warning message.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* par-ch4.adb (P_Iterated_Component_Association): Place construct
under -gnat2020 flag, given that it is a future feature of
the language.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
defining identifier as referenced to prevent spurious warnings:
corresponding loop is expanded into one or more loops whose
variable has the same name, and the expression uses those names
and not the original one.
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Check_A_Call): Do not consider
references to internal variables for SPARK semantics.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* inline.adb (In_Package_Spec): refine type of
the parameter from Node_Id to Entity_Id.
2017-09-08 Justin Squirek <squirek@adacore.com>
* exp_ch5.adb (Expand_Formal_Container_Loop):
Reset the scope of the loop parameter after it is reanalyzed.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.ads (Set_Rep_Info): New inline procedure.
* sem_util.adb (Set_Rep_Info): Implement it.
* sem_ch3.adb (Process_Subtype): If the case of a constraint present,
always copy the representation aspects onto the subtype.
2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
* g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
Correction of the return type from access type to option type.
(Simple_HTable): Moving the Instance_Data to ads file.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* opt.ads (Include_Subprogram_In_Messages): New variable.
* errout.ads (Current_Subprogram_Ptr): New variable.
* errout.adb (Error_Msg): Prepend current subprogram info
in messages if Include_Subprogram_In_Messages is set.
* sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
Current_Subprogram.
* gnat1drv.adb (Adjust_Global_Switches): Set
Include_Subprogram_In_Messages when -gnatdJ is set.
* debug.adb: Document and reserve -gnatdJ.
2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
* g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
functions to iterate over simple hastables.
(Load_Factor_HTable): Remove obsolete and inefficient implementation.
2017-09-08 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Unqual_BIP_Function_Call): Adding
missing checks on the presence of Entity() before checking the
entity attributes.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Reorder some
statements, use local variable and remove unnecessary processing.
2017-09-08 Javier Miranda <miranda@adacore.com>
* exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
subprogram.
(Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
(Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
subprogram.
(Unqual_BIP_Iface_Function_Call): New subprogram.
* exp_ch6.adb (Replace_Renaming_Declaration_Id): New
subprogram containing code that was previously inside
Make_Build_In_Place_Call_In_Object_Declaration since it is also
required for one of the new subprograms.
(Expand_Actuals):
Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
(Expand_N_Extended_Return_Statement): Extend the
cases covered by an assertion on expected BIP object
declarations.
(Make_Build_In_Place_Call_In_Assignment):
Removing unused code; found working on this ticket.
(Make_Build_In_Place_Call_In_Object_Declaration): Move the code
that replaces the internal name of the renaming declaration
into the new subprogram Replace_Renaming_Declaration_Id.
(Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
(Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
New subprogram.
(Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
subprogram.
(Unqual_BIP_Iface_Function_Call): New subprogram.
* exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
* exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
* exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
(Expand_N_Indexed_Component): Invoke the new subprogram
Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
(Expand_N_Selected_Component): Invoke the new subprogram
Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
(Expand_N_Slice): Invoke the new subprogram
Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
* exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
Invoke the new subprogram
Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
2017-09-08 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Fix handling of
access to interface types. Remove also the accessibility check.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): Really freeze
all the types that are referenced by the expression.
(Analyze_Expression_Function): Call Freeze_Expr_Types for
a completion instead of manually freezing the type of the
expression.
(Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
New procedure, auxiliary to Expand_Pragma_Check, to handle
references to the discriminants of a protected type within a
precondition of a protected operation. This is needed because
the original precondition has been analyzed in the context of
the protected declaration, but in the body of the operation
references to the discriminants have been replaved by references
to the discriminants of the target object, and these references
are only created when expanding the protected body.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
Loop_Variant.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Build_Record_VS_Func): If the record is an
unchecked union, do not emit checks for its (non-existent)
discriminants, or for variant parts that depend on them.
2017-09-08 Justin Squirek <squirek@adacore.com>
* sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
Find_Comparison_Type.Try_One_Interp): Add check for generic
instances.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
remaining references to AAMP_On_Target.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* style.adb: Fix typo.
2017-09-08 Javier Miranda <miranda@adacore.com>
* einfo.adb (Underlying_Type): Add missing support for class-wide
types that come from the limited view.
* exp_attr.adb (Attribute_Address): Check class-wide type
interfaces using the underlying type to handle limited-withed
types.
(Attribute_Tag): Check class-wide type interfaces using
the underlying type to handle limited-withed types.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
over a subtype of a type with a static predicate, taking into
account the predicate function of the parent type and the bounds
given in the loop specification.
* sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
a loop specification that is a subtype indication whose type mark
is a type with a static predicate, inherit predicate function,
used to build case statement for rewritten loop.
2017-09-08 Justin Squirek <squirek@adacore.com>
* lib-load.adb: Modify printing of error message to exclude file
line number.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
don't inline subprograms declared in both visible and private
parts of a package.
(In_Package_Spec): previously In_Package_Visible_Spec; now
detects subprograms declared both in visible and private parts
of a package spec.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Build_Invariant_Procedure_Declaration): If
the type is an anonymous array in an object declaration, whose
component type has an invariant, use the object declaration
as the insertion point for the invariant procedure, given that
there is no explicit type declaration for an anonymous array type.
2017-09-08 Bob Duff <duff@adacore.com>
* a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
2017-09-08 Bob Duff <duff@adacore.com>
* a-strfix.adb (Trim): Compute Low and High only if needed.
2017-09-08 Justin Squirek <squirek@adacore.com>
* lib-load.adb (Load_Main_Source): Add error output in the case a
source file is missing.
2017-09-08 Bob Duff <duff@adacore.com>
PR ada/80888
* a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
Default_WCEM by default (i.e. if the encoding is not specified
by the Form string).
2017-09-08 Bob Duff <duff@adacore.com>
* s-trasym.ads (Hexa_Traceback): If
Suppress_Hex is True, print "..." instead of a hexadecimal
address.
* s-trasym.adb: Ignore No_Hex in this version.
Misc cleanup.
2017-09-08 Bob Duff <duff@adacore.com>
* debug.adb: Minor reformatting.
2017-09-08 Bob Duff <duff@adacore.com>
* a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
code so it doesn't trigger an "uninit var" warning.
2017-09-08 Nicolas Roche <roche@adacore.com>
* s-hibaen.ads: Remove obsolete file.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* a-locale.ads: Add comment explaining the state of this package.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Is_CCT_Instance): Allow calls in the context
of packages.
* sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
allow calls in the context of package spec (for pragma
Initializes) and bodies (for pragma Refined_State).
2017-09-08 Bob Duff <duff@adacore.com>
* checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
new Exp.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* debug.adb (dA): Adjust comment.
* gnat1drv.adb (Gnat1drv): Likewise.
* opt.ads (List_Representation_Info_Extended): New variable.
* repinfo.adb (List_Record_Info): Split implementation into...
(Compute_Max_Length): ...this. Recurse on records if requested.
(List_Record_Layout): Likewise.
* switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
statement, accept '0' and set List_Representation_Info_Extended
on 'e'.
* usage.adb (Usage): Document new -gnatRe variant.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
Do not save the given entity in the global variable Default_Pool
if the pragma appears within a generic unit.
2017-09-08 Bob Duff <duff@adacore.com>
* errout.adb (Delete_Warning): Do not
decrement Warnings_Treated_As_Errors. This is called before
Warnings_Treated_As_Errors has been incremented to account for
this warning. Decrementing it here can lead to negative values
of Warnings_Treated_As_Errors, raising Constraint_Error in
checks-on builds, and causing the compiler to return an error
code in checks-off builds.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
entities of named concurrent types as Ref_Id and not of anonymous
concurrent objects (because callers already know when a conversion
is necessary and can easily do it); also, do not expect protected
types or protected objects as Context_Id (because no flow-related
SPARK pragmas are attached there); reflect these changes in a
more precise comment.
2017-09-08 Olivier Hainque <hainque@adacore.com>
* g-altive.ads: Add documentation.
2017-09-08 Bob Duff <duff@adacore.com>
* sem_util.ads, debug.adb: Minor comment fix.
* erroutc.ads: Comment fix.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
for compatibility of component types of formal and actual in an
instantiation of a child unit, when the component type of the
formal is itself a formal of an enclosing generic.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
sem_prag.adb to make it available for GNATprove; for concurrent
types replace custom scope climbing with Scope_Same_Or_Within; for
single concurrent objects add scope climbing (with Scope_Within),
which was not there (that's the primary semantic change of this
commit); also, when comparing a single concurrent object with
its corresponding concurrent type rely on equality of types,
not of objects (because that's simpler to code).
* sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
(Analyze_Global_Item): adjust special-casing of references to the
current instance of a concurrent unit in the Global contracts
of task types and single tasks objects; similar for references
in the protected operations and entries of protected types and
single protected objects (in all these cases the current instance
behaves as an implicit parameter and must not be mentioned in
the Global contract).
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
function calls returning a record within a subprogram call,
for C generation.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
name that designates the current instance of a child unit in its
own body and appears as the prefix of a reference to an entity
local to the child unit.
* exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
Minor reformatting.
2017-09-08 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
may be intentional.
2017-09-08 Tristan Gingold <gingold@adacore.com>
* sem_warn.adb (Check_Unused_Withs): Remove test that disabled
warnings on internal units in configurable run time mode.
2017-09-08 Bob Duff <duff@adacore.com>
* sem_ch3.adb (Build_Derived_Private_Type): Inherit
representation items from interfaces that the derived type
implements, not just from the parent type.
* sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
this to return an empty list when there are no interfaces.
* einfo.ads, sem_ch13.adb: Minor comment fixes.
* sem_attr.adb: Minor comment fix.
2017-09-08 Doug Rupp <rupp@adacore.com>
* sigtramp-vxworks.c [i386]: Adjust the kernel context for
x86-vx7.
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): Generate a
call to Allocate_Any_Controlled when the allocation does not
require any initialization.
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.
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
Reimplemented.
(Expand_SPARK_Potential_Renaming): Code clean up.
* sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
the item does not have a proper entity.
(Analyze_Input_Item): Add a guard in case the item does not have a
proper entity.
(Collect_States_And_Objects): Include object renamings in the
items being collected.
(Resolve_State): Update the documentation of this routine.
* sem_util.adb (Entity_Of): Add circuitry to handle
renamings of function results.
(Remove_Entity): New routine.
(Remove_Overloaded_Entity): Take advantage of factorization.
* sem_util.ads (Entity_Of): Update the documentation
of this routine.
(Remove_Entity): New routine.
(Remove_Overloaded_Entity): Update the documentation of this
routine.
2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Record_Info): During first loop,
do not override the normalized position and first bit
if they have already been set. Move fallback code
for the packed case to the case where it belongs.
* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
Also adjust the normalized position of components.
(Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
the placement of a primitive operation O that renames an operation
R declared in an inner package, and which is thus not a primitive
of the dispatching type of O. In this case O is a new primitive
and does not inherit its dispatch table position from R (which
has none).
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension_If_Expression,
Analyze_Dimension_Case_Expression): new subprograms to verify
the dimensional correctness of Ada2012 conditional expressions,
and set properly the dimensions of the construct.
* sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
call Analyze_Dimension.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
loop on an interface declared as a private extension of another
synchronized interface.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Generic_Parent): New procedure within
Analyze_Associations, to handle actual packages that depend on
previous instances. If a package IAP that is an instantiation is
used as an actual in a subsequent instantiation SI in the same
scope, and IAP has a body, IAP must be frozen before SI. If
the generic parent of IAP is itself declared in a previous
instantiation in the same scope, that instantiation must also
be frozen before SI.
(Install_Body): Prevent double insertion of freeze node for
instance.
2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Resolve_State): Update the
comment on documentation. Generate a reference to the state once
resolution takes place.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case
Linker_Section): If the aspect applies to an object declaration
with explicit initialization, do not delay the freezing of the
object, to prevent access-before-elaboration in the generated
initialization code.
2017-09-08 Ed Schonberg <schonberg@adacore.com>
* a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
(Integer_Value (Item)) when the size of the fixed decimal type
is larger than Integer.
2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
PR ada/82127
* gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
in order of increasing position in more cases.
2017-09-07 Yannick Moy <moy@adacore.com>
* a-exetim-mingw.ads: Add contract Global=>null
on all operations that are modeled as having no read or write
of global variables in SPARK.
2017-09-07 Raphael Amiard <amiard@adacore.com>
* a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
to Hmaps.Generic_Ops.
* a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
cursors.
* a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
cursors.
* a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
position in cursors.
2017-09-07 Javier Miranda <miranda@adacore.com>
* sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
allow disabling the generation of implicit pragma Elaborate_All
on task bodies.
2017-09-07 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_Tags): Avoid suffix counter
in the external name of the elaboration flag. Required to fix
the regressions introduced by the initial version of this patch.
2017-09-07 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): Do not
insert an explicit conversion to force the displacement of the
"this" pointer to reference the secondary dispatch table in the
case where the return statement is returning a raise expression,
as in "return raise ...".
2017-09-07 Arnaud Charlet <charlet@adacore.com>
* sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
* sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
procedure from sem_disp.adb.
* sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
with Unit.