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