1 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3 * scans.ads: New token At_Sign. Remove '@' from list of illegal
4 characters for future version of the language. '@' is legal name.
5 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
6 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
8 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
9 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10 (Has_Target_Names): New flag on N_Assignment_Statement, to
11 indicate that RHS has occurrences of N_Target_Name.
12 * sem.adb: Call Analyze_Target_Name.
13 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
14 (urrent_LHS): Global variable that denotes LHS of assignment,
15 used in the analysis of Target_Name nodes.
16 * sem_res.adb (Resolve_Target_Name): New procedure.
17 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
18 N is an assignment statement whose RHS contains occurences of @
19 that designate the value of the LHS of the assignment. If the
20 LHS is side-effect free the target names can be replaced with
21 a copy of the LHS; otherwise the semantics of the assignment
22 is described in terms of a procedure with an in-out parameter,
24 (Expand_N_Assignment_Statement): Call
25 Expand_Assign_With_Target_Names when needed.
26 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
27 * sprint.adb: Handle N_Target_Name.
29 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
31 * checks.adb: Minor fix in comment.
33 2017-01-23 Philippe Gil <gil@adacore.com>
35 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
36 count in Sort = Memory_Usage or Allocations_Count
38 2017-01-23 Justin Squirek <squirek@adacore.com>
40 * sem_ch3.adb: Code cleanup.
42 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
44 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
45 variables to the local variable section. Update the profile
46 of various nested routine that previously had visibility
47 of those globals. One the matching phase has completed,
48 remove certain classes of clauses which are considered noise.
49 (Check_Dependency_Clause): Properly detect a match between two
50 'Result attributes. Update the various post-match cases to use
51 Is_Already_Matched as this routine now automatically recognizes
52 a previously matched 'Result attribute.
53 (Is_Already_Matched): New routine.
54 (Remove_Extra_Clauses): New routine.
55 (Report_Extra_Clauses): Remove the detection of ... => null
56 clauses as this is now done in Remove_Extra_Clauses.
58 2017-01-23 Ed Schonberg <schonberg@adacore.com>
60 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
61 report on spurious overlaps between values involving a subtype
62 with a static predicate, because the expansion of such a subtype
63 into individual ranges in inhibited in ASIS mode.
65 2017-01-23 Justin Squirek <squirek@adacore.com>
67 * sem_ch3.adb (Analyze_Declarations): Add detection
68 of an edge case and delay freezing if it is present.
70 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
72 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
73 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
75 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
77 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
78 access-to-subprogram types inherit the convention of the
79 associated subprogram. (Set_Profile_Convention): New routine.
80 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
81 of the two entities directly, use Conventions_Match to account
82 for anonymous access-to-subprogram and subprogram types.
83 (Conventions_Match): New routine.
85 2017-01-23 Claire Dross <dross@adacore.com>
87 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
88 which return Universal_Integer, force the overflow check flag for
89 Length and Range_Length for types as big as Long_Long_Integer.
91 2017-01-23 Claire Dross <dross@adacore.com>
93 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
94 attributes which return Universal_Integer, introduce a conversion
95 to the expected type with the appropriate check flags set.
96 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
97 base type if the range is null. It may still be invalid if it
98 is higher than the lower bound. This is checked later in the
99 context in which the range appears.
101 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
103 * scos.ads: Introduce a constant to represent ignored
104 dependencies in SCO_Unit_Table_Entry.
106 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
108 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
109 spaces from error messages.
111 2017-01-23 Ed Schonberg <schonberg@adacore.com>
113 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
114 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
115 an object declaration for an array type with a modular index type
116 with the size of Long_Long_Integer. Special processing is needed
117 in this case to compute reliably the size of the object, and
118 eventually to raise Storage_Error, when wrap-around arithmetic
119 might compute a meangingless size for the object.
121 2017-01-23 Justin Squirek <squirek@adacore.com>
123 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
124 sem_type.adb: Code cleanups.
126 2017-01-23 Bob Duff <duff@adacore.com>
128 * sem_res.adb (Resolve_Call): In the part of the code where
129 it is deciding whether to turn the call into an indexed
130 component, avoid doing so if the call is to an instance of
131 Unchecked_Conversion. Otherwise, the compiler turns it into an
132 indexed component, and resolution of that turns it back into a
133 function call, and so on, resulting in infinite recursion.
134 * sem_util.adb (Needs_One_Actual): If the first formal has a
135 default, then return False.
137 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
139 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
140 optimizations when the type is modular and the offsets are equal.
142 2017-01-20 Thomas Quinot <quinot@adacore.com>
144 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
147 2017-01-20 Nicolas Roche <roche@adacore.com>
149 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
151 2017-01-20 Bob Duff <duff@adacore.com>
153 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
154 (etc) optimizations when the type is modular.
156 2017-01-20 Yannick Moy <moy@adacore.com>
158 * sem_ch6.adb (Move_Pragmas): move some pragmas,
159 but copy the SPARK_Mode pragma instead of moving it.
160 (Build_Subprogram_Declaration): Ensure that the generated spec
161 and original body share the same SPARK_Pragma aspect/pragma.
162 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
163 procedure to copy SPARK_Mode aspect.
165 2017-01-20 Bob Duff <duff@adacore.com>
167 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
169 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
170 Empty even in ASIS mode.
172 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
174 * exp_ch9.adb: minor style fixes in comments.
175 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
176 relative statement introduces an implicit dependency on
177 Ada.Real_Time.Clock_Time.
178 * sem_util.adb: Minor reformatting.
180 2017-01-20 Ed Schonberg <schonberg@adacore.com>
182 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
183 must be treated as delayed aspect even if the expression is
184 a literal, because the aspect affects the freezing and the
185 elaboration of the object to which it applies.
187 2017-01-20 Tristan Gingold <gingold@adacore.com>
189 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
191 2017-01-20 Ed Schonberg <schonberg@adacore.com>
193 * lib-xref.adb (Generate_Reference): Do not warn about the
194 presence of a pragma Unreferenced if the entity appears as the
195 actual in a procedure call that does not come from source.
197 2017-01-20 Pascal Obry <obry@adacore.com>
199 * expect.c, terminals.c: Fix some warnings about unused variables.
200 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
203 2017-01-20 Bob Duff <duff@adacore.com>
205 * exp_attr.adb (Constrained): Apply an access check (check that
206 the prefix is not null) when the prefix denotes an object of an
207 access type; that is, when there is an implicit dereference.
209 2017-01-20 Gary Dismukes <dismukes@adacore.com>
211 * s-rident.ads (constant Profile_Info): Remove
212 No_Calendar from GNAT_Extended_Ravenscar restrictions.
214 2017-01-20 Tristan Gingold <gingold@adacore.com>
216 * s-maccod.ads: Add pragma No_Elaboration_Code_All
218 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
220 * ghost.adb (Mark_Ghost_Clause): New routine.
221 (Prune_Node): Do not prune compilation unit nodes.
222 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
223 This does not touch the node itself, but does prune all its fields.
224 * ghost.ads (Mark_Ghost_Clause): New routine.
225 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
226 package clause mentions Ghost and non-Ghost packages. Mark a
227 use package clause as Ghost when it mentions a Ghost package.
228 (Analyze_Use_Type): Emit an error when a use type clause mentions
229 Ghost and non-Ghost types. Mark a use type clause as Ghost when
230 it mentions a Ghost type.
231 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
232 Ghost when it withs a Ghost unit.
234 2017-01-20 Javier Miranda <miranda@adacore.com>
236 * sem_res.adb (Resolve_Call): If a function call
237 returns a limited view of a type and at the point of the call the
238 function is not declared in the extended main unit then replace
239 it with the non-limited view, which must be available. If the
240 called function is in the extended main unit then no action is
241 needed since the back-end handles this case.
243 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
245 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
246 (Contains_Subprograms_Refs): ...this. Adjust comment
247 for constants. (Is_Subp_Or_Const_Ref): Rename into...
248 (Is_Subprogram_Ref): ...this.
249 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
250 Has_Non_Subprograms_Referencer and adjust comment. Remove
251 incorrect shortcut for package declarations and bodies.
253 2017-01-20 Ed Schonberg <schonberg@adacore.com>
255 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
256 base type differs from that of the completion and the private
257 subtype is an itype (created for a constraint on an access
258 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
261 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
263 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
264 When inheriting the SPARK_Mode of a prior expression function,
265 look at the properly resolved entity rather than the initial
266 candidate which may denote a homonym.
268 2017-01-20 Ed Schonberg <schonberg@adacore.com>
270 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
271 Precondition or Postcondition, and the context is pragma
272 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
273 and suggest the standard names Assertion_Policy /Pre /Post
276 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
278 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
280 2017-01-20 Javier Miranda <miranda@adacore.com>
282 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
284 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
285 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
288 2017-01-20 Ed Schonberg <schonberg@adacore.com>
290 * sem_ch13.adb (Analyze_Aspect_Specification, case
291 Dynamic_Predicate): If the entity E is a subtype that inherits
292 a static predicate for its parent P,, the inherited and the
293 new predicate combine in the generated predicate function,
294 and E only has a dynamic predicate.
296 2017-01-20 Tristan Gingold <gingold@adacore.com>
298 * s-boustr.ads, s-boustr.adb: New package.
299 * Makefile.rtl: Add s-boustr.
301 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
303 * inline.adb (Process_Formals): Qualify the
304 expression of a return statement when it yields a universal type.
306 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
308 * freeze.adb (Freeze_All): Freeze the default
309 expressions of all eligible formal parameters that appear in
310 entries, entry families, and protected subprograms.
312 2017-01-20 Ed Schonberg <schonberg@adacore.com>
314 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
315 for illegal inherited Implicit_Dereference aspects with renamed
318 2017-01-20 Javier Miranda <miranda@adacore.com>
320 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
321 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
322 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
323 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
324 Set_Prev, Tree_Read): Adding assertion.
325 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
326 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
327 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
328 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
329 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
330 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
331 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
332 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
333 Set_ListN_With_Parent): Adding assertion.
335 2017-01-20 Ed Schonberg <schonberg@adacore.com>
337 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
338 import that applies to several homograph subprograms. when one
339 of them is declared by a subprogram body.
341 2017-01-20 Justin Squirek <squirek@adacore.com>
343 * exp_ch6.adb (Expand_Call): Remove optimization
344 that nulls out calls to null procedures.
346 2017-01-20 Yannick Moy <moy@adacore.com>
348 * inline.adb (Expand_Inlined_Call): Keep more
349 precise type of actual for inlining whenever possible. In
350 particular, do not switch to the formal type in GNATprove mode in
351 some case where the GNAT backend might require it for visibility.
353 2017-01-20 Ed Schonberg <schonberg@adacore.com>
355 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
356 aspect Implicit_Dereference can be inherited by a full view if
357 the partial view has no discriminants, because there is no way
358 to apply the aspect to the partial view.
359 (Build_Derived_Record_Type): If derived type renames discriminants
360 of the parent, the new discriminant inherits the aspect from
362 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
363 call through an access discriminant designating a subprogram.
364 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
365 properly a parameterless call through an access discriminant on
366 the left-hand side of an assignment.
367 * sem_res.adb (resolve): If an interpreation involves a
368 discriminant with an implicit dereference and the expression is an
369 entity, resolution takes place later in the appropriate routine.
370 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
371 access discriminants that designate a subprogram type.
373 2017-01-20 Pascal Obry <obry@adacore.com>
375 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
377 2017-01-20 Yannick Moy <moy@adacore.com>
379 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
380 on implicitly with'ed units in GNATprove mode.
381 * sinfo.ads (Implicit_With): Document use of flag for implicitly
382 with'ed units in GNATprove mode.
384 2017-01-20 Ed Schonberg <schonberg@adacore.com>
386 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
387 unit Do not report an error on a non-static entity that appears
388 in the context of a spec expression, such as an aspect expression.
390 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
392 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
393 (Is_Underlying_Full_View): New routine.
394 (Set_Is_Underlying_Full_View): New routine.
395 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
396 * einfo.ads Add new attribute Is_Underlying_Full_View.
397 (Is_Underlying_Full_View): New routine along with pragma Inline.
398 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
399 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
400 class-wide types and underlying full views. The first subtype
401 is used as the working type for all Itypes, not just array base types.
402 (Build_DIC_Procedure_Declaration): Do not consider
403 class-wide types and underlying full views. The first subtype
404 is used as the working type for all Itypes, not just array
406 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
407 view or an underlying full view without clobbering the attributes
408 of a previous freeze node.
409 (Inherit_Freeze_Node): New routine.
410 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
412 (Build_Underlying_Full_View): Mark an underlying full view as such.
413 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
416 2017-01-20 Yannick Moy <moy@adacore.com>
418 * sinfo.ads: Document lack of Do_Division_Check flag
419 on float exponentiation.
421 2017-01-19 Javier Miranda <miranda@adacore.com>
423 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
424 identifier attribute of a block-statement node. Required to avoid
425 assertion failure when building the new containers library.
427 2017-01-19 Bob Duff <duff@adacore.com>
429 * exp_ch3.adb: Update comment.
431 2017-01-19 Vincent Celier <celier@adacore.com>
433 * gprep.adb (Gnatprep): Parse the definition file without
434 "replace in comments" even when switch -C is used.
436 2017-01-19 Justin Squirek <squirek@adacore.com>
438 * exp_ch9.adb (Is_Pure_Barrier): Create function
439 Is_Count_Attribute to identify an expansion of the 'Count
442 2017-01-19 Ed Schonberg <schonberg@adacore.com>
444 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
445 statements within an element iterator loop are only analyzed
446 agter the loop is rewritten. Within a generic the analysis must
447 be performed in any case to complete name capture.
449 2017-01-19 Bob Duff <duff@adacore.com>
451 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
452 before checking for unrecognized pragmas.
453 Initialize Pname on its declarations; that's always good style.
455 2017-01-19 Claire Dross <dross@adacore.com>
457 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
458 body into the tree for GNATprove by setting its Parent field. The
459 components invariants of composite types are not checked by
460 the composite type's invariant procedure in GNATprove mode.
461 (Build_Invariant_Procedure_Declaration): Semi-insert the
462 declaration into the tree for GNATprove by setting its Parent
464 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
465 the component invariants to the array type invariant procedure
466 so that the procedure can be used to check the array type
468 (Freeze_Record_Type): In GNATprove mode, do
469 not add the component invariants to the record type invariant
470 procedure so that the procedure can be used to check the record
471 type invariants if any.
473 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
475 * lib-xref-spark_specific.adb: Minor reformatting.
476 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
478 2017-01-19 Javier Miranda <miranda@adacore.com>
480 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
481 Build_Back_End_Aggregate.
482 (Generate_Aggregate_For_Derived_Type): Code cleanup.
483 (Prepend_Stored_Values): Code cleanup.
485 2017-01-19 Ed Schonberg <schonberg@adacore.com>
487 * sem_ch6.adb (Analyze_Expression_Function): Check for an
488 incomplete return type after attempting to freeze it, so that
489 other freeze actiona are generated in the proper order.
491 2017-01-19 Ed Schonberg <schonberg@adacore.com>
493 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
494 type, ie. a type whose component is a character type, and the
495 aggregate is positional, do not convert into a string literal
496 if the index type is not an integer type, because the original
497 type may be required in an enclosing operation.
499 2017-01-19 Bob Duff <duff@adacore.com>
501 * binde.adb, debug.adb: Enable new elaboration order algorithm
502 by default. -dp switch reverts to the old algorithm.
504 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
506 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
507 (Analyze_Declarations): Create the DIC and Invariant
508 procedure bodies s after all freezing has taken place.
509 (Build_Assertion_Bodies): New routine.
510 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
512 (Analyze_Package_Specification): Remove the
513 generation of the DIC and Invariant procedure bodies. This is
514 now done by Analyze_Declarations.
515 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
516 procedures are never treated as primitives.
518 2017-01-19 Yannick Moy <moy@adacore.com>
520 * frontend.adb: Analyze inlined bodies and check elaboration
521 rules in GNATprove mode too.
522 * sem_elab.adb (Delay_Element): Add Boolean component to save
523 indication that call is in SPARK code. (Check_Elab_Calls):
524 Check elaboration rules in GNATprove mode, and correctly set
525 the current value of SPARK_Mode.
526 * lib-xref-spark_specific.adb
527 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
529 2017-01-19 Ed Schonberg <schonberg@adacore.com>
531 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
532 checks on the expression for the high bound of concatenation
533 when checks are disabled, to suppress warnings about potential
534 constraint errors in restricted runtimes.
536 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
538 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
539 representation-to-position function as inlined.
540 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
541 the purity of an internally generated entity if it has been
542 explicitly marked as pure for optimization purposes.
543 * exp_aggr.adb: Minor reformatting.
545 2017-01-19 Javier Miranda <miranda@adacore.com>
547 * exp_ch6.adb (Expand_Call): Remove side effects on
548 actuals that are allocators with qualified expression since the
549 initialization of the object is performed by means of individual
550 statements (and hence it must be done before the call).
552 2017-01-19 Ed Schonberg <schonberg@adacore.com>
554 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
555 (Build_Derived_Enumeration_Type): If the derived type inherits a
556 dynamic predicate from its parent, the bounds of the type must
557 freeze because an explicit constraint is constructed for the
558 type and the corresponding range is elaborated now.
560 2017-01-19 Arnaud Charlet <charlet@adacore.com>
562 * sem_attr.ads: minor fix of inconsistent casing in comment
563 * lib-writ.ads: minor align comments in columns
564 * sem_ch3.adb: Minor reformatting.
565 * spark_xrefs.ads: minor fix typo in SPARK-related comment
566 * table.ads: minor style fix in comment
567 * lib-xref-spark_specific.adb
568 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
569 * sem_ch12.adb: minor whitespace fix
570 * freeze.adb: Add comment.
571 * sem_util.adb (Unique_Name): for instances of
572 generic subprograms ignore the name of the wrapper package.
574 2017-01-19 Javier Miranda <miranda@adacore.com>
576 * exp_aggr.adb (Resolve_Record_Aggregate):
577 Factorize code needed for aggregates of limited and unlimited
578 types in a new routine.
579 (Pass_Aggregate_To_Back_End): New subprogram.
581 2017-01-19 Yannick Moy <moy@adacore.com>
583 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
585 2017-01-19 Ed Schonberg <schonberg@adacore.com>
587 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
588 public, for use elsewhere.
589 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
590 an Inlined_body, recognize a call that uses object notation
591 and has not been rewritten as a regular call because regular
592 expansion has not taken place.
594 2017-01-19 Bob Duff <duff@adacore.com>
596 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
597 in case of generic formal discrete types, because it causes crashes in
598 the compiler when built with assertions on.
600 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
602 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
603 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
605 2017-01-19 Bob Duff <duff@adacore.com>
607 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
608 Increment Warnings_Detected. It was decrementing, which is
609 wrong since we just issued a warning message.
610 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
611 these variables to be of subtype Nat instead of Int, because
612 they should never be negative.
614 2017-01-19 Javier Miranda <miranda@adacore.com>
616 * contracts.adb (Build_Postconditions_Procedure): Replace
617 Generate_C_Code by Modify_Tree_For_C.
618 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
619 Replace Generate_C_Code by Modify_Tree_For_C.
620 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
622 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
623 Generate_C_Code by Modify_Tree_For_C.
624 * exp_ch4.adb (Expand_Allocator_Expression): Replace
625 Generate_C_Code by Modify_Tree_For_C.
626 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
627 by Modify_Tree_For_C.
628 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
629 Generate_C_Code by Modify_Tree_For_C.
630 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
631 by Modify_Tree_For_C.
632 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
634 2017-01-19 Javier Miranda <miranda@adacore.com>
636 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
638 (Is_Inlinable_Expression_Function): New subprogram.
639 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
641 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
643 2017-01-19 Ed Schonberg <schonberg@adacore.com>
645 * sem_ch4.adb (Diagnose_Call): Improve error message when a
646 selected component has a prefix that might be interpreted
647 as a parameterless function call, but none of the candidate
648 interpretations is parameterless, and there is a hidden homonym
649 of the prefix that is a package.
650 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
651 interpreted as a parameterless function call and its analysis
652 fails, do not call Analyze_Selected_Component.
654 2017-01-19 Steve Baird <baird@adacore.com>
656 * sem_util.ads: Add new Use_Full_View Boolean parameter to
658 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
659 calls to a newly-defined Scalar_Range_Of_Right_View function.
661 2017-01-19 Arnaud Charlet <charlet@adacore.com>
663 * gnat1drv.adb: minor fix of unbalanced parens in comment
664 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
665 to visible part of the package to allow re-use in GNATprove.
666 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
667 from repeated code of Traverse_Compilation_Unit.
668 (Traverse_Declaration_Or_Statement): fixed detection of
669 generic subprograms and packages; also, iteration over case
670 statement alternatives rewritten to avoid testing if the first
671 alternative is present (since it must be present due to Ada
672 syntax restrictions).
674 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
676 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
677 returning by reference not just for subprogram body stubs,
678 but for all subprogram cases.
679 * sem_util.adb: Code reformatting.
680 (Requires_Transient_Scope): Update the call to Results_Differ.
681 (Results_Differ): Update the parameter profile and the associated
684 2017-01-19 Ed Schonberg <schonberg@adacore.com>
686 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
687 identifier nodes that do not come from source, to handle properly
688 dimensionality check within an inlined body which inclddes both
689 original operands and rewritten operands. This removes spurious
690 dimensionality errors in the presence of front-end inlining,
691 as well as in SPARK mode.
693 2017-01-16 Jakub Jelinek <jakub@redhat.com>
696 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
698 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
700 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
702 2017-01-13 Arnaud Charlet <charlet@adacore.com>
704 * doc/gnat_ugn/getting_started_with_gnat.rst,
705 doc/gnat_ugn/inline_assembler.rst,
706 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
707 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
708 doc/gnat_ugn/about_this_guide.rst,
709 doc/gnat_ugn/platform_specific_information.rst,
710 doc/gnat_ugn/example_of_binder_output.rst,
711 doc/gnat_ugn/gnat_and_program_execution.rst,
712 doc/gnat_ugn/gnat_utility_programs.rst,
713 doc/gnat_ugn/the_gnat_compilation_model.rst,
714 doc/gnat_rm/implementation_defined_attributes.rst,
715 doc/gnat_rm/compatibility_and_porting_guide.rst,
716 doc/gnat_rm/standard_library_routines.rst,
717 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
718 doc/gnat_rm/implementation_defined_pragmas.rst,
719 doc/gnat_rm/the_gnat_library.rst,
720 doc/gnat_rm/obsolescent_features.rst,
721 doc/gnat_rm/about_this_guide.rst,
722 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
723 doc/gnat_rm/implementation_of_ada_2012_features.rst,
724 doc/gnat_rm/interfacing_to_other_languages.rst,
725 doc/gnat_rm/implementation_defined_aspects.rst,
726 doc/gnat_rm.rst: Update documentation.
727 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
729 2017-01-13 Ed Schonberg <schonberg@adacore.com>
731 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
732 * scil_ll.adb: Minor style fix in comment.
733 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
734 even if entity is already set, because the node may be renalyzed
735 after inlining transformations.
737 2017-01-13 Javier Miranda <miranda@adacore.com>
739 * sem_res.adb (Resolve_Call): Do not establish a transient scope
740 for a call to inlinable expression function (since the call will
741 be replaced by its returned object).
742 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
743 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
744 (Expand_Call): For inlinable expression function call replace the
745 call by its returned object.
746 (Is_Inlinable_Expression_Function): New subprogram.
748 2017-01-13 Gary Dismukes <dismukes@adacore.com>
750 * checks.adb: Minor typo fix and reformatting.
752 2017-01-13 Javier Miranda <miranda@adacore.com>
754 * contracts.adb (Contract_Only_Subprograms): Remove formal.
755 (Copy_Original_Specification): Removed.
756 (Skip_Contract_Only_Subprogram): Move here checks previously
757 located in the caller of this routine (to leave the code more clean).
758 (Build_Contract_Only_Subprogram): Code cleanup.
759 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
760 (Get_Contract_Only_Missing_Body_Name): Removed.
762 2017-01-13 Javier Miranda <miranda@adacore.com>
764 * sem_ch6.adb (Cloned_Expression): New subprogram.
765 (Freeze_Expr_Types): Complete previous patch since the expression
766 of an expression-function may have iterators and loops with
767 defining identifiers which, as part of the preanalysis of the
768 expression, may be left decorated with itypes that will not be
769 available in the tree passed to the backend.
771 2017-01-13 Ed Schonberg <schonberg@adacore.com>
773 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
774 conversion to Integer of an expression that is an attribute
775 reference 'Pos on an enumeration type.
777 2017-01-13 Bob Duff <duff@adacore.com>
779 * atree.ads: Minor comment fix.
781 2017-01-13 Justin Squirek <squirek@adacore.com>
783 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
784 calls in accessibility check on return statement.
786 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
788 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
789 Ensure that the input body is a subprogram body before trying to
790 determine whether it denoted an expression function. Note that
791 subprogram body stubs cannot denote expression functions.
793 2017-01-13 Gary Dismukes <dismukes@adacore.com>
795 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
798 2017-01-13 Javier Miranda <miranda@adacore.com>
800 * einfo.ads (Component_Bit_Offset): Fix documentation.
801 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
802 on record holes for components with unknown compile-time offsets.
804 2017-01-13 Bob Duff <duff@adacore.com>
806 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
807 * g-locfil.ads: Minor comment fix.
809 2017-01-13 Bob Duff <duff@adacore.com>
811 * binde.adb (Elab_New): New elaboration order algorithm
812 that is expected to cause fewer ABE issues. This is a work in
813 progress. The new algorithm is currently disabled, and can be
814 enable by the -dp switch, or by modifying the Do_Old and Do_New
815 etc. flags and rebuilding. Experimental code is included to
816 compare the results of the old and new algorithms.
817 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
818 can have multiple of these tables, so the old and new algorithms
820 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
821 parameter of type array. This avoids the global variable, and
822 allows bounds checking (which is normally defeated by the tables
823 packages). It also ensures that the Elab_Order is read-only
825 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
826 subprograms that need it, as above.
827 * debug.adb: Document new -dp switch. Modify doc of old -do
829 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
830 and Bindgen. Move writing of closure (-R and -Ra switches)
831 to Binde; that's more convenient.
833 2017-01-13 Ed Schonberg <schonberg@adacore.com>
835 * sem_ch6.adb (Analyze_Expression_Function): If the expression
836 function is a completion, all entities referenced in the
837 expression are frozen. As a consequence, a reference to an
838 uncompleted private type from an enclosing scope is illegal.
840 2017-01-13 Javier Miranda <miranda@adacore.com>
842 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
843 (Analyze_Subprogram_Body_Helper): At the occurrence of an
844 expression function declaration that is a completion, its
845 expression causes freezing (AI12-0103).
847 2017-01-13 Vadim Godunko <godunko@adacore.com>
849 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
850 Reference functions of Ada.Containers.Indefinite_Holders.
852 2017-01-13 Bob Duff <duff@adacore.com>
854 * s-os_lib.ads: Minor comment fixes.
856 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
858 * exp_ch3.adb (Default_Initialize_Object): Do not default
859 initialize an object when it is of a task type and restriction
860 No_Tasking is in effect because the initialization is obsolete.
861 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
862 restriction No_Tasking is in effect.
863 (Build_Master_Renaming): Do not rename a master when restriction
864 No_Tasking is in effect.
866 2017-01-13 Ed Schonberg <schonberg@adacore.com>
868 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
869 the legality of An others clause applies as well to a choice in
870 an Iterated_component_ association.
871 (Resolve_Iterated_Component_Association): An others choice
873 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
874 Iterated_Component_Association is not static.
876 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
878 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
879 control is passed to the expresion handler before the new mode
881 * sem_ch12.adb (Analyze_Package_Instantiation,
882 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
883 in case control is passed to the expresion handler before the
886 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
888 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
889 exp_aggr.adb: Minor reformatting.
891 2017-01-13 Gary Dismukes <dismukes@adacore.com>
893 * inline.adb: Minor reformatting and typo fix.
895 2017-01-13 Ed Schonberg <schonberg@adacore.com>
897 * sem_util.ads, sem_util.adb (Choice_List): Move function here
898 from sem_aggr.adb, for use elsewhere.
899 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
900 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
901 Iterated_Component_Present.
902 * exp_aggr.adb: Use Choice_List throughout, to handle
903 Iterated_Component_Associations.
904 (Gen_Loop): Generate proper loop for an
905 Iterated_Component_Association: loop variable has the identifier
906 of the original association. Generate a loop even for a single
907 component choice, in order to make loop parameter visible in
909 (Flatten): An Iterated_Component_Association is not static.
911 2017-01-13 Yannick Moy <moy@adacore.com>
913 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
914 float exponentiation for statically known small negative values
915 is the reciprocal of the exponentiation for the opposite value
917 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
918 Ensure that the value of float exponentiation for negative values
919 is the reciprocal of the exponentiation for the opposite value
921 * inline.adb (Expand_Inlined_Call): Fix the count
922 for the number of generated gotos.
924 2017-01-13 Yannick Moy <moy@adacore.com>
926 * inline.adb: Code cleanup.
927 * sem_util.adb (Is_OK_Volatile_Context): Add
928 expression in delay statement as OK for volatile context.
930 2017-01-13 Ed Schonberg <schonberg@adacore.com>
932 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
933 mode a choice that is a subtype with a static predicate is
934 replaced by the values it covers. This transformation must not
935 be performed in ASIS mode, to preserve the source for analysis.
937 2017-01-13 Justin Squirek <squirek@adacore.com>
939 * nlists.ads: Correct minor typo.
941 2017-01-13 Gary Dismukes <dismukes@adacore.com>
943 * sem_ch13.adb: Minor reformatting and typo fix.
945 2017-01-13 Ed Schonberg <schonberg@adacore.com>
947 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
948 Iterated_Component_Association is a named association in an
950 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
951 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
952 and resolve the discrete choices and the expression of the
954 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
955 Loop_Actions and Box_Present are attributes of
956 N_Iterated_Component_Association nodes. Box_Present is always
958 * sprint.adb (Sprint_Node): An Iterated_Component_Association
959 has a Discrete_Choices list, as specified in the RM. A
960 Component_Association for aggregate uses instead a Choices list.
961 We have to live with this small inconsistency because the new
962 construct also has a defining identifier, and there is no way
963 to merge the two node structures.
965 2017-01-13 Yannick Moy <moy@adacore.com>
967 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
968 list of pragmas to remove. Remove pragmas from the list of
969 statements in the body to inline.
970 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
972 2017-01-13 Ed Schonberg <schonberg@adacore.com>
974 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
975 Analyze_Declarations, to analyze and resolve the expressions of
976 aspect specifications in the current declarative list, so that
977 the expressions have proper entity and type info. This is needed
978 for ASIS when there is no subsequent expansion to generate this
979 semantic information.
980 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
981 original expression, to suppress cascaded errors when expression
982 has been constant-folded.
983 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
984 ASIS mode, because there is no subsequent expansion to decorate
987 2017-01-13 Yannick Moy <moy@adacore.com>
989 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
990 New function to detect when a call may be inlined or not in
992 (Expand_Inlined_Call): Ensure that a temporary
993 is always created in the cases where a type conversion may be
994 needed on an input parameter in GNATprove mode, so that GNATprove
995 sees the check to perform.
996 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
997 when not applicable due to actual requiring type conversion
998 with possible check but no temporary value can be copied for
999 GNATprove to see the check.
1001 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
1003 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
1004 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
1005 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
1006 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
1007 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
1008 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
1009 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
1010 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
1011 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
1012 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
1013 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
1014 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
1015 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
1016 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
1017 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
1018 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
1019 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
1020 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
1021 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
1022 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
1023 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
1024 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
1025 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
1026 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
1027 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
1028 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
1029 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
1030 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
1031 statements to reflect the new style for case alternatives. Various
1032 code clean up and reformatting.
1034 2017-01-13 Gary Dismukes <dismukes@adacore.com>
1036 * exp_util.adb: Minor reformatting.
1038 2017-01-13 Yannick Moy <moy@adacore.com>
1040 * exp_spark.adb: Code cleanup.
1041 * sem_ch9.adb (Analyze_Delay_Until): Resolve
1042 expression so that calls are identified as such inside delay
1045 2017-01-13 Ed Schonberg <schonberg@adacore.com>
1047 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
1048 * par-ch3.adb (P_Discrete_Choice_List): An
1049 Iterated_Component_Association is an array aggregate component.
1050 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
1051 (Is_Quantified_Expression): New function that performs a lookahead
1052 to distinguish quantified expressions from iterated component
1054 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
1056 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
1057 * sem.adb (Analyze): Handle Iterated_Component_Association.
1058 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
1059 component associations.
1060 * sinfo.ads, sinfo.adb: Entries for for
1061 N_Iterated_Component_Association and its fields.
1062 * sprint.adb (Sprint_Node_Actual): Handle
1063 N_Iterated_Component_Association.
1065 2017-01-13 Justin Squirek <squirek@adacore.com>
1067 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
1068 of the style check until after preanalysis of acutals.
1070 2017-01-13 Yannick Moy <moy@adacore.com>
1072 * sem_ch13.adb: Minor reformatting.
1073 * par-ch11.adb: minor style fix in whitespace
1074 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
1075 reduced to Add_Artificial_ALI_File; style fix in declaration of
1076 Text; grammar fix in comment.
1077 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
1078 * freeze.adb: Cleanup to pass pragma instead of
1080 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
1081 replace System'To_Address by equivalent call.
1083 2017-01-13 Arnaud Charlet <charlet@adacore.com>
1085 * bindusg.adb: Improve usage output for -f switch.
1087 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
1089 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
1092 2017-01-13 Ed Schonberg <schonberg@adacore.com>
1094 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
1095 treat comparisons on strings as legal in a Static_Predicate.
1096 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
1097 a function call that is the expansion of a string comparison.The
1098 function call is built when compiling the corresponding predicate
1099 function, but the expression has been found legal as a static
1100 predicate during earlier analysis.
1101 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
1102 properly a function call that is the expansion of a string
1103 comparison operation, in order to recover the Static_Predicate
1104 expression and apply it to a static argument when needed.
1106 2017-01-13 Tristan Gingold <gingold@adacore.com>
1108 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
1109 (Open_Read): Re-implement using Open_Read_No_Exception.
1110 (Open_Write): Raise exception in case of error.
1111 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
1112 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
1114 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
1116 2017-01-13 Yannick Moy <moy@adacore.com>
1118 * checks.adb: Code cleanup.
1120 2017-01-13 Yannick Moy <moy@adacore.com>
1122 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
1123 expression instead of unanalyzed aspect expression for checking
1124 the validity of inheriting an operation. Also copy the expression
1125 being passing it to Build_Class_Wide_Expression, as this call
1126 modifies its argument.
1127 * sem_util.ads Fix comment to reference correct function name
1130 2017-01-13 Javier Miranda <miranda@adacore.com>
1132 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
1133 when we propagate information about the indexes back to the original
1134 indexing mode and the prefix of the index is a function call, do not
1135 remove any parameter from such call.
1137 2017-01-13 Gary Dismukes <dismukes@adacore.com>
1139 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
1140 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
1141 a build-in-place function whose result type is tagged.
1143 2017-01-13 Yannick Moy <moy@adacore.com>
1145 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1146 Do not generate a wrapper when the only candidate is a class-wide
1148 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
1149 inside a generic context.
1151 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
1153 * exp_util.adb (Add_Inherited_Tagged_DIC):
1154 Pass the object parameters of both the parent and the derived
1155 type DIC procedure to the reference replacement circuitry.
1156 (Find_DIC_Type): Modify the circuitry to present the partial
1157 view of a private type in case the private type defines its own
1159 (Replace_Object_And_Primitive_References): Add two
1160 optional formal parameters. Update the comment on usage. Update
1161 the replacement of references to object parameters.
1163 2017-01-13 Gary Dismukes <dismukes@adacore.com>
1165 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
1167 2017-01-13 Ed Schonberg <schonberg@adacore.com>
1169 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
1170 an out parameter that is a type conversion, independently of th
1171 range check that may apply to the expression of the conversion,
1172 for use in GNATProve.
1174 2017-01-13 Yannick Moy <moy@adacore.com>
1176 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
1177 GNATprove_Mode here to Frontend.
1178 * frontend.adb (Frontend): Move the implicit with for System
1179 in GNATprove_Mode here as it ismore correct this way; the old
1180 place only worked by chance, since there were no overloaded names.
1181 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
1182 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
1183 four attributes identified in SRM 9(18), add an implicit with
1184 to Ada.Task_Identification.
1185 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
1186 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
1188 * checks.adb (Apply_Discriminant_Check,
1189 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
1190 In GNATprove mode, we do not apply the checks, but we still
1191 analyze the expression to possibly issue errors on SPARK
1192 code when a run-time error can be detected at compile time.
1193 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
1196 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
1198 * expander.adb (Expand): Add a warning about using return
1199 statements in Ghost management code.
1200 * exp_ch3.adb (Freeze_Type): Add a warning about using return
1201 statements in Ghost management code.
1202 * exp_ch7.adb (Build_Invariant_Procedure_Body,
1203 Build_Invariant_Procedure_Declaration): Add a warning about
1204 using return statements in Ghost management code.
1205 * exp_disp.adb (Make_DT): Add a warning about using return
1206 statements in Ghost management code.
1207 * exp_util.adb (Build_DIC_Procedure_Body,
1208 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
1209 warning about using return statements in Ghost management code.
1210 * freeze.adb (Freeze_Entity): Add a warning about using return
1211 statements in Ghost management code.
1212 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
1213 statements in Ghost management code.
1214 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
1215 a warning about using return statements in Ghost management code.
1216 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
1217 return statements in Ghost management code.
1218 * sem_ch6.adb (Analyze_Procedure_Call,
1219 Analyze_Subprogram_Body_Helper): Add a warning about using return
1220 statements in Ghost management code.
1221 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
1222 using return statements in Ghost management code.
1223 * sem_ch12.adb (Analyze_Package_Instantiation,
1224 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
1225 Instantiate_Subprogram_Body): Add a warning about using return
1226 statements in Ghost management code.
1227 * sem_ch13.adb (Build_Predicate_Functions,
1228 Build_Predicate_Function_Declarations): Add a warning about
1229 using return statements in Ghost management code.
1230 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
1231 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
1232 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
1233 using return statements in Ghost management code.
1235 2017-01-13 Tristan Gingold <gingold@adacore.com>
1237 * s-mmosin-mingw.adb: Fix pragma import.
1239 2017-01-13 Arnaud Charlet <charlet@adacore.com>
1241 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
1244 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
1246 * atree.adb (Allocate_Initialize_Node): A newly created node is
1247 no longer marked as Ghost at this level.
1248 (Mark_New_Ghost_Node): New routine.
1249 (New_Copy): Mark the copy as Ghost.
1250 (New_Entity): Mark the entity as Ghost.
1251 (New_Node): Mark the node as Ghost.
1252 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
1253 apply to unanalyzed entities.
1254 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
1256 (Set_Is_Checked_Ghost_Entity): This attribute now
1257 applies to all entities as well as unanalyzed entities.
1258 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
1259 all entities as well as unanalyzed entities.
1260 * expander.adb Add with and use clauses for Ghost.
1261 (Expand): Install and revert the Ghost region associated with the node
1263 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
1264 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
1265 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
1266 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
1267 (Freeze_Type): Install and revert the Ghost region associated
1268 with the type being frozen.
1269 * exp_ch5.adb Remove with and use clauses for Ghost.
1270 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
1271 * exp_ch6.adb Remove with and use clauses for Ghost.
1272 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
1273 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
1274 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
1275 Ghost region of the working type.
1276 (Build_Invariant_Procedure_Declaration): Install and revert
1277 the Ghost region of the working type.
1278 (Expand_N_Package_Body): Remove all Ghost-related code.
1279 * exp_ch8.adb Remove with and use clauses for Ghost.
1280 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
1282 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
1283 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
1284 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
1286 * exp_ch13.adb Remove with and use clauses for Ghost.
1287 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
1288 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
1289 the tagged type. Move the generation of various entities within
1290 the Ghost region of the type.
1291 * exp_prag.adb Remove with and use clauses for Ghost.
1292 (Expand_Pragma_Check): Remove all Ghost-related code.
1293 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
1294 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
1295 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
1296 * exp_util.adb (Build_DIC_Procedure_Body): Install
1297 and revert the Ghost region of the working types.
1298 (Build_DIC_Procedure_Declaration): Install and revert the
1299 Ghost region of the working type.
1300 (Make_Invariant_Call): Install and revert the Ghost region of the
1302 (Make_Predicate_Call): Reimplemented. Install and revert the
1303 Ghost region of the associated type.
1304 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
1305 of the entity being frozen.
1306 (New_Freeze_Node): Removed.
1307 * ghost.adb Remove with and use clauses for Opt.
1308 (Check_Ghost_Completion): Update the parameter profile
1309 and all references to formal parameters.
1310 (Ghost_Entity): Update the comment on usage.
1311 (Install_Ghost_Mode): New routines.
1312 (Is_Ghost_Assignment): New routine.
1313 (Is_Ghost_Declaration): New routine.
1314 (Is_Ghost_Pragma): New routine.
1315 (Is_Ghost_Procedure_Call): New routine.
1316 (Is_Ghost_Renaming): Removed.
1317 (Is_OK_Declaration): Reimplemented.
1318 (Is_OK_Pragma): Reimplemented.
1319 (Is_OK_Statement): Reimplemented.
1320 (Is_Subject_To_Ghost): Update the comment on usage.
1321 (Mark_And_Set_Ghost_Assignment): New routine.
1322 (Mark_And_Set_Ghost_Body): New routine.
1323 (Mark_And_Set_Ghost_Completion): New routine.
1324 (Mark_And_Set_Ghost_Declaration): New routine.
1325 (Mark_And_Set_Ghost_Instantiation): New routine.
1326 (Mark_And_Set_Ghost_Procedure_Call): New routine.
1327 (Mark_Full_View_As_Ghost): Removed.
1328 (Mark_Ghost_Declaration_Or_Body): New routine.
1329 (Mark_Ghost_Pragma): New routine.
1330 (Mark_Ghost_Renaming): New routine.
1331 (Mark_Pragma_As_Ghost): Removed.
1332 (Mark_Renaming_As_Ghost): Removed.
1333 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
1334 (Prune_Node): Freeze nodes no longer need special pruning, they
1335 are processed by the general ignored Ghost code mechanism.
1336 (Restore_Ghost_Mode): New routine.
1337 (Set_Ghost_Mode): Reimplemented.
1338 (Set_Ghost_Mode_From_Entity): Removed.
1339 * ghost.ads Add with and use clauses for Ghost.
1340 (Check_Ghost_Completion): Update the parameter profile
1341 along with the comment on usage.
1342 (Install_Ghost_Mode): New routine.
1343 (Is_Ghost_Assignment): New routine.
1344 (Is_Ghost_Declaration): New routine.
1345 (Is_Ghost_Pragma): New routine.
1346 (Is_Ghost_Procedure_Call): New routine.
1347 (Mark_And_Set_Ghost_Assignment): New routine.
1348 (Mark_And_Set_Ghost_Body): New routine.
1349 (Mark_And_Set_Ghost_Completion): New routine.
1350 (Mark_And_Set_Ghost_Declaration): New routine.
1351 (Mark_And_Set_Ghost_Instantiation): New routine.
1352 (Mark_And_Set_Ghost_Procedure_Call): New routine.
1353 (Mark_Full_View_As_Ghost): Removed.
1354 (Mark_Ghost_Pragma): New routine.
1355 (Mark_Ghost_Renaming): New routine.
1356 (Mark_Pragma_As_Ghost): Removed.
1357 (Mark_Renaming_As_Ghost): Removed.
1358 (Restore_Ghost_Mode): New routine.
1359 (Set_Ghost_Mode): Redefined.
1360 (Set_Ghost_Mode_From_Entity): Removed.
1361 * sem.adb (Analyze): Install and revert the Ghost region of the
1362 node being analyzed.
1363 (Do_Analyze): Change the way a clean Ghost
1364 region is installed and reverted.
1365 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
1366 all Ghost-related code.
1367 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
1368 (Analyze_Number_Declaration): Remove all Ghost-related code.
1369 (Analyze_Object_Declaration): Install and revert the Ghost region of
1370 a deferred object declaration's completion.
1371 (Array_Type_Declaration): Remove all Ghost-related code.
1372 (Build_Derived_Type): Update the comment on
1373 the propagation of Ghost attributes from a parent to a derived type.
1374 (Derive_Subprogram): Remove all Ghost-related code.
1375 (Make_Class_Wide_Type): Remove all Ghost-related code.
1376 (Make_Implicit_Base): Remove all Ghost-related code.
1377 (Process_Full_View): Install and revert the Ghost region of
1378 the partial view. There is no longer need to check the Ghost
1380 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
1381 region of the left hand side.
1382 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
1383 all Ghost-related code.
1384 (Analyze_Expression_Function): Remove all Ghost-related code.
1385 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
1386 (Analyze_Procedure_Call): Install and revert the Ghost region of
1387 the procedure being called.
1388 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
1389 region of the spec or body.
1390 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
1391 (Build_Subprogram_Declaration): Remove all Ghost-related code.
1392 (Find_Corresponding_Spec): Remove all Ghost-related code.
1393 (Process_Formals): Remove all Ghost-related code.
1394 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
1395 the Ghost region of the spec.
1396 (Analyze_Package_Declaration): Remove all Ghost-related code.
1397 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
1398 Ghost when it aliases a Ghost entity.
1399 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
1401 (Analyze_Object_Renaming): Mark a renaming as Ghost when
1402 it aliases a Ghost entity.
1403 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
1405 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
1406 aliases a Ghost entity.
1407 * sem_ch11.adb Remove with and use clauses for Ghost.
1408 (Analyze_Exception_Declaration): Remove all Ghost-related code.
1409 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
1411 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
1413 (Analyze_Package_Instantiation): Install and revert the Ghost region
1414 of the package instantiation.
1415 (Analyze_Subprogram_Instantiation): Install
1416 and revert the Ghost region of the subprogram instantiation.
1417 (Instantiate_Package_Body): Code clean up. Install and revert the
1418 Ghost region of the package body.
1419 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
1420 Ghost region of the subprogram body.
1421 * sem_ch13.adb (Build_Predicate_Functions): Install
1422 and revert the Ghost region of the related type.
1423 (Build_Predicate_Function_Declaration): Code clean up. Install
1424 and rever the Ghost region of the related type.
1425 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
1426 Install and revert the Ghost region of the pragma.
1427 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
1428 Ghost region of the pragma.
1429 (Analyze_Pragma): Install and revert the Ghost region of various
1430 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
1431 or encloses a Ghost entity.
1432 (Analyze_Pre_Post_Condition): Install and revert the Ghost
1433 region of the pragma.
1434 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
1435 Ghost region of the pragma.
1436 * sem_res.adb (Resolve): Remove all Ghost-related code.
1437 * sem_util.adb (Is_Declaration): Reimplemented.
1438 (Is_Declaration_Other_Than_Renaming): New routine.
1439 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
1440 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
1441 (Is_Ghost_Pragma): Removed.
1442 (Is_Ignored_Ghost_Pragma): New routine.
1443 (Set_Is_Checked_Ghost_Pragma): New routine.
1444 (Set_Is_Ghost_Pragma): Removed.
1445 (Set_Is_Ignored_Ghost_Pragma): New routine.
1446 * sinfo.ads: Update the documentation on Ghost mode and
1447 Ghost regions. New attributes Is_Checked_Ghost_Pragma
1448 and Is_Ignored_Ghost_Pragma along with usages in nodes.
1449 Remove attribute Is_Ghost_Pragma along with usages in nodes.
1450 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1451 (Is_Ghost_Pragma): Removed along with pragma Inline.
1452 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1453 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
1454 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
1455 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
1457 2017-01-12 Tristan Gingold <gingold@adacore.com>
1459 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
1460 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
1462 2017-01-12 Yannick Moy <moy@adacore.com>
1464 * errout.adb, errout.ads (Initialize): Factor common treatment
1466 (Reset_Warnings): New procedure to reset counts related to warnings.
1467 (Record_Compilation_Errors): New variable to store the presence of an
1468 error, used in gnat2why to allow changing the Warning_Mode.
1469 (Compilation_Errors): Use new variable Record_Compilation_Errors to
1470 store the presence of an error.
1472 2017-01-12 Javier Miranda <miranda@adacore.com>
1474 * sem_ch13.adb (Analyze_Aspect_Specifications):
1475 For Interrupt_Handler and Attach_ Handler aspects, decorate the
1476 internally built reference to the protected procedure as coming
1477 from sources and force its analysis.
1479 2017-01-12 Ed Schonberg <schonberg@adacore.com>
1481 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
1482 inherit predicates if any from the first_subtype of the parent,
1483 not from the anonymous parent type.
1484 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
1485 predicate is not a static subtype.
1487 2017-01-12 Gary Dismukes <dismukes@adacore.com>
1489 * freeze.adb (Check_Suspicious_Convention): New procedure
1490 performing a warning check on discriminated record types with
1491 convention C or C++. Factored out of procedure Freeze_Record_Type,
1492 and changed to only apply to base types (to avoid spurious
1493 warnings on subtypes). Minor improvement of warning messages
1494 to refer to discriminated rather than variant record types.
1495 (Freeze_Record_Type): Remove code for performing a suspicious
1497 (Freeze_Entity): Only call Freeze_Record_Type
1498 on types that aren't declared within any enclosing generic units
1499 (rather than just excluding the type when the innermost scope
1500 is generic). Call Check_Suspicious_Convention whether or not
1501 the type is declared within a generic unit.
1502 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
1503 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
1506 2017-01-12 Tristan Gingold <gingold@adacore.com>
1508 * sysdep.c, adaint.c, rtinit.c, ming32.h:
1509 (__gnat_current_codepage): Renamed from CurrentCodePage
1510 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
1512 2017-01-12 Ed Schonberg <schonberg@adacore.com>
1514 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
1515 quantified expressions, following AI12-050: the loop parameters
1516 of two quantified expressions are conformant if they have the
1519 2017-01-12 Arnaud Charlet <charlet@adacore.com>
1521 * gcc-interface/Makefile.in: Clean up VxWorks targets.
1523 2017-01-12 Ed Schonberg <schonberg@adacore.com>
1525 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
1526 Hnadle properly the attribute reference when it appears as part
1527 of an expression in another loop aspect.
1529 2017-01-12 Ed Schonberg <schonberg@adacore.com>
1531 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
1532 subsidiary of Build_Initialization_Call, to complete generation
1533 of predicate checks on discriminants whose (sub)types have
1534 predicates, and to add checks on variants that do not have an
1536 * sem_util.adb (Gather_Components): A missing Others alternative is
1537 not an error when the type of the discriminant is a static predicate
1538 (and coverage has been checked when analyzing the case statement). A
1539 runtime check is generated to verify that a given discriminant
1540 satisfies the predicate (RM 3.8.1. (21.1/2)).
1542 2017-01-12 Yannick Moy <moy@adacore.com>
1544 * gnat1drv.adb (Adjust_Global_Switches): Only
1545 perform checking of exception mechanism when generating code.
1547 2017-01-12 Justin Squirek <squirek@adacore.com>
1549 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
1550 Remove handling of access component with invariant.
1551 (Build_Invariant_Procedure_Declaration): Remove return on class
1553 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
1554 conditional exception for component or array so Has_Own_Invariants
1555 flag is not falsly set.
1556 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
1557 wide type to have no invariant flags.
1559 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1561 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
1562 sem_ch13.adb: Minor reformatting.
1564 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1566 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
1567 adjustment primitive when the ancestor type was not properly frozen.
1568 (Gen_Assign): Guard against a missing initialization
1569 primitive when the component type was not properly frozen.
1570 (Initialize_Array_Component): Guard against a missing adjustment
1571 primitive when the component type was not properly frozen.
1572 (Initialize_Record_Component): Guard against a missing adjustment
1573 primitive when the component type was not properly frozen.
1574 (Process_Transient_Component_Completion): The transient object may
1575 not be finalized when its associated type was not properly frozen.
1576 * exp_ch3.adb (Build_Assignment): Guard against a missing
1577 adjustment primitive when the component type was not properly frozen.
1578 (Build_Initialization_Call): Guard against a missing
1579 initialization primitive when the associated type was not properly
1581 (Expand_N_Object_Declaration): Guard against a missing
1582 adjustment primitive when the base type was not properly frozen.
1583 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
1584 body when there is no adjustment primitive available. Create an
1585 empty Deep_Finalize body when there is no finalization primitive
1587 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
1588 missing finalization primitive when the designated type was
1589 not properly frozen.
1590 (Expand_N_Allocator): Guard against a missing initialization primitive
1591 when the designated type was not properly frozen.
1592 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
1593 only when the corresponding adjustment primitive is available.
1594 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
1595 adjustment/finalization statements only when there is an available
1596 primitive to carry out the action.
1597 (Build_Initialize_Statements): Generate the initialization/finalization
1598 statements only when there is an available primitive to carry out the
1600 (Make_Adjust_Call): Do not generate a call when the underlying
1601 type is not present due to a possible missing full view.
1602 (Make_Final_Call): Do not generate a call when the underlying
1603 type is not present due to a possible missing full view.
1604 (Make_Finalize_Address_Stmts): Generate an empty body when the
1605 designated type lacks a finalization primitive.
1606 (Make_Init_Call): Do not generate a call when the underlying type is
1607 not present due to a possible missing full view.
1608 (Process_Component_For_Adjust): Add the adjustment call only when the
1609 corresponding adjustment primitive is available.
1610 (Process_Component_For_Finalize): Add the finalization call only when
1611 the corresponding finalization primitive is available.
1612 (Process_Object_Declaration): Use a null statement to emulate a
1613 missing call to the finalization primitive of the object type.
1614 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
1615 (Make_Final_Call): Update the comment on usage.
1616 (Make_Init_Call): Update the comment on usage.
1617 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
1619 2017-01-12 Arnaud Charlet <charlet@adacore.com>
1621 * einfo.ads: Update documentation of Address_Taken.
1622 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
1623 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
1624 for subprograms when setting Address_Taken flag.
1626 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
1628 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
1629 Configurable_Run_Time_Mode off when analysing with'ed predefined
1632 2017-01-12 Gary Dismukes <dismukes@adacore.com>
1634 * sem_prag.adb: Minor reformatting.
1635 * sem_util.adb (Unique_Entity): fix result for
1636 bodies of entry families.
1638 2017-01-12 Justin Squirek <squirek@adacore.com>
1640 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
1641 Resolve_Suppressible in the pragma Assertion_Policy case.
1642 (Resolve_Suppressible): Created this function to factor out
1643 common code used to resolve Suppress to either Ignore or Check
1644 * snames.ads-tmpl: Add name for Suppressible.
1646 2017-01-12 Gary Dismukes <dismukes@adacore.com>
1648 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
1650 * debug.adb: Minor comment fixes.
1652 2017-01-12 Arnaud Charlet <charlet@adacore.com>
1654 * sem_util.adb (Unique_Entity): For concurrent
1655 bodies that are defined with stubs and complete a declaration
1656 of a single concurrent object return the entity of an implicit
1657 concurrent type, not the entity of the anonymous concurrent
1659 * debug.adb: -gnatd.J is no longer used.
1660 * make.adb (Globalize): Removed, no longer used.
1661 * sem_ch9.adb: minor typo in comment for entry index
1663 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
1665 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1666 * exp_ch3.adb (Build_Init_Statements): As part of initialising
1667 the value record of a task, set its _Secondary_Stack_Size field
1669 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1670 a _Secondary_Stack_Size field in the value record of
1671 the task if a Secondary_Stack_Size rep item is present.
1672 (Make_Task_Create_Call): Include secondary stack size
1673 parameter. If No_Secondary_Stack restriction is in place, passes
1675 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1676 Secondary_Stack_Size.
1677 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1678 function to define the overhead of the secondary stack.
1679 * s-tarest.adb (Create_Restricted_Task,
1680 Create_Restricted_Task_Sequential): Functions now include
1681 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1682 * s-tarest.adb (Create_Restricted_Task,
1683 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
1684 include Secondary_Stack_Size parameter.
1685 (Task_Wrapper): Secondary stack now allocated to the size specified by
1686 the Secondary_Stack_Size parameter in the task's ATCB.
1687 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
1688 Secondary_Stack_Size component.
1689 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1690 Create_Restricted_Task_Sequential): Function now include
1691 Secondary_Stack_Size parameter.
1692 (Task_Wrapper): Secondary stack now allocated to the size
1693 specified by the Secondary_Stack_Size parameter in the task's
1695 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
1696 to include Secondary_Stack_Size parameter.
1697 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
1698 Secondary_Stack_Size aspect, turning the aspect into its corresponding
1700 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
1701 * snames.adb-tmpl, snames.ads-tmpl: Added names
1702 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1703 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1705 2017-01-12 Yannick Moy <moy@adacore.com>
1707 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
1710 2017-01-12 Justin Squirek <squirek@adacore.com>
1712 * exp_attr.adb (Expand_N_Attribute_Reference):
1713 Fix Finalization_Size case by properly resolving the type after
1714 rewritting the node.
1716 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1718 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
1720 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
1721 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
1722 exp_sel.ads: Minor reformatting.
1724 2017-01-12 Justin Squirek <squirek@adacore.com>
1726 * exp_ch6.adb (Expand_Call): Add guard to prevent
1727 invariant checks from being created for internally generated
1730 2017-01-12 Bob Duff <duff@adacore.com>
1732 * lib-writ.ads: Remove incorrect comment.
1734 2017-01-12 Javier Miranda <miranda@adacore.com>
1736 * debug.adb (-gnatd.K): Enable generation of contract-only
1737 procedures in CodePeer mode.
1738 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
1740 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
1742 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
1744 (Get_Contract_Only_Missing_Body_Name): New subprogram.
1745 (Get_Contract_Only_Body): New subprogram.
1746 (Set_Contract_Only_Body): New subprogram.
1747 (Is_Contract_Only_Body): New subprogram.
1748 (Set_Is_Contract_Only_Body): New subprogram.
1749 (SCIL_Nodes): Replace table by hash-table.
1751 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1753 * exp_ch6.adb: Minor reformatting.
1754 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
1756 2017-01-12 Bob Duff <duff@adacore.com>
1758 * binde.adb (Forced): New reason for a dependence.
1759 (Force_Elab_Order): Implementation of the new switch.
1760 * binde.ads: Minor comment fixes.
1761 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
1762 long ago that is no longer supported; removed comment about that.
1763 * opt.ads (Force_Elab_Order_File): Name of file specified for
1765 * switch-b.adb: Parse -f switch.
1767 2017-01-12 Justin Squirek <squirek@adacore.com>
1769 * exp_ch6.adb (Check_View_Conversion): Created this function
1770 to properly chain calls to check type invariants that may be
1771 present in a subprogram call after the subprogram.
1772 (Expand_Call): Add a conditional to identify when a view conversion
1773 needs to be checked.
1774 * nlists.adb, nlists.ads (Prepend_New): New routine.
1775 (Prepend_New_To): New routine.
1777 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1779 * sinfo.ads: Minor reformatting.
1781 2017-01-12 Gary Dismukes <dismukes@adacore.com>
1783 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
1786 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
1788 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
1789 variable Definite. Create a local object and pass its 'Access to the
1790 BIP function when the result type is either definite or it does not
1791 require any finalization or secondary stack management.
1793 2017-01-12 Bob Duff <duff@adacore.com>
1795 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
1796 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
1797 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
1798 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
1799 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
1800 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1801 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1802 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
1803 Change name to Pragma_Name_Unmapped.
1804 (Pragma_Name_Mapped): Change name to Pragma_Name.
1805 This is because the "mapped" version should be the usual case.
1807 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
1809 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
1810 Is_Default_Init_Cond_Procedure, and
1811 Has_Inherited_Default_Init_Cond. Add uses of flags
1812 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
1813 (Default_Init_Cond_Procedure): Removed.
1814 (DIC_Procedure): New routine.
1815 (Has_Default_Init_Cond): Removed.
1816 (Has_DIC): New routine.
1817 (Has_Inheritable_Invariants): The attribute applies to the base type.
1818 (Has_Inherited_Default_Init_Cond): Removed.
1819 (Has_Inherited_DIC): New routine.
1820 (Has_Inherited_Invariants): The attribute applies to the base type.
1821 (Has_Own_DIC): New routine.
1822 (Has_Own_Invariants): The attribute applies to the base type.
1823 (Is_Default_Init_Cond_Procedure): Removed.
1824 (Is_DIC_Procedure): New routine.
1825 (Set_Default_Init_Cond_Procedure): Removed.
1826 (Set_DIC_Procedure): New routine.
1827 (Set_Has_Default_Init_Cond): Removed.
1828 (Set_Has_Inheritable_Invariants): The attribute applies
1830 (Set_Has_Inherited_Default_Init_Cond): Removed.
1831 (Set_Has_Inherited_DIC): New routine.
1832 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
1833 (Set_Has_Own_DIC): New routine.
1834 (Set_Has_Own_Invariants): The attribute applies to the base type.
1835 (Set_Is_Default_Init_Cond_Procedure): Removed.
1836 (Set_Is_DIC_Procedure): New routine.
1837 (Write_Entity_Flags): Update the output of all flags related to
1838 default initial condition.
1839 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
1840 of the call to the DIC procedure.
1841 (Freeze_Type): Generate the body of the DIC procedure.
1842 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
1843 all occurrences of Create_Append with Append_New_To. Do
1844 not generate an invariant procedure for a class-wide type.
1845 The generated body acts as a freeze action of the working type.
1846 (Build_Invariant_Procedure_Declaration): Do not generate an
1847 invariant procedure for a class-wide type.
1848 (Create_Append): Removed.
1849 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
1850 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
1851 class-wide pre/postcondition description and data structures from
1853 (Build_Class_Wide_Expression): Moved from Sem_Prag.
1854 (Build_DIC_Call): New routine.
1855 (Build_DIC_Procedure_Body): New routine.
1856 (Build_DIC_Procedure_Declaration): New routine.
1857 (Entity_Hash): Moved from Sem_Prag.
1858 (Find_DIC_Type): New routine.
1859 (Update_Primitives_Mapping): Reimplemented.
1860 (Update_Primitives_Mapping_Of_Types): New routine.
1861 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
1862 (Build_DIC_Call): New routine.
1863 (Build_DIC_Procedure_Body): New routine.
1864 (Build_DIC_Procedure_Declaration): New routine.
1865 (Update_Primitives_Mapping): Moved from Sem_Prag.
1866 (Update_Primitives_Mapping_Of_Types): New routine.
1867 * nlists.adb (Append_New): New routine.
1868 (Append_New_To): New routine.
1869 * nlists.ads (Append_New): New routine.
1870 (Append_New_To): New routine.
1871 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
1872 of DIC procedures here. This is now done at the end of the
1873 visible declarations, private declarations, and at the freeze
1875 (Analyze_Private_Extension_Declaration):
1876 A private extension inherits the DIC pragma of a parent type.
1877 (Analyze_Subtype_Declaration): No need to propagate invariant
1878 attributes to a subtype as those apply to the base type.
1879 (Build_Derived_Record_Type): No need to inherit invariants here
1880 as this is now done in Build_Derived_Type.
1881 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
1883 (Process_Full_View): Update the propagation of DIC attributes.
1884 (Propagate_Default_Init_Cond_Attributes): Removed.
1885 * sem_ch7.adb Add with and use clauses for Exp_Util.
1886 (Analyze_Package_Specification): Create the body of the DIC
1887 procedure at the end of the visible and private declarations.
1888 (Preserve_Full_Attributes): Propagate DIC attributes.
1889 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
1891 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
1892 * sem_elab.adb (Check_A_Call): Update the call to
1893 Is_Nontrivial_Default_Init_Cond_Procedure.
1894 * sem_prag.adb Remove the with and use clauses for
1895 GNAT.HTable. Move the handling of class- wide pre/postcondition
1896 description and data structures to Exp_Util.
1897 (Analyze_Pragma): Create the declaration of the DIC procedure. There
1898 is no need to propagate invariant-related attributes at this point
1899 as this is done in Build_Invariant_Procedure_Declaration.
1900 (Build_Class_Wide_Expression): Moved to Exp_Util.
1901 (Entity_Hash): Moved to Exp_Util.
1902 (Update_Primitives_Mapping): Moved to Exp_Util.
1903 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
1904 (Update_Primitives_Mapping): Moved to Exp_Util.
1905 * sem_util.adb: Remove with and use clauses for Ghost
1907 (Build_Default_Init_Cond_Call): Removed.
1908 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1909 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1910 (Get_Views): Reimplemented.
1911 (Has_Full_Default_Initialization): Reimplement the section on DIC.
1912 (Inherit_Default_Init_Cond_Procedure): Removed.
1913 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1914 (Is_Nontrivial_DIC_Procedure): New routine.
1915 (Is_Verifiable_DIC_Pragma): New routine.
1916 (Propagate_DIC_Attributes): New routine.
1917 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
1918 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1919 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1920 (Inherit_Default_Init_Cond_Procedure): Removed.
1921 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1922 (Is_Nontrivial_DIC_Procedure): New routine.
1923 (Is_Verifiable_DIC_Pragma): New routine.
1924 (Propagate_DIC_Attributes): New routine.
1925 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
1927 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
1929 (Expression_Copy): New routine along with pragma Inline.
1930 (Set_Expression_Copy): New routine along with pragma Inline.
1932 2017-01-06 Bob Duff <duff@adacore.com>
1934 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
1935 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
1936 we won't generate the call to s_stalib_adafinal when the main
1937 is not written in Ada.
1939 2017-01-06 Bob Duff <duff@adacore.com>
1941 * sem_prag.adb: Minor: remove pragma Warnings.
1943 2017-01-06 Tristan Gingold <gingold@adacore.com>
1945 * Makefile.rtl: Do not compile s-stchop by default.
1947 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1949 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
1950 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
1951 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
1952 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
1953 Reverted previous change for now.
1955 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1957 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
1958 check to default discriminant value if checks are enabled.
1959 (Build_Assignment): If type of component has static predicate,
1960 apply check to its default value, if any.
1962 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1964 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1965 * exp_ch3.adb (Build_Init_Statements): As part of initialising
1966 the value record of a task, set its _Secondary_Stack_Size field
1968 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1969 a _Secondary_Stack_Size field in the value record of
1970 the task if a Secondary_Stack_Size rep item is present.
1971 (Make_Task_Create_Call): Include secondary stack size
1972 parameter. If No_Secondary_Stack restriction is in place, passes
1974 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1975 Secondary_Stack_Size.
1976 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1977 function to define the overhead of the secondary stack.
1978 * s-tarest.adb (Create_Restricted_Task,
1979 Create_Restricted_Task_Sequential): Functions now include
1980 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1981 * s-tarest.adb (Create_Restricted_Task,
1982 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
1983 now include Secondary_Stack_Size parameter.
1985 Secondary stack now allocated to the size specified by the
1986 Secondary_Stack_Size parameter in the task's ATCB.
1987 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
1988 Secondary_Stack_Size component.
1989 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1990 Create_Restricted_Task_Sequential): Function now include
1991 Secondary_Stack_Size parameter.
1992 (Task_Wrapper): Secondary stack
1993 now allocated to the size specified by the Secondary_Stack_Size
1994 parameter in the task's ATCB.
1995 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
1996 for Secondary_Stack_Size aspect, turning the aspect into its
1997 corresponding internal attribute.
1998 (Analyze_Attribute_Definition):
1999 Process Secondary_Stack_Size attribute.
2000 * snames.adb-tmpl, snames.ads-tmpl: Added names
2001 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
2002 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
2004 2017-01-06 Pascal Obry <obry@adacore.com>
2006 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
2007 Sequential_IO and Direct_IO.
2009 2017-01-06 Bob Duff <duff@adacore.com>
2011 * snames.ads-tmpl (Renamed): New name for the pragma argument.
2012 * par-ch2.adb: Allow the new pragma (with analysis deferred
2014 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
2015 Keep a mapping from new pragma names to old names.
2016 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
2017 implement it by calling Map_Pragma_Name.
2018 * checks.adb, contracts.adb, einfo.adb, errout.adb,
2019 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
2020 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
2021 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
2022 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
2023 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2024 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
2027 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2029 * exp_ch9.adb: Minor reformatting.
2031 2017-01-06 Tristan Gingold <gingold@adacore.com>
2033 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
2034 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
2035 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
2037 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
2038 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
2039 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
2040 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
2042 2017-01-06 Bob Duff <duff@adacore.com>
2044 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
2045 dummy implementation of Map_Pragma_Name.
2047 2017-01-06 Tristan Gingold <gingold@adacore.com>
2049 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
2050 entry_body variable constant.
2051 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
2052 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
2054 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
2055 now access to constant.
2057 2017-01-06 Gary Dismukes <dismukes@adacore.com>
2059 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
2060 reformatting and typo fixes.
2062 2017-01-06 Bob Duff <duff@adacore.com>
2064 * snames.ads-tmpl: New names for pragma renaming.
2065 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
2066 * par-prag.adb: Add new pragma name to case statement.
2067 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
2069 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
2070 Dummy implementation of Pragma_Name_Mapped.
2072 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2074 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
2075 better detect call within an entry_wrapper.
2076 * sem_res.adb (Resolve_Call): A protected call within an
2077 entity_wrapper is analyzed in the context of the protected
2078 object but corresponds to a pre-analysis and is not an access
2080 * sem_attr.adb: Minor reformatting.
2082 2017-01-06 Justin Squirek <squirek@adacore.com>
2084 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
2085 Finalization_Size to allow a prefix of any non-class-wide type.
2086 * sem_attr.ads Modify comment for Finalization_Size to include
2087 definite type use case.
2089 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2091 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
2092 on procedures that are wrappers created for entries that have
2094 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
2095 body is an entry_wrapper, compile it in the context of the
2096 synchronized type, because a precondition may refer to funtions
2098 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
2100 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
2101 within an Entry_Wrapper this is an external call whose target
2102 is the synchronized object that is the actual in the call to
2105 2017-01-06 Yannick Moy <moy@adacore.com>
2107 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
2108 in tree, which means not analyzing the previous prefix if the node has
2109 been rewritten into its prefix.
2111 2017-01-06 Gary Dismukes <dismukes@adacore.com>
2113 * s-tpobop.adb: Minor reformatting.
2115 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2117 * checks.adb (Ensure_Valid): Do not generate a validity check
2118 within a generated predicate function, validity checks will have
2119 been applied earlier when required.
2121 2017-01-06 Tristan Gingold <gingold@adacore.com>
2123 * s-tpoben.ads (Protection_Entries): Add comment and reorder
2124 components for performances.
2125 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
2128 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2130 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
2131 If expression is compile-time known and obeys a static predicate
2132 it must be labelled as static, to prevent spurious warnings and
2133 run-time errors, e.g. in case statements. This is relevant when
2134 the expression is the result of constant-folding a type conversion
2135 whose expression is a variable with a known static value.
2137 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2139 * exp_attr.adb, sem_attr.ads: Minor reformatting.
2141 2017-01-06 Justin Squirek <squirek@adacore.com>
2143 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
2144 expansion of Finalization_Size attribute.
2145 * sem_attr.adb (Analyze_Attribute): Add entry to check the
2146 semantics of Finalization_Size.
2147 (Eval_Attribute): Add null entry for Finalization_Size.
2148 * sem_attr.ads: Add Finalization_Size to the implementation
2149 dependent attribute list.
2150 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
2152 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2154 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
2155 iterator specification with a serious syntactic error, transform
2156 construct into an infinite loop in order to continue analysis
2157 and prevent a compiler abort.
2159 2017-01-06 Tristan Gingold <gingold@adacore.com>
2161 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
2162 max_queue_lengths_array if unused.
2164 2017-01-06 Bob Duff <duff@adacore.com>
2166 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
2167 array access, in case "\" is at the end of Text.
2168 * stylesw.adb (Set_Style_Check_Options): Don't include input
2169 characters in the error message template, because they could
2170 be control characters such as "\", which Errout will try to
2173 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2175 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
2176 For a private type examine the visible declarations that follow
2177 the partial view, not just the private declarations that follow
2180 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2182 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
2185 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2187 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
2188 alias of the inherited op is the parent iterator, no need to
2189 examine dispatch table positions which might not be established
2190 yet if type is not frozen.
2191 * sem_disp.adb (Check_Controlling_Formals): The formal of a
2192 predicate function may be a subtype of a tagged type.
2193 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
2194 of representation items for the completion of a type extension
2195 where a predicate applies to the partial view.
2196 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
2197 parameter that designates function whose actual receives a
2198 predicate check, to improve warning message when the check will
2199 lead to infinite recursion.
2200 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
2201 Apply_Predicate_Check.
2203 2017-01-06 Tristan Gingold <gingold@adacore.com>
2205 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
2206 Gnat_Extended_Ravenscar.
2207 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
2209 2017-01-06 Gary Dismukes <dismukes@adacore.com>
2211 * sem_util.ads: Minor typo fix and reformatting.
2213 2017-01-06 Yannick Moy <moy@adacore.com>
2215 * ghost.adb Minor fixing of references to SPARK RM.
2216 (Check_Ghost_Context): Check whether reference is to a lvalue
2217 before issuing an error about violation of SPARK RM 6.9(13)
2218 when declaration has Ghost policy Check and reference has Ghost
2220 * sem_util.adb Minor indentation.
2221 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
2222 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
2223 * sem_util.ads (Unique_Defining_Entity): Document the result
2224 for package body stubs.
2226 2017-01-06 Tristan Gingold <gingold@adacore.com>
2228 * raise-gcc.c (abort): Macro to call Abort_Propagation.
2229 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
2231 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2232 Do not generate the Entry_Max_Queue_Lengths_Array if all default
2234 * exp_util.adb (Corresponding_Runtime_Package): Consider
2235 Max_Queue_Length pragma.
2237 2017-01-06 Justin Squirek <squirek@adacore.com>
2239 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
2240 Remove declaration generation in the case of
2241 System_Tasking_Protected_Objects_Single_Entry being used,
2242 and add a warning message when this is detected to occur.
2243 (Make_Initialize_Protection): Remove reference pass in the case
2244 of System_Tasking_Protected_Objects_Single_Entry.
2245 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
2246 * s-tposen.adb (Initialize_Protection_Entry): Remove
2247 Entry_Queue_Max parameter.
2248 * s-tposen.ads: Remove the types use to store the entry queue
2250 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
2252 2017-01-06 Yannick Moy <moy@adacore.com>
2254 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
2255 behavior of function, to also accept out of range positions
2256 and raise Constraint_Error in such case, and to copy sloc from
2257 literal if No_Location passed as location.
2258 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
2259 of functions to raise Constraint_Error in case of value not in
2262 2017-01-06 Tristan Gingold <gingold@adacore.com>
2264 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
2265 Invalidate_Stack_Cache.
2267 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
2269 * s-os_lib.adb: Minor fix to the signature of Readlink.
2271 2017-01-06 Javier Miranda <miranda@adacore.com>
2273 * sem_ch6.adb (Conforming_Types): Handle another
2274 confusion between views in a nested instance with an actual
2275 private type whose full view is not in scope.
2277 2017-01-06 Arnaud Charlet <charlet@adacore.com>
2279 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
2280 mark a rewritten if statement as explicit (Comes_From_Source).
2282 2017-01-06 Gary Dismukes <dismukes@adacore.com>
2284 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
2286 2017-01-06 Tristan Gingold <gingold@adacore.com>
2288 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
2290 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2292 * sem_case.adb: Minor reformatting.
2294 2017-01-06 Thomas Quinot <quinot@adacore.com>
2296 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
2298 2017-01-06 Justin Squirek <squirek@adacore.com>
2300 * aspects.adb: Register aspect in Canonical_Aspect.
2301 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
2302 into respective tables.
2303 * einfo.ads, einfo.adb: Add a new attribute for
2304 handling the parameters for Pragma_Max_Entry_Queue
2305 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
2306 for accessing and setting were added as well.
2307 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
2308 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
2309 declaration for pramga arguments and store them in the protected
2311 (Make_Initialize_Protection): Pass a reference to
2312 the Entry_Max_Queue_Lengths_Array in the protected type node to
2314 * rtsfind.adb: Minor grammar fix.
2315 * rtsfind.ads: Register new types taken from the
2316 runtime libraries RE_Protected_Entry_Queue_Max and
2317 RE_Protected_Entry_Queue_Max_Array
2318 * s-tposen.adb, s-tpoben.adb
2319 (Initialize_Protection_Entry/Initialize_Protection_Entries):
2320 Add extra parameter and add assignment to local object.
2321 * s-tposen.ads, s-tpoben.ads: Add new types to
2322 store entry queue maximums and a field to the entry object record.
2323 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
2324 for Aspect_Max_Queue_Length.
2325 (Check_Aspect_At_Freeze_Point):
2326 Add aspect to list of aspects that don't require delayed analysis.
2327 * sem_prag.adb (Analyze_Pragma): Add case statement for
2328 Pragma_Max_Queue_Length, check semantics, and register arugments
2329 in the respective entry nodes.
2330 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
2331 and Has_Max_Queue_Length
2332 * snames.ads-tmpl: Add constant for the new aspect-name
2333 Name_Max_Queue_Length and corrasponding pragma.
2335 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2337 * exp_util.adb (Is_Controlled_Function_Call):
2338 Reimplemented. Consider any node which has an entity as the
2339 function call may appear in various ways.
2341 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2343 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
2344 an unchecked type conversion when performing a view conversion
2345 to/from a private type. In all other cases use a regular type
2346 conversion to ensure that any relevant checks are properly
2349 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2351 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
2353 2017-01-06 Ed Schonberg <schonberg@adacore.com>
2355 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
2356 error on case expression that is an entity, when coverage is
2357 incomplete and entity has a static value obtained by local
2359 (Handle_Static_Predicate): New procedure, subsidiary of
2360 Check_Choices, to handle case alternatives that are either
2361 subtype names or subtype indications involving subtypes that
2362 have static predicates.
2364 2017-01-06 Thomas Quinot <quinot@adacore.com>
2366 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
2367 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
2369 2017-01-06 Bob Duff <duff@adacore.com>
2371 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
2372 Elaborate_All(P) to P itself. That could happen in obscure cases,
2373 and always introduced a cycle (P body must be elaborated before
2375 * lib-writ.ads: Comment clarification.
2376 * ali-util.ads: Minor comment fix.
2377 * ali.adb: Minor reformatting.
2379 2017-01-06 Tristan Gingold <gingold@adacore.com>
2381 * a-exexpr-gcc.adb: Improve comment.
2383 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
2385 * s-linux-mips.ads: Use correct signal and errno constants.
2386 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
2388 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
2390 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
2391 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
2394 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
2396 * gnatvsn.ads: Bump copyright year.
2398 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2400 * gnat_ugn.texi: Bump @copying's copyright year.
2401 * gnat_rm.texi: Likewise.
2403 Copyright (C) 2017 Free Software Foundation, Inc.
2405 Copying and distribution of this file, with or without modification,
2406 are permitted in any medium without royalty provided the copyright
2407 notice and this notice are preserved.