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