Remove orphaned entries
[official-gcc.git] / gcc / ada / ChangeLog
blobd2647b1b591b9f0da49cc7e9ecd31d4041d2bfdc
1 2017-01-20  Thomas Quinot  <quinot@adacore.com>
3         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
4         message.
6 2017-01-20  Nicolas Roche  <roche@adacore.com>
8         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10 2017-01-20  Bob Duff  <duff@adacore.com>
12         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
13         (etc) optimizations when the type is modular.
15 2017-01-20  Yannick Moy  <moy@adacore.com>
17         * sem_ch6.adb (Move_Pragmas): move some pragmas,
18         but copy the SPARK_Mode pragma instead of moving it.
19         (Build_Subprogram_Declaration): Ensure that the generated spec
20         and original body share the same SPARK_Pragma aspect/pragma.
21         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
22         procedure to copy SPARK_Mode aspect.
24 2017-01-20  Bob Duff  <duff@adacore.com>
26         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
27         even in ASIS mode.
28         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
29         Empty even in ASIS mode.
31 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
33         * exp_ch9.adb: minor style fixes in comments.
34         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
35         relative statement introduces an implicit dependency on
36         Ada.Real_Time.Clock_Time.
37         * sem_util.adb: Minor reformatting.
39 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
41         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
42         must be treated as delayed aspect even if the expression is
43         a literal, because the aspect affects the freezing and the
44         elaboration of the object to which it applies.
46 2017-01-20  Tristan Gingold  <gingold@adacore.com>
48         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
50 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
52         * lib-xref.adb (Generate_Reference): Do not warn about the
53         presence of a pragma Unreferenced if the entity appears as the
54         actual in a procedure call that does not come from source.
56 2017-01-20  Pascal Obry  <obry@adacore.com>
58         * expect.c, terminals.c: Fix some warnings about unused variables.
59         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
60         of the runtime.
62 2017-01-20  Bob Duff  <duff@adacore.com>
64         * exp_attr.adb (Constrained): Apply an access check (check that
65         the prefix is not null) when the prefix denotes an object of an
66         access type; that is, when there is an implicit dereference.
68 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
70         * s-rident.ads (constant Profile_Info): Remove
71         No_Calendar from GNAT_Extended_Ravenscar restrictions.
73 2017-01-20  Tristan Gingold  <gingold@adacore.com>
75         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
77 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
79         * ghost.adb (Mark_Ghost_Clause): New routine.
80         (Prune_Node): Do not prune compilation unit nodes.
81         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
82         This does not touch the node itself, but does prune all its fields.
83         * ghost.ads (Mark_Ghost_Clause): New routine.
84         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
85         package clause mentions Ghost and non-Ghost packages. Mark a
86         use package clause as Ghost when it mentions a Ghost package.
87         (Analyze_Use_Type): Emit an error when a use type clause mentions
88         Ghost and non-Ghost types. Mark a use type clause as Ghost when
89         it mentions a Ghost type.
90         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
91         Ghost when it withs a Ghost unit.
93 2017-01-20  Javier Miranda  <miranda@adacore.com>
95         * sem_res.adb (Resolve_Call): If a function call
96         returns a limited view of a type and at the point of the call the
97         function is not declared in the extended main unit then replace
98         it with the non-limited view, which must be available. If the
99         called function is in the extended main unit then no action is
100         needed since the back-end handles this case.
102 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
104         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
105         (Contains_Subprograms_Refs): ...this.  Adjust comment
106         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
107         (Is_Subprogram_Ref): ...this.
108         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
109         Has_Non_Subprograms_Referencer and adjust comment.  Remove
110         incorrect shortcut for package declarations and bodies.
112 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
114         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
115         base type differs from that of the completion and the private
116         subtype is an itype (created for a constraint on an access
117         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
118         anomalies in gigi.
120 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
122         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
123         When inheriting the SPARK_Mode of a prior expression function,
124         look at the properly resolved entity rather than the initial
125         candidate which may denote a homonym.
127 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
129         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
130         Precondition or Postcondition, and the context is pragma
131         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
132         and suggest the standard names Assertion_Policy /Pre /Post
133         instead.
135 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
137         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
139 2017-01-20  Javier Miranda  <miranda@adacore.com>
141         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
142         Entity attribute.
143         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
144         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
145         malformed trees.
147 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
149         * sem_ch13.adb (Analyze_Aspect_Specification, case
150         Dynamic_Predicate): If the entity E is a subtype that inherits
151         a static predicate for its parent P,, the inherited and the
152         new predicate combine in the generated predicate function,
153         and E only has a dynamic predicate.
155 2017-01-20  Tristan Gingold  <gingold@adacore.com>
157         * s-boustr.ads, s-boustr.adb: New package.
158         * Makefile.rtl: Add s-boustr.
160 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
162         * inline.adb (Process_Formals): Qualify the
163         expression of a return statement when it yields a universal type.
165 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
167         * freeze.adb (Freeze_All): Freeze the default
168         expressions of all eligible formal parameters that appear in
169         entries, entry families, and protected subprograms.
171 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
173         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
174         for illegal inherited Implicit_Dereference aspects with renamed
175         discriminants.
177 2017-01-20  Javier Miranda  <miranda@adacore.com>
179         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
180         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
181         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
182         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
183         Set_Prev, Tree_Read): Adding assertion.
184         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
185         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
186         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
187         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
188         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
189         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
190         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
191         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
192         Set_ListN_With_Parent): Adding assertion.
194 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
196         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
197         import that applies to several homograph subprograms. when one
198         of them is declared by a subprogram body.
200 2017-01-20  Justin Squirek  <squirek@adacore.com>
202         * exp_ch6.adb (Expand_Call): Remove optimization
203         that nulls out calls to null procedures.
205 2017-01-20  Yannick Moy  <moy@adacore.com>
207         * inline.adb (Expand_Inlined_Call): Keep more
208         precise type of actual for inlining whenever possible. In
209         particular, do not switch to the formal type in GNATprove mode in
210         some case where the GNAT backend might require it for visibility.
212 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
214         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
215         aspect Implicit_Dereference can be inherited by a full view if
216         the partial view has no discriminants, because there is no way
217         to apply the aspect to the partial view.
218         (Build_Derived_Record_Type): If derived type renames discriminants
219         of the parent, the new discriminant inherits the aspect from
220         the old one.
221         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
222         call through an access discriminant designating a subprogram.
223         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
224         properly a parameterless call through an access discriminant on
225         the left-hand side of an assignment.
226         * sem_res.adb (resolve): If an interpreation involves a
227         discriminant with an implicit dereference and the expression is an
228         entity, resolution takes place later in the appropriate routine.
229         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
230         access discriminants that designate a subprogram type.
232 2017-01-20  Pascal Obry  <obry@adacore.com>
234         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
236 2017-01-20  Yannick Moy  <moy@adacore.com>
238         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
239         on implicitly with'ed units in GNATprove mode.
240         * sinfo.ads (Implicit_With): Document use of flag for implicitly
241         with'ed units in GNATprove mode.
243 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
245         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
246         unit Do not report an error on a non-static entity that appears
247         in the context of a spec expression, such as an aspect expression.
249 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
251         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
252         (Is_Underlying_Full_View): New routine.
253         (Set_Is_Underlying_Full_View): New routine.
254         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
255         * einfo.ads Add new attribute Is_Underlying_Full_View.
256         (Is_Underlying_Full_View): New routine along with pragma Inline.
257         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
258         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
259         class-wide types and underlying full views. The first subtype
260         is used as the working type for all Itypes, not just array base types.
261         (Build_DIC_Procedure_Declaration): Do not consider
262         class-wide types and underlying full views. The first subtype
263         is used as the working type for all Itypes, not just array
264         base types.
265         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
266         view or an underlying full view without clobbering the attributes
267         of a previous freeze node.
268         (Inherit_Freeze_Node): New routine.
269         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
270         full view as such.
271         (Build_Underlying_Full_View): Mark an underlying full view as such.
272         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
273         full view as such.
275 2017-01-20  Yannick Moy  <moy@adacore.com>
277         * sinfo.ads: Document lack of Do_Division_Check flag
278         on float exponentiation.
280 2017-01-19  Javier Miranda  <miranda@adacore.com>
282         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
283         identifier attribute of a block-statement node. Required to avoid
284         assertion failure when building the new containers library.
286 2017-01-19  Bob Duff  <duff@adacore.com>
288         * exp_ch3.adb: Update comment.
290 2017-01-19  Vincent Celier  <celier@adacore.com>
292         * gprep.adb (Gnatprep): Parse the definition file without
293         "replace in comments" even when switch -C is used.
295 2017-01-19  Justin Squirek  <squirek@adacore.com>
297         * exp_ch9.adb (Is_Pure_Barrier): Create function
298         Is_Count_Attribute to identify an expansion of the 'Count
299         attribute.
301 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
303         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
304         statements within an element iterator loop are only analyzed
305         agter the loop is rewritten. Within a generic the analysis must
306         be performed in any case to complete name capture.
308 2017-01-19  Bob Duff  <duff@adacore.com>
310         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
311         before checking for unrecognized pragmas.
312         Initialize Pname on its declarations; that's always good style.
314 2017-01-19  Claire Dross  <dross@adacore.com>
316         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
317         body into the tree for GNATprove by setting its Parent field. The
318         components invariants of composite types are not checked by
319         the composite type's invariant procedure in GNATprove mode.
320         (Build_Invariant_Procedure_Declaration): Semi-insert the
321         declaration into the tree for GNATprove by setting its Parent
322         field.
323         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
324         the component invariants to the array type  invariant procedure
325         so that the procedure can be used to  check the array type
326         invariants if any.
327         (Freeze_Record_Type): In GNATprove mode, do
328         not add the component invariants to the record type  invariant
329         procedure so that the procedure can be used to  check the record
330         type invariants if any.
332 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
334         * lib-xref-spark_specific.adb: Minor reformatting.
335         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
337 2017-01-19  Javier Miranda  <miranda@adacore.com>
339         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
340         Build_Back_End_Aggregate.
341         (Generate_Aggregate_For_Derived_Type): Code cleanup.
342         (Prepend_Stored_Values): Code cleanup.
344 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
346         * sem_ch6.adb (Analyze_Expression_Function): Check for an
347         incomplete return type after attempting to freeze it, so that
348         other freeze actiona are generated in the proper order.
350 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
352         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
353         type, ie. a type whose component is a character type, and the
354         aggregate is positional, do not convert into a string literal
355         if the index type is not an integer type, because the original
356         type may be required in an enclosing operation.
358 2017-01-19  Bob Duff  <duff@adacore.com>
360         * binde.adb, debug.adb: Enable new elaboration order algorithm
361         by default. -dp switch reverts to the old algorithm.
363 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
365         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
366         (Analyze_Declarations): Create the DIC and Invariant
367         procedure bodies s after all freezing has taken place.
368         (Build_Assertion_Bodies): New routine.
369         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
370         and Exp_Util.
371         (Analyze_Package_Specification): Remove the
372         generation of the DIC and Invariant procedure bodies. This is
373         now done by Analyze_Declarations.
374         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
375         procedures are never treated as primitives.
377 2017-01-19  Yannick Moy  <moy@adacore.com>
379         * frontend.adb: Analyze inlined bodies and check elaboration
380         rules in GNATprove mode too.
381         * sem_elab.adb (Delay_Element): Add Boolean component to save
382         indication that call is in SPARK code.  (Check_Elab_Calls):
383         Check elaboration rules in GNATprove mode, and correctly set
384         the current value of SPARK_Mode.
385         * lib-xref-spark_specific.adb
386         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
388 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
390         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
391         checks on the expression for the high bound of concatenation
392         when checks are disabled, to suppress warnings about potential
393         constraint errors in restricted runtimes.
395 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
397         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
398         representation-to-position function as inlined.
399         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
400         the purity of an internally generated entity if it has been
401         explicitly marked as pure for optimization purposes.
402         * exp_aggr.adb: Minor reformatting.
404 2017-01-19  Javier Miranda  <miranda@adacore.com>
406         * exp_ch6.adb (Expand_Call): Remove side effects on
407         actuals that are allocators with qualified expression since the
408         initialization of the object is performed by means of individual
409         statements (and hence it must be done before the call).
411 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
413         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
414         (Build_Derived_Enumeration_Type): If the derived type inherits a
415         dynamic predicate from its parent, the bounds of the type must
416         freeze because an explicit constraint is constructed for the
417         type and the corresponding range is elaborated now.
419 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
421         * sem_attr.ads: minor fix of inconsistent casing in comment
422         * lib-writ.ads: minor align comments in columns
423         * sem_ch3.adb: Minor reformatting.
424         * spark_xrefs.ads: minor fix typo in SPARK-related comment
425         * table.ads: minor style fix in comment
426         * lib-xref-spark_specific.adb
427         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
428         * sem_ch12.adb: minor whitespace fix
429         * freeze.adb: Add comment.
430         * sem_util.adb (Unique_Name): for instances of
431         generic subprograms ignore the name of the wrapper package.
433 2017-01-19  Javier Miranda  <miranda@adacore.com>
435         * exp_aggr.adb (Resolve_Record_Aggregate):
436         Factorize code needed for aggregates of limited and unlimited
437         types in a new routine.
438         (Pass_Aggregate_To_Back_End): New subprogram.
440 2017-01-19  Yannick Moy  <moy@adacore.com>
442         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
444 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
446         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
447         public, for use elsewhere.
448         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
449         an Inlined_body, recognize a call that uses object notation
450         and has not been rewritten as a regular call because regular
451         expansion has not taken place.
453 2017-01-19  Bob Duff  <duff@adacore.com>
455         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
456         in case of generic formal discrete types, because it causes crashes in
457         the compiler when built with assertions on.
459 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
461         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
462         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
464 2017-01-19  Bob Duff  <duff@adacore.com>
466         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
467         Increment Warnings_Detected.  It was decrementing, which is
468         wrong since we just issued a warning message.
469         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
470         these variables to be of subtype Nat instead of Int, because
471         they should never be negative.
473 2017-01-19  Javier Miranda  <miranda@adacore.com>
475         * contracts.adb (Build_Postconditions_Procedure): Replace
476         Generate_C_Code by Modify_Tree_For_C.
477         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
478         Replace Generate_C_Code by Modify_Tree_For_C.
479         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
480         Modify_Tree_For_C.
481         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
482         Generate_C_Code by Modify_Tree_For_C.
483         * exp_ch4.adb (Expand_Allocator_Expression): Replace
484         Generate_C_Code by Modify_Tree_For_C.
485         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
486         by Modify_Tree_For_C.
487         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
488         Generate_C_Code by Modify_Tree_For_C.
489         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
490         by Modify_Tree_For_C.
491         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
493 2017-01-19  Javier Miranda  <miranda@adacore.com>
495         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
496         subprogram.
497         (Is_Inlinable_Expression_Function): New subprogram.
498         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
499         to Sem_Util.
500         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
502 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
504         * sem_ch4.adb (Diagnose_Call): Improve error message when a
505         selected component has a prefix that might be interpreted
506         as a parameterless function call, but none of the candidate
507         interpretations is parameterless, and there is a hidden homonym
508         of the prefix that is a package.
509         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
510         interpreted as a parameterless function call and its analysis
511         fails, do not call Analyze_Selected_Component.
513 2017-01-19  Steve Baird  <baird@adacore.com>
515         * sem_util.ads: Add new Use_Full_View Boolean parameter to
516         Get_Index_Bounds.
517         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
518         calls to a newly-defined Scalar_Range_Of_Right_View function.
520 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
522         * gnat1drv.adb: minor fix of unbalanced parens in comment
523         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
524         to visible part of the package to allow re-use in GNATprove.
525         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
526         from repeated code of Traverse_Compilation_Unit.
527         (Traverse_Declaration_Or_Statement): fixed detection of
528         generic subprograms and packages; also, iteration over case
529         statement alternatives rewritten to avoid testing if the first
530         alternative is present (since it must be present due to Ada
531         syntax restrictions).
533 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
535         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
536         returning by reference not just for subprogram body stubs,
537         but for all subprogram cases.
538         * sem_util.adb: Code reformatting.
539         (Requires_Transient_Scope): Update the call to Results_Differ.
540         (Results_Differ): Update the parameter profile and the associated
541         comment on usage.
543 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
545         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
546         identifier nodes that do not come from source, to handle properly
547         dimensionality check within an inlined body which inclddes both
548         original operands and rewritten operands. This removes spurious
549         dimensionality errors in the presence of front-end inlining,
550         as well as in SPARK mode.
552 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
554         PR driver/49726
555         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
557 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
559         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
561 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
563         * doc/gnat_ugn/getting_started_with_gnat.rst,
564         doc/gnat_ugn/inline_assembler.rst,
565         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
566         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
567         doc/gnat_ugn/about_this_guide.rst,
568         doc/gnat_ugn/platform_specific_information.rst,
569         doc/gnat_ugn/example_of_binder_output.rst,
570         doc/gnat_ugn/gnat_and_program_execution.rst,
571         doc/gnat_ugn/gnat_utility_programs.rst,
572         doc/gnat_ugn/the_gnat_compilation_model.rst,
573         doc/gnat_rm/implementation_defined_attributes.rst,
574         doc/gnat_rm/compatibility_and_porting_guide.rst,
575         doc/gnat_rm/standard_library_routines.rst,
576         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
577         doc/gnat_rm/implementation_defined_pragmas.rst,
578         doc/gnat_rm/the_gnat_library.rst,
579         doc/gnat_rm/obsolescent_features.rst,
580         doc/gnat_rm/about_this_guide.rst,
581         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
582         doc/gnat_rm/implementation_of_ada_2012_features.rst,
583         doc/gnat_rm/interfacing_to_other_languages.rst,
584         doc/gnat_rm/implementation_defined_aspects.rst,
585         doc/gnat_rm.rst: Update documentation.
586         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
588 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
590         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
591         * scil_ll.adb: Minor style fix in comment.
592         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
593         even if entity is already set, because the node may be renalyzed
594         after inlining transformations.
596 2017-01-13  Javier Miranda  <miranda@adacore.com>
598         * sem_res.adb (Resolve_Call): Do not establish a transient scope
599         for a call to inlinable expression function (since the call will
600         be replaced by its returned object).
601         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
602         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
603         (Expand_Call): For inlinable expression function call replace the
604         call by its returned object.
605         (Is_Inlinable_Expression_Function): New subprogram.
607 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
609         * checks.adb: Minor typo fix and reformatting.
611 2017-01-13  Javier Miranda  <miranda@adacore.com>
613         * contracts.adb (Contract_Only_Subprograms): Remove formal.
614         (Copy_Original_Specification): Removed.
615         (Skip_Contract_Only_Subprogram): Move here checks previously
616         located in the caller of this routine (to leave the code more clean).
617         (Build_Contract_Only_Subprogram): Code cleanup.
618         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
619         (Get_Contract_Only_Missing_Body_Name): Removed.
621 2017-01-13  Javier Miranda  <miranda@adacore.com>
623         * sem_ch6.adb (Cloned_Expression): New subprogram.
624         (Freeze_Expr_Types): Complete previous patch since the expression
625         of an expression-function may have iterators and loops with
626         defining identifiers which, as part of the preanalysis of the
627         expression, may be left decorated with itypes that will not be
628         available in the tree passed to the backend.
630 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
632         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
633         conversion to Integer of an expression that is an attribute
634         reference 'Pos on an enumeration type.
636 2017-01-13  Bob Duff  <duff@adacore.com>
638         * atree.ads: Minor comment fix.
640 2017-01-13  Justin Squirek  <squirek@adacore.com>
642         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
643         calls in accessibility check on return statement.
645 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
647         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
648         Ensure that the input body is a subprogram body before trying to
649         determine whether it denoted an expression function.  Note that
650         subprogram body stubs cannot denote expression functions.
652 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
654         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
655         and typo fixes.
657 2017-01-13  Javier Miranda  <miranda@adacore.com>
659         * einfo.ads (Component_Bit_Offset): Fix documentation.
660         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
661         on record holes for components with unknown compile-time offsets.
663 2017-01-13  Bob Duff  <duff@adacore.com>
665         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
666         * g-locfil.ads: Minor comment fix.
668 2017-01-13  Bob Duff  <duff@adacore.com>
670         * binde.adb (Elab_New): New elaboration order algorithm
671         that is expected to cause fewer ABE issues. This is a work in
672         progress. The new algorithm is currently disabled, and can be
673         enable by the -dp switch, or by modifying the Do_Old and Do_New
674         etc. flags and rebuilding. Experimental code is included to
675         compare the results of the old and new algorithms.
676         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
677         can have multiple of these tables, so the old and new algorithms
678         can coexist.
679         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
680         parameter of type array. This avoids the global variable, and
681         allows bounds checking (which is normally defeated by the tables
682         packages). It also ensures that the Elab_Order is read-only
683         to Bindgen.
684         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
685         subprograms that need it, as above.
686         * debug.adb: Document new -dp switch. Modify doc of old -do
687         switch.
688         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
689         and Bindgen.  Move writing of closure (-R and -Ra switches)
690         to Binde; that's more convenient.
692 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
694         * sem_ch6.adb (Analyze_Expression_Function): If the expression
695         function is a completion, all entities referenced in the
696         expression are frozen. As a consequence, a reference to an
697         uncompleted private type from an enclosing scope is illegal.
699 2017-01-13  Javier Miranda  <miranda@adacore.com>
701         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
702         (Analyze_Subprogram_Body_Helper): At the occurrence of an
703         expression function declaration that is a completion, its
704         expression causes freezing (AI12-0103).
706 2017-01-13  Vadim Godunko  <godunko@adacore.com>
708         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
709         Reference functions of Ada.Containers.Indefinite_Holders.
711 2017-01-13  Bob Duff  <duff@adacore.com>
713         * s-os_lib.ads: Minor comment fixes.
715 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
717         * exp_ch3.adb (Default_Initialize_Object): Do not default
718         initialize an object when it is of a task type and restriction
719         No_Tasking is in effect because the initialization is obsolete.
720         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
721         restriction No_Tasking is in effect.
722         (Build_Master_Renaming): Do not rename a master when restriction
723         No_Tasking is in effect.
725 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
727         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
728         the legality of An others clause applies as well to a choice in
729         an Iterated_component_ association.
730         (Resolve_Iterated_Component_Association): An others choice
731         is legal.
732         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
733         Iterated_Component_Association is not static.
735 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
737         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
738         control is passed to the expresion handler before the new mode
739         is set.
740         * sem_ch12.adb (Analyze_Package_Instantiation,
741         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
742         in case control is passed to the expresion handler before the
743         new mode is set.
745 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
747         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
748         exp_aggr.adb: Minor reformatting.
750 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
752         * inline.adb: Minor reformatting and typo fix.
754 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
756         * sem_util.ads, sem_util.adb (Choice_List): Move function here
757         from sem_aggr.adb, for use elsewhere.
758         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
759         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
760         Iterated_Component_Present.
761         * exp_aggr.adb: Use Choice_List throughout, to handle
762         Iterated_Component_Associations.
763         (Gen_Loop): Generate proper loop for an
764         Iterated_Component_Association: loop variable has the identifier
765         of the original association. Generate a loop even for a single
766         component choice, in order to make loop parameter visible in
767         expression.
768         (Flatten): An Iterated_Component_Association is not static.
770 2017-01-13  Yannick Moy  <moy@adacore.com>
772         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
773         float exponentiation for statically known small negative values
774         is the reciprocal of the exponentiation for the opposite value
775         of the exponent.
776         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
777         Ensure that the value of float exponentiation for negative values
778         is the reciprocal of the exponentiation for the opposite value
779         of the exponent.
780         * inline.adb (Expand_Inlined_Call): Fix the count
781         for the number of generated gotos.
783 2017-01-13  Yannick Moy  <moy@adacore.com>
785         * inline.adb: Code cleanup.
786         * sem_util.adb (Is_OK_Volatile_Context): Add
787         expression in delay statement as OK for volatile context.
789 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
791         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
792         mode a choice that is a subtype with a static predicate is
793         replaced by the values it covers. This transformation must not
794         be performed in ASIS mode, to preserve the source for analysis.
796 2017-01-13  Justin Squirek  <squirek@adacore.com>
798         * nlists.ads: Correct minor typo.
800 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
802         * sem_ch13.adb: Minor reformatting and typo fix.
804 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
806         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
807         Iterated_Component_Association is a named association in an
808         array aggregate.
809         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
810         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
811         and resolve the discrete choices and the expression of the
812         new construct.
813         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
814         Loop_Actions and Box_Present are attributes of
815         N_Iterated_Component_Association nodes. Box_Present is always
816         False in this case.
817         * sprint.adb (Sprint_Node): An Iterated_Component_Association
818         has a Discrete_Choices list, as specified in the RM. A
819         Component_Association for aggregate uses instead a Choices list.
820         We have to live with this small inconsistency because the new
821         construct also has a defining identifier, and there is no way
822         to merge the two node structures.
824 2017-01-13  Yannick Moy  <moy@adacore.com>
826         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
827         list of pragmas to remove.  Remove pragmas from the list of
828         statements in the body to inline.
829         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
831 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
833         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
834         Analyze_Declarations, to analyze and resolve the expressions of
835         aspect specifications in the current declarative list, so that
836         the expressions have proper entity and type info.  This is needed
837         for ASIS when there is no subsequent expansion to generate this
838         semantic information.
839         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
840         original expression, to suppress cascaded errors when expression
841         has been constant-folded.
842         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
843         ASIS mode, because there is no subsequent expansion to decorate
844         the tree.
846 2017-01-13  Yannick Moy  <moy@adacore.com>
848         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
849         New function to detect when a call may be inlined or not in
850         GNATprove mode.
851         (Expand_Inlined_Call): Ensure that a temporary
852         is always created in the cases where a type conversion may be
853         needed on an input parameter in GNATprove mode, so that GNATprove
854         sees the check to perform.
855         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
856         when not applicable due to actual requiring type conversion
857         with possible check but no temporary value can be copied for
858         GNATprove to see the check.
860 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
862         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
863         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
864         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
865         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
866         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
867         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
868         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
869         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
870         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
871         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
872         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
873         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
874         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
875         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
876         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
877         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
878         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
879         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
880         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
881         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
882         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
883         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
884         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
885         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
886         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
887         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
888         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
889         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
890         statements to reflect the new style for case alternatives. Various
891         code clean up and reformatting.
893 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
895         * exp_util.adb: Minor reformatting.
897 2017-01-13  Yannick Moy  <moy@adacore.com>
899         * exp_spark.adb: Code cleanup.
900         * sem_ch9.adb (Analyze_Delay_Until): Resolve
901         expression so that calls are identified as such inside delay
902         until.
904 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
906         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
907         * par-ch3.adb (P_Discrete_Choice_List): An
908         Iterated_Component_Association is an array aggregate component.
909         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
910         (Is_Quantified_Expression): New function that performs a lookahead
911         to distinguish quantified expressions from iterated component
912         associations.
913         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
914         associations.
915         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
916         * sem.adb (Analyze): Handle Iterated_Component_Association.
917         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
918         component associations.
919         * sinfo.ads, sinfo.adb: Entries for for
920         N_Iterated_Component_Association and its fields.
921         * sprint.adb (Sprint_Node_Actual): Handle
922         N_Iterated_Component_Association.
924 2017-01-13  Justin Squirek  <squirek@adacore.com>
926         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
927         of the style check until after preanalysis of acutals.
929 2017-01-13  Yannick Moy  <moy@adacore.com>
931         * sem_ch13.adb: Minor reformatting.
932         * par-ch11.adb: minor style fix in whitespace
933         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
934         reduced to Add_Artificial_ALI_File; style fix in declaration of
935         Text; grammar fix in comment.
936         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
937         * freeze.adb: Cleanup to pass pragma instead of
938         expression to call.
939         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
940         replace System'To_Address by equivalent call.
942 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
944         * bindusg.adb: Improve usage output for -f switch.
946 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
948         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
949         Minor reformatting.
951 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
953         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
954         treat comparisons on strings as legal in a Static_Predicate.
955         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
956         a function call that is the expansion of a string comparison.The
957         function call is built when compiling the corresponding predicate
958         function, but the expression has been found legal as a static
959         predicate during earlier analysis.
960         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
961         properly a function call that is the expansion of a string
962         comparison operation, in order to recover the Static_Predicate
963         expression and apply it to a static argument when needed.
965 2017-01-13  Tristan Gingold  <gingold@adacore.com>
967         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
968         (Open_Read): Re-implement using Open_Read_No_Exception.
969         (Open_Write): Raise exception in case of error.
970         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
971         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
972         reaise exception.
973         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
975 2017-01-13  Yannick Moy  <moy@adacore.com>
977         * checks.adb: Code cleanup.
979 2017-01-13  Yannick Moy  <moy@adacore.com>
981         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
982         expression instead of unanalyzed aspect expression for checking
983         the validity of inheriting an operation. Also copy the expression
984         being passing it to Build_Class_Wide_Expression, as this call
985         modifies its argument.
986         * sem_util.ads Fix comment to reference correct function name
987         New_Copy_Tree.
989 2017-01-13  Javier Miranda  <miranda@adacore.com>
991         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
992         when we propagate information about the indexes back to the original
993         indexing mode and the prefix of the index is a function call, do not
994         remove any parameter from such call.
996 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
998         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
999         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
1000         a build-in-place function whose result type is tagged.
1002 2017-01-13  Yannick Moy  <moy@adacore.com>
1004         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1005         Do not generate a wrapper when the only candidate is a class-wide
1006         subprogram.
1007         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
1008         inside a generic context.
1010 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1012         * exp_util.adb (Add_Inherited_Tagged_DIC):
1013         Pass the object parameters of both the parent and the derived
1014         type DIC procedure to the reference replacement circuitry.
1015         (Find_DIC_Type): Modify the circuitry to present the partial
1016         view of a private type in case the private type defines its own
1017         DIC pragma.
1018         (Replace_Object_And_Primitive_References): Add two
1019         optional formal parameters.  Update the comment on usage. Update
1020         the replacement of references to object parameters.
1022 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1024         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
1026 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1028         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
1029         an out parameter that is a type conversion, independently of th
1030         range check that may apply to the expression of the conversion,
1031         for use in GNATProve.
1033 2017-01-13  Yannick Moy  <moy@adacore.com>
1035         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
1036         GNATprove_Mode here to Frontend.
1037         * frontend.adb (Frontend): Move the implicit with for System
1038         in GNATprove_Mode here as it ismore correct this way; the old
1039         place only worked by chance, since there were no overloaded names.
1040         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
1041         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
1042         four attributes identified in SRM 9(18), add an implicit with
1043         to Ada.Task_Identification.
1044         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1045         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
1046         mode.
1047         * checks.adb (Apply_Discriminant_Check,
1048         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
1049         In GNATprove mode, we do not apply the checks, but we still
1050         analyze the expression to possibly issue errors on SPARK
1051         code when a run-time error can be detected at compile time.
1052         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
1053         in GNATprove mode.
1055 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1057         * expander.adb (Expand): Add a warning about using return
1058         statements in Ghost management code.
1059         * exp_ch3.adb (Freeze_Type): Add a warning about using return
1060         statements in Ghost management code.
1061         * exp_ch7.adb (Build_Invariant_Procedure_Body,
1062         Build_Invariant_Procedure_Declaration): Add a warning about
1063         using return statements in Ghost management code.
1064         * exp_disp.adb (Make_DT): Add a warning about using return
1065         statements in Ghost management code.
1066         * exp_util.adb (Build_DIC_Procedure_Body,
1067         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
1068         warning about using return statements in Ghost management code.
1069         * freeze.adb (Freeze_Entity): Add a warning about using return
1070         statements in Ghost management code.
1071         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
1072         statements in Ghost management code.
1073         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
1074         a warning about using return statements in Ghost management code.
1075         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
1076         return statements in Ghost management code.
1077         * sem_ch6.adb (Analyze_Procedure_Call,
1078         Analyze_Subprogram_Body_Helper): Add a warning about using return
1079         statements in Ghost management code.
1080         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
1081         using return statements in Ghost management code.
1082         * sem_ch12.adb (Analyze_Package_Instantiation,
1083         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
1084         Instantiate_Subprogram_Body): Add a warning about using return
1085         statements in Ghost management code.
1086         * sem_ch13.adb (Build_Predicate_Functions,
1087         Build_Predicate_Function_Declarations): Add a warning about
1088         using return statements in Ghost management code.
1089         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
1090         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
1091         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
1092         using return statements in Ghost management code.
1094 2017-01-13  Tristan Gingold  <gingold@adacore.com>
1096         * s-mmosin-mingw.adb: Fix pragma import.
1098 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
1100         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
1101         codepeer mode.
1103 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1105         * atree.adb (Allocate_Initialize_Node): A newly created node is
1106         no longer marked as Ghost at this level.
1107         (Mark_New_Ghost_Node): New routine.
1108         (New_Copy): Mark the copy as Ghost.
1109         (New_Entity): Mark the entity as Ghost.
1110         (New_Node): Mark the node as Ghost.
1111         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
1112         apply to unanalyzed entities.
1113         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
1114         entities.
1115         (Set_Is_Checked_Ghost_Entity): This attribute now
1116         applies to all entities as well as unanalyzed entities.
1117         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
1118         all entities as well as unanalyzed entities.
1119         * expander.adb Add with and use clauses for Ghost.
1120         (Expand): Install and revert the Ghost region associated with the node
1121         being expanded.
1122         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
1123         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
1124         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
1125         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
1126         (Freeze_Type): Install and revert the Ghost region associated
1127         with the type being frozen.
1128         * exp_ch5.adb Remove with and use clauses for Ghost.
1129         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
1130         * exp_ch6.adb Remove with and use clauses for Ghost.
1131         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
1132         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
1133         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
1134         Ghost region of the working type.
1135         (Build_Invariant_Procedure_Declaration): Install and revert
1136         the Ghost region of the working type.
1137         (Expand_N_Package_Body): Remove all Ghost-related code.
1138         * exp_ch8.adb Remove with and use clauses for Ghost.
1139         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
1140         code.
1141         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
1142         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
1143         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
1144         code.
1145         * exp_ch13.adb Remove with and use clauses for Ghost.
1146         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
1147         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
1148         the tagged type. Move the generation of various entities within
1149         the Ghost region of the type.
1150         * exp_prag.adb Remove with and use clauses for Ghost.
1151         (Expand_Pragma_Check): Remove all Ghost-related code.
1152         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
1153         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
1154         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
1155         * exp_util.adb (Build_DIC_Procedure_Body): Install
1156         and revert the Ghost region of the working types.
1157         (Build_DIC_Procedure_Declaration): Install and revert the
1158         Ghost region of the working type.
1159         (Make_Invariant_Call): Install and revert the Ghost region of the
1160         associated type.
1161         (Make_Predicate_Call): Reimplemented. Install and revert the
1162         Ghost region of the associated type.
1163         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
1164         of the entity being frozen.
1165         (New_Freeze_Node): Removed.
1166         * ghost.adb Remove with and use clauses for Opt.
1167         (Check_Ghost_Completion): Update the parameter profile
1168         and all references to formal parameters.
1169         (Ghost_Entity): Update the comment on usage.
1170         (Install_Ghost_Mode): New routines.
1171         (Is_Ghost_Assignment): New routine.
1172         (Is_Ghost_Declaration): New routine.
1173         (Is_Ghost_Pragma): New routine.
1174         (Is_Ghost_Procedure_Call): New routine.
1175         (Is_Ghost_Renaming): Removed.
1176         (Is_OK_Declaration): Reimplemented.
1177         (Is_OK_Pragma): Reimplemented.
1178         (Is_OK_Statement): Reimplemented.
1179         (Is_Subject_To_Ghost): Update the comment on usage.
1180         (Mark_And_Set_Ghost_Assignment): New routine.
1181         (Mark_And_Set_Ghost_Body): New routine.
1182         (Mark_And_Set_Ghost_Completion): New routine.
1183         (Mark_And_Set_Ghost_Declaration): New routine.
1184         (Mark_And_Set_Ghost_Instantiation): New routine.
1185         (Mark_And_Set_Ghost_Procedure_Call): New routine.
1186         (Mark_Full_View_As_Ghost): Removed.
1187         (Mark_Ghost_Declaration_Or_Body): New routine.
1188         (Mark_Ghost_Pragma): New routine.
1189         (Mark_Ghost_Renaming): New routine.
1190         (Mark_Pragma_As_Ghost): Removed.
1191         (Mark_Renaming_As_Ghost): Removed.
1192         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1193         (Prune_Node): Freeze nodes no longer need special pruning, they
1194         are processed by the general ignored Ghost code mechanism.
1195         (Restore_Ghost_Mode): New routine.
1196         (Set_Ghost_Mode): Reimplemented.
1197         (Set_Ghost_Mode_From_Entity): Removed.
1198         * ghost.ads Add with and use clauses for Ghost.
1199         (Check_Ghost_Completion): Update the parameter profile
1200         along with the comment on usage.
1201         (Install_Ghost_Mode): New routine.
1202         (Is_Ghost_Assignment): New routine.
1203         (Is_Ghost_Declaration): New routine.
1204         (Is_Ghost_Pragma): New routine.
1205         (Is_Ghost_Procedure_Call): New routine.
1206         (Mark_And_Set_Ghost_Assignment): New routine.
1207         (Mark_And_Set_Ghost_Body): New routine.
1208         (Mark_And_Set_Ghost_Completion): New routine.
1209         (Mark_And_Set_Ghost_Declaration): New routine.
1210         (Mark_And_Set_Ghost_Instantiation): New routine.
1211         (Mark_And_Set_Ghost_Procedure_Call): New routine.
1212         (Mark_Full_View_As_Ghost): Removed.
1213         (Mark_Ghost_Pragma): New routine.
1214         (Mark_Ghost_Renaming): New routine.
1215         (Mark_Pragma_As_Ghost): Removed.
1216         (Mark_Renaming_As_Ghost): Removed.
1217         (Restore_Ghost_Mode): New routine.
1218         (Set_Ghost_Mode): Redefined.
1219         (Set_Ghost_Mode_From_Entity): Removed.
1220         * sem.adb (Analyze): Install and revert the Ghost region of the
1221         node being analyzed.
1222         (Do_Analyze): Change the way a clean Ghost
1223         region is installed and reverted.
1224         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
1225         all Ghost-related code.
1226         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
1227         (Analyze_Number_Declaration): Remove all Ghost-related code.
1228         (Analyze_Object_Declaration): Install and revert the Ghost region of
1229         a deferred object declaration's completion.
1230         (Array_Type_Declaration): Remove all Ghost-related code.
1231         (Build_Derived_Type): Update the comment on
1232         the propagation of Ghost attributes from a parent to a derived type.
1233         (Derive_Subprogram): Remove all Ghost-related code.
1234         (Make_Class_Wide_Type): Remove all Ghost-related code.
1235         (Make_Implicit_Base): Remove all Ghost-related code.
1236         (Process_Full_View): Install and revert the Ghost region of
1237         the partial view.  There is no longer need to check the Ghost
1238         completion here.
1239         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
1240         region of the left hand side.
1241         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
1242         all Ghost-related code.
1243         (Analyze_Expression_Function): Remove all Ghost-related code.
1244         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
1245         (Analyze_Procedure_Call): Install and revert the Ghost region of
1246         the procedure being called.
1247         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
1248         region of the spec or body.
1249         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
1250         (Build_Subprogram_Declaration): Remove all Ghost-related code.
1251         (Find_Corresponding_Spec): Remove all Ghost-related code.
1252         (Process_Formals): Remove all Ghost-related code.
1253         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
1254         the Ghost region of the spec.
1255         (Analyze_Package_Declaration): Remove all Ghost-related code.
1256         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
1257         Ghost when it aliases a Ghost entity.
1258         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
1259         a Ghost entity.
1260         (Analyze_Object_Renaming): Mark a renaming as Ghost when
1261         it aliases a Ghost entity.
1262         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
1263         a Ghost entity.
1264         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
1265         aliases a Ghost entity.
1266         * sem_ch11.adb Remove with and use clauses for Ghost.
1267         (Analyze_Exception_Declaration): Remove all Ghost-related code.
1268         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
1269         Ghost-related code.
1270         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
1271         code.
1272         (Analyze_Package_Instantiation): Install and revert the Ghost region
1273         of the package instantiation.
1274         (Analyze_Subprogram_Instantiation): Install
1275         and revert the Ghost region of the subprogram instantiation.
1276         (Instantiate_Package_Body): Code clean up. Install and revert the
1277         Ghost region of the package body.
1278         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
1279         Ghost region of the subprogram body.
1280         * sem_ch13.adb (Build_Predicate_Functions): Install
1281         and revert the Ghost region of the related type.
1282         (Build_Predicate_Function_Declaration): Code clean up. Install
1283         and rever the Ghost region of the related type.
1284         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1285         Install and revert the Ghost region of the pragma.
1286         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
1287         Ghost region of the pragma.
1288         (Analyze_Pragma): Install and revert the Ghost region of various
1289         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
1290         or encloses a Ghost entity.
1291         (Analyze_Pre_Post_Condition): Install and revert the Ghost
1292         region of the pragma.
1293         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
1294         Ghost region of the pragma.
1295         * sem_res.adb (Resolve): Remove all Ghost-related code.
1296         * sem_util.adb (Is_Declaration): Reimplemented.
1297         (Is_Declaration_Other_Than_Renaming): New routine.
1298         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
1299         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
1300         (Is_Ghost_Pragma): Removed.
1301         (Is_Ignored_Ghost_Pragma): New routine.
1302         (Set_Is_Checked_Ghost_Pragma): New routine.
1303         (Set_Is_Ghost_Pragma): Removed.
1304         (Set_Is_Ignored_Ghost_Pragma): New routine.
1305         * sinfo.ads: Update the documentation on Ghost mode and
1306         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
1307         and Is_Ignored_Ghost_Pragma along with usages in nodes.
1308         Remove attribute Is_Ghost_Pragma along with usages in nodes.
1309         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1310         (Is_Ghost_Pragma): Removed along with pragma Inline.
1311         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1312         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1313         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
1314         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1316 2017-01-12  Tristan Gingold  <gingold@adacore.com>
1318         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
1319         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
1321 2017-01-12  Yannick Moy  <moy@adacore.com>
1323         * errout.adb, errout.ads (Initialize): Factor common treatment
1324         in Reset_Warnings.
1325         (Reset_Warnings): New procedure to reset counts related to warnings.
1326         (Record_Compilation_Errors): New variable to store the presence of an
1327         error, used in gnat2why to allow changing the Warning_Mode.
1328         (Compilation_Errors): Use new variable Record_Compilation_Errors to
1329         store the presence of an error.
1331 2017-01-12  Javier Miranda  <miranda@adacore.com>
1333         * sem_ch13.adb (Analyze_Aspect_Specifications):
1334         For Interrupt_Handler and Attach_ Handler aspects, decorate the
1335         internally built reference to the protected procedure as coming
1336         from sources and force its analysis.
1338 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1340         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
1341         inherit predicates if any from the first_subtype of the parent,
1342         not from the anonymous parent type.
1343         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
1344         predicate is not a static subtype.
1346 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1348         * freeze.adb (Check_Suspicious_Convention): New procedure
1349         performing a warning check on discriminated record types with
1350         convention C or C++. Factored out of procedure Freeze_Record_Type,
1351         and changed to only apply to base types (to avoid spurious
1352         warnings on subtypes). Minor improvement of warning messages
1353         to refer to discriminated rather than variant record types.
1354         (Freeze_Record_Type): Remove code for performing a suspicious
1355         convention check.
1356         (Freeze_Entity): Only call Freeze_Record_Type
1357         on types that aren't declared within any enclosing generic units
1358         (rather than just excluding the type when the innermost scope
1359         is generic). Call Check_Suspicious_Convention whether or not
1360         the type is declared within a generic unit.
1361         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
1362         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
1363         from Sem_Ch8).
1365 2017-01-12  Tristan Gingold  <gingold@adacore.com>
1367         * sysdep.c, adaint.c, rtinit.c, ming32.h:
1368         (__gnat_current_codepage): Renamed from CurrentCodePage
1369         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
1371 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1373         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
1374         quantified expressions, following AI12-050: the loop parameters
1375         of two quantified expressions are conformant if they have the
1376         same identifier.
1378 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1380         * gcc-interface/Makefile.in: Clean up VxWorks targets.
1382 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1384         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
1385         Hnadle properly the attribute reference when it appears as part
1386         of an expression in another loop aspect.
1388 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1390         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
1391         subsidiary of Build_Initialization_Call, to complete generation
1392         of predicate checks on discriminants whose (sub)types have
1393         predicates, and to add checks on variants that do not have an
1394         others clause.
1395         * sem_util.adb (Gather_Components): A missing Others alternative is
1396         not an error when the type of the discriminant is a static predicate
1397         (and coverage has been checked when analyzing the case statement). A
1398         runtime check is generated to verify that a given discriminant
1399         satisfies the predicate (RM 3.8.1. (21.1/2)).
1401 2017-01-12  Yannick Moy  <moy@adacore.com>
1403         * gnat1drv.adb (Adjust_Global_Switches): Only
1404         perform checking of exception mechanism when generating code.
1406 2017-01-12  Justin Squirek  <squirek@adacore.com>
1408         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
1409         Remove handling of access component with invariant.
1410         (Build_Invariant_Procedure_Declaration): Remove return on class
1411         wide type.
1412         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
1413         conditional exception for component or array so Has_Own_Invariants
1414         flag is not falsly set.
1415         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
1416         wide type to have no invariant flags.
1418 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1420         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
1421         sem_ch13.adb: Minor reformatting.
1423 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1425         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
1426         adjustment primitive when the ancestor type was not properly frozen.
1427         (Gen_Assign): Guard against a missing initialization
1428         primitive when the component type was not properly frozen.
1429         (Initialize_Array_Component): Guard against a missing adjustment
1430         primitive when the component type was not properly frozen.
1431         (Initialize_Record_Component): Guard against a missing adjustment
1432         primitive when the component type was not properly frozen.
1433         (Process_Transient_Component_Completion): The transient object may
1434         not be finalized when its associated type was not properly frozen.
1435         * exp_ch3.adb (Build_Assignment): Guard against a missing
1436         adjustment primitive when the component type was not properly frozen.
1437         (Build_Initialization_Call): Guard against a missing
1438         initialization primitive when the associated type was not properly
1439         frozen.
1440         (Expand_N_Object_Declaration): Guard against a missing
1441         adjustment primitive when the base type was not properly frozen.
1442         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
1443         body when there is no adjustment primitive available. Create an
1444         empty Deep_Finalize body when there is no finalization primitive
1445         available.
1446         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
1447         missing finalization primitive when the designated type was
1448         not properly frozen.
1449         (Expand_N_Allocator): Guard against a missing initialization primitive
1450         when the designated type was not properly frozen.
1451         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
1452         only when the corresponding adjustment primitive is available.
1453         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
1454         adjustment/finalization statements only when there is an available
1455         primitive to carry out the action.
1456         (Build_Initialize_Statements): Generate the initialization/finalization
1457         statements only when there is an available primitive to carry out the
1458         action.
1459         (Make_Adjust_Call): Do not generate a call when the underlying
1460         type is not present due to a possible missing full view.
1461         (Make_Final_Call): Do not generate a call when the underlying
1462         type is not present due to a possible missing full view.
1463         (Make_Finalize_Address_Stmts): Generate an empty body when the
1464         designated type lacks a finalization primitive.
1465         (Make_Init_Call): Do not generate a call when the underlying type is
1466         not present due to a possible missing full view.
1467         (Process_Component_For_Adjust): Add the adjustment call only when the
1468         corresponding adjustment primitive is available.
1469         (Process_Component_For_Finalize): Add the finalization call only when
1470         the corresponding finalization primitive is available.
1471         (Process_Object_Declaration): Use a null statement to emulate a
1472         missing call to the finalization primitive of the object type.
1473         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
1474         (Make_Final_Call): Update the comment on usage.
1475         (Make_Init_Call): Update the comment on usage.
1476         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
1478 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1480         * einfo.ads: Update documentation of Address_Taken.
1481         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
1482         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
1483         for subprograms when setting Address_Taken flag.
1485 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
1487         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
1488         Configurable_Run_Time_Mode off when analysing with'ed predefined
1489         libraries.
1491 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1493         * sem_prag.adb: Minor reformatting.
1494         * sem_util.adb (Unique_Entity): fix result for
1495         bodies of entry families.
1497 2017-01-12  Justin Squirek  <squirek@adacore.com>
1499         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
1500         Resolve_Suppressible in the pragma Assertion_Policy case.
1501         (Resolve_Suppressible): Created this function to factor out
1502         common code used to resolve Suppress to either Ignore or Check
1503         * snames.ads-tmpl: Add name for Suppressible.
1505 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1507         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
1508         reformatting.
1509         * debug.adb: Minor comment fixes.
1511 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1513         * sem_util.adb (Unique_Entity): For concurrent
1514         bodies that are defined with stubs and complete a declaration
1515         of a single concurrent object return the entity of an implicit
1516         concurrent type, not the entity of the anonymous concurrent
1517         object.
1518         * debug.adb: -gnatd.J is no longer used.
1519         * make.adb (Globalize): Removed, no longer used.
1520         * sem_ch9.adb: minor typo in comment for entry index
1522 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
1524         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1525         * exp_ch3.adb (Build_Init_Statements): As part of initialising
1526         the value record of a task, set its _Secondary_Stack_Size field
1527         if present.
1528         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1529         a _Secondary_Stack_Size field in the value record of
1530         the task if a Secondary_Stack_Size rep item is present.
1531         (Make_Task_Create_Call): Include secondary stack size
1532         parameter. If No_Secondary_Stack restriction is in place, passes
1533         stack size of 0.
1534         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1535         Secondary_Stack_Size.
1536         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1537         function to define the overhead of the secondary stack.
1538         * s-tarest.adb (Create_Restricted_Task,
1539         Create_Restricted_Task_Sequential): Functions now include
1540         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1541         * s-tarest.adb (Create_Restricted_Task,
1542         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
1543         include Secondary_Stack_Size parameter.
1544         (Task_Wrapper): Secondary stack now allocated to the size specified by
1545         the Secondary_Stack_Size parameter in the task's ATCB.
1546         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
1547         Secondary_Stack_Size component.
1548         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1549         Create_Restricted_Task_Sequential): Function now include
1550         Secondary_Stack_Size parameter.
1551         (Task_Wrapper): Secondary stack now allocated to the size
1552         specified by the Secondary_Stack_Size parameter in the task's
1553         ATCB.
1554         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
1555         to include Secondary_Stack_Size parameter.
1556         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
1557         Secondary_Stack_Size aspect, turning the aspect into its corresponding
1558         internal attribute.
1559         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
1560         * snames.adb-tmpl, snames.ads-tmpl: Added names
1561         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1562         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1564 2017-01-12  Yannick Moy  <moy@adacore.com>
1566         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
1567         subtree.
1569 2017-01-12  Justin Squirek  <squirek@adacore.com>
1571         * exp_attr.adb (Expand_N_Attribute_Reference):
1572         Fix Finalization_Size case by properly resolving the type after
1573         rewritting the node.
1575 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1577         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
1578         the tree.
1579         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
1580         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
1581         exp_sel.ads: Minor reformatting.
1583 2017-01-12  Justin Squirek  <squirek@adacore.com>
1585         * exp_ch6.adb (Expand_Call): Add guard to prevent
1586         invariant checks from being created for internally generated
1587         subprograms.
1589 2017-01-12  Bob Duff  <duff@adacore.com>
1591         * lib-writ.ads: Remove incorrect comment.
1593 2017-01-12  Javier Miranda  <miranda@adacore.com>
1595         * debug.adb (-gnatd.K): Enable generation of contract-only
1596         procedures in CodePeer mode.
1597         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1598         New subprogram.
1599         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
1600         set.
1601         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
1602         subprogram.
1603         (Get_Contract_Only_Missing_Body_Name): New subprogram.
1604         (Get_Contract_Only_Body): New subprogram.
1605         (Set_Contract_Only_Body): New subprogram.
1606         (Is_Contract_Only_Body): New subprogram.
1607         (Set_Is_Contract_Only_Body): New subprogram.
1608         (SCIL_Nodes): Replace table by hash-table.
1610 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1612         * exp_ch6.adb: Minor reformatting.
1613         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
1615 2017-01-12  Bob Duff  <duff@adacore.com>
1617         * binde.adb (Forced): New reason for a dependence.
1618         (Force_Elab_Order): Implementation of the new switch.
1619         * binde.ads: Minor comment fixes.
1620         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
1621         long ago that is no longer supported; removed comment about that.
1622         * opt.ads (Force_Elab_Order_File): Name of file specified for
1623         -f switch.
1624         * switch-b.adb: Parse -f switch.
1626 2017-01-12  Justin Squirek  <squirek@adacore.com>
1628         * exp_ch6.adb (Check_View_Conversion): Created this function
1629         to properly chain calls to check type invariants that may be
1630         present in a subprogram call after the subprogram.
1631         (Expand_Call): Add a conditional to identify when a view conversion
1632         needs to be checked.
1633         * nlists.adb, nlists.ads (Prepend_New): New routine.
1634         (Prepend_New_To): New routine.
1636 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1638         * sinfo.ads: Minor reformatting.
1640 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1642         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
1643         reformatting.
1645 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1647         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
1648         variable Definite. Create a local object and pass its 'Access to the
1649         BIP function when the result type is either definite or it does not
1650         require any finalization or secondary stack management.
1652 2017-01-12  Bob Duff  <duff@adacore.com>
1654         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
1655         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
1656         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
1657         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
1658         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
1659         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1660         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1661         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
1662         Change name to Pragma_Name_Unmapped.
1663         (Pragma_Name_Mapped): Change name to Pragma_Name.
1664         This is because the "mapped" version should be the usual case.
1666 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
1668         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
1669         Is_Default_Init_Cond_Procedure, and
1670         Has_Inherited_Default_Init_Cond.  Add uses of flags
1671         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
1672         (Default_Init_Cond_Procedure): Removed.
1673         (DIC_Procedure): New routine.
1674         (Has_Default_Init_Cond): Removed.
1675         (Has_DIC): New routine.
1676         (Has_Inheritable_Invariants): The attribute applies to the base type.
1677         (Has_Inherited_Default_Init_Cond): Removed.
1678         (Has_Inherited_DIC): New routine.
1679         (Has_Inherited_Invariants): The attribute applies to the base type.
1680         (Has_Own_DIC): New routine.
1681         (Has_Own_Invariants): The attribute applies to the base type.
1682         (Is_Default_Init_Cond_Procedure): Removed.
1683         (Is_DIC_Procedure): New routine.
1684         (Set_Default_Init_Cond_Procedure): Removed.
1685         (Set_DIC_Procedure): New routine.
1686         (Set_Has_Default_Init_Cond): Removed.
1687         (Set_Has_Inheritable_Invariants): The attribute applies
1688         to the base type.
1689         (Set_Has_Inherited_Default_Init_Cond): Removed.
1690         (Set_Has_Inherited_DIC): New routine.
1691         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
1692         (Set_Has_Own_DIC): New routine.
1693         (Set_Has_Own_Invariants): The attribute applies to the base type.
1694         (Set_Is_Default_Init_Cond_Procedure): Removed.
1695         (Set_Is_DIC_Procedure): New routine.
1696         (Write_Entity_Flags): Update the output of all flags related to
1697         default initial condition.
1698         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
1699         of the call to the DIC procedure.
1700         (Freeze_Type): Generate the body of the DIC procedure.
1701         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
1702         all occurrences of Create_Append with Append_New_To. Do
1703         not generate an invariant procedure for a class-wide type.
1704         The generated body acts as a freeze action of the working type.
1705         (Build_Invariant_Procedure_Declaration): Do not generate an
1706         invariant procedure for a class-wide type.
1707         (Create_Append): Removed.
1708         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
1709         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
1710         class-wide pre/postcondition description and data structures from
1711         Sem_Prag.
1712         (Build_Class_Wide_Expression): Moved from Sem_Prag.
1713         (Build_DIC_Call): New routine.
1714         (Build_DIC_Procedure_Body): New routine.
1715         (Build_DIC_Procedure_Declaration): New routine.
1716         (Entity_Hash): Moved from Sem_Prag.
1717         (Find_DIC_Type): New routine.
1718         (Update_Primitives_Mapping): Reimplemented.
1719         (Update_Primitives_Mapping_Of_Types): New routine.
1720         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
1721         (Build_DIC_Call): New routine.
1722         (Build_DIC_Procedure_Body): New routine.
1723         (Build_DIC_Procedure_Declaration): New routine.
1724         (Update_Primitives_Mapping): Moved from Sem_Prag.
1725         (Update_Primitives_Mapping_Of_Types): New routine.
1726         * nlists.adb (Append_New): New routine.
1727         (Append_New_To): New routine.
1728         * nlists.ads (Append_New): New routine.
1729         (Append_New_To): New routine.
1730         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
1731         of DIC procedures here. This is now done at the end of the
1732         visible declarations, private declarations, and at the freeze
1733         point of a type.
1734         (Analyze_Private_Extension_Declaration):
1735         A private extension inherits the DIC pragma of a parent type.
1736         (Analyze_Subtype_Declaration): No need to propagate invariant
1737         attributes to a subtype as those apply to the base type.
1738         (Build_Derived_Record_Type): No need to inherit invariants here
1739         as this is now done in Build_Derived_Type.
1740         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
1741         a parent type.
1742         (Process_Full_View): Update the propagation of DIC attributes.
1743         (Propagate_Default_Init_Cond_Attributes): Removed.
1744         * sem_ch7.adb Add with and use clauses for Exp_Util.
1745         (Analyze_Package_Specification): Create the body of the DIC
1746         procedure at the end of the visible and private declarations.
1747         (Preserve_Full_Attributes): Propagate DIC attributes.
1748         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
1749         DIC attributes.
1750         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
1751         * sem_elab.adb (Check_A_Call): Update the call to
1752         Is_Nontrivial_Default_Init_Cond_Procedure.
1753         * sem_prag.adb Remove the with and use clauses for
1754         GNAT.HTable. Move the handling of class- wide pre/postcondition
1755         description and data structures to Exp_Util.
1756         (Analyze_Pragma): Create the declaration of the DIC procedure. There
1757         is no need to propagate invariant-related attributes at this point
1758         as this is done in Build_Invariant_Procedure_Declaration.
1759         (Build_Class_Wide_Expression): Moved to Exp_Util.
1760         (Entity_Hash): Moved to Exp_Util.
1761         (Update_Primitives_Mapping): Moved to Exp_Util.
1762         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
1763         (Update_Primitives_Mapping): Moved to Exp_Util.
1764         * sem_util.adb: Remove with and use clauses for Ghost
1765         and Sem_Ch13.
1766         (Build_Default_Init_Cond_Call): Removed.
1767         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1768         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1769         (Get_Views): Reimplemented.
1770         (Has_Full_Default_Initialization): Reimplement the section on DIC.
1771         (Inherit_Default_Init_Cond_Procedure): Removed.
1772         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1773         (Is_Nontrivial_DIC_Procedure): New routine.
1774         (Is_Verifiable_DIC_Pragma): New routine.
1775         (Propagate_DIC_Attributes): New routine.
1776         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
1777         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1778         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1779         (Inherit_Default_Init_Cond_Procedure): Removed.
1780         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1781         (Is_Nontrivial_DIC_Procedure): New routine.
1782         (Is_Verifiable_DIC_Pragma): New routine.
1783         (Propagate_DIC_Attributes): New routine.
1784         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
1785         on DIC.
1786         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
1787         usage in nodes.
1788         (Expression_Copy): New routine along with pragma Inline.
1789         (Set_Expression_Copy): New routine along with pragma Inline.
1791 2017-01-06  Bob Duff  <duff@adacore.com>
1793         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
1794         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
1795         we won't generate the call to s_stalib_adafinal when the main
1796         is not written in Ada.
1798 2017-01-06  Bob Duff  <duff@adacore.com>
1800         * sem_prag.adb: Minor: remove pragma Warnings.
1802 2017-01-06  Tristan Gingold  <gingold@adacore.com>
1804         * Makefile.rtl: Do not compile s-stchop by default.
1806 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
1808         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
1809         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
1810         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
1811         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
1812         Reverted previous change for now.
1814 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
1816         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
1817         check to default discriminant value if checks are enabled.
1818         (Build_Assignment): If type of component has static predicate,
1819         apply check to its default value, if any.
1821 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
1823         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1824         * exp_ch3.adb (Build_Init_Statements): As part of initialising
1825         the value record of a task, set its _Secondary_Stack_Size field
1826         if present.
1827         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1828         a _Secondary_Stack_Size field in the value record of
1829         the task if a Secondary_Stack_Size rep item is present.
1830         (Make_Task_Create_Call): Include secondary stack size
1831         parameter. If No_Secondary_Stack restriction is in place, passes
1832         stack size of 0.
1833         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1834         Secondary_Stack_Size.
1835         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1836         function to define the overhead of the secondary stack.
1837         * s-tarest.adb (Create_Restricted_Task,
1838         Create_Restricted_Task_Sequential): Functions now include
1839         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1840         * s-tarest.adb (Create_Restricted_Task,
1841         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
1842         now include Secondary_Stack_Size parameter.
1843         (Task_Wrapper):
1844         Secondary stack now allocated to the size specified by the
1845         Secondary_Stack_Size parameter in the task's ATCB.
1846         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
1847         Secondary_Stack_Size component.
1848         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1849         Create_Restricted_Task_Sequential): Function now include
1850         Secondary_Stack_Size parameter.
1851         (Task_Wrapper): Secondary stack
1852         now allocated to the size specified by the Secondary_Stack_Size
1853         parameter in the task's ATCB.
1854         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
1855         for Secondary_Stack_Size aspect, turning the aspect into its
1856         corresponding internal attribute.
1857         (Analyze_Attribute_Definition):
1858         Process Secondary_Stack_Size attribute.
1859         * snames.adb-tmpl, snames.ads-tmpl: Added names
1860         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1861         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1863 2017-01-06  Pascal Obry  <obry@adacore.com>
1865         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
1866         Sequential_IO and Direct_IO.
1868 2017-01-06  Bob Duff  <duff@adacore.com>
1870         * snames.ads-tmpl (Renamed): New name for the pragma argument.
1871         * par-ch2.adb: Allow the new pragma (with analysis deferred
1872         to Sem_Prag).
1873         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
1874         Keep a mapping from new pragma names to old names.
1875         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
1876         implement it by calling Map_Pragma_Name.
1877         * checks.adb, contracts.adb, einfo.adb, errout.adb,
1878         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
1879         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
1880         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
1881         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
1882         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1883         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
1884         as appropriate.
1886 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
1888         * exp_ch9.adb: Minor reformatting.
1890 2017-01-06  Tristan Gingold  <gingold@adacore.com>
1892         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
1893         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
1894         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
1895         (unused).
1896         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
1897         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
1898         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
1899         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
1901 2017-01-06  Bob Duff  <duff@adacore.com>
1903         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
1904         dummy implementation of Map_Pragma_Name.
1906 2017-01-06  Tristan Gingold  <gingold@adacore.com>
1908         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
1909         entry_body variable constant.
1910         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
1911         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
1912         to constant.
1913         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
1914         now access to constant.
1916 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
1918         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
1919         reformatting and typo fixes.
1921 2017-01-06  Bob Duff  <duff@adacore.com>
1923         * snames.ads-tmpl: New names for pragma renaming.
1924         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
1925         * par-prag.adb: Add new pragma name to case statement.
1926         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
1927         of the pragma.
1928         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
1929         Dummy implementation of Pragma_Name_Mapped.
1931 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
1933         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
1934         better detect call within an entry_wrapper.
1935         * sem_res.adb (Resolve_Call): A protected call within an
1936         entity_wrapper is analyzed in the context of the protected
1937         object but corresponds to a pre-analysis and is not an access
1938         before elaboration.
1939         * sem_attr.adb: Minor reformatting.
1941 2017-01-06  Justin Squirek  <squirek@adacore.com>
1943         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
1944         Finalization_Size to allow a prefix of any non-class-wide type.
1945         * sem_attr.ads Modify comment for Finalization_Size to include
1946         definite type use case.
1948 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
1950         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
1951         on procedures that are wrappers created for entries that have
1952         preconditions.
1953         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
1954         body is an entry_wrapper, compile it in the context of the
1955         synchronized type, because a precondition may refer to funtions
1956         of the type.
1957         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
1958         body entity.
1959         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
1960         within an Entry_Wrapper this is an external call whose target
1961         is the synchronized object that is the actual in the call to
1962         the wrapper.
1964 2017-01-06  Yannick Moy  <moy@adacore.com>
1966         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
1967         in tree, which means not analyzing the previous prefix if the node has
1968         been rewritten into its prefix.
1970 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
1972         * s-tpobop.adb: Minor reformatting.
1974 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
1976         * checks.adb (Ensure_Valid): Do not generate a validity check
1977         within a generated predicate function, validity checks will have
1978         been applied earlier when required.
1980 2017-01-06  Tristan Gingold  <gingold@adacore.com>
1982         * s-tpoben.ads (Protection_Entries): Add comment and reorder
1983         components for performances.
1984         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
1985         semantic.
1987 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
1989         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
1990         If expression is compile-time known and obeys a static predicate
1991         it must be labelled as static, to prevent spurious warnings and
1992         run-time errors, e.g. in case statements. This is relevant when
1993         the expression is the result of constant-folding a type conversion
1994         whose expression is a variable with a known static value.
1996 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
1998         * exp_attr.adb, sem_attr.ads: Minor reformatting.
2000 2017-01-06  Justin Squirek  <squirek@adacore.com>
2002         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
2003         expansion of Finalization_Size attribute.
2004         * sem_attr.adb (Analyze_Attribute): Add entry to check the
2005         semantics of Finalization_Size.
2006         (Eval_Attribute): Add null entry for Finalization_Size.
2007         * sem_attr.ads: Add Finalization_Size to the implementation
2008         dependent attribute list.
2009         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
2011 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2013         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
2014         iterator specification with a serious syntactic error, transform
2015         construct into an infinite loop in order to continue analysis
2016         and prevent a compiler abort.
2018 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2020         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
2021         max_queue_lengths_array if unused.
2023 2017-01-06  Bob Duff  <duff@adacore.com>
2025         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
2026         array access, in case "\" is at the end of Text.
2027         * stylesw.adb (Set_Style_Check_Options): Don't include input
2028         characters in the error message template, because they could
2029         be control characters such as "\", which Errout will try to
2030         interpret.
2032 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2034         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
2035         For a private type examine the visible declarations that follow
2036         the partial view, not just the private declarations that follow
2037         the full view.
2039 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2041         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
2042         code cleanup.
2044 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2046         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
2047         alias of the inherited op is the parent iterator, no need to
2048         examine dispatch table positions which might not be established
2049         yet if type is not frozen.
2050         * sem_disp.adb (Check_Controlling_Formals): The formal of a
2051         predicate function may be a subtype of a tagged type.
2052         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
2053         of representation items for the completion of a type extension
2054         where a predicate applies to the partial view.
2055         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
2056         parameter that designates function whose actual receives a
2057         predicate check, to improve warning message when the check will
2058         lead to infinite recursion.
2059         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
2060         Apply_Predicate_Check.
2062 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2064         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
2065         Gnat_Extended_Ravenscar.
2066         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
2068 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2070         * sem_util.ads: Minor typo fix and reformatting.
2072 2017-01-06  Yannick Moy  <moy@adacore.com>
2074         * ghost.adb Minor fixing of references to SPARK RM.
2075         (Check_Ghost_Context): Check whether reference is to a lvalue
2076         before issuing an error about violation of SPARK RM 6.9(13)
2077         when declaration has Ghost policy Check and reference has Ghost
2078         policy Ignore.
2079         * sem_util.adb Minor indentation.
2080         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
2081         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
2082         * sem_util.ads (Unique_Defining_Entity): Document the result
2083         for package body stubs.
2085 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2087         * raise-gcc.c (abort): Macro to call Abort_Propagation.
2088         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
2089         constant.
2090         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2091         Do not generate the Entry_Max_Queue_Lengths_Array if all default
2092         values.
2093         * exp_util.adb (Corresponding_Runtime_Package): Consider
2094         Max_Queue_Length pragma.
2096 2017-01-06  Justin Squirek  <squirek@adacore.com>
2098         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2099         Remove declaration generation in the case of
2100         System_Tasking_Protected_Objects_Single_Entry being used,
2101         and add a warning message when this is detected to occur.
2102         (Make_Initialize_Protection): Remove reference pass in the case
2103         of System_Tasking_Protected_Objects_Single_Entry.
2104         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
2105         * s-tposen.adb (Initialize_Protection_Entry): Remove
2106         Entry_Queue_Max parameter.
2107         * s-tposen.ads: Remove the types use to store the entry queue
2108         maximum.
2109         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
2111 2017-01-06  Yannick Moy  <moy@adacore.com>
2113         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
2114         behavior of function, to also accept out of range positions
2115         and raise Constraint_Error in such case, and to copy sloc from
2116         literal if No_Location passed as location.
2117         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
2118         of functions to raise Constraint_Error in case of value not in
2119         appropriate range.
2121 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2123         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
2124         Invalidate_Stack_Cache.
2126 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2128         * s-os_lib.adb: Minor fix to the signature of Readlink.
2130 2017-01-06  Javier Miranda  <miranda@adacore.com>
2132         * sem_ch6.adb (Conforming_Types): Handle another
2133         confusion between views in a nested instance with an actual
2134         private type whose full view is not in scope.
2136 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
2138         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
2139         mark a rewritten if statement as explicit (Comes_From_Source).
2141 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2143         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
2145 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2147         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
2149 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2151         * sem_case.adb: Minor reformatting.
2153 2017-01-06  Thomas Quinot  <quinot@adacore.com>
2155         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
2157 2017-01-06  Justin Squirek  <squirek@adacore.com>
2159         * aspects.adb: Register aspect in Canonical_Aspect.
2160         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
2161         into respective tables.
2162         * einfo.ads, einfo.adb: Add a new attribute for
2163         handling the parameters for Pragma_Max_Entry_Queue
2164         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
2165         for accessing and setting were added as well.
2166         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
2167         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
2168         declaration for pramga arguments and store them in the protected
2169         type node.
2170         (Make_Initialize_Protection): Pass a reference to
2171         the Entry_Max_Queue_Lengths_Array in the protected type node to
2172         the runtime.
2173         * rtsfind.adb: Minor grammar fix.
2174         * rtsfind.ads: Register new types taken from the
2175         runtime libraries RE_Protected_Entry_Queue_Max and
2176         RE_Protected_Entry_Queue_Max_Array
2177         * s-tposen.adb, s-tpoben.adb
2178         (Initialize_Protection_Entry/Initialize_Protection_Entries):
2179         Add extra parameter and add assignment to local object.
2180         * s-tposen.ads, s-tpoben.ads: Add new types to
2181         store entry queue maximums and a field to the entry object record.
2182         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
2183         for Aspect_Max_Queue_Length.
2184         (Check_Aspect_At_Freeze_Point):
2185         Add aspect to list of aspects that don't require delayed analysis.
2186         * sem_prag.adb (Analyze_Pragma): Add case statement for
2187         Pragma_Max_Queue_Length, check semantics, and register arugments
2188         in the respective entry nodes.
2189         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
2190         and Has_Max_Queue_Length
2191         * snames.ads-tmpl: Add constant for the new aspect-name
2192         Name_Max_Queue_Length and corrasponding pragma.
2194 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2196         * exp_util.adb (Is_Controlled_Function_Call):
2197         Reimplemented. Consider any node which has an entity as the
2198         function call may appear in various ways.
2200 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2202         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
2203         an unchecked type conversion when performing a view conversion
2204         to/from a private type. In all other cases use a regular type
2205         conversion to ensure that any relevant checks are properly
2206         installed.
2208 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2210         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
2212 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2214         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
2215         error on case expression that is an entity, when coverage is
2216         incomplete and entity has a static value obtained by local
2217         propagation.
2218         (Handle_Static_Predicate): New procedure, subsidiary of
2219         Check_Choices, to handle case alternatives that are either
2220         subtype names or subtype indications involving subtypes that
2221         have static predicates.
2223 2017-01-06  Thomas Quinot  <quinot@adacore.com>
2225         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
2226         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
2228 2017-01-06  Bob Duff  <duff@adacore.com>
2230         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
2231         Elaborate_All(P) to P itself. That could happen in obscure cases,
2232         and always introduced a cycle (P body must be elaborated before
2233         P body).
2234         * lib-writ.ads: Comment clarification.
2235         * ali-util.ads: Minor comment fix.
2236         * ali.adb: Minor reformatting.
2238 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2240         * a-exexpr-gcc.adb: Improve comment.
2242 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
2244         * s-linux-mips.ads: Use correct signal and errno constants.
2245         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
2247 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
2249         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
2250         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
2251         sections.
2253 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
2255         * gnatvsn.ads: Bump copyright year.
2257 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
2259         * gnat_ugn.texi: Bump @copying's copyright year.
2260         * gnat_rm.texi: Likewise.
2262 Copyright (C) 2017 Free Software Foundation, Inc.
2264 Copying and distribution of this file, with or without modification,
2265 are permitted in any medium without royalty provided the copyright
2266 notice and this notice are preserved.