PR rtl-optimization/79386
[official-gcc.git] / gcc / ada / ChangeLog
blob387cfbfc559bf0e38aff89754abf96e9a7822d1c
1 2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
2             Jakub Jelinek  <jakub@redhat.com>
4         PR ada/79309
5         * adaint.c (__gnat_killprocesstree): Fix broken string handling.
7 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
9         PR lto/79061
10         * gcc-interface/utils.c (get_global_context): Pass main_input_filename
11         to build_translation_unit_decl.
13 2017-01-23  Javier Miranda  <miranda@adacore.com>
15         * sem_util.adb (New_Copy_Tree): Code cleanup:
16         removal of the internal map (ie. variable Actual_Map, its
17         associated local variables, and all the code handling it).
18         * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
19         force loading of the System package when processing a task type.
20         (Analyze_Protected_Type_Declaration): in GNATprove mode force
21         loading of the System package when processing a protected type.
22         * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
23         force loading of the System package when processing compilation
24         unit with a main-like subprogram.
25         * frontend.adb (Frontend): remove forced loading of the System
26         package.
28 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
30         * sem_prag.adb (Default_Initial_Condition): If the desired type
31         declaration is a derived type declaration with discriminants,
32         it is rewritten as a private type declaration.
33         * sem_ch13.adb (Replace_Type_References_Generic,
34         Visible_Component): A discriminated private type with descriminnts
35         has components that must be rewritten as selected components
36         if they appear as identifiers in an aspect expression such as
37         a Default_Initial_Condition.
38         * sem_util.adb (Defining_Entity): support N_Iterator_Specification
39         nodes.
41 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
43         * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
44         * gnat1drv.adb Generate an empty object file for an ignored
45         Ghost compilation unit.
46         * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
48 2017-01-23  Yannick Moy  <moy@adacore.com>
50         * sem_ch4.adb (Analyze_Indexed_Component_Form):
51         Adapt to inlined prefix with string literal subtype.
52         * inline.adb (Expand_Inlined_Call): Keep unchecked
53         conversion inside inlined call when formal type is constrained.
55 2017-01-23  Javier Miranda  <miranda@adacore.com>
57         * sem_util.adb (New_Copy_Tree): Code cleanup:
58         removal of global variables. All the global variables, global
59         functions and tables of this subprogram are now declared locally.
61 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
63         * exp_strm.ads: Minor reformatting and typo fixes.
65 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
67         * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
68         exp_aggr.adb: Minor reformatting.
69         * g-diopit.adb: minor grammar/punctuation fix in comment.
70         * g-byorma.ads: minor fix of unbalanced parens in comment.
72 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
74         * par.adb: Update the documentation of component Labl.
75         * par-ch6.adb (P_Return_Statement): Set the expected label of
76         an extended return statement to Error.
78 2017-01-23  Tristan Gingold  <gingold@adacore.com>
80         * s-boustr.ads, s-boustr.adb (Is_Full): New function.
82 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
84         * expander.adb: Handle N_Delta_Aggregate.
86 2017-01-23  Javier Miranda  <miranda@adacore.com>
88         * exp_ch6.adb (Expand_Call): Improve the code that
89         checks if some formal of the called subprogram is a class-wide
90         interface, to handle subtypes of class-wide interfaces.
92 2017-01-23  Javier Miranda  <miranda@adacore.com>
94         * checks.adb (Apply_Parameter_Aliasing_Checks):
95         Remove side effects of the actuals before generating the overlap
96         check.
98 2017-01-23  Justin Squirek  <squirek@adacore.com>
100         * exp_strm.ads, exp_strm.ads
101         (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
102         as to avoid getting the underlying type by default.
103         * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
104         underlying type in the Iiput and output attribute cases when
105         building their respective functions.
107 2017-01-23  Gary Dismukes  <dismukes@adacore.com>
109         * scng.adb: Minor reformatting of error message.
111 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
113         * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
114         to freeze the return type of an expression funxtion that is a
115         completion, if the type is a limited view and the non-limited
116         view is available.
118 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
120         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
121         aggregate construct.
122         (P_Record_Or_Array_Component_Association): An array aggregate
123         can start with an Iterated_Component_Association.
124         * scng.adb: Modify error message on improper use of @ in earlier
125         versions of the language.
126         * sinfo.ads: New node kind N_Delta_Aggregate.
127         * sinfo.adb: An N_Delta_Aggregate has component associations and
128         an expression.
129         * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
130         * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
131         Create a new index for each one of the choices in the association,
132         to prevent spurious homonyms in the scope.
133         (Resolve_Delta_Aggregate): New.
134         * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
135         * exp_util.adb (Insert_Actions): Take into account
136         N_Delta_Aggregate.
137         * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
138         * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
139         and local procedures Expand_Delta_Array_Aggregate and
140         expand_Delta_Record_Aggregate.
141         * sprint.adb: Handle N_Delta_Aggregate.
143 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
145         * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
146         empty name when the exception declaration is subject to pragma
147         Discard_Names.
148         (Null_String): New routine.
150 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
152         * par-ch9.adb (P_Protected_Definition): Parse
153         any optional and potentially illegal pragmas which appear in
154         a protected operation declaration list.
155         (P_Task_Items): Parse
156         any optional and potentially illegal pragmas which appear in a
157         task item list.
159 2017-01-23  Pascal Obry  <obry@adacore.com>
161         * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
162         is needed when a foreign thread call a Win32 API using a thread handle
163         like GetThreadTimes() for example.
165 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
167         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
168         allow an 'Address clause to be specified on a prefix of a
169         class-wide type.
171 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
173         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
174         attribute 'Valid is a renaming of the original expression when
175         the expression denotes a name. For all other kinds of expression,
176         use a constant to capture the value.
177         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
178         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
180 2017-01-23  Justin Squirek  <squirek@adacore.com>
182         * sem_eval.adb (Eval_Integer_Literal): Add special
183         case to avoid optimizing out check if the literal appears in
184         an if-expression.
186 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
188         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
189         allow an 'Address clause to be specified on a prefix of a
190         class-wide type.
192 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
194         * checks.adb (Insert_Valid_Check): Ensure that the prefix of
195         attribute 'Valid is a renaming of the original expression when
196         the expression denotes a name. For all other kinds of expression,
197         use a constant to capture the value.
198         * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
199         * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
201 2017-01-23  Justin Squirek  <squirek@adacore.com>
203         * sem_eval.adb (Eval_Integer_Literal): Add special
204         case to avoid optimizing out check if the literal appears in
205         an if-expression.
207 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
209         * sem_ch4.adb (Try_Primitive_Operations,
210         Is_Valid_First_Argument_Of): argument is valid if it is a derived
211         type with unknown discriminants that matches its underlying
212         record view.
213         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
214         expression if its type is derived from a limited type with
215         unknown discriminants, because the expansion (which is a call)
216         must be expanded in the enclosing context to add the proper build-
217         in-place parameters to the call.
218         * lib.ads, exp_ch9.adb: Minor fixes in comments.
220 2017-01-23  Yannick Moy  <moy@adacore.com>
222         * frontend.adb (Frontend): Do not load runtime
223         unit for GNATprove when parsing failed.
224         * exp_ch9.adb: minor removal of extra whitespace
225         * exp_ch6.adb: minor typo in comment
226         * sem_util.adb: Code cleanup.
227         * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
228         * a-ngcefu.adb: minor style fix in whitespace
230 2017-01-23  Thomas Quinot  <quinot@adacore.com>
232         * scos.ads: Document usage of 'd' as default SCO kind for
233         declarations.
234         * par_sco.adb (Traverse_Declarations_Or_Statements.
235         Traverse_Degenerate_Subprogram): New supporting routine for expression
236         functions and null procedures.
237         (Traverse_Declarations_Or_Statements.Traverse_One): Add
238         N_Expression_Function to the subprogram case; add required
239         support for null procedures and expression functions.
241 2017-01-23  Bob Duff  <duff@adacore.com>
243         * namet.ads (Bounded_String): Decrease the size of type
244         Bounded_String to avoid running out of stack space.
245         * namet.ads (Append): Don't ignore buffer overflow; raise
246         Program_Error instead.
248 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
250         * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
251         sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
252         reformatting.
253         * exp_ch9.adb: minor style fix in comment.
255 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
257         * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
258         for a limited record extension with unknown discriminants whose
259         full view has no discriminants.
261 2017-01-23  Yannick Moy  <moy@adacore.com>
263         * exp_spark.adb: Alphabetize with clauses.
265 2017-01-23  Yannick Moy  <moy@adacore.com>
267         * sem_util.adb (Has_Enabled_Property): Treat
268         protected objects and variables differently from other variables.
270 2017-01-23  Thomas Quinot  <quinot@adacore.com>
272         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
273         Split original Ada 95 part off into new subprogram
274         below. Call that subprogram (instead of proceeding with
275         AI95-0133 behaviour) if debug switch -gnatd.p is in use.
276         (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
277         * debug.adb Document new switch -gnatd.p
278         * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
279         record for reverse bit order if an error has already been posted
280         on the record type.  This avoids generating extraneous "info:"
281         messages for illegal code.
283 2017-01-23  Justin Squirek  <squirek@adacore.com>
285         * sem_ch3.adb (Analyze_Declarations): Correct comments
286         * freeze.adb (Find_Constant): Add detection of deferred constants
287         so they are not incorrectly flagged as premature.
289 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
291         * scans.ads: New token At_Sign. Remove '@' from list of illegal
292         characters for future version of the language. '@' is legal name.
293         * scng.ads, scng.adb (Scan):  Handle '@' appropriately.
294         * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
295         denotes a Target_Name.
296         * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
297         * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
298         (Has_Target_Names): New flag on N_Assignment_Statement, to
299         indicate that RHS has occurrences of N_Target_Name.
300         * sem.adb: Call Analyze_Target_Name.
301         * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
302         (urrent_LHS): Global variable that denotes LHS of assignment,
303         used in the analysis of Target_Name nodes.
304         * sem_res.adb (Resolve_Target_Name): New procedure.
305         * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
306         N is an assignment statement whose RHS contains occurences of @
307         that designate the value of the LHS of the assignment. If the
308         LHS is side-effect free the target names can be replaced with
309         a copy of the LHS; otherwise the semantics of the assignment
310         is described in terms of a procedure with an in-out parameter,
311         and expanded as such.
312         (Expand_N_Assignment_Statement): Call
313         Expand_Assign_With_Target_Names when needed.
314         * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
315         * sprint.adb: Handle N_Target_Name.
317 2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>
319         * checks.adb: Minor fix in comment.
321 2017-01-23  Philippe Gil  <gil@adacore.com>
323         * g-debpoo.adb (Do_Report) remove freed chunks from chunks
324         count in Sort = Memory_Usage or Allocations_Count
326 2017-01-23  Justin Squirek  <squirek@adacore.com>
328         * sem_ch3.adb: Code cleanup.
330 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
332         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
333         variables to the local variable section. Update the profile
334         of various nested routine that previously had visibility
335         of those globals. One the matching phase has completed,
336         remove certain classes of clauses which are considered noise.
337         (Check_Dependency_Clause): Properly detect a match between two
338         'Result attributes. Update the various post-match cases to use
339         Is_Already_Matched as this routine now automatically recognizes
340         a previously matched 'Result attribute.
341         (Is_Already_Matched): New routine.
342         (Remove_Extra_Clauses): New routine.
343         (Report_Extra_Clauses): Remove the detection of ... => null
344         clauses as this is now done in Remove_Extra_Clauses.
346 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
348         * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
349         report on spurious overlaps between values involving a subtype
350         with a static predicate, because the expansion of such a subtype
351         into individual ranges in inhibited in ASIS mode.
353 2017-01-23  Justin Squirek  <squirek@adacore.com>
355         * sem_ch3.adb (Analyze_Declarations): Add detection
356         of an edge case and delay freezing if it is present.
358 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
360         * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
361         sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
363 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
365         * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
366         access-to-subprogram types inherit the convention of the
367         associated subprogram.  (Set_Profile_Convention): New routine.
368         * sem_ch6.adb (Check_Conformance): Do not compare the conventions
369         of the two entities directly, use Conventions_Match to account
370         for anonymous access-to-subprogram and subprogram types.
371         (Conventions_Match): New routine.
373 2017-01-23  Claire Dross  <dross@adacore.com>
375         * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
376         which return Universal_Integer, force the overflow check flag for
377         Length and Range_Length for types as big as Long_Long_Integer.
379 2017-01-23  Claire Dross  <dross@adacore.com>
381         * exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
382         attributes which return Universal_Integer, introduce a conversion
383         to the expected type with the appropriate check flags set.
384         * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
385         base type if the range is null. It may still be invalid if it
386         is higher than the lower bound. This is checked later in the
387         context in which the range appears.
389 2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>
391         * scos.ads: Introduce a constant to represent ignored
392         dependencies in SCO_Unit_Table_Entry.
394 2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
396         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
397         spaces from error messages.
399 2017-01-23  Ed Schonberg  <schonberg@adacore.com>
401         * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
402         subsidiary to Expand_N_Object_ Declaration, to compute a guard on
403         an object declaration for an array type with a modular index type
404         with the size of Long_Long_Integer. Special processing is needed
405         in this case to compute reliably the size of the object, and
406         eventually  to raise Storage_Error, when wrap-around arithmetic
407         might compute a meangingless size for the object.
409 2017-01-23  Justin Squirek  <squirek@adacore.com>
411         * a-wtenau.adb, par-endh.adb, sem_prag.adb,
412         sem_type.adb: Code cleanups.
414 2017-01-23  Bob Duff  <duff@adacore.com>
416         * sem_res.adb (Resolve_Call): In the part of the code where
417         it is deciding whether to turn the call into an indexed
418         component, avoid doing so if the call is to an instance of
419         Unchecked_Conversion. Otherwise, the compiler turns it into an
420         indexed component, and resolution of that turns it back into a
421         function call, and so on, resulting in infinite recursion.
422         * sem_util.adb (Needs_One_Actual): If the first formal has a
423         default, then return False.
425 2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>
427         * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
428         optimizations when the type is modular and the offsets are equal.
430 2017-01-20  Thomas Quinot  <quinot@adacore.com>
432         * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
433         message.
435 2017-01-20  Nicolas Roche  <roche@adacore.com>
437         * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
439 2017-01-20  Bob Duff  <duff@adacore.com>
441         * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
442         (etc) optimizations when the type is modular.
444 2017-01-20  Yannick Moy  <moy@adacore.com>
446         * sem_ch6.adb (Move_Pragmas): move some pragmas,
447         but copy the SPARK_Mode pragma instead of moving it.
448         (Build_Subprogram_Declaration): Ensure that the generated spec
449         and original body share the same SPARK_Pragma aspect/pragma.
450         * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
451         procedure to copy SPARK_Mode aspect.
453 2017-01-20  Bob Duff  <duff@adacore.com>
455         * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
456         even in ASIS mode.
457         * sem_ch13.adb (Resolve_Name): Enable setting the entity to
458         Empty even in ASIS mode.
460 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
462         * exp_ch9.adb: minor style fixes in comments.
463         * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
464         relative statement introduces an implicit dependency on
465         Ada.Real_Time.Clock_Time.
466         * sem_util.adb: Minor reformatting.
468 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
470         * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
471         must be treated as delayed aspect even if the expression is
472         a literal, because the aspect affects the freezing and the
473         elaboration of the object to which it applies.
475 2017-01-20  Tristan Gingold  <gingold@adacore.com>
477         * s-osinte-vxworks.ads (Interrup_Range): New subtype.
479 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
481         * lib-xref.adb (Generate_Reference): Do not warn about the
482         presence of a pragma Unreferenced if the entity appears as the
483         actual in a procedure call that does not come from source.
485 2017-01-20  Pascal Obry  <obry@adacore.com>
487         * expect.c, terminals.c: Fix some warnings about unused variables.
488         * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
489         of the runtime.
491 2017-01-20  Bob Duff  <duff@adacore.com>
493         * exp_attr.adb (Constrained): Apply an access check (check that
494         the prefix is not null) when the prefix denotes an object of an
495         access type; that is, when there is an implicit dereference.
497 2017-01-20  Gary Dismukes  <dismukes@adacore.com>
499         * s-rident.ads (constant Profile_Info): Remove
500         No_Calendar from GNAT_Extended_Ravenscar restrictions.
502 2017-01-20  Tristan Gingold  <gingold@adacore.com>
504         *  s-maccod.ads: Add pragma No_Elaboration_Code_All
506 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
508         * ghost.adb (Mark_Ghost_Clause): New routine.
509         (Prune_Node): Do not prune compilation unit nodes.
510         (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
511         This does not touch the node itself, but does prune all its fields.
512         * ghost.ads (Mark_Ghost_Clause): New routine.
513         * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
514         package clause mentions Ghost and non-Ghost packages. Mark a
515         use package clause as Ghost when it mentions a Ghost package.
516         (Analyze_Use_Type): Emit an error when a use type clause mentions
517         Ghost and non-Ghost types. Mark a use type clause as Ghost when
518         it mentions a Ghost type.
519         * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
520         Ghost when it withs a Ghost unit.
522 2017-01-20  Javier Miranda  <miranda@adacore.com>
524         * sem_res.adb (Resolve_Call): If a function call
525         returns a limited view of a type and at the point of the call the
526         function is not declared in the extended main unit then replace
527         it with the non-limited view, which must be available. If the
528         called function is in the extended main unit then no action is
529         needed since the back-end handles this case.
531 2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>
533         * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
534         (Contains_Subprograms_Refs): ...this.  Adjust comment
535         for constants.  (Is_Subp_Or_Const_Ref): Rename into...
536         (Is_Subprogram_Ref): ...this.
537         (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
538         Has_Non_Subprograms_Referencer and adjust comment.  Remove
539         incorrect shortcut for package declarations and bodies.
541 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
543         * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
544         base type differs from that of the completion and the private
545         subtype is an itype (created for a constraint on an access
546         type e.g.), set Delayed_Freeze on both to prevent out-of-scope
547         anomalies in gigi.
549 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
551         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
552         When inheriting the SPARK_Mode of a prior expression function,
553         look at the properly resolved entity rather than the initial
554         candidate which may denote a homonym.
556 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
558         * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
559         Precondition or Postcondition, and the context is pragma
560         Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
561         and suggest the standard names Assertion_Policy /Pre /Post
562         instead.
564 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
566         * sem_ch10.adb, sem_cat.adb: Minor reformatting.
568 2017-01-20  Javier Miranda  <miranda@adacore.com>
570         * sem_ch3.adb (Access_Type_Declaration): Protect access to the
571         Entity attribute.
572         * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
573         * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
574         malformed trees.
576 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
578         * sem_ch13.adb (Analyze_Aspect_Specification, case
579         Dynamic_Predicate): If the entity E is a subtype that inherits
580         a static predicate for its parent P,, the inherited and the
581         new predicate combine in the generated predicate function,
582         and E only has a dynamic predicate.
584 2017-01-20  Tristan Gingold  <gingold@adacore.com>
586         * s-boustr.ads, s-boustr.adb: New package.
587         * Makefile.rtl: Add s-boustr.
589 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
591         * inline.adb (Process_Formals): Qualify the
592         expression of a return statement when it yields a universal type.
594 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
596         * freeze.adb (Freeze_All): Freeze the default
597         expressions of all eligible formal parameters that appear in
598         entries, entry families, and protected subprograms.
600 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
602         * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
603         for illegal inherited Implicit_Dereference aspects with renamed
604         discriminants.
606 2017-01-20  Javier Miranda  <miranda@adacore.com>
608         * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
609         * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
610         * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
611         (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
612         Set_Prev, Tree_Read): Adding assertion.
613         * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
614         * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
615         (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
616         Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
617         Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
618         Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
619         Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
620         Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
621         Set_ListN_With_Parent): Adding assertion.
623 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
625         * sem_prag.adb (Process_Convention): Diagnose properly a pragma
626         import that applies to several homograph subprograms. when one
627         of them is declared by a subprogram body.
629 2017-01-20  Justin Squirek  <squirek@adacore.com>
631         * exp_ch6.adb (Expand_Call): Remove optimization
632         that nulls out calls to null procedures.
634 2017-01-20  Yannick Moy  <moy@adacore.com>
636         * inline.adb (Expand_Inlined_Call): Keep more
637         precise type of actual for inlining whenever possible. In
638         particular, do not switch to the formal type in GNATprove mode in
639         some case where the GNAT backend might require it for visibility.
641 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
643         * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
644         aspect Implicit_Dereference can be inherited by a full view if
645         the partial view has no discriminants, because there is no way
646         to apply the aspect to the partial view.
647         (Build_Derived_Record_Type): If derived type renames discriminants
648         of the parent, the new discriminant inherits the aspect from
649         the old one.
650         * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
651         call through an access discriminant designating a subprogram.
652         * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
653         properly a parameterless call through an access discriminant on
654         the left-hand side of an assignment.
655         * sem_res.adb (resolve): If an interpreation involves a
656         discriminant with an implicit dereference and the expression is an
657         entity, resolution takes place later in the appropriate routine.
658         * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
659         access discriminants that designate a subprogram type.
661 2017-01-20  Pascal Obry  <obry@adacore.com>
663         * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
665 2017-01-20  Yannick Moy  <moy@adacore.com>
667         * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
668         on implicitly with'ed units in GNATprove mode.
669         * sinfo.ads (Implicit_With): Document use of flag for implicitly
670         with'ed units in GNATprove mode.
672 2017-01-20  Ed Schonberg  <schonberg@adacore.com>
674         * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
675         unit Do not report an error on a non-static entity that appears
676         in the context of a spec expression, such as an aspect expression.
678 2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
680         * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
681         (Is_Underlying_Full_View): New routine.
682         (Set_Is_Underlying_Full_View): New routine.
683         (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
684         * einfo.ads Add new attribute Is_Underlying_Full_View.
685         (Is_Underlying_Full_View): New routine along with pragma Inline.
686         (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
687         * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
688         class-wide types and underlying full views. The first subtype
689         is used as the working type for all Itypes, not just array base types.
690         (Build_DIC_Procedure_Declaration): Do not consider
691         class-wide types and underlying full views. The first subtype
692         is used as the working type for all Itypes, not just array
693         base types.
694         * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
695         view or an underlying full view without clobbering the attributes
696         of a previous freeze node.
697         (Inherit_Freeze_Node): New routine.
698         * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
699         full view as such.
700         (Build_Underlying_Full_View): Mark an underlying full view as such.
701         * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
702         full view as such.
704 2017-01-20  Yannick Moy  <moy@adacore.com>
706         * sinfo.ads: Document lack of Do_Division_Check flag
707         on float exponentiation.
709 2017-01-19  Javier Miranda  <miranda@adacore.com>
711         * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
712         identifier attribute of a block-statement node. Required to avoid
713         assertion failure when building the new containers library.
715 2017-01-19  Bob Duff  <duff@adacore.com>
717         * exp_ch3.adb: Update comment.
719 2017-01-19  Vincent Celier  <celier@adacore.com>
721         * gprep.adb (Gnatprep): Parse the definition file without
722         "replace in comments" even when switch -C is used.
724 2017-01-19  Justin Squirek  <squirek@adacore.com>
726         * exp_ch9.adb (Is_Pure_Barrier): Create function
727         Is_Count_Attribute to identify an expansion of the 'Count
728         attribute.
730 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
732         * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
733         statements within an element iterator loop are only analyzed
734         agter the loop is rewritten. Within a generic the analysis must
735         be performed in any case to complete name capture.
737 2017-01-19  Bob Duff  <duff@adacore.com>
739         * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
740         before checking for unrecognized pragmas.
741         Initialize Pname on its declarations; that's always good style.
743 2017-01-19  Claire Dross  <dross@adacore.com>
745         * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
746         body into the tree for GNATprove by setting its Parent field. The
747         components invariants of composite types are not checked by
748         the composite type's invariant procedure in GNATprove mode.
749         (Build_Invariant_Procedure_Declaration): Semi-insert the
750         declaration into the tree for GNATprove by setting its Parent
751         field.
752         * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
753         the component invariants to the array type  invariant procedure
754         so that the procedure can be used to  check the array type
755         invariants if any.
756         (Freeze_Record_Type): In GNATprove mode, do
757         not add the component invariants to the record type  invariant
758         procedure so that the procedure can be used to  check the record
759         type invariants if any.
761 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
763         * lib-xref-spark_specific.adb: Minor reformatting.
764         * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
766 2017-01-19  Javier Miranda  <miranda@adacore.com>
768         * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
769         Build_Back_End_Aggregate.
770         (Generate_Aggregate_For_Derived_Type): Code cleanup.
771         (Prepend_Stored_Values): Code cleanup.
773 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
775         * sem_ch6.adb (Analyze_Expression_Function): Check for an
776         incomplete return type after attempting to freeze it, so that
777         other freeze actiona are generated in the proper order.
779 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
781         * sem_aggr.adb (Resolve_Aggregate): If the type is a string
782         type, ie. a type whose component is a character type, and the
783         aggregate is positional, do not convert into a string literal
784         if the index type is not an integer type, because the original
785         type may be required in an enclosing operation.
787 2017-01-19  Bob Duff  <duff@adacore.com>
789         * binde.adb, debug.adb: Enable new elaboration order algorithm
790         by default. -dp switch reverts to the old algorithm.
792 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
794         * sem_ch3.adb Add with and use clauses for Exp_Ch7.
795         (Analyze_Declarations): Create the DIC and Invariant
796         procedure bodies s after all freezing has taken place.
797         (Build_Assertion_Bodies): New routine.
798         * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
799         and Exp_Util.
800         (Analyze_Package_Specification): Remove the
801         generation of the DIC and Invariant procedure bodies. This is
802         now done by Analyze_Declarations.
803         * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
804         procedures are never treated as primitives.
806 2017-01-19  Yannick Moy  <moy@adacore.com>
808         * frontend.adb: Analyze inlined bodies and check elaboration
809         rules in GNATprove mode too.
810         * sem_elab.adb (Delay_Element): Add Boolean component to save
811         indication that call is in SPARK code.  (Check_Elab_Calls):
812         Check elaboration rules in GNATprove mode, and correctly set
813         the current value of SPARK_Mode.
814         * lib-xref-spark_specific.adb
815         (Add_SPARK_Xrefs): Simplify iteration over dereferences.
817 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
819         * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
820         checks on the expression for the high bound of concatenation
821         when checks are disabled, to suppress warnings about potential
822         constraint errors in restricted runtimes.
824 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
826         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
827         representation-to-position function as inlined.
828         * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
829         the purity of an internally generated entity if it has been
830         explicitly marked as pure for optimization purposes.
831         * exp_aggr.adb: Minor reformatting.
833 2017-01-19  Javier Miranda  <miranda@adacore.com>
835         * exp_ch6.adb (Expand_Call): Remove side effects on
836         actuals that are allocators with qualified expression since the
837         initialization of the object is performed by means of individual
838         statements (and hence it must be done before the call).
840 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
842         * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
843         (Build_Derived_Enumeration_Type): If the derived type inherits a
844         dynamic predicate from its parent, the bounds of the type must
845         freeze because an explicit constraint is constructed for the
846         type and the corresponding range is elaborated now.
848 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
850         * sem_attr.ads: minor fix of inconsistent casing in comment
851         * lib-writ.ads: minor align comments in columns
852         * sem_ch3.adb: Minor reformatting.
853         * spark_xrefs.ads: minor fix typo in SPARK-related comment
854         * table.ads: minor style fix in comment
855         * lib-xref-spark_specific.adb
856         (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
857         * sem_ch12.adb: minor whitespace fix
858         * freeze.adb: Add comment.
859         * sem_util.adb (Unique_Name): for instances of
860         generic subprograms ignore the name of the wrapper package.
862 2017-01-19  Javier Miranda  <miranda@adacore.com>
864         * exp_aggr.adb (Resolve_Record_Aggregate):
865         Factorize code needed for aggregates of limited and unlimited
866         types in a new routine.
867         (Pass_Aggregate_To_Back_End): New subprogram.
869 2017-01-19  Yannick Moy  <moy@adacore.com>
871         * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
873 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
875         * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
876         public, for use elsewhere.
877         * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
878         an Inlined_body, recognize a call that uses object notation
879         and has not been rewritten as a regular call because regular
880         expansion has not taken place.
882 2017-01-19  Bob Duff  <duff@adacore.com>
884         * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
885         in case of generic formal discrete types, because it causes crashes in
886         the compiler when built with assertions on.
888 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
890         * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
891         sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
893 2017-01-19  Bob Duff  <duff@adacore.com>
895         * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
896         Increment Warnings_Detected.  It was decrementing, which is
897         wrong since we just issued a warning message.
898         * binderr.ads (Errors_Detected, Warnings_Detected): Declare
899         these variables to be of subtype Nat instead of Int, because
900         they should never be negative.
902 2017-01-19  Javier Miranda  <miranda@adacore.com>
904         * contracts.adb (Build_Postconditions_Procedure): Replace
905         Generate_C_Code by Modify_Tree_For_C.
906         * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
907         Replace Generate_C_Code by Modify_Tree_For_C.
908         * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
909         Modify_Tree_For_C.
910         * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
911         Generate_C_Code by Modify_Tree_For_C.
912         * exp_ch4.adb (Expand_Allocator_Expression): Replace
913         Generate_C_Code by Modify_Tree_For_C.
914         * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
915         by Modify_Tree_For_C.
916         * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
917         Generate_C_Code by Modify_Tree_For_C.
918         * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
919         by Modify_Tree_For_C.
920         * sinfo.ads (Modify_Tree_For_C): Adding documentation.
922 2017-01-19  Javier Miranda  <miranda@adacore.com>
924         * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
925         subprogram.
926         (Is_Inlinable_Expression_Function): New subprogram.
927         * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
928         to Sem_Util.
929         (Is_Inlinable_Expression_Function): Moved to Sem_Util.
931 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
933         * sem_ch4.adb (Diagnose_Call): Improve error message when a
934         selected component has a prefix that might be interpreted
935         as a parameterless function call, but none of the candidate
936         interpretations is parameterless, and there is a hidden homonym
937         of the prefix that is a package.
938         * sem_ch8.adb (Find_Selected_Component): If the prefix might be
939         interpreted as a parameterless function call and its analysis
940         fails, do not call Analyze_Selected_Component.
942 2017-01-19  Steve Baird  <baird@adacore.com>
944         * sem_util.ads: Add new Use_Full_View Boolean parameter to
945         Get_Index_Bounds.
946         * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
947         calls to a newly-defined Scalar_Range_Of_Right_View function.
949 2017-01-19  Arnaud Charlet  <charlet@adacore.com>
951         * gnat1drv.adb: minor fix of unbalanced parens in comment
952         * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
953         to visible part of the package to allow re-use in GNATprove.
954         * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
955         from repeated code of Traverse_Compilation_Unit.
956         (Traverse_Declaration_Or_Statement): fixed detection of
957         generic subprograms and packages; also, iteration over case
958         statement alternatives rewritten to avoid testing if the first
959         alternative is present (since it must be present due to Ada
960         syntax restrictions).
962 2017-01-19  Hristian Kirtchev  <kirtchev@adacore.com>
964         * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
965         returning by reference not just for subprogram body stubs,
966         but for all subprogram cases.
967         * sem_util.adb: Code reformatting.
968         (Requires_Transient_Scope): Update the call to Results_Differ.
969         (Results_Differ): Update the parameter profile and the associated
970         comment on usage.
972 2017-01-19  Ed Schonberg  <schonberg@adacore.com>
974         * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
975         identifier nodes that do not come from source, to handle properly
976         dimensionality check within an inlined body which inclddes both
977         original operands and rewritten operands. This removes spurious
978         dimensionality errors in the presence of front-end inlining,
979         as well as in SPARK mode.
981 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
983         PR driver/49726
984         * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
986 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
988         * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
990 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
992         * doc/gnat_ugn/getting_started_with_gnat.rst,
993         doc/gnat_ugn/inline_assembler.rst,
994         doc/gnat_ugn/building_executable_programs_with_gnat.rst,
995         doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
996         doc/gnat_ugn/about_this_guide.rst,
997         doc/gnat_ugn/platform_specific_information.rst,
998         doc/gnat_ugn/example_of_binder_output.rst,
999         doc/gnat_ugn/gnat_and_program_execution.rst,
1000         doc/gnat_ugn/gnat_utility_programs.rst,
1001         doc/gnat_ugn/the_gnat_compilation_model.rst,
1002         doc/gnat_rm/implementation_defined_attributes.rst,
1003         doc/gnat_rm/compatibility_and_porting_guide.rst,
1004         doc/gnat_rm/standard_library_routines.rst,
1005         doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1006         doc/gnat_rm/implementation_defined_pragmas.rst,
1007         doc/gnat_rm/the_gnat_library.rst,
1008         doc/gnat_rm/obsolescent_features.rst,
1009         doc/gnat_rm/about_this_guide.rst,
1010         doc/gnat_rm/the_implementation_of_standard_i_o.rst,
1011         doc/gnat_rm/implementation_of_ada_2012_features.rst,
1012         doc/gnat_rm/interfacing_to_other_languages.rst,
1013         doc/gnat_rm/implementation_defined_aspects.rst,
1014         doc/gnat_rm.rst: Update documentation.
1015         * gnat_rm.texi, gnat_ugn.texi: Regenerated.
1017 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1019         * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
1020         * scil_ll.adb: Minor style fix in comment.
1021         * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
1022         even if entity is already set, because the node may be renalyzed
1023         after inlining transformations.
1025 2017-01-13  Javier Miranda  <miranda@adacore.com>
1027         * sem_res.adb (Resolve_Call): Do not establish a transient scope
1028         for a call to inlinable expression function (since the call will
1029         be replaced by its returned object).
1030         * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
1031         * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
1032         (Expand_Call): For inlinable expression function call replace the
1033         call by its returned object.
1034         (Is_Inlinable_Expression_Function): New subprogram.
1036 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1038         * checks.adb: Minor typo fix and reformatting.
1040 2017-01-13  Javier Miranda  <miranda@adacore.com>
1042         * contracts.adb (Contract_Only_Subprograms): Remove formal.
1043         (Copy_Original_Specification): Removed.
1044         (Skip_Contract_Only_Subprogram): Move here checks previously
1045         located in the caller of this routine (to leave the code more clean).
1046         (Build_Contract_Only_Subprogram): Code cleanup.
1047         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
1048         (Get_Contract_Only_Missing_Body_Name): Removed.
1050 2017-01-13  Javier Miranda  <miranda@adacore.com>
1052         * sem_ch6.adb (Cloned_Expression): New subprogram.
1053         (Freeze_Expr_Types): Complete previous patch since the expression
1054         of an expression-function may have iterators and loops with
1055         defining identifiers which, as part of the preanalysis of the
1056         expression, may be left decorated with itypes that will not be
1057         available in the tree passed to the backend.
1059 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1061         * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
1062         conversion to Integer of an expression that is an attribute
1063         reference 'Pos on an enumeration type.
1065 2017-01-13  Bob Duff  <duff@adacore.com>
1067         * atree.ads: Minor comment fix.
1069 2017-01-13  Justin Squirek  <squirek@adacore.com>
1071         * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
1072         calls in accessibility check on return statement.
1074 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1076         * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1077         Ensure that the input body is a subprogram body before trying to
1078         determine whether it denoted an expression function.  Note that
1079         subprogram body stubs cannot denote expression functions.
1081 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1083         * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
1084         and typo fixes.
1086 2017-01-13  Javier Miranda  <miranda@adacore.com>
1088         * einfo.ads (Component_Bit_Offset): Fix documentation.
1089         * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
1090         on record holes for components with unknown compile-time offsets.
1092 2017-01-13  Bob Duff  <duff@adacore.com>
1094         * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
1095         * g-locfil.ads: Minor comment fix.
1097 2017-01-13  Bob Duff  <duff@adacore.com>
1099         * binde.adb (Elab_New): New elaboration order algorithm
1100         that is expected to cause fewer ABE issues. This is a work in
1101         progress. The new algorithm is currently disabled, and can be
1102         enable by the -dp switch, or by modifying the Do_Old and Do_New
1103         etc. flags and rebuilding. Experimental code is included to
1104         compare the results of the old and new algorithms.
1105         * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
1106         can have multiple of these tables, so the old and new algorithms
1107         can coexist.
1108         * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
1109         parameter of type array. This avoids the global variable, and
1110         allows bounds checking (which is normally defeated by the tables
1111         packages). It also ensures that the Elab_Order is read-only
1112         to Bindgen.
1113         * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
1114         subprograms that need it, as above.
1115         * debug.adb: Document new -dp switch. Modify doc of old -do
1116         switch.
1117         * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
1118         and Bindgen.  Move writing of closure (-R and -Ra switches)
1119         to Binde; that's more convenient.
1121 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1123         * sem_ch6.adb (Analyze_Expression_Function): If the expression
1124         function is a completion, all entities referenced in the
1125         expression are frozen. As a consequence, a reference to an
1126         uncompleted private type from an enclosing scope is illegal.
1128 2017-01-13  Javier Miranda  <miranda@adacore.com>
1130         * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
1131         (Analyze_Subprogram_Body_Helper): At the occurrence of an
1132         expression function declaration that is a completion, its
1133         expression causes freezing (AI12-0103).
1135 2017-01-13  Vadim Godunko  <godunko@adacore.com>
1137         * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
1138         Reference functions of Ada.Containers.Indefinite_Holders.
1140 2017-01-13  Bob Duff  <duff@adacore.com>
1142         * s-os_lib.ads: Minor comment fixes.
1144 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1146         * exp_ch3.adb (Default_Initialize_Object): Do not default
1147         initialize an object when it is of a task type and restriction
1148         No_Tasking is in effect because the initialization is obsolete.
1149         * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
1150         restriction No_Tasking is in effect.
1151         (Build_Master_Renaming): Do not rename a master when restriction
1152         No_Tasking is in effect.
1154 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1156         * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
1157         the legality of An others clause applies as well to a choice in
1158         an Iterated_component_ association.
1159         (Resolve_Iterated_Component_Association): An others choice
1160         is legal.
1161         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
1162         Iterated_Component_Association is not static.
1164 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1166         * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
1167         control is passed to the expresion handler before the new mode
1168         is set.
1169         * sem_ch12.adb (Analyze_Package_Instantiation,
1170         Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
1171         in case control is passed to the expresion handler before the
1172         new mode is set.
1174 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1176         * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
1177         exp_aggr.adb: Minor reformatting.
1179 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1181         * inline.adb: Minor reformatting and typo fix.
1183 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1185         * sem_util.ads, sem_util.adb (Choice_List): Move function here
1186         from sem_aggr.adb, for use elsewhere.
1187         * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
1188         * sem_aggr.adb (Resolve_Array_Aggregate): Remove
1189         Iterated_Component_Present.
1190         * exp_aggr.adb: Use Choice_List throughout, to handle
1191         Iterated_Component_Associations.
1192         (Gen_Loop): Generate proper loop for an
1193         Iterated_Component_Association: loop variable has the identifier
1194         of the original association. Generate a loop even for a single
1195         component choice, in order to make loop parameter visible in
1196         expression.
1197         (Flatten): An Iterated_Component_Association is not static.
1199 2017-01-13  Yannick Moy  <moy@adacore.com>
1201         * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
1202         float exponentiation for statically known small negative values
1203         is the reciprocal of the exponentiation for the opposite value
1204         of the exponent.
1205         * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
1206         Ensure that the value of float exponentiation for negative values
1207         is the reciprocal of the exponentiation for the opposite value
1208         of the exponent.
1209         * inline.adb (Expand_Inlined_Call): Fix the count
1210         for the number of generated gotos.
1212 2017-01-13  Yannick Moy  <moy@adacore.com>
1214         * inline.adb: Code cleanup.
1215         * sem_util.adb (Is_OK_Volatile_Context): Add
1216         expression in delay statement as OK for volatile context.
1218 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1220         * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
1221         mode a choice that is a subtype with a static predicate is
1222         replaced by the values it covers. This transformation must not
1223         be performed in ASIS mode, to preserve the source for analysis.
1225 2017-01-13  Justin Squirek  <squirek@adacore.com>
1227         * nlists.ads: Correct minor typo.
1229 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1231         * sem_ch13.adb: Minor reformatting and typo fix.
1233 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1235         * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
1236         Iterated_Component_Association is a named association in an
1237         array aggregate.
1238         * sem_aggr.adb (Resolve_Iterated_Component_Association): New
1239         procedure, subsidiary of Resolve_Array_Aggregate, to analyze
1240         and resolve the discrete choices and the expression of the
1241         new construct.
1242         * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
1243         Loop_Actions and Box_Present are attributes of
1244         N_Iterated_Component_Association nodes. Box_Present is always
1245         False in this case.
1246         * sprint.adb (Sprint_Node): An Iterated_Component_Association
1247         has a Discrete_Choices list, as specified in the RM. A
1248         Component_Association for aggregate uses instead a Choices list.
1249         We have to live with this small inconsistency because the new
1250         construct also has a defining identifier, and there is no way
1251         to merge the two node structures.
1253 2017-01-13  Yannick Moy  <moy@adacore.com>
1255         * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
1256         list of pragmas to remove.  Remove pragmas from the list of
1257         statements in the body to inline.
1258         * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
1260 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1262         * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
1263         Analyze_Declarations, to analyze and resolve the expressions of
1264         aspect specifications in the current declarative list, so that
1265         the expressions have proper entity and type info.  This is needed
1266         for ASIS when there is no subsequent expansion to generate this
1267         semantic information.
1268         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
1269         original expression, to suppress cascaded errors when expression
1270         has been constant-folded.
1271         (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
1272         ASIS mode, because there is no subsequent expansion to decorate
1273         the tree.
1275 2017-01-13  Yannick Moy  <moy@adacore.com>
1277         * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
1278         New function to detect when a call may be inlined or not in
1279         GNATprove mode.
1280         (Expand_Inlined_Call): Ensure that a temporary
1281         is always created in the cases where a type conversion may be
1282         needed on an input parameter in GNATprove mode, so that GNATprove
1283         sees the check to perform.
1284         * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
1285         when not applicable due to actual requiring type conversion
1286         with possible check but no temporary value can be copied for
1287         GNATprove to see the check.
1289 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1291         * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
1292         exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
1293         layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
1294         exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
1295         exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
1296         g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
1297         sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
1298         prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
1299         a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
1300         get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
1301         g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
1302         sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
1303         s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
1304         contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
1305         g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
1306         g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
1307         a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
1308         ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
1309         get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
1310         prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
1311         exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
1312         s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
1313         a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
1314         a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
1315         g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
1316         par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
1317         uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
1318         a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
1319         statements to reflect the new style for case alternatives. Various
1320         code clean up and reformatting.
1322 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1324         * exp_util.adb: Minor reformatting.
1326 2017-01-13  Yannick Moy  <moy@adacore.com>
1328         * exp_spark.adb: Code cleanup.
1329         * sem_ch9.adb (Analyze_Delay_Until): Resolve
1330         expression so that calls are identified as such inside delay
1331         until.
1333 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1335         * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
1336         * par-ch3.adb (P_Discrete_Choice_List): An
1337         Iterated_Component_Association is an array aggregate component.
1338         * par-ch4.adb (P_Iterated_Component_Association): New procedure.
1339         (Is_Quantified_Expression): New function that performs a lookahead
1340         to distinguish quantified expressions from iterated component
1341         associations.
1342         (P_Aggregate_Or_Paren_Expr): Recognize iterated component
1343         associations.
1344         (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
1345         * sem.adb (Analyze): Handle Iterated_Component_Association.
1346         * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
1347         component associations.
1348         * sinfo.ads, sinfo.adb: Entries for for
1349         N_Iterated_Component_Association and its fields.
1350         * sprint.adb (Sprint_Node_Actual): Handle
1351         N_Iterated_Component_Association.
1353 2017-01-13  Justin Squirek  <squirek@adacore.com>
1355         * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
1356         of the style check until after preanalysis of acutals.
1358 2017-01-13  Yannick Moy  <moy@adacore.com>
1360         * sem_ch13.adb: Minor reformatting.
1361         * par-ch11.adb: minor style fix in whitespace
1362         * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
1363         reduced to Add_Artificial_ALI_File; style fix in declaration of
1364         Text; grammar fix in comment.
1365         * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
1366         * freeze.adb: Cleanup to pass pragma instead of
1367         expression to call.
1368         * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
1369         replace System'To_Address by equivalent call.
1371 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
1373         * bindusg.adb: Improve usage output for -f switch.
1375 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1377         * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
1378         Minor reformatting.
1380 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1382         * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
1383         treat comparisons on strings as legal in a Static_Predicate.
1384         (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
1385         a function call that is the expansion of a string comparison.The
1386         function call is built when compiling the corresponding predicate
1387         function, but the expression has been found legal as a static
1388         predicate during earlier analysis.
1389         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
1390         properly a function call that is the expansion of a string
1391         comparison operation, in order to recover the Static_Predicate
1392         expression and apply it to a static argument when needed.
1394 2017-01-13  Tristan Gingold  <gingold@adacore.com>
1396         * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
1397         (Open_Read): Re-implement using Open_Read_No_Exception.
1398         (Open_Write): Raise exception in case of error.
1399         * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
1400         * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
1401         reaise exception.
1402         * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
1404 2017-01-13  Yannick Moy  <moy@adacore.com>
1406         * checks.adb: Code cleanup.
1408 2017-01-13  Yannick Moy  <moy@adacore.com>
1410         * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
1411         expression instead of unanalyzed aspect expression for checking
1412         the validity of inheriting an operation. Also copy the expression
1413         being passing it to Build_Class_Wide_Expression, as this call
1414         modifies its argument.
1415         * sem_util.ads Fix comment to reference correct function name
1416         New_Copy_Tree.
1418 2017-01-13  Javier Miranda  <miranda@adacore.com>
1420         * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
1421         when we propagate information about the indexes back to the original
1422         indexing mode and the prefix of the index is a function call, do not
1423         remove any parameter from such call.
1425 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1427         * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
1428         * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
1429         a build-in-place function whose result type is tagged.
1431 2017-01-13  Yannick Moy  <moy@adacore.com>
1433         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1434         Do not generate a wrapper when the only candidate is a class-wide
1435         subprogram.
1436         (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
1437         inside a generic context.
1439 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1441         * exp_util.adb (Add_Inherited_Tagged_DIC):
1442         Pass the object parameters of both the parent and the derived
1443         type DIC procedure to the reference replacement circuitry.
1444         (Find_DIC_Type): Modify the circuitry to present the partial
1445         view of a private type in case the private type defines its own
1446         DIC pragma.
1447         (Replace_Object_And_Primitive_References): Add two
1448         optional formal parameters.  Update the comment on usage. Update
1449         the replacement of references to object parameters.
1451 2017-01-13  Gary Dismukes  <dismukes@adacore.com>
1453         * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
1455 2017-01-13  Ed Schonberg  <schonberg@adacore.com>
1457         * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
1458         an out parameter that is a type conversion, independently of th
1459         range check that may apply to the expression of the conversion,
1460         for use in GNATProve.
1462 2017-01-13  Yannick Moy  <moy@adacore.com>
1464         * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
1465         GNATprove_Mode here to Frontend.
1466         * frontend.adb (Frontend): Move the implicit with for System
1467         in GNATprove_Mode here as it ismore correct this way; the old
1468         place only worked by chance, since there were no overloaded names.
1469         * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
1470         * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
1471         four attributes identified in SRM 9(18), add an implicit with
1472         to Ada.Task_Identification.
1473         * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1474         Deal specially with the wrapper introduced for AI05-0071 in GNATprove
1475         mode.
1476         * checks.adb (Apply_Discriminant_Check,
1477         Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
1478         In GNATprove mode, we do not apply the checks, but we still
1479         analyze the expression to possibly issue errors on SPARK
1480         code when a run-time error can be detected at compile time.
1481         (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
1482         in GNATprove mode.
1484 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1486         * expander.adb (Expand): Add a warning about using return
1487         statements in Ghost management code.
1488         * exp_ch3.adb (Freeze_Type): Add a warning about using return
1489         statements in Ghost management code.
1490         * exp_ch7.adb (Build_Invariant_Procedure_Body,
1491         Build_Invariant_Procedure_Declaration): Add a warning about
1492         using return statements in Ghost management code.
1493         * exp_disp.adb (Make_DT): Add a warning about using return
1494         statements in Ghost management code.
1495         * exp_util.adb (Build_DIC_Procedure_Body,
1496         Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
1497         warning about using return statements in Ghost management code.
1498         * freeze.adb (Freeze_Entity): Add a warning about using return
1499         statements in Ghost management code.
1500         * sem.adb (Analyze, Do_Analyze): Add a warning about using return
1501         statements in Ghost management code.
1502         * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
1503         a warning about using return statements in Ghost management code.
1504         * sem_ch5.adb (Analyze_Assignment): Add a warning about using
1505         return statements in Ghost management code.
1506         * sem_ch6.adb (Analyze_Procedure_Call,
1507         Analyze_Subprogram_Body_Helper): Add a warning about using return
1508         statements in Ghost management code.
1509         * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
1510         using return statements in Ghost management code.
1511         * sem_ch12.adb (Analyze_Package_Instantiation,
1512         Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
1513         Instantiate_Subprogram_Body): Add a warning about using return
1514         statements in Ghost management code.
1515         * sem_ch13.adb (Build_Predicate_Functions,
1516         Build_Predicate_Function_Declarations): Add a warning about
1517         using return statements in Ghost management code.
1518         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
1519         Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
1520         Analyze_Pre_Post_Condition_In_Decl_Part):  Add a warning about
1521         using return statements in Ghost management code.
1523 2017-01-13  Tristan Gingold  <gingold@adacore.com>
1525         * s-mmosin-mingw.adb: Fix pragma import.
1527 2017-01-13  Arnaud Charlet  <charlet@adacore.com>
1529         * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
1530         codepeer mode.
1532 2017-01-13  Hristian Kirtchev  <kirtchev@adacore.com>
1534         * atree.adb (Allocate_Initialize_Node): A newly created node is
1535         no longer marked as Ghost at this level.
1536         (Mark_New_Ghost_Node): New routine.
1537         (New_Copy): Mark the copy as Ghost.
1538         (New_Entity): Mark the entity as Ghost.
1539         (New_Node): Mark the node as Ghost.
1540         * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
1541         apply to unanalyzed entities.
1542         (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
1543         entities.
1544         (Set_Is_Checked_Ghost_Entity): This attribute now
1545         applies to all entities as well as unanalyzed entities.
1546         (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
1547         all entities as well as unanalyzed entities.
1548         * expander.adb Add with and use clauses for Ghost.
1549         (Expand): Install and revert the Ghost region associated with the node
1550         being expanded.
1551         * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
1552         (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
1553         (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
1554         (Expand_Freeze_Record_Type): Remove all Ghost-related code.
1555         (Freeze_Type): Install and revert the Ghost region associated
1556         with the type being frozen.
1557         * exp_ch5.adb Remove with and use clauses for Ghost.
1558         (Expand_N_Assignment_Statement): Remove all Ghost-related code.
1559         * exp_ch6.adb Remove with and use clauses for Ghost.
1560         (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
1561         (Expand_N_Subprogram_Body): Remove all Ghost-related code.
1562         * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
1563         Ghost region of the working type.
1564         (Build_Invariant_Procedure_Declaration): Install and revert
1565         the Ghost region of the working type.
1566         (Expand_N_Package_Body): Remove all Ghost-related code.
1567         * exp_ch8.adb Remove with and use clauses for Ghost.
1568         (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
1569         code.
1570         (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
1571         (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
1572         (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
1573         code.
1574         * exp_ch13.adb Remove with and use clauses for Ghost.
1575         (Expand_N_Freeze_Entity): Remove all Ghost-related code.
1576         * exp_disp.adb (Make_DT): Install and revert the Ghost region of
1577         the tagged type. Move the generation of various entities within
1578         the Ghost region of the type.
1579         * exp_prag.adb Remove with and use clauses for Ghost.
1580         (Expand_Pragma_Check): Remove all Ghost-related code.
1581         (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
1582         (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
1583         (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
1584         * exp_util.adb (Build_DIC_Procedure_Body): Install
1585         and revert the Ghost region of the working types.
1586         (Build_DIC_Procedure_Declaration): Install and revert the
1587         Ghost region of the working type.
1588         (Make_Invariant_Call): Install and revert the Ghost region of the
1589         associated type.
1590         (Make_Predicate_Call): Reimplemented. Install and revert the
1591         Ghost region of the associated type.
1592         * freeze.adb (Freeze_Entity): Install and revert the Ghost region
1593         of the entity being frozen.
1594         (New_Freeze_Node): Removed.
1595         * ghost.adb Remove with and use clauses for Opt.
1596         (Check_Ghost_Completion): Update the parameter profile
1597         and all references to formal parameters.
1598         (Ghost_Entity): Update the comment on usage.
1599         (Install_Ghost_Mode): New routines.
1600         (Is_Ghost_Assignment): New routine.
1601         (Is_Ghost_Declaration): New routine.
1602         (Is_Ghost_Pragma): New routine.
1603         (Is_Ghost_Procedure_Call): New routine.
1604         (Is_Ghost_Renaming): Removed.
1605         (Is_OK_Declaration): Reimplemented.
1606         (Is_OK_Pragma): Reimplemented.
1607         (Is_OK_Statement): Reimplemented.
1608         (Is_Subject_To_Ghost): Update the comment on usage.
1609         (Mark_And_Set_Ghost_Assignment): New routine.
1610         (Mark_And_Set_Ghost_Body): New routine.
1611         (Mark_And_Set_Ghost_Completion): New routine.
1612         (Mark_And_Set_Ghost_Declaration): New routine.
1613         (Mark_And_Set_Ghost_Instantiation): New routine.
1614         (Mark_And_Set_Ghost_Procedure_Call): New routine.
1615         (Mark_Full_View_As_Ghost): Removed.
1616         (Mark_Ghost_Declaration_Or_Body): New routine.
1617         (Mark_Ghost_Pragma): New routine.
1618         (Mark_Ghost_Renaming): New routine.
1619         (Mark_Pragma_As_Ghost): Removed.
1620         (Mark_Renaming_As_Ghost): Removed.
1621         (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1622         (Prune_Node): Freeze nodes no longer need special pruning, they
1623         are processed by the general ignored Ghost code mechanism.
1624         (Restore_Ghost_Mode): New routine.
1625         (Set_Ghost_Mode): Reimplemented.
1626         (Set_Ghost_Mode_From_Entity): Removed.
1627         * ghost.ads Add with and use clauses for Ghost.
1628         (Check_Ghost_Completion): Update the parameter profile
1629         along with the comment on usage.
1630         (Install_Ghost_Mode): New routine.
1631         (Is_Ghost_Assignment): New routine.
1632         (Is_Ghost_Declaration): New routine.
1633         (Is_Ghost_Pragma): New routine.
1634         (Is_Ghost_Procedure_Call): New routine.
1635         (Mark_And_Set_Ghost_Assignment): New routine.
1636         (Mark_And_Set_Ghost_Body): New routine.
1637         (Mark_And_Set_Ghost_Completion): New routine.
1638         (Mark_And_Set_Ghost_Declaration): New routine.
1639         (Mark_And_Set_Ghost_Instantiation): New routine.
1640         (Mark_And_Set_Ghost_Procedure_Call): New routine.
1641         (Mark_Full_View_As_Ghost): Removed.
1642         (Mark_Ghost_Pragma): New routine.
1643         (Mark_Ghost_Renaming): New routine.
1644         (Mark_Pragma_As_Ghost): Removed.
1645         (Mark_Renaming_As_Ghost): Removed.
1646         (Restore_Ghost_Mode): New routine.
1647         (Set_Ghost_Mode): Redefined.
1648         (Set_Ghost_Mode_From_Entity): Removed.
1649         * sem.adb (Analyze): Install and revert the Ghost region of the
1650         node being analyzed.
1651         (Do_Analyze): Change the way a clean Ghost
1652         region is installed and reverted.
1653         * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
1654         all Ghost-related code.
1655         (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
1656         (Analyze_Number_Declaration): Remove all Ghost-related code.
1657         (Analyze_Object_Declaration): Install and revert the Ghost region of
1658         a deferred object declaration's completion.
1659         (Array_Type_Declaration): Remove all Ghost-related code.
1660         (Build_Derived_Type): Update the comment on
1661         the propagation of Ghost attributes from a parent to a derived type.
1662         (Derive_Subprogram): Remove all Ghost-related code.
1663         (Make_Class_Wide_Type): Remove all Ghost-related code.
1664         (Make_Implicit_Base): Remove all Ghost-related code.
1665         (Process_Full_View): Install and revert the Ghost region of
1666         the partial view.  There is no longer need to check the Ghost
1667         completion here.
1668         * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
1669         region of the left hand side.
1670         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
1671         all Ghost-related code.
1672         (Analyze_Expression_Function): Remove all Ghost-related code.
1673         (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
1674         (Analyze_Procedure_Call): Install and revert the Ghost region of
1675         the procedure being called.
1676         (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
1677         region of the spec or body.
1678         (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
1679         (Build_Subprogram_Declaration): Remove all Ghost-related code.
1680         (Find_Corresponding_Spec): Remove all Ghost-related code.
1681         (Process_Formals): Remove all Ghost-related code.
1682         * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
1683         the Ghost region of the spec.
1684         (Analyze_Package_Declaration): Remove all Ghost-related code.
1685         * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
1686         Ghost when it aliases a Ghost entity.
1687         (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
1688         a Ghost entity.
1689         (Analyze_Object_Renaming): Mark a renaming as Ghost when
1690         it aliases a Ghost entity.
1691         (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
1692         a Ghost entity.
1693         (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
1694         aliases a Ghost entity.
1695         * sem_ch11.adb Remove with and use clauses for Ghost.
1696         (Analyze_Exception_Declaration): Remove all Ghost-related code.
1697         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
1698         Ghost-related code.
1699         (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
1700         code.
1701         (Analyze_Package_Instantiation): Install and revert the Ghost region
1702         of the package instantiation.
1703         (Analyze_Subprogram_Instantiation): Install
1704         and revert the Ghost region of the subprogram instantiation.
1705         (Instantiate_Package_Body): Code clean up. Install and revert the
1706         Ghost region of the package body.
1707         (Instantiate_Subprogram_Body): Code clean up. Install and revert the
1708         Ghost region of the subprogram body.
1709         * sem_ch13.adb (Build_Predicate_Functions): Install
1710         and revert the Ghost region of the related type.
1711         (Build_Predicate_Function_Declaration): Code clean up. Install
1712         and rever the Ghost region of the related type.
1713         * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1714         Install and revert the Ghost region of the pragma.
1715         (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
1716         Ghost region of the pragma.
1717         (Analyze_Pragma): Install and revert the Ghost region of various
1718         pragmas.  Mark a pragma as Ghost when it is related to a Ghost entity
1719         or encloses a Ghost entity.
1720         (Analyze_Pre_Post_Condition): Install and revert the Ghost
1721         region of the pragma.
1722         (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
1723         Ghost region of the pragma.
1724         * sem_res.adb (Resolve): Remove all Ghost-related code.
1725         * sem_util.adb (Is_Declaration): Reimplemented.
1726         (Is_Declaration_Other_Than_Renaming): New routine.
1727         * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
1728         * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
1729         (Is_Ghost_Pragma): Removed.
1730         (Is_Ignored_Ghost_Pragma): New routine.
1731         (Set_Is_Checked_Ghost_Pragma): New routine.
1732         (Set_Is_Ghost_Pragma): Removed.
1733         (Set_Is_Ignored_Ghost_Pragma): New routine.
1734         * sinfo.ads: Update the documentation on Ghost mode and
1735         Ghost regions.  New attributes Is_Checked_Ghost_Pragma
1736         and Is_Ignored_Ghost_Pragma along with usages in nodes.
1737         Remove attribute Is_Ghost_Pragma along with usages in nodes.
1738         (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1739         (Is_Ghost_Pragma): Removed along with pragma Inline.
1740         (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1741         (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1742         (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
1743         (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1745 2017-01-12  Tristan Gingold  <gingold@adacore.com>
1747         * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
1748         s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
1750 2017-01-12  Yannick Moy  <moy@adacore.com>
1752         * errout.adb, errout.ads (Initialize): Factor common treatment
1753         in Reset_Warnings.
1754         (Reset_Warnings): New procedure to reset counts related to warnings.
1755         (Record_Compilation_Errors): New variable to store the presence of an
1756         error, used in gnat2why to allow changing the Warning_Mode.
1757         (Compilation_Errors): Use new variable Record_Compilation_Errors to
1758         store the presence of an error.
1760 2017-01-12  Javier Miranda  <miranda@adacore.com>
1762         * sem_ch13.adb (Analyze_Aspect_Specifications):
1763         For Interrupt_Handler and Attach_ Handler aspects, decorate the
1764         internally built reference to the protected procedure as coming
1765         from sources and force its analysis.
1767 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1769         * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
1770         inherit predicates if any from the first_subtype of the parent,
1771         not from the anonymous parent type.
1772         * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
1773         predicate is not a static subtype.
1775 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1777         * freeze.adb (Check_Suspicious_Convention): New procedure
1778         performing a warning check on discriminated record types with
1779         convention C or C++. Factored out of procedure Freeze_Record_Type,
1780         and changed to only apply to base types (to avoid spurious
1781         warnings on subtypes). Minor improvement of warning messages
1782         to refer to discriminated rather than variant record types.
1783         (Freeze_Record_Type): Remove code for performing a suspicious
1784         convention check.
1785         (Freeze_Entity): Only call Freeze_Record_Type
1786         on types that aren't declared within any enclosing generic units
1787         (rather than just excluding the type when the innermost scope
1788         is generic). Call Check_Suspicious_Convention whether or not
1789         the type is declared within a generic unit.
1790         * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
1791         * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
1792         from Sem_Ch8).
1794 2017-01-12  Tristan Gingold  <gingold@adacore.com>
1796         * sysdep.c, adaint.c, rtinit.c, ming32.h:
1797         (__gnat_current_codepage): Renamed from CurrentCodePage
1798         (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
1800 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1802         * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
1803         quantified expressions, following AI12-050: the loop parameters
1804         of two quantified expressions are conformant if they have the
1805         same identifier.
1807 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1809         * gcc-interface/Makefile.in: Clean up VxWorks targets.
1811 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1813         * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
1814         Hnadle properly the attribute reference when it appears as part
1815         of an expression in another loop aspect.
1817 2017-01-12  Ed Schonberg  <schonberg@adacore.com>
1819         * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
1820         subsidiary of Build_Initialization_Call, to complete generation
1821         of predicate checks on discriminants whose (sub)types have
1822         predicates, and to add checks on variants that do not have an
1823         others clause.
1824         * sem_util.adb (Gather_Components): A missing Others alternative is
1825         not an error when the type of the discriminant is a static predicate
1826         (and coverage has been checked when analyzing the case statement). A
1827         runtime check is generated to verify that a given discriminant
1828         satisfies the predicate (RM 3.8.1. (21.1/2)).
1830 2017-01-12  Yannick Moy  <moy@adacore.com>
1832         * gnat1drv.adb (Adjust_Global_Switches): Only
1833         perform checking of exception mechanism when generating code.
1835 2017-01-12  Justin Squirek  <squirek@adacore.com>
1837         * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
1838         Remove handling of access component with invariant.
1839         (Build_Invariant_Procedure_Declaration): Remove return on class
1840         wide type.
1841         * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
1842         conditional exception for component or array so Has_Own_Invariants
1843         flag is not falsly set.
1844         * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
1845         wide type to have no invariant flags.
1847 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1849         * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
1850         sem_ch13.adb: Minor reformatting.
1852 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
1854         * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
1855         adjustment primitive when the ancestor type was not properly frozen.
1856         (Gen_Assign): Guard against a missing initialization
1857         primitive when the component type was not properly frozen.
1858         (Initialize_Array_Component): Guard against a missing adjustment
1859         primitive when the component type was not properly frozen.
1860         (Initialize_Record_Component): Guard against a missing adjustment
1861         primitive when the component type was not properly frozen.
1862         (Process_Transient_Component_Completion): The transient object may
1863         not be finalized when its associated type was not properly frozen.
1864         * exp_ch3.adb (Build_Assignment): Guard against a missing
1865         adjustment primitive when the component type was not properly frozen.
1866         (Build_Initialization_Call): Guard against a missing
1867         initialization primitive when the associated type was not properly
1868         frozen.
1869         (Expand_N_Object_Declaration): Guard against a missing
1870         adjustment primitive when the base type was not properly frozen.
1871         (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
1872         body when there is no adjustment primitive available. Create an
1873         empty Deep_Finalize body when there is no finalization primitive
1874         available.
1875         * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
1876         missing finalization primitive when the designated type was
1877         not properly frozen.
1878         (Expand_N_Allocator): Guard against a missing initialization primitive
1879         when the designated type was not properly frozen.
1880         * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
1881         only when the corresponding adjustment primitive is available.
1882         * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
1883         adjustment/finalization statements only when there is an available
1884         primitive to carry out the action.
1885         (Build_Initialize_Statements): Generate the initialization/finalization
1886         statements only when there is an available primitive to carry out the
1887         action.
1888         (Make_Adjust_Call): Do not generate a call when the underlying
1889         type is not present due to a possible missing full view.
1890         (Make_Final_Call): Do not generate a call when the underlying
1891         type is not present due to a possible missing full view.
1892         (Make_Finalize_Address_Stmts): Generate an empty body when the
1893         designated type lacks a finalization primitive.
1894         (Make_Init_Call): Do not generate a call when the underlying type is
1895         not present due to a possible missing full view.
1896         (Process_Component_For_Adjust): Add the adjustment call only when the
1897         corresponding adjustment primitive is available.
1898         (Process_Component_For_Finalize): Add the finalization call only when
1899         the corresponding finalization primitive is available.
1900         (Process_Object_Declaration): Use a null statement to emulate a
1901         missing call to the finalization primitive of the object type.
1902         * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
1903         (Make_Final_Call): Update the comment on usage.
1904         (Make_Init_Call): Update the comment on usage.
1905         * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
1907 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1909         * einfo.ads: Update documentation of Address_Taken.
1910         * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
1911         [Access_Attribute]): Only consider 'Access/'Unchecked_Access
1912         for subprograms when setting Address_Taken flag.
1914 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
1916         * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
1917         Configurable_Run_Time_Mode off when analysing with'ed predefined
1918         libraries.
1920 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1922         * sem_prag.adb: Minor reformatting.
1923         * sem_util.adb (Unique_Entity): fix result for
1924         bodies of entry families.
1926 2017-01-12  Justin Squirek  <squirek@adacore.com>
1928         * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
1929         Resolve_Suppressible in the pragma Assertion_Policy case.
1930         (Resolve_Suppressible): Created this function to factor out
1931         common code used to resolve Suppress to either Ignore or Check
1932         * snames.ads-tmpl: Add name for Suppressible.
1934 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
1936         * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
1937         reformatting.
1938         * debug.adb: Minor comment fixes.
1940 2017-01-12  Arnaud Charlet  <charlet@adacore.com>
1942         * sem_util.adb (Unique_Entity): For concurrent
1943         bodies that are defined with stubs and complete a declaration
1944         of a single concurrent object return the entity of an implicit
1945         concurrent type, not the entity of the anonymous concurrent
1946         object.
1947         * debug.adb: -gnatd.J is no longer used.
1948         * make.adb (Globalize): Removed, no longer used.
1949         * sem_ch9.adb: minor typo in comment for entry index
1951 2017-01-12  Patrick Bernardi  <bernardi@adacore.com>
1953         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1954         * exp_ch3.adb (Build_Init_Statements): As part of initialising
1955         the value record of a task, set its _Secondary_Stack_Size field
1956         if present.
1957         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1958         a _Secondary_Stack_Size field in the value record of
1959         the task if a Secondary_Stack_Size rep item is present.
1960         (Make_Task_Create_Call): Include secondary stack size
1961         parameter. If No_Secondary_Stack restriction is in place, passes
1962         stack size of 0.
1963         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1964         Secondary_Stack_Size.
1965         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1966         function to define the overhead of the secondary stack.
1967         * s-tarest.adb (Create_Restricted_Task,
1968         Create_Restricted_Task_Sequential): Functions now include
1969         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1970         * s-tarest.adb (Create_Restricted_Task,
1971         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
1972         include Secondary_Stack_Size parameter.
1973         (Task_Wrapper): Secondary stack now allocated to the size specified by
1974         the Secondary_Stack_Size parameter in the task's ATCB.
1975         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
1976         Secondary_Stack_Size component.
1977         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1978         Create_Restricted_Task_Sequential): Function now include
1979         Secondary_Stack_Size parameter.
1980         (Task_Wrapper): Secondary stack now allocated to the size
1981         specified by the Secondary_Stack_Size parameter in the task's
1982         ATCB.
1983         * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
1984         to include Secondary_Stack_Size parameter.
1985         * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
1986         Secondary_Stack_Size aspect, turning the aspect into its corresponding
1987         internal attribute.
1988         (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
1989         * snames.adb-tmpl, snames.ads-tmpl: Added names
1990         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1991         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1993 2017-01-12  Yannick Moy  <moy@adacore.com>
1995         * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
1996         subtree.
1998 2017-01-12  Justin Squirek  <squirek@adacore.com>
2000         * exp_attr.adb (Expand_N_Attribute_Reference):
2001         Fix Finalization_Size case by properly resolving the type after
2002         rewritting the node.
2004 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
2006         * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
2007         the tree.
2008         (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
2009         * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
2010         exp_sel.ads: Minor reformatting.
2012 2017-01-12  Justin Squirek  <squirek@adacore.com>
2014         * exp_ch6.adb (Expand_Call): Add guard to prevent
2015         invariant checks from being created for internally generated
2016         subprograms.
2018 2017-01-12  Bob Duff  <duff@adacore.com>
2020         * lib-writ.ads: Remove incorrect comment.
2022 2017-01-12  Javier Miranda  <miranda@adacore.com>
2024         * debug.adb (-gnatd.K): Enable generation of contract-only
2025         procedures in CodePeer mode.
2026         * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
2027         New subprogram.
2028         (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
2029         set.
2030         * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
2031         subprogram.
2032         (Get_Contract_Only_Missing_Body_Name): New subprogram.
2033         (Get_Contract_Only_Body): New subprogram.
2034         (Set_Contract_Only_Body): New subprogram.
2035         (Is_Contract_Only_Body): New subprogram.
2036         (Set_Is_Contract_Only_Body): New subprogram.
2037         (SCIL_Nodes): Replace table by hash-table.
2039 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
2041         * exp_ch6.adb: Minor reformatting.
2042         * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
2044 2017-01-12  Bob Duff  <duff@adacore.com>
2046         * binde.adb (Forced): New reason for a dependence.
2047         (Force_Elab_Order): Implementation of the new switch.
2048         * binde.ads: Minor comment fixes.
2049         * bindusg.adb: Add -f switch. Apparently, there was an -f switch
2050         long ago that is no longer supported; removed comment about that.
2051         * opt.ads (Force_Elab_Order_File): Name of file specified for
2052         -f switch.
2053         * switch-b.adb: Parse -f switch.
2055 2017-01-12  Justin Squirek  <squirek@adacore.com>
2057         * exp_ch6.adb (Check_View_Conversion): Created this function
2058         to properly chain calls to check type invariants that may be
2059         present in a subprogram call after the subprogram.
2060         (Expand_Call): Add a conditional to identify when a view conversion
2061         needs to be checked.
2062         * nlists.adb, nlists.ads (Prepend_New): New routine.
2063         (Prepend_New_To): New routine.
2065 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
2067         * sinfo.ads: Minor reformatting.
2069 2017-01-12  Gary Dismukes  <dismukes@adacore.com>
2071         * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
2072         reformatting.
2074 2017-01-12  Hristian Kirtchev  <kirtchev@adacore.com>
2076         * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
2077         variable Definite. Create a local object and pass its 'Access to the
2078         BIP function when the result type is either definite or it does not
2079         require any finalization or secondary stack management.
2081 2017-01-12  Bob Duff  <duff@adacore.com>
2083         * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
2084         exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
2085         frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
2086         par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
2087         sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
2088         sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
2089         sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2090         sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
2091         Change name to Pragma_Name_Unmapped.
2092         (Pragma_Name_Mapped): Change name to Pragma_Name.
2093         This is because the "mapped" version should be the usual case.
2095 2017-01-09  Hristian Kirtchev  <kirtchev@adacore.com>
2097         * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
2098         Is_Default_Init_Cond_Procedure, and
2099         Has_Inherited_Default_Init_Cond.  Add uses of flags
2100         Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
2101         (Default_Init_Cond_Procedure): Removed.
2102         (DIC_Procedure): New routine.
2103         (Has_Default_Init_Cond): Removed.
2104         (Has_DIC): New routine.
2105         (Has_Inheritable_Invariants): The attribute applies to the base type.
2106         (Has_Inherited_Default_Init_Cond): Removed.
2107         (Has_Inherited_DIC): New routine.
2108         (Has_Inherited_Invariants): The attribute applies to the base type.
2109         (Has_Own_DIC): New routine.
2110         (Has_Own_Invariants): The attribute applies to the base type.
2111         (Is_Default_Init_Cond_Procedure): Removed.
2112         (Is_DIC_Procedure): New routine.
2113         (Set_Default_Init_Cond_Procedure): Removed.
2114         (Set_DIC_Procedure): New routine.
2115         (Set_Has_Default_Init_Cond): Removed.
2116         (Set_Has_Inheritable_Invariants): The attribute applies
2117         to the base type.
2118         (Set_Has_Inherited_Default_Init_Cond): Removed.
2119         (Set_Has_Inherited_DIC): New routine.
2120         (Set_Has_Inherited_Invariants): The attribute applies to the base type.
2121         (Set_Has_Own_DIC): New routine.
2122         (Set_Has_Own_Invariants): The attribute applies to the base type.
2123         (Set_Is_Default_Init_Cond_Procedure): Removed.
2124         (Set_Is_DIC_Procedure): New routine.
2125         (Write_Entity_Flags): Update the output of all flags related to
2126         default initial condition.
2127         * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
2128         of the call to the DIC procedure.
2129         (Freeze_Type): Generate the body of the DIC procedure.
2130         * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
2131         all occurrences of Create_Append with Append_New_To. Do
2132         not generate an invariant procedure for a class-wide type.
2133         The generated body acts as a freeze action of the working type.
2134         (Build_Invariant_Procedure_Declaration): Do not generate an
2135         invariant procedure for a class-wide type.
2136         (Create_Append): Removed.
2137         * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
2138         sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
2139         class-wide pre/postcondition description and data structures from
2140         Sem_Prag.
2141         (Build_Class_Wide_Expression): Moved from Sem_Prag.
2142         (Build_DIC_Call): New routine.
2143         (Build_DIC_Procedure_Body): New routine.
2144         (Build_DIC_Procedure_Declaration): New routine.
2145         (Entity_Hash): Moved from Sem_Prag.
2146         (Find_DIC_Type): New routine.
2147         (Update_Primitives_Mapping): Reimplemented.
2148         (Update_Primitives_Mapping_Of_Types): New routine.
2149         * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
2150         (Build_DIC_Call): New routine.
2151         (Build_DIC_Procedure_Body): New routine.
2152         (Build_DIC_Procedure_Declaration): New routine.
2153         (Update_Primitives_Mapping): Moved from Sem_Prag.
2154         (Update_Primitives_Mapping_Of_Types): New routine.
2155         * nlists.adb (Append_New): New routine.
2156         (Append_New_To): New routine.
2157         * nlists.ads (Append_New): New routine.
2158         (Append_New_To): New routine.
2159         * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
2160         of DIC procedures here. This is now done at the end of the
2161         visible declarations, private declarations, and at the freeze
2162         point of a type.
2163         (Analyze_Private_Extension_Declaration):
2164         A private extension inherits the DIC pragma of a parent type.
2165         (Analyze_Subtype_Declaration): No need to propagate invariant
2166         attributes to a subtype as those apply to the base type.
2167         (Build_Derived_Record_Type): No need to inherit invariants here
2168         as this is now done in Build_Derived_Type.
2169         (Build_Derived_Type): Inherit both the DIC pragma and invariants from
2170         a parent type.
2171         (Process_Full_View): Update the propagation of DIC attributes.
2172         (Propagate_Default_Init_Cond_Attributes): Removed.
2173         * sem_ch7.adb Add with and use clauses for Exp_Util.
2174         (Analyze_Package_Specification): Create the body of the DIC
2175         procedure at the end of the visible and private declarations.
2176         (Preserve_Full_Attributes): Propagate DIC attributes.
2177         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
2178         DIC attributes.
2179         (Analyze_Task_Type_Declaration): Propagate DIC attributes.
2180         * sem_elab.adb (Check_A_Call): Update the call to
2181         Is_Nontrivial_Default_Init_Cond_Procedure.
2182         * sem_prag.adb Remove the with and use clauses for
2183         GNAT.HTable. Move the handling of class- wide pre/postcondition
2184         description and data structures to Exp_Util.
2185         (Analyze_Pragma): Create the declaration of the DIC procedure. There
2186         is no need to propagate invariant-related attributes at this point
2187         as this is done in Build_Invariant_Procedure_Declaration.
2188         (Build_Class_Wide_Expression): Moved to Exp_Util.
2189         (Entity_Hash): Moved to Exp_Util.
2190         (Update_Primitives_Mapping): Moved to Exp_Util.
2191         * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
2192         (Update_Primitives_Mapping): Moved to Exp_Util.
2193         * sem_util.adb: Remove with and use clauses for Ghost
2194         and Sem_Ch13.
2195         (Build_Default_Init_Cond_Call): Removed.
2196         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
2197         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
2198         (Get_Views): Reimplemented.
2199         (Has_Full_Default_Initialization): Reimplement the section on DIC.
2200         (Inherit_Default_Init_Cond_Procedure): Removed.
2201         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
2202         (Is_Nontrivial_DIC_Procedure): New routine.
2203         (Is_Verifiable_DIC_Pragma): New routine.
2204         (Propagate_DIC_Attributes): New routine.
2205         * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
2206         (Build_Default_Init_Cond_Procedure_Bodies): Removed.
2207         (Build_Default_Init_Cond_Procedure_Declaration): Removed.
2208         (Inherit_Default_Init_Cond_Procedure): Removed.
2209         (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
2210         (Is_Nontrivial_DIC_Procedure): New routine.
2211         (Is_Verifiable_DIC_Pragma): New routine.
2212         (Propagate_DIC_Attributes): New routine.
2213         * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
2214         on DIC.
2215         * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
2216         usage in nodes.
2217         (Expression_Copy): New routine along with pragma Inline.
2218         (Set_Expression_Copy): New routine along with pragma Inline.
2220 2017-01-06  Bob Duff  <duff@adacore.com>
2222         * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
2223         "Bind_Main_Program" to "not Bind_For_Library", because otherwise
2224         we won't generate the call to s_stalib_adafinal when the main
2225         is not written in Ada.
2227 2017-01-06  Bob Duff  <duff@adacore.com>
2229         * sem_prag.adb: Minor: remove pragma Warnings.
2231 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2233         * Makefile.rtl: Do not compile s-stchop by default.
2235 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
2237         * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
2238         sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
2239         snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
2240         s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
2241         Reverted previous change for now.
2243 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2245         * exp_ch3.adb (Build_Initialization_Call): Apply predicate
2246         check to default discriminant value if checks are enabled.
2247         (Build_Assignment): If type of component has static predicate,
2248         apply check to its default value, if any.
2250 2017-01-06  Patrick Bernardi  <bernardi@adacore.com>
2252         * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
2253         * exp_ch3.adb (Build_Init_Statements): As part of initialising
2254         the value record of a task, set its _Secondary_Stack_Size field
2255         if present.
2256         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
2257         a _Secondary_Stack_Size field in the value record of
2258         the task if a Secondary_Stack_Size rep item is present.
2259         (Make_Task_Create_Call): Include secondary stack size
2260         parameter. If No_Secondary_Stack restriction is in place, passes
2261         stack size of 0.
2262         * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
2263         Secondary_Stack_Size.
2264         * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
2265         function to define the overhead of the secondary stack.
2266         * s-tarest.adb (Create_Restricted_Task,
2267         Create_Restricted_Task_Sequential): Functions now include
2268         Secondary_Stack_Size parameter to pass to Initialize_ATCB.
2269         * s-tarest.adb (Create_Restricted_Task,
2270         Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
2271         now include Secondary_Stack_Size parameter.
2272         (Task_Wrapper):
2273         Secondary stack now allocated to the size specified by the
2274         Secondary_Stack_Size parameter in the task's ATCB.
2275         * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
2276         Secondary_Stack_Size component.
2277         * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
2278         Create_Restricted_Task_Sequential): Function now include
2279         Secondary_Stack_Size parameter.
2280         (Task_Wrapper): Secondary stack
2281         now allocated to the size specified by the Secondary_Stack_Size
2282         parameter in the task's ATCB.
2283         * sem_ch13.adb (Analyze_Aspect_Specification): Add support
2284         for Secondary_Stack_Size aspect, turning the aspect into its
2285         corresponding internal attribute.
2286         (Analyze_Attribute_Definition):
2287         Process Secondary_Stack_Size attribute.
2288         * snames.adb-tmpl, snames.ads-tmpl: Added names
2289         Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
2290         Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
2292 2017-01-06  Pascal Obry  <obry@adacore.com>
2294         * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
2295         Sequential_IO and Direct_IO.
2297 2017-01-06  Bob Duff  <duff@adacore.com>
2299         * snames.ads-tmpl (Renamed): New name for the pragma argument.
2300         * par-ch2.adb: Allow the new pragma (with analysis deferred
2301         to Sem_Prag).
2302         * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
2303         Keep a mapping from new pragma names to old names.
2304         * sem_prag.adb: Check legality of pragma Rename_Pragma, and
2305         implement it by calling Map_Pragma_Name.
2306         * checks.adb, contracts.adb, einfo.adb, errout.adb,
2307         * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
2308         * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
2309         * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
2310         * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
2311         * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2312         * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
2313         as appropriate.
2315 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2317         * exp_ch9.adb: Minor reformatting.
2319 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2321         * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
2322         * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
2323         (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
2324         (unused).
2325         * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
2326         Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
2327         * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
2328         Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
2330 2017-01-06  Bob Duff  <duff@adacore.com>
2332         * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
2333         dummy implementation of Map_Pragma_Name.
2335 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2337         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
2338         entry_body variable constant.
2339         * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
2340         * s-tpoben.ads (Protected_Entry_Body_Access): Now access
2341         to constant.
2342         * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
2343         now access to constant.
2345 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2347         * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
2348         reformatting and typo fixes.
2350 2017-01-06  Bob Duff  <duff@adacore.com>
2352         * snames.ads-tmpl: New names for pragma renaming.
2353         * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
2354         * par-prag.adb: Add new pragma name to case statement.
2355         * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
2356         of the pragma.
2357         * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
2358         Dummy implementation of Pragma_Name_Mapped.
2360 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2362         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
2363         better detect call within an entry_wrapper.
2364         * sem_res.adb (Resolve_Call): A protected call within an
2365         entity_wrapper is analyzed in the context of the protected
2366         object but corresponds to a pre-analysis and is not an access
2367         before elaboration.
2368         * sem_attr.adb: Minor reformatting.
2370 2017-01-06  Justin Squirek  <squirek@adacore.com>
2372         * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
2373         Finalization_Size to allow a prefix of any non-class-wide type.
2374         * sem_attr.ads Modify comment for Finalization_Size to include
2375         definite type use case.
2377 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2379         * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
2380         on procedures that are wrappers created for entries that have
2381         preconditions.
2382         * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
2383         body is an entry_wrapper, compile it in the context of the
2384         synchronized type, because a precondition may refer to funtions
2385         of the type.
2386         * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
2387         body entity.
2388         * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
2389         within an Entry_Wrapper this is an external call whose target
2390         is the synchronized object that is the actual in the call to
2391         the wrapper.
2393 2017-01-06  Yannick Moy  <moy@adacore.com>
2395         * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
2396         in tree, which means not analyzing the previous prefix if the node has
2397         been rewritten into its prefix.
2399 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2401         * s-tpobop.adb: Minor reformatting.
2403 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2405         * checks.adb (Ensure_Valid): Do not generate a validity check
2406         within a generated predicate function, validity checks will have
2407         been applied earlier when required.
2409 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2411         * s-tpoben.ads (Protection_Entries): Add comment and reorder
2412         components for performances.
2413         * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
2414         semantic.
2416 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2418         * sem_eval.adb (Check_Expression_Against_Static_Predicate):
2419         If expression is compile-time known and obeys a static predicate
2420         it must be labelled as static, to prevent spurious warnings and
2421         run-time errors, e.g. in case statements. This is relevant when
2422         the expression is the result of constant-folding a type conversion
2423         whose expression is a variable with a known static value.
2425 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2427         * exp_attr.adb, sem_attr.ads: Minor reformatting.
2429 2017-01-06  Justin Squirek  <squirek@adacore.com>
2431         * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
2432         expansion of Finalization_Size attribute.
2433         * sem_attr.adb (Analyze_Attribute): Add entry to check the
2434         semantics of Finalization_Size.
2435         (Eval_Attribute): Add null entry for Finalization_Size.
2436         * sem_attr.ads: Add Finalization_Size to the implementation
2437         dependent attribute list.
2438         * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
2440 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2442         * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
2443         iterator specification with a serious syntactic error, transform
2444         construct into an infinite loop in order to continue analysis
2445         and prevent a compiler abort.
2447 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2449         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
2450         max_queue_lengths_array if unused.
2452 2017-01-06  Bob Duff  <duff@adacore.com>
2454         * errout.adb (Set_Msg_Text): Protect against out-of-bounds
2455         array access, in case "\" is at the end of Text.
2456         * stylesw.adb (Set_Style_Check_Options): Don't include input
2457         characters in the error message template, because they could
2458         be control characters such as "\", which Errout will try to
2459         interpret.
2461 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2463         * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
2464         For a private type examine the visible declarations that follow
2465         the partial view, not just the private declarations that follow
2466         the full view.
2468 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2470         * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
2471         code cleanup.
2473 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2475         * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
2476         alias of the inherited op is the parent iterator, no need to
2477         examine dispatch table positions which might not be established
2478         yet if type is not frozen.
2479         * sem_disp.adb (Check_Controlling_Formals): The formal of a
2480         predicate function may be a subtype of a tagged type.
2481         * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
2482         of representation items for the completion of a type extension
2483         where a predicate applies to the partial view.
2484         * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
2485         parameter that designates function whose actual receives a
2486         predicate check, to improve warning message when the check will
2487         lead to infinite recursion.
2488         * sem_res.adb (Resolve_Actuals): Pass additional parameter to
2489         Apply_Predicate_Check.
2491 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2493         * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
2494         Gnat_Extended_Ravenscar.
2495         * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
2497 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2499         * sem_util.ads: Minor typo fix and reformatting.
2501 2017-01-06  Yannick Moy  <moy@adacore.com>
2503         * ghost.adb Minor fixing of references to SPARK RM.
2504         (Check_Ghost_Context): Check whether reference is to a lvalue
2505         before issuing an error about violation of SPARK RM 6.9(13)
2506         when declaration has Ghost policy Check and reference has Ghost
2507         policy Ignore.
2508         * sem_util.adb Minor indentation.
2509         * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
2510         Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
2511         * sem_util.ads (Unique_Defining_Entity): Document the result
2512         for package body stubs.
2514 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2516         * raise-gcc.c (abort): Macro to call Abort_Propagation.
2517         * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
2518         constant.
2519         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2520         Do not generate the Entry_Max_Queue_Lengths_Array if all default
2521         values.
2522         * exp_util.adb (Corresponding_Runtime_Package): Consider
2523         Max_Queue_Length pragma.
2525 2017-01-06  Justin Squirek  <squirek@adacore.com>
2527         * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2528         Remove declaration generation in the case of
2529         System_Tasking_Protected_Objects_Single_Entry being used,
2530         and add a warning message when this is detected to occur.
2531         (Make_Initialize_Protection): Remove reference pass in the case
2532         of System_Tasking_Protected_Objects_Single_Entry.
2533         * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
2534         * s-tposen.adb (Initialize_Protection_Entry): Remove
2535         Entry_Queue_Max parameter.
2536         * s-tposen.ads: Remove the types use to store the entry queue
2537         maximum.
2538         * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
2540 2017-01-06  Yannick Moy  <moy@adacore.com>
2542         * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
2543         behavior of function, to also accept out of range positions
2544         and raise Constraint_Error in such case, and to copy sloc from
2545         literal if No_Location passed as location.
2546         * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
2547         of functions to raise Constraint_Error in case of value not in
2548         appropriate range.
2550 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2552         * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
2553         Invalidate_Stack_Cache.
2555 2017-01-06  Eric Botcazou  <ebotcazou@adacore.com>
2557         * s-os_lib.adb: Minor fix to the signature of Readlink.
2559 2017-01-06  Javier Miranda  <miranda@adacore.com>
2561         * sem_ch6.adb (Conforming_Types): Handle another
2562         confusion between views in a nested instance with an actual
2563         private type whose full view is not in scope.
2565 2017-01-06  Arnaud Charlet  <charlet@adacore.com>
2567         * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
2568         mark a rewritten if statement as explicit (Comes_From_Source).
2570 2017-01-06  Gary Dismukes  <dismukes@adacore.com>
2572         * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
2574 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2576         * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
2578 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2580         * sem_case.adb: Minor reformatting.
2582 2017-01-06  Thomas Quinot  <quinot@adacore.com>
2584         * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
2586 2017-01-06  Justin Squirek  <squirek@adacore.com>
2588         * aspects.adb: Register aspect in Canonical_Aspect.
2589         * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
2590         into respective tables.
2591         * einfo.ads, einfo.adb: Add a new attribute for
2592         handling the parameters for Pragma_Max_Entry_Queue
2593         (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
2594         for accessing and setting were added as well.
2595         * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
2596         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
2597         declaration for pramga arguments and store them in the protected
2598         type node.
2599         (Make_Initialize_Protection): Pass a reference to
2600         the Entry_Max_Queue_Lengths_Array in the protected type node to
2601         the runtime.
2602         * rtsfind.adb: Minor grammar fix.
2603         * rtsfind.ads: Register new types taken from the
2604         runtime libraries RE_Protected_Entry_Queue_Max and
2605         RE_Protected_Entry_Queue_Max_Array
2606         * s-tposen.adb, s-tpoben.adb
2607         (Initialize_Protection_Entry/Initialize_Protection_Entries):
2608         Add extra parameter and add assignment to local object.
2609         * s-tposen.ads, s-tpoben.ads: Add new types to
2610         store entry queue maximums and a field to the entry object record.
2611         * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
2612         for Aspect_Max_Queue_Length.
2613         (Check_Aspect_At_Freeze_Point):
2614         Add aspect to list of aspects that don't require delayed analysis.
2615         * sem_prag.adb (Analyze_Pragma): Add case statement for
2616         Pragma_Max_Queue_Length, check semantics, and register arugments
2617         in the respective entry nodes.
2618         * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
2619         and Has_Max_Queue_Length
2620         * snames.ads-tmpl: Add constant for the new aspect-name
2621         Name_Max_Queue_Length and corrasponding pragma.
2623 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2625         * exp_util.adb (Is_Controlled_Function_Call):
2626         Reimplemented. Consider any node which has an entity as the
2627         function call may appear in various ways.
2629 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2631         * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
2632         an unchecked type conversion when performing a view conversion
2633         to/from a private type. In all other cases use a regular type
2634         conversion to ensure that any relevant checks are properly
2635         installed.
2637 2017-01-06  Hristian Kirtchev  <kirtchev@adacore.com>
2639         * sem_prag.adb, sem_ch8.adb: Minor reformatting.
2641 2017-01-06  Ed Schonberg  <schonberg@adacore.com>
2643         * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
2644         error on case expression that is an entity, when coverage is
2645         incomplete and entity has a static value obtained by local
2646         propagation.
2647         (Handle_Static_Predicate): New procedure, subsidiary of
2648         Check_Choices, to handle case alternatives that are either
2649         subtype names or subtype indications involving subtypes that
2650         have static predicates.
2652 2017-01-06  Thomas Quinot  <quinot@adacore.com>
2654         * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
2655         (GNAT.Socket): Add support for Busy_Polling and Generic_Option
2657 2017-01-06  Bob Duff  <duff@adacore.com>
2659         * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
2660         Elaborate_All(P) to P itself. That could happen in obscure cases,
2661         and always introduced a cycle (P body must be elaborated before
2662         P body).
2663         * lib-writ.ads: Comment clarification.
2664         * ali-util.ads: Minor comment fix.
2665         * ali.adb: Minor reformatting.
2667 2017-01-06  Tristan Gingold  <gingold@adacore.com>
2669         * a-exexpr-gcc.adb: Improve comment.
2671 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
2673         * s-linux-mips.ads: Use correct signal and errno constants.
2674         (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
2676 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
2678         * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
2679         * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
2680         sections.
2682 2017-01-01  Eric Botcazou  <ebotcazou@adacore.com>
2684         * gnatvsn.ads: Bump copyright year.
2686 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
2688         * gnat_ugn.texi: Bump @copying's copyright year.
2689         * gnat_rm.texi: Likewise.
2691 Copyright (C) 2017 Free Software Foundation, Inc.
2693 Copying and distribution of this file, with or without modification,
2694 are permitted in any medium without royalty provided the copyright
2695 notice and this notice are preserved.