1 2017-11-09 Yannick Moy <moy@adacore.com>
3 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
6 2017-11-09 Pascal Obry <obry@adacore.com>
8 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
9 only for foreign threads. We initialize the thread handle only if not
10 yet initialized. This happens in Enter_Task for foreign threads only.
11 But for native threads (Ada tasking) we do want to keep the real
12 handle (from Create_Task) to be able to free the corresponding
13 resources in Finalize_TCB (CloseHandle).
15 2017-11-09 Yannick Moy <moy@adacore.com>
17 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
19 (Error_Attr_P): Fix name in pragma No_Return.
20 (Unexpected_Argument): Add pragma No_Return.
21 (Placement_Error): Add pragma No_Return.
23 2017-11-09 Javier Miranda <miranda@adacore.com>
25 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
26 dispatch table is statically built.
27 (Make_DT): Declare constant the Interface_Table object associated with
28 an statically built dispatch table. For this purpose the Offset_To_Top
29 value of each interface is computed using the dummy object.
30 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
31 the Offset_To_Top field of secondary dispatch tables when the dispatch
32 table is statically built.
33 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
34 when the dispatch table is statically built.
35 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
36 Document the new GNAT restriction Static_Dispatch_Tables.
37 * gnat_rm.texi: Regenerate.
39 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
41 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
42 to avoid a dormant bug.
44 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
46 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
47 as such capability is not available on the OS.
48 * link.c: Make sure linker options for QNX are correct.
49 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
50 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
51 in particular a workaround with locks priority ceiling where a higher
52 priority task is allowed to lock a lower ceiling priority lock. This
53 also fixes the scheduling of FIFO tasks when the priority of a task is
55 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
57 2017-11-09 Yannick Moy <moy@adacore.com>
59 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
61 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
63 * namet.adb (Copy_One_Character): Add assumption for static analysis,
64 as knowledge that Hex(2) is in the range 0..255 is too complex for
66 (Finalize): Add assumption for static analysis, as the fact that there
67 are symbols in the table depends on a global invariant at this point in
69 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
70 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
73 2017-11-09 Javier Miranda <miranda@adacore.com>
75 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
76 * exp_disp.adb (Building_Static_DT): Check restriction.
77 (Building_Static_Secondary_DT): Check restriction.
78 (Make_DT): Initialize the HT_Link to No_Tag.
79 * opt.ads (Static_Dispatch_Tables): Rename flag...
80 (Building_Static_Dispatch_Tables): ... into this. This will avoid
81 conflict with the restriction name.
82 * gnat1drv.adb: Update.
83 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
84 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
86 2017-11-09 Pascal Obry <obry@adacore.com>
88 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
91 2017-11-09 Yannick Moy <moy@adacore.com>
93 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
94 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
95 use. Default initialize Hi, Lo.
96 (Selected_Range_Checks): Retype Num_Checks more precisely.
97 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
99 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
101 (Process_Postconditions): Mark parameter Stmts as Unmodified.
102 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
103 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
104 (Expand_Concatenate): Default initialize High_Bound.
105 (Optimize_Length_Comparison): Default initialize Ent, Index.
106 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
108 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
110 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
111 remove pragma Warnings(Off).
112 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
113 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
114 * freeze.adb (Check_Component_Storage_Order): Default initialize
115 Comp_Byte_Aligned rather than silencing messages with pragma
116 Warnings(Off), which does not work for CodePeer initialization
117 messages, and given that here the possible read of an unitialized value
118 depends on a proper use of parameters by the caller.
119 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
120 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
121 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
123 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
124 pragma Warnings(Off).
125 (Analyze_Case_Expression): Rescope checking block within branch where
126 Others_Present is set by the call to Check_Choices.
127 * sem_ch5.adb (Analyze_Assignment): Default initialize
129 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
130 and restructure code to defend against previous errors, so that, in
131 that case, control does not flow to the elsif condition which read an
132 uninitialized Obj_Decl.
133 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
134 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
135 which seem to be left uninitialized and possibly read in some cases.
136 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
137 precisely. This requires to exchange the test for exiting in case of
138 too many positions and the increment to Position, inside the loop.
139 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
140 which cannot be read uninitialized, but the reasons for that are quite
142 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
143 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
145 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
146 and test for presence of non-null Opnd_Type before testing its scope,
147 in a test which would read its value uninitialized, and is very rarely
148 exercized (it depends on the presence of an extension of System).
149 * sem_spark.ads: Update comment to fix name of main analysis procedure.
150 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
152 * set_targ.adb (FailN): Mark procedure with No_Return.
153 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
154 initialize all array Options to white space, as there is already code
155 doing the same for the remaining positions in Options at the end of the
158 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
160 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
161 generic instantiations either.
163 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
165 * sem_prag.adb (Analyze_Part_Of): Reword error message.
166 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
167 SPARK_Mode appears with an illegal mode, treat this as a non-existent
170 2017-11-09 Ed Schonberg <schonberg@adacore.com>
172 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
173 a limited view of a type T declared in unit U1, when the function is
174 declared in another unit U2 and the call appears in a procedure within
177 2017-11-09 Justin Squirek <squirek@adacore.com>
179 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
180 when processing generic instances.
182 2017-11-09 Bob Duff <duff@adacore.com>
184 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
185 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
186 objects can have those special values. Valid_Name_Id could usefully be
187 used all over the compiler front end, but that's too much trouble for
188 now. If we did that, we might want to rename:
189 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
190 For parameters of type Valid_Name_Id, remove some redundant tests,
191 including the ones found by CodePeer. Use Is_Valid_Name instead of
192 membership test when appropriate.
193 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
194 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
195 "in Error_Name_Or_No_Name".
196 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
197 Error_Name_Or_No_Name".
199 2017-11-09 Arnaud Charlet <charlet@adacore.com>
201 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
202 mode here unless -gnateC is specified.
203 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
206 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
208 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
209 part of the ALI writing; they are now processed directly from memory
210 when requested by the backend.
211 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
212 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
213 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
214 (Add_SPARK_File): Remove.
215 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
216 that are trivially uninteresting to the SPARK backend.
217 * spark_xrefs.ads: Remove code that is no longer needed.
218 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
220 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
222 * sem_elab.adb: Update the documentation on adding a new elaboration
223 schenario. Add new hash table Recorded_Top_Level_Scenarios.
224 (Is_Check_Emitting_Scenario): Removed.
225 (Is_Recorded_Top_Level_Scenario): New routine.
226 (Kill_Elaboration_Scenario): Reimplemented.
227 (Record_Elaboration_Scenario): Mark the scenario as recorded.
228 (Set_Is_Recorded_Top_Level_Scenario): New routine.
229 (Update_Elaboration_Scenario): Reimplemented.
230 * sinfo.adb (Is_Recorded_Scenario): Removed.
231 (Set_Is_Recorded_Scenario): Removed.
232 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
233 occurrences in nodes.
234 (Is_Recorded_Scenario): Removed along with pragma Inline.
235 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
237 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
239 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
242 2017-11-09 Justin Squirek <squirek@adacore.com>
244 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
245 to the allocation of an anonymous access-to-controlled object.
247 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
249 * sigtramp-qnx.c: Fix obvious typo.
251 2017-11-09 Doug Rupp <rupp@adacore.com>
253 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
255 2017-11-09 Ed Schonberg <schonberg@adacore.com>
257 * sem_res.adb (Resolve): If expression is an entity whose type has
258 implicit dereference, generate reference to it, because no reference is
259 generated for an overloaded entity during analysis, given that its
260 identity may not be known.
262 2017-11-09 Javier Miranda <miranda@adacore.com>
264 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
265 offset-to-top field by addition.
266 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
268 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
269 return a negative offset-to-top value.
270 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
271 Set_Static_Offset_To_Top passing a negative offet-to-top value;
272 initialize also the offset-to-top field with a negative offset.
273 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
274 an addition since the offset-to-top field is now a negative value.
275 (Displace): Displace the pointer to the object means of a substraction
276 since it is now a negative value.
277 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
278 means of a substraction since it is now a negative value.
280 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
282 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
283 before Errout.Output_Messages also in the case of compilation errors.
285 2017-11-09 Javier Miranda <miranda@adacore.com>
287 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
288 the Class Level): Fix error interfacing with C strings.
289 * gnat_ugn.texi: Regenerate.
291 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
293 * system-qnx-aarch64.ads: Fix the priority constants.
294 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
296 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
297 corresponds to an idle priority on QNX.
299 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
301 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
304 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
306 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
307 in expression funtions that are expanded into variables.
309 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
311 * sem_util.adb: Minor whitespace cleanup.
313 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
315 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
316 s-taprop version rather than a custom one.
317 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
319 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
321 * lib-xref.ads, lib-xref-spark_specific.adb
322 (Traverse_Compilation_Unit): Move declaration to package body.
324 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
326 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
327 the type of the renaming from its defining entity, rather then the
328 subtype mark as there may not be a subtype mark.
330 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
332 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
333 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
334 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
335 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
336 terminals.c: Initial port of GNAT for aarch64-qnx
338 2017-11-08 Elisa Barboni <barboni@adacore.com>
340 * exp_util.adb (Find_DIC_Type): Move...
341 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
343 2017-11-08 Justin Squirek <squirek@adacore.com>
345 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
346 the owner and corresponding coextension.
348 2017-11-08 Ed Schonberg <schonberg@adacore.com>
350 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
351 following separate procedures.
352 (Resolve_Delta_Array_Aggregate): Previous code form
353 Resolve_Delta_Aggregate.
354 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
355 ARG decisions on the legality rules for delta aggregates for records:
356 in the case of a variant record, components from different variants
357 cannot be specified in the delta aggregate, and this must be checked
360 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
362 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
363 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
366 2017-11-08 Gary Dismukes <dismukes@adacore.com>
368 * sem_ch4.adb: Minor typo fix.
370 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
372 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
373 Spec_Scope_Num components.
374 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
375 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
377 (Collect_SPARK_Xrefs): Skip setting proper values of removed
380 2017-11-08 Gary Dismukes <dismukes@adacore.com>
382 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
383 name is a discriminant in check for unconditional accessibility
384 violation within instances.
386 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
388 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
389 for constants (with variable input).
390 (Is_Constant_Object_Without_Variable_Input): Remove.
392 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
394 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
396 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
398 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
400 (dspark): Remove hardcoded table bound.
402 2017-11-08 Ed Schonberg <schonberg@adacore.com>
404 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
405 the type of the base of the construct to determine the type (or
406 candidate interpretations) of the delta aggregate. This allows the
407 construct to appear in a context that expects a private extension.
408 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
411 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
413 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
414 with Entity_Id of the reference.
415 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
416 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
417 reference, not the file and scope indices.
419 2017-11-08 Arnaud Charlet <charlet@adacore.com>
421 * errout.ads (Current_Node): New.
422 * errout.adb (Error_Msg): Use Current_Node.
423 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
425 * style.adb: Call Error_Msg_N when possible.
427 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
429 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
431 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
432 the Scope_Id record component.
434 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
436 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
437 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
438 SPARK_File_Record components.
439 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
440 representation of files/units.
442 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
444 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
445 Remove Inside_Stubs parameter.
447 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
449 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
450 represented by Entity_Id.
451 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
452 represented by Entity_Id; this information is not repeated as
454 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
455 Name_Of_Heap_Variable.
456 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
458 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
459 scope and xrefs tables to above changes in data types.
461 2017-11-08 Justin Squirek <squirek@adacore.com>
463 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
464 primitives of generic actuals.
465 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
466 base type clauses as per ARM 8.4 (8.2/3).
468 2017-11-08 Ed Schonberg <schonberg@adacore.com>
470 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
471 categorization dependency of the body, as is done for non-generic
473 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
474 through declarations (Simple optimization, no behavior change).
476 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
478 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
479 (SPARK_Scope_Record): Remove inessential components.
480 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
482 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
483 removed record components.
484 (Add_SPARK_Xrefs): Remove setting of removed record components.
486 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
488 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
491 2017-11-08 Javier Miranda <miranda@adacore.com>
493 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
494 functionality of this routine to handle multiple levels of derivations.
496 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
498 * einfo.adb: Elist36 is now used as Nested_Scenarios.
499 (Nested_Scenarios): New routine.
500 (Set_Nested_Scenarios): New routine.
501 (Write_Field36_Name): New routine.
502 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
504 (Nested_Scenarios): New routine along with pragma Inline.
505 (Set_Nested_Scenarios): New routine along with pragma Inline.
506 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
507 (Process_Nested_Scenarios): New routine.
508 (Traverse_Body): When a subprogram body is traversed for the first
509 time, find, save, and process all suitable scenarios found within.
510 Subsequent traversals of the same subprogram body utilize the saved
513 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
515 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
516 protected operations.
517 (Add_SPARK_Xrefs): Simplify detection of empty entities.
518 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
519 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
520 reading and testing SPARK cross-references stored in the ALI files.
521 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
522 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
524 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
525 with description of the SPARK xrefs ALI format.
526 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
527 and put_spark_refs.o.
529 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
531 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
532 when the associated access type is subject to pragma
533 No_Heap_Finalization.
534 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
535 designated type in case it comes from a limited withed unit.
537 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
539 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
540 SPARK-related flags. Add ??? comment.
541 * exp_util.adb (Insert_Actions): Add an entry for node
542 N_Variable_Reference_Marker.
543 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
544 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
545 and record a variable reference marker for the current name.
546 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
547 a variable reference marker for the current name.
548 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
549 (Extract_Variable_Reference_Attributes): Reimplemented.
550 (Info_Scenario): Add output for variable references and remove output
552 (Info_Variable_Read): Removed.
553 (Info_Variable_Reference): New routine.
554 (Is_Suitable_Scenario): Variable references are now suitable scenarios
555 while variable reads are not.
556 (Output_Active_Scenarios): Add output for variable references and
557 remove output for variable reads.
558 (Output_Variable_Read): Removed.
559 (Output_Variable_Reference): New routine.
560 (Process_Variable_Read): Removed.
561 (Process_Variable_Reference): New routine.
562 (Process_Variable_Reference_Read): New routine.
563 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
564 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
565 marker for the current actual.
566 * sem_spark.adb (Check_Node): Add an entry for node
567 N_Variable_Reference_Marker.
568 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
569 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
570 * sinfo.adb (Is_Read): New routine.
571 (Is_Write): New routine.
572 (Target): Updated to handle variable reference markers.
573 (Set_Is_Read): New routine.
574 (Set_Is_Write): New routine.
575 (Set_Target): Updated to handle variable reference markers.
576 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
577 occurrences in nodes. Update attribute Target. Add new node
578 kind N_Variable_Reference_Marker.
579 (Is_Read): New routine along with pragma Inline.
580 (Is_Write): New routine along with pragma Inline.
581 (Set_Is_Read): New routine along with pragma Inline.
582 (Set_Is_Write): New routine along with pragma Inline.
583 * sprint.adb (Sprint_Node_Actual): Add an entry for node
584 N_Variable_Reference_Marker.
586 2017-11-08 Arnaud Charlet <charlet@adacore.com>
588 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
591 2017-11-08 Yannick Moy <moy@adacore.com>
593 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
594 about unused use-type or use-package clauses inside inlined bodies.
596 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
598 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
599 In_Partial_Fin along with a comment on its usage. Do not guarantee the
600 prior elaboration of a unit when the need came from a partial
601 finalization context.
602 (In_Initialization_Context): Relocated to Process_Call.
603 (Is_Partial_Finalization_Proc): New routine.
604 (Process_Access): Add new parameter In_Partial_Fin along with a comment
606 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
607 a comment on its usage.
608 (Process_Activation_Conditional_ABE_Impl): Add new parameter
609 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
610 diagnostics when the activation occurs in a partial finalization
612 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
613 In_Partial_Fin along with a comment on its usage.
614 (Process_Call): Add new parameter In_Partial_Fin along with a comment
615 on its usage. A call is within a partial finalization context when it
616 targets a finalizer or primitive [Deep_]Finalize, and the call appears
617 in initialization actions. Pass this information down to the recursive
618 steps of the Processing phase.
619 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
620 comment on its usage. Remove the guard which suppresses the generation
621 of implicit Elaborate[_All] pragmas. This is now done in
622 Ensure_Prior_Elaboration.
623 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
624 with a comment on its usage. Do not emit any ABE diagnostics when the
625 call occurs in a partial finalization context.
626 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
627 comment on its usage.
628 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
629 comment on its usage.
630 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
631 with a comment on its usage.
632 (Process_Instantiation_Conditional_ABE): Add new parameter
633 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
634 diagnostics when the instantiation occurs in a partial finalization
636 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
637 with a comment on its usage.
638 (Process_Scenario): Add new parameter In_Partial_Fin along with a
639 comment on its usage.
640 (Process_Single_Activation): Add new parameter In_Partial_Fin along
641 with a comment on its usage.
642 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
645 2017-11-08 Arnaud Charlet <charlet@adacore.com>
647 * sem_ch13.adb: Add optional parameter to Error_Msg.
649 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
651 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
652 for the Interfaces.* hierarchy as longer unit names are now allowed.
654 2017-11-08 Arnaud Charlet <charlet@adacore.com>
656 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
657 subprogram as well. Support more cases of entities.
658 (Append_Entity_Name): Add some defensive code.
660 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
662 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
664 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
667 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
669 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
671 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
673 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
675 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
676 (convert): Do not use an unchecked conversion for converting from a
677 type to another type padding it.
679 2017-10-20 Doug Rupp <rupp@adacore.com>
681 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
682 needed for using monotonic clock.
683 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
685 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
686 out monotonic clock related functions body.
687 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
688 Compute_Deadline): Move to...
689 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
691 2017-10-20 Ed Schonberg <schonberg@adacore.com>
693 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
694 case where the controlling formal is an anonymous access to interface
696 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
697 access type, handle properly the the constructed dereference that
698 designates the object used in the rewritten synchronized call.
699 (Parameter_Block_Pack): If the type of the actual is by-copy, its
700 generated declaration in the parameter block does not need an
701 initialization even if the type is a null-excluding access type,
702 because it will be initialized with the value of the actual later on.
703 (Parameter_Block_Pack): Do not add controlling actual to parameter
704 block when its type is by-copy.
706 2017-10-20 Justin Squirek <squirek@adacore.com>
708 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
709 scope stack traversal into the context clause.
711 2017-10-20 Bob Duff <duff@adacore.com>
713 * sinfo.ads: Fix a comment typo.
715 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
717 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
718 warning against usage in conjunction with -gnatn.
719 (-fdump-xref): Delete entry.
720 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
722 * gnat_ugn.texi: Regenerate.
724 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
726 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
729 2017-10-20 Yannick Moy <moy@adacore.com>
731 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
732 compare a dimensioned expression with a literal.
733 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
735 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
736 dimensionality system in GNAT.
737 * gnat_ugn.texi: Regenerate.
739 2017-10-20 Yannick Moy <moy@adacore.com>
741 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
742 inadequate silencing of errors.
743 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
744 checking the subprogram body generated from an expression function,
745 when this is done as part of the preanalysis done on expression
746 functions, as the subprogram body may not yet be attached in the AST.
747 The error if any will be issued later during the analysis of the body.
748 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
750 2017-10-20 Arnaud Charlet <charlet@adacore.com>
752 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
753 warning on ineffective use clause.
755 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
757 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
758 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
759 to issue the warning on the absence of local raise.
760 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
761 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
762 absence of local raise.
763 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
764 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
765 where a scenario could give rise to raising Program_Error.
766 * sem_elab.adb: Typo fixes.
767 * fe.h (Warn_If_No_Local_Raise): Declare.
768 * gcc-interface/gigi.h (get_exception_label): Change return type.
769 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
770 simple vector of Entity_Id.
771 (gnu_storage_error_label_stack): Likewise.
772 (gnu_program_error_label_stack): Likewise.
773 (gigi): Adjust to above changes.
774 (Raise_Error_to_gnu): Likewise.
775 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
776 (N_Push_Constraint_Error_Label): Push the label onto the stack.
777 (N_Push_Storage_Error_Label): Likewise.
778 (N_Push_Program_Error_Label): Likewise.
779 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
780 a warning on the absence of local raise.
781 (N_Pop_Storage_Error_Label): Likewise.
782 (N_Pop_Program_Error_Label): Likewise.
783 (push_exception_label_stack): Delete.
784 (get_exception_label): Change return type to Entity_Id and adjust.
785 * gcc-interface/utils2.c (build_goto_raise): Change type of first
786 parameter to Entity_Id and adjust. Set TREE_USED on the label.
787 (build_call_raise): Adjust calls to get_exception_label and also
789 (build_call_raise_column): Likewise.
790 (build_call_raise_range): Likewise.
791 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
792 Document actual default behavior.
794 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
796 * einfo.ads: Minor consistent punctuation in comment. All numbered
797 items in the comment of Is_Internal are now terminated with a period.
799 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
801 * exp_util.adb (Build_Temporary): Mark created temporary entity as
804 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
806 * sem_type.adb (In_Generic_Actual): Simplified.
808 2017-10-20 Justin Squirek <squirek@adacore.com>
810 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
811 verify a renaming exists for a generic formal before comparing it to
812 the actual as defaulted formals will not have a renamed_object.
814 2017-10-20 Javier Miranda <miranda@adacore.com>
816 * exp_ch6.adb (Replace_Returns): Fix wrong management of
817 N_Block_Statement nodes.
819 2017-10-20 Bob Duff <duff@adacore.com>
821 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
822 component of an array aggregate if it is initialized by a
823 build-in-place function call.
824 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
825 bip for nonlimited types.
826 * debug.adb: Document -gnatd.9.
828 2017-10-20 Bob Duff <duff@adacore.com>
830 * sem_ch12.adb: Remove redundant setting of Parent.
832 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
834 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
835 of the operands is a string literal.
837 2017-10-20 Bob Duff <duff@adacore.com>
839 * einfo.ads: Comment fix.
841 2017-10-20 Clement Fumex <fumex@adacore.com>
843 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
845 2017-10-20 Ed Schonberg <schonberg@adacore.com>
847 * sem_dim.adb (Extract_Power): Accept dimension values that are not
848 non-negative integers when the dimensioned base type is an Integer
851 2017-10-20 Bob Duff <duff@adacore.com>
853 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
854 that an allocator came from a b-i-p return statement.
855 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
856 object of a nonlimited build-in-place function call.
857 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
858 Alloc_For_BIP_Return flag on generated allocators.
859 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
860 If the N_Assignment_Statement has been transformed into something else,
861 then Should_Transform_BIP_Assignment won't work.
862 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
863 "Remove Adjust if we're building the return object of an extended
864 return statement in place." Back out that part of the change, because
865 the Alloc_For_BIP_Return flag is now used for that.
867 2017-10-19 Bob Duff <duff@adacore.com>
869 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
870 should be "T". Handle case of a subtype of a class-wide type.
872 2017-10-19 Bob Duff <duff@adacore.com>
874 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
875 which node kinds can legitimately be ignored, and raise Program_Error
878 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
880 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
881 instantiation that acts as a compilation unit.
882 (Find_Code_Unit): Reimplemented.
883 (Find_Top_Unit): Reimplemented.
884 (Find_Unit_Entity): New routine.
885 (Process_Instantiation_SPARK): Correct the elaboration requirement a
886 package instantiation imposes on a unit.
888 2017-10-19 Bob Duff <duff@adacore.com>
890 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
891 for a narrow set of controlled types.
893 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
895 * sinput.ads (Line_Start): Add pragma Inline.
896 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
898 2017-10-19 Bob Duff <duff@adacore.com>
900 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
901 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
902 build-in-place function call so that the temp is declared in the right
905 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
907 * gcc-interface/misc.c (gnat_tree_size): Move around.
909 * gcc-interface/utils.c (max_size): Deal with SSA names.
911 2017-10-17 Jakub Jelinek <jakub@redhat.com>
913 * gcc-interface/misc.c (gnat_tree_size): New function.
914 (LANG_HOOKS_TREE_SIZE): Redefine.
916 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
918 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
919 Remote_Call_Interface is not a suitable preelaboratd context when the
920 call appears in the package body.
922 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
924 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
925 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
926 alignment for consistency. If Align is non-zero, use the minimum of
927 Align and M for the alignment.
928 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
929 setting the alignment directly.
931 2017-10-14 Ed Schonberg <schonberg@adacore.com>
933 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
934 optional string in an Assert pragma until the expansion of the pragma
935 has rewritten it as a conditional statement, so that the string
936 argument is only evaluaed if the assertion fails. This is mandated by
939 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
941 * debug.adb: Switch -gnatd.v and associated flag are now used to
942 enforce the SPARK rules for elaboration in SPARK code.
943 * sem_elab.adb: Describe switch -gnatd.v.
944 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
945 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
947 (Process_Variable_Assignment): Clarify why variable assignments are
948 processed reglardless of whether -gnatd.v is in effect.
949 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
950 sections on elaboration code and compilation switches.
951 * gnat_ugn.texi: Regenerate.
953 2017-10-14 Gary Dismukes <dismukes@adacore.com>
955 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
956 sem_warn.adb: Minor reformattings.
958 2017-10-14 Ed Schonberg <schonberg@adacore.com>
960 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
961 for reverse iteration over formal containers.
962 * gnat_rm.texi: Regenerate.
964 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
966 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
967 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
968 (Ensure_Static_Prior_Elaboration): Renamed to
969 Ensure_Prior_Elaboration_Static for consistency reasons.
970 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
971 reflect its new purpose.
972 (Is_Initialized): New routine.
973 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
974 in order to reflect its new purpose.
975 (Is_Variable_Read): New routine.
976 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
977 to reflect its new purpose.
978 (Process_Variable_Assignment): This routine now acts as a top level
979 dispatcher for variable assignments.
980 (Process_Variable_Assignment_Ada): New routine.
981 (Process_Variable_Assignment_SPARK): New routine.
982 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
983 to reflects its new purpose. A reference to a variable is now suitable
984 for ABE processing only when it is a read. The logic in the routine now
985 reflects the latest SPARK elaboration rules.
987 2017-10-14 Justin Squirek <squirek@adacore.com>
989 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
990 triggers marking on formal subprograms.
992 2017-10-14 Javier Miranda <miranda@adacore.com>
994 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
995 renamings of objects that come from the sources.
997 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
999 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1000 parameter and set the alignment of the type to Align.
1001 (Copy_Float_Type): Adjust call to Build_Float_Type.
1002 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
1003 call to Build_Float_Type and do not set RM_Size and Alignment.
1005 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1007 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1008 GNATRTL_NONTASKING_OBJ.
1010 2017-10-14 Bob Duff <duff@adacore.com>
1012 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1013 enabling b-i-p for nonlimited controlled types (but disabled).
1015 2017-10-14 Justin Squirek <squirek@adacore.com>
1017 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1018 Has_Warnings_Off with Warnings_Off.
1020 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
1022 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1024 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1026 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1027 enclosing package at the end of the visible declarations.
1028 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1029 an initialization item which is undefined due to some illegality.
1031 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1033 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1034 within each unit that require a default-sized primary and secondary
1035 stack to be generated by the binder.
1036 (Scan_ALI): Scan new 'T' lines.
1037 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1038 * bindgen.adb (Gen_Output_File): Count the number of default-sized
1039 stacks within the closure that are to be created by the binder.
1040 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1041 stacks and record these in System.Secodnary_Stack.
1042 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1043 closure of the program being bound.
1044 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1045 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1046 (Expand_N_Object_Declaration): Count the number of default-sized stacks
1047 used by task objects contained within the object whose declaration is
1048 being expanded. Only performed when either the restrictions
1049 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1051 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1052 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1053 the expansion of a task type if the size of the stack is known at
1054 run-time and the restrictions No_Implicit_Heap_Allocations or
1055 No_Implicit_Task_Allocations are in effect.
1056 (Make_Task_Create_Call): If using a restricted profile provide
1057 secondary stack parameter: either the statically created stack or null.
1058 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1059 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1060 Unit_Record initialization expressions.
1061 * lib-writ.adb (Add_Preprocessing_Dependency,
1062 Ensure_System_Dependency): Include Primary_Stack_Count and
1063 Sec_Stack_Count in Unit_Record initialization expression.
1064 (Write_ALI): Write T lines.
1065 (Write_Unit_Information): Do not output 'T' lines if there are no
1066 stacks for the binder to generate.
1067 * lib-writ.ads: Updated library information documentation to include
1069 * lib.adb (Increment_Primary_Stack_Count): New routine.
1070 (Increment_Sec_Stack_Count): New routine.
1071 (Primary_Stack_Count): New routine.
1072 (Sec_Stack_Count): New routine.
1073 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1074 Unit_Record and updated documentation.
1075 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1076 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1077 (Primary_Stack_Count): New routine along with pragma Inline.
1078 (Sec_Stack_Count): New routine along with pragma Inline.
1079 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
1080 redefined. New flag Default_Sec_Stack_Size and
1081 Quantity_Of_Default_Size_Sec_Stacks.
1082 * rtfinal.c Fixed erroneous comment.
1083 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1084 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
1085 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1086 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1087 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1088 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1089 (Set_Sec_Stack_Addr): Removed routine.
1090 (Get_Sec_Stack): New routine.
1091 (Set_Sec_Stack): New routine.
1092 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1093 reflect new procedure and global names.
1094 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1095 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1096 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1097 parameter profile to allow the secondary stack size to be specified.
1098 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1099 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
1100 call to remove Secondary_Stack_Size reference. Add secondary stack
1101 address and size to SSL.Create_TSD call.
1102 (Task_Wrapper): Remove secondary stack creation.
1103 * libgnarl/s-tarest.ads (Create_Restricted_Task,
1104 Create_Restricted_Task_Sequential): Update parameter profile to include
1105 Sec_Stack_Address and clarify the Size parameter.
1106 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1107 from profile and body.
1108 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1109 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1111 (Initialize_ATCB): Update the parameter profile to remove
1112 Secondary_Stack_Size.
1113 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1114 call to Initialize_ATCB. Add secondary stack address and size to
1115 SSL.Create_TSD call, and catch any storage exception from the call.
1116 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1117 new subprogram and component names.
1118 (Task_Wrapper): Remove secondary stack creation.
1119 (Vulnerable_Complete_Master): Update to reflect TSD changes.
1120 * libgnarl/s-tassta.ads: Reformat comments.
1121 (Create_Task): Update parameter profile.
1122 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1123 profile to include secondary stack size. Remove secondary size
1124 parameter from Initialize_ATCB call and add it to Create_TSD call.
1125 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1126 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1127 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1128 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1129 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
1130 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
1132 (Default_Sec_Stack_Size): New routine.
1133 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1135 * libgnat/s-soflin.adb: Removed unused with-clauses. With
1136 System.Soft_Links.Initialize to initialize non-tasking TSD.
1137 (Create_TSD): Update parameter profile. Initialize the TSD and
1138 unconditionally call SS_Init.
1139 (Destroy_TSD): Update SST.SS_Free call.
1140 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1141 Set_Sec_Stack_Addr_Soft): Remove routines.
1142 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1143 Set_Sec_Stack_Soft): Add routines.
1144 (NT_TSD): Move to private part of package specification.
1145 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1146 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
1147 objects to *_Sec_Stack_*. TSD: removed warning suppression and
1148 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1149 (Create_TSD): Update parameter profile.
1150 (NT_TSD): Move to private section from body.
1151 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1152 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1153 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1155 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1156 (Thread_Body_Enter): Update parameter profile and body to adapt to new
1157 System.Secondary_Stack.
1158 (Init_RTS): Update body for new System.Soft_Links names.
1159 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
1162 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1164 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
1165 operating on trees as wide_ints.
1167 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1169 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
1170 as a scoping construct when it is byproduct of exception handling.
1172 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1174 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
1175 semantic field Target of node N_Call_Marker.
1177 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1179 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
1180 attempts to copy a limited value, when the allocator is the expression
1181 in an expression function.
1183 2017-10-09 Joel Brobecker <brobecker@adacore.com>
1185 * doc/share/conf.py: Tell the style checker that this is a Python
1186 fragment, and therefore that pyflakes should not be run to validate
1189 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
1191 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
1192 (Is_Entity_Name): Likewise.
1193 (Is_String_Type): Likewise.
1194 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
1195 and remove useless comparisons on the base types.
1196 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
1197 on T2. Always test Is_Private_Type before Full_View_Covers.
1199 2017-10-09 Bob Duff <duff@adacore.com>
1201 * exp_ch4.adb: Minor refactoring.
1203 2017-10-09 Javier Miranda <miranda@adacore.com>
1205 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
1208 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1210 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
1211 are verified only in the static model.
1213 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1215 * sem_ch5.adb (Analyze_Iterator_Specification,
1216 Check_Reverse_Iteration): Check that the domain of iteration supports
1217 reverse iteration when it is a formal container. This requires the
1218 presence of a Previous primitive in the Iterable aspect.
1219 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
1220 primitives Last and Previous to support reverse iteration over formal
1222 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
1223 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
1224 for reverse iteration using primitives Last and Previous in generated
1227 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1229 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
1230 of the Defining_Program_Unit_Name, which is an identifier, in order to
1231 construct the string for the fully qualified name.
1233 2017-10-09 Justin Squirek <squirek@adacore.com>
1235 * sem_ch3.adb: Rename Uses_Unseen_Priv into
1236 Contains_Lib_Incomplete_Type.
1238 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1240 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
1241 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
1242 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
1243 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
1244 sem_ch10.adb, par-ch8.adb: Minor reformatting.
1246 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1248 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
1249 in the static model.
1250 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
1251 in the static model.
1252 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
1255 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1257 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
1258 expressions when the enclosing scope is a subprogram body and the next
1259 declaration is a body that freezes entities previously declared in the
1262 2017-10-09 Justin Squirek <squirek@adacore.com>
1264 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
1265 ghost packages and living packages in use clauses.
1266 (Use_One_Type, Note_Redundant_Use): Correct warning messages
1268 2017-10-09 Justin Squirek <squirek@adacore.com>
1270 * osint.ads: Document new parameter FD for Read_Source_File.
1272 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1274 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
1275 which the predicate check applies is tagged, convert the expression to
1276 that type. This is in most cases a no-op, but is relevant if the
1277 expression is clas-swide, because the predicate function being invoked
1278 is not a primitive of the type and cannot take a class-wide actual.
1280 2017-10-09 Gary Dismukes <dismukes@adacore.com>
1282 * exp_disp.adb: Minor reformatting.
1284 2017-10-09 Arnaud Charlet <charlet@adacore.com>
1286 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
1288 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1290 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
1292 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
1294 2017-10-09 Bob Duff <duff@adacore.com>
1296 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
1297 immediately if the call has already been processed (by a previous call
1298 to Make_Build_In_Place_Call_In_Anonymous_Context).
1299 * sem_elab.adb: Minor typo fixes.
1301 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1303 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
1304 predicate, do not replace an identifier that matches the type if the
1305 identifier is a selector in a selected component, because this
1306 indicates a reference to some homograph of the type itself, and not to
1307 the current occurence in the predicate.
1309 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
1311 * repinfo.adb (List_Record_Layout): Tweak formatting.
1312 (Write_Val): Remove superfluous spaces in back-end layout mode.
1314 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1316 * sem_res.adb (Property_Error): Remove.
1317 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
1318 current wording of the rule.
1320 2017-10-09 Justin Squirek <squirek@adacore.com>
1322 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
1323 before analyzing a given scope due to an expression function.
1324 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
1326 2017-10-09 Bob Duff <duff@adacore.com>
1328 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
1329 Defining_Identifier (Obj_Decl) in two places, because it might have
1331 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
1332 involving 'Input on (not visibly) derived types.
1334 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1336 * atree.adb: Add new soft link Rewriting_Proc.
1337 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
1338 (Set_Rewriting_Proc): New routine.
1339 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
1340 (Set_Rewriting_Proc): New routine.
1341 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
1342 for *E*laboration flag to maintain consistency with other elaboration
1343 flag generating subprograms.
1344 * debug.adb: Document the new usage of flag -gnatdL.
1345 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
1346 as Protected_Subprogram. Flag148 is now used as
1347 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
1348 Is_Initial_Condition_Procedure.
1349 (Is_Elaboration_Checks_OK_Id): New routine.
1350 (Is_Initial_Condition_Procedure): New routine.
1351 (Protected_Subprogram): New routine.
1352 (Receiving_Entry): New routine.
1353 (SPARK_Pragma): Update assertion.
1354 (SPARK_Pragma_Inherited): Update assertion.
1355 (Suppress_Elaboration_Warnings): Removed.
1356 (Set_Is_Elaboration_Checks_OK_Id): New routine.
1357 (Set_Is_Initial_Condition_Procedure): New routine.
1358 (Set_Protected_Subprogram): New routine.
1359 (Set_Receiving_Entry): New routine.
1360 (Set_SPARK_Pragma): Update assertion.
1361 (Set_SPARK_Pragma_Inherited): Update assertion.
1362 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
1363 (Write_Field19_Name): Add output for Receiving_Entry.
1364 (Write_Field39_Name): Add output for Protected_Subprogram.
1365 (Write_Field40_Name): Update the output for SPARK_Pragma.
1366 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
1367 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
1368 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
1369 of various entities.
1370 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
1371 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
1372 (Protected_Subprogram): New routine along with pragma Inline.
1373 (Receiving_Entry): New routine along with pragma Inline.
1374 (Suppress_Elaboration_Warnings): Removed.
1375 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
1377 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
1379 (Set_Protected_Subprogram): New routine along with pragma Inline.
1380 (Set_Receiving_Entry): New routine along with pragma Inline.
1381 (Set_Suppress_Elaboration_Warnings): Removed.
1382 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
1383 consistency with other finalizer generating subprograms.
1384 (Default_Initialize_Object): Mark the block which wraps the call to
1385 finalize as being part of initialization.
1386 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
1388 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
1389 (Next_Suitable_Statement): Update the comment on usage. Skip over call
1390 markers generated by the ABE mechanism.
1391 * exp_ch9.adb (Activation_Call_Loc): New routine.
1392 (Add_Accept): Link the accept procedure to the original entry.
1393 (Build_Protected_Sub_Specification): Link the protected or unprotected
1394 version to the original subprogram.
1395 (Build_Task_Activation_Call): Code cleanup. Use a source location which
1396 is very close to the "begin" or "end" keywords when generating the
1398 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
1399 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
1401 (Expand_SPARK_N_Loop_Statement): New routine.
1402 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
1403 call to the Default_Initial_Condition procedure.
1404 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
1405 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
1407 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
1408 (Insert_Actions): Add processing for N_Call_Marker.
1409 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
1410 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
1411 * frontend.adb: Initialize Sem_Elab. Process all saved top level
1412 elaboration scenarios for ABE issues.
1413 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
1415 * lib.adb (Earlier_In_Extended_Unit): New variant.
1416 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
1417 (Preanalysis_Active): New routine.
1418 * sem.ads (Preanalysis_Active): New routine.
1419 * sem_attr.adb (Analyze_Access_Attribute): Save certain
1420 elaboration-related attributes. Save the scenario for ABE processing.
1421 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
1422 effect. Save certain elaboration-related attributes.
1423 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
1424 attributes. Save the scenario for ABE processing.
1425 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
1426 mode in effect. Save certain elaboration-related attributes.
1427 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
1428 locating the first real statement.
1429 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
1430 certain elaboration-related attributes.
1431 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
1432 elaboration warnings.
1433 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
1434 generated for purposes of wrapping an attribute used as a generic
1436 (Find_Direct_Name): Save certain elaboration-related attributes. Save
1437 the scenario for ABE processing.
1438 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
1439 the scenario for ABE processing.
1440 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
1441 elaboration-related attributes.
1442 (Analyze_Requeue): Save certain elaboration-related attributes. Save
1443 the scenario for ABE processing.
1444 (Analyze_Single_Task_Declaration): Save certain elaboration-related
1446 (Analyze_Task_Type_Declaration): Save certain elaboration-related
1448 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
1449 elaboration-related attributes.
1450 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
1451 effect. Save certain elaboration-related attributes.
1452 (Analyze_Package_Instantiation): Save certain elaboration-related
1453 attributes. Save the scenario for ABE processing. Create completing
1454 bodies in case the instantiation results in a guaranteed ABE.
1455 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
1456 attributes Save the scenario for ABE processing. Create a completing
1457 body in case the instantiation results in a guaranteed ABE.
1458 (Provide_Completing_Bodies): New routine.
1459 * sem_elab.ads: Brand new implementation.
1460 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
1461 Elaborate_Body): Do not suppress elaboration warnings.
1462 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
1464 (Resolve_Call): Save certain elaboration-related attributes. Save the
1465 scenario for ABE processing.
1466 (Resolve_Entity_Name): Do not perform any ABE processing here.
1467 (Resolve_Entry_Call): Inherit certain attributes from the original call.
1468 * sem_util.adb (Begin_Keyword_Location): New routine.
1469 (Defining_Entity): Update the parameter profile. Add processing for
1470 concurrent subunits that are rewritten as null statements.
1471 (End_Keyword_Location): New routine.
1472 (Find_Enclosing_Scope): New routine.
1473 (In_Instance_Visible_Part): Code cleanup.
1474 (In_Subtree): Update the parameter profile. Add new version.
1475 (Is_Preelaborable_Aggregate): New routine.
1476 (Is_Preelaborable_Construct): New routine.
1477 (Mark_Elaboration_Attributes): New routine.
1478 (Scope_Within): Update the parameter profile.
1479 (Scope_Within_Or_Same): Update the parameter profile.
1480 * sem_util.ads (Begin_Keyword_Location): New routine.
1481 (Defining_Entity): Update the parameter profile and the comment on
1483 (End_Keyword_Location): New routine.
1484 (Find_Enclosing_Scope): New routine.
1485 (In_Instance_Visible_Part): Update the parameter profile.
1486 (In_Subtree): Update the parameter profile. Add new version.
1487 (Is_Preelaborable_Aggregate): New routine.
1488 (Is_Preelaborable_Construct): New routine.
1489 (Mark_Elaboration_Attributes): New routine.
1490 (Scope_Within): Update the parameter profile and the comment on usage.
1491 (Scope_Within_Or_Same): Update the parameter profile and the comment on
1493 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
1494 to determine whether a loop has meaningful condition actions.
1495 (Has_Condition_Actions): New routine.
1496 * sinfo.adb (ABE_Is_Certain): Removed.
1497 (Is_Declaration_Level_Node): New routine.
1498 (Is_Dispatching_Call): New routine.
1499 (Is_Elaboration_Checks_OK_Node): New routine.
1500 (Is_Initialization_Block): New routine.
1501 (Is_Known_Guaranteed_ABE): New routine.
1502 (Is_Recorded_Scenario): New routine.
1503 (Is_Source_Call): New routine.
1504 (Is_SPARK_Mode_On_Node): New routine.
1505 (No_Elaboration_Check): Removed.
1506 (Target): New routine.
1507 (Was_Attribute_Reference): New routine.
1508 (Set_ABE_Is_Certain): Removed.
1509 (Set_Is_Declaration_Level_Node): New routine.
1510 (Set_Is_Dispatching_Call): New routine.
1511 (Set_Is_Elaboration_Checks_OK_Node): New routine.
1512 (Set_Is_Initialization_Block): New routine.
1513 (Set_Is_Known_Guaranteed_ABE): New routine.
1514 (Set_Is_Recorded_Scenario): New routine.
1515 (Set_Is_Source_Call): New routine.
1516 (Set_Is_SPARK_Mode_On_Node): New routine.
1517 (Set_No_Elaboration_Check): Removed.
1518 (Set_Target): New routine.
1519 (Set_Was_Attribute_Reference): New routine.
1520 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
1521 Do_Discriminant_Check now utilizes Flag3. Attribute
1522 No_Side_Effect_Removal now utilizes Flag17. Add new node
1523 N_Call_Marker. Update the structure of various nodes.
1524 (ABE_Is_Certain): Removed along with pragma Inline.
1525 (Is_Declaration_Level_Node): New routine along with pragma Inline.
1526 (Is_Dispatching_Call): New routine along with pragma Inline.
1527 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
1528 (Is_Initialization_Block): New routine along with pragma Inline.
1529 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1530 (Is_Recorded_Scenario): New routine along with pragma Inline.
1531 (Is_Source_Call): New routine along with pragma Inline.
1532 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1533 (No_Elaboration_Check): Removed along with pragma Inline.
1534 (Target): New routine along with pragma Inline.
1535 (Was_Attribute_Reference): New routine along with pragma Inline.
1536 (Set_ABE_Is_Certain): Removed along with pragma Inline.
1537 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
1538 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
1539 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
1541 (Set_Is_Initialization_Block): New routine along with pragma Inline.
1542 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1543 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
1544 (Set_Is_Source_Call): New routine along with pragma Inline.
1545 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1546 (Set_No_Elaboration_Check): Removed along with pragma Inline.
1547 (Set_Target): New routine along with pragma Inline.
1548 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
1549 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
1551 2017-10-09 Bob Duff <duff@adacore.com>
1553 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
1555 2017-10-09 Bob Duff <duff@adacore.com>
1557 * freeze.ads: Minor comment fixed.
1559 2017-10-09 Bob Duff <duff@adacore.com>
1561 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
1562 care of unchecked conversions in addition to regular conversions. This
1563 takes care of a case where a type is derived from a private untagged
1564 type that is completed by a tagged controlled type.
1566 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1568 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
1569 rewriting a class-wide condition, handle properly the case where the
1570 controlling argument of the operation to which the condition applies is
1571 an access to a tagged type, and the condition includes a dispatching
1572 call with an implicit dereference.
1574 2017-10-09 Bob Duff <duff@adacore.com>
1576 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
1577 the code at the end of this procedure that was setting the type of a
1578 class-wide object to the specific type returned by a function call.
1579 Treat this case as indefinite instead.
1581 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1583 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
1584 Suppress spurious ambiguity error when two traversals of the homonym
1585 chain (first directly, and then through an examination of relevant
1586 interfaces) retrieve the same operation, when other irrelevant homonyms
1587 of the operatioh are also present.
1589 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1591 * sem_util.adb (Object_Access_Level): If the object is the return
1592 statement of an expression function, return the level of the function.
1593 This is relevant when the object involves an implicit conversion
1594 between access types and the expression function is a completion, which
1595 forces the analysis of the expression before rewriting it as a body, so
1596 that freeze nodes can appear in the proper scope.
1598 2017-10-09 Bob Duff <duff@adacore.com>
1600 * atree.adb: Make nnd apply to everything "interesting", including
1601 Rewrite. Remove rrd.
1603 2017-10-09 Javier Miranda <miranda@adacore.com>
1605 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
1606 processing the declaration of the dummy object internally created by
1607 Make_DT to compute the offset to the top of components referencing
1608 secondary dispatch tables.
1609 (Initialize_Tag): Do not initialize the offset-to-top field if it has
1610 been initialized initialized.
1611 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
1612 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
1613 (Make_DT): Create a dummy constant object if we can statically build
1614 secondary dispatch tables.
1615 (Make_Secondary_DT): For statically allocated secondary dispatch tables
1616 use the dummy object to compute the offset-to-top field value by means
1617 of the attribute 'Position.
1619 2017-10-09 Bob Duff <duff@adacore.com>
1621 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
1622 code so if BIPAlloc is not passed in, it will likely raise
1623 Program_Error instead of cause miscellaneous chaos.
1624 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
1625 as for the other Is_B-I-P... functions.
1626 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
1627 aggregate whose ancestor part is a build-in-place call returning a
1628 nonlimited type, transform the assignment to the ancestor part to use a
1630 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
1631 creating an Itype for a library unit entity.
1632 (Check_Initialization): Avoid spurious error message on
1633 internally-generated call.
1634 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
1635 right-hand side is a build-in-place call. This didn't happen when b-i-p
1636 was only for limited types.
1637 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
1638 implies >= Ada 2005.
1639 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
1641 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
1643 2017-10-09 Arnaud Charlet <charlet@adacore.com>
1645 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
1647 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1649 * libgnarl/s-taprob.adb: Minor whitespace fix.
1651 2017-10-09 Bob Duff <duff@adacore.com>
1653 * namet.ads: Minor comment fix.
1655 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1657 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
1658 just like other program units listed in Ada RM 10.1(1).
1660 2017-10-09 Justin Squirek <squirek@adacore.com>
1662 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
1664 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1666 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
1667 actual for a formal package is an instantiation of a child unit, create
1668 a freeze node for the instance of the parent if it appears in the same
1669 scope and is not frozen yet.
1671 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
1673 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
1674 in-source documentation for tagged types's Offset_To_Top.
1676 2017-10-09 Bob Duff <duff@adacore.com>
1678 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
1679 confusing. Same for N_Loc. Remove assumption that b-i-p implies
1680 limited. This is for the case of a function call that occurs as the
1681 default for a record component.
1682 (Expand_N_Object_Declaration): Deal with the case where expansion has
1683 created an object declaration initialized with something like
1685 * exp_ch3.adb: Minor reformatting.
1687 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1689 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
1690 the attribute is an object, but it may appear within a conversion. The
1691 object itself must be retrieved when generating the range test that
1692 implements the validity check on a scalar type.
1694 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
1697 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
1698 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
1700 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
1701 Pierre-Marie de Rodat <derodat@adacore.com>
1704 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
1705 (time_t): Change from derived type to subtype.
1706 (timeval): Use suseconds_t for tv_usec.
1707 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
1709 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1711 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
1712 handling the form (plus/mult (convert @0) @1).
1714 2017-09-29 Bob Duff <duff@adacore.com>
1716 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
1718 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
1719 change. Set the Etype in the class-wide case. This fixes a regression
1720 in the libadalang test suite.
1722 2017-09-29 Joel Brobecker <brobecker@adacore.com>
1724 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1725 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
1727 * gnat_ugn.texi: Regenerate.
1729 2017-09-29 Justin Squirek <squirek@adacore.com>
1731 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
1732 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
1733 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
1734 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
1735 for checking source file status and error message and/or call to
1737 * libgnat/s-os_lib.ads: Add new potential value constant for
1738 uninitialized file descriptors.
1739 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
1740 return result of IO to encompass a read access failure in addition to a
1741 file-not-found error.
1743 2017-09-29 Bob Duff <duff@adacore.com>
1745 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
1746 functions returning nonlimited types. Allow for qualified expressions
1747 and type conversions.
1748 (Expand_N_Extended_Return_Statement): Correct the computation of
1749 Func_Bod to allow for child units.
1750 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
1751 limited (initialization of In_Place_Expansion), and implies >= Ada
1753 (Is_Build_In_Place_Result_Type): New function to accompany
1754 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
1755 sometimes we just have the type on our hands, not the function. For
1756 now, does the same thing as the old version, so build-in-place is
1757 disabled for nonlimited types, except that you can use -gnatd.9 to
1759 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
1760 accompany Is_Build_In_Place_Function and
1761 Is_Build_In_Place_Function_Call, because sometimes we just have the
1762 type on our hands, not the function.
1763 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
1765 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
1766 questionable code at the end that was setting the Etype.
1767 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
1768 determine whether "return (...agg...);" is returning from a
1769 build-in-place function.
1770 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
1771 Remove assumption that b-i-p implies limited (initialization of
1772 In_Place_Expansion).
1773 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
1774 an unchecked conversion. Add assertions.
1775 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
1776 secondary stack here, just because the type needs finalization. That
1778 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
1779 For "return (...agg...);" don't assume b-i-p implies limited.
1780 Needs_Finalization does not imply secondary stack.
1781 (Expand_Array_Aggregate): Named notation. Reverse the sense of
1782 Component_OK_For_Backend -- more readability with fewer double
1784 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
1785 b-i-p implies >= Ada 2005.
1786 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
1787 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
1788 object of an extended return statement in place.
1789 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
1790 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
1791 b-i-p implies >= Ada 2005.
1792 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
1793 b-i-p implies >= Ada 2005.
1794 * exp_ch7.adb: Comment fix.
1795 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
1796 assumptions that b-i-p implies >= Ada 2005.
1797 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
1798 b-i-p implies >= Ada 2005.
1799 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
1800 (Expr), in case Pool_Id is not set.
1801 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
1802 qualified or converted.
1803 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
1804 (Param)) = N_Identifier; that's all it could be.
1805 * sinfo.ads: Comment fixes.
1806 * snames.ads-tmpl: Comment fixes.
1807 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
1809 2017-09-29 Justin Squirek <squirek@adacore.com>
1811 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
1812 all cases related to marking entity identifiers.
1814 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1816 * adaint.c (win32_wait): Properly handle error and take into account
1817 the WIN32 limitation on the number of simultaneous wait objects.
1819 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1821 * cal.c: Minor proofreading.
1823 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
1825 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
1826 * gnat_ugn.texi: Regenerate.
1828 2017-09-29 Bob Duff <duff@adacore.com>
1830 * lib-xref.ads: Comment fix.
1832 2017-09-29 Bob Duff <duff@adacore.com>
1834 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
1835 Discriminants can't need finalization.
1837 2017-09-29 Ed Schonberg <schonberg@adacore.com>
1839 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
1840 for types in expression if the function is within a generic unit.
1841 * sem_res.adb (Resolve): In a generic context do not freeze an
1842 expression, unless it is an entity. This exception is solely for the
1843 purpose of detecting illegal uses of deferred constants in generic
1845 * sem_res.adb: Minor reformatting.
1847 2017-09-29 Justin Squirek <squirek@adacore.com>
1849 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
1852 2017-09-29 Yannick Moy <moy@adacore.com>
1854 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
1856 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1858 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
1859 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
1860 Document the effect of pragma Optimize_Alignment (Space) on non-packed
1862 * gnat_rm.texi: Regenerate.
1864 2017-09-25 Justin Squirek <squirek@adacore.com>
1866 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
1867 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
1868 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
1869 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
1870 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
1871 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
1872 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
1873 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
1874 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
1875 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
1876 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
1877 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
1878 Removal of ineffective use-clauses.
1879 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
1880 constant folded barriers.
1881 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
1882 Subtype_Marks and Names list in use-clause nodes to their new singular
1883 counterparts (e.g. Subtype_Mark, Name).
1884 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
1885 Prev_Ids and More_Ids in use-clause nodes.
1886 (P_Use_Clause): Modify to take a list as a parameter.
1887 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
1888 subtype_marks within an aggregate use-clauses into individual clauses.
1889 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
1890 P_Use_Clause to match its new behavior.
1891 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
1892 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
1894 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
1895 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
1896 the declarative region.
1897 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
1898 after analysis (Analyze_Package_Specification): Update use clause chain
1899 when there is no body.
1900 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
1901 parameter to determine weither the installation of scopes should also
1902 propagate on the use-clause "chain".
1903 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
1904 what constitutes a valid "use" of a clause.
1905 (Update_Use_Clause_Chain): Created to aggregate common machinary used
1906 to clean up use-clause chains (and warn on ineffectiveness) at the end
1907 of declaritive regions.
1908 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
1909 package name from a use-package clause.
1910 (Analyze_Package_Name_List): Created to perform analysis on a list of
1911 package names (similar to Analyze_Package_Name).
1912 (Find_Most_Prev): Created to traverse to the beginning of a given
1914 (Most_Decendant_Use_Clause): Create to identify which clause from a
1915 given set is highest in scope (not always the most prev).
1916 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
1917 handle the new chaining algorithm, also many changes related to
1918 redundant clauses. A new parameter has also been added to force
1919 installation to handle certain cases.
1920 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
1921 Analyze_Task_Body): Mark use clauses on relevant entities.
1922 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
1923 Install_Parents): Add parameter to determine weither the installation
1924 of scopes should also propagate on the use-clause "chain".
1925 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
1926 Install_Context to avoid redundant chaining of use-clauses.
1927 * sem_ch13.adb: Minor reformatting.
1928 * sem_res.adb (Resolve): Mark use clauses on operators.
1929 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
1931 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
1932 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
1933 represent any given clause's usage/reference/necessity.
1934 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
1935 nodes to allow loose chaining of redundant clauses.
1936 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
1937 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
1938 reorganization in node fields.
1939 * types.ads (Source_File_Index): Adjust index bounds.
1940 (No_Access_To_Source_File): New constant.
1942 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1944 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
1945 the expression to be used in the generated attribute specification
1946 (rather than relocating it) to avoid resolving a potentially malformed
1947 tree when the expression is resolved through an ASIS-specific call to
1948 Resolve_Aspect_Expressions. This manifests itself as a crash on a
1949 function with parameter associations.
1951 2017-09-25 Yannick Moy <moy@adacore.com>
1953 * exp_spark.adb (Expand_SPARK_Indexed_Component,
1954 Expand_SPARK_Selected_Component): New procedures to insert explicit
1955 dereference if required.
1956 (Expand_SPARK): Call the new procedures.
1958 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
1960 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
1961 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
1962 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
1963 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
1964 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
1966 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
1968 * adaint.c (win32_wait): Properly handle error and take into account
1969 the WIN32 limitation on the number of simultaneous wait objects.
1971 2017-09-25 Yannick Moy <moy@adacore.com>
1973 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
1974 invariant procedure in GNATprove mode.
1975 * sem_ch5.adb (Analyze_Assignment): Likewise.
1977 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
1979 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
1980 "back-end" in comments.
1982 2017-09-25 Ed Schonberg <schonberg@adacore.com>
1984 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
1985 call that appears in a classwide precondition and that mentions an
1986 access formal of the subprogram, must use the accessibility level of
1987 the actual in the call. This is one case in which a reference to a
1988 formal parameter appears outside of the body of the subprogram.
1990 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1992 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
1994 (Resolve_Entry): Clean up predicate
1996 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
1998 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
1999 than Program_Error because U_E is more in line with respect to the
2002 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2004 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2005 Storage_Size does not freeze, and thus can include references to
2008 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2010 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2011 reference when it appears within a pragma of no significance to SPARK.
2012 (In_Insignificant_Pragma): New routine.
2013 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2015 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2017 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2018 actual is a renaming, indicate that it is the renamed package that must
2019 be frozen before the instantiation.
2021 2017-09-25 Yannick Moy <moy@adacore.com>
2023 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2024 of dimensionality system in GNAT UG.
2025 * gnat_ugn.texi: Regenerate.
2027 2017-09-25 Yannick Moy <moy@adacore.com>
2029 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2030 GNATprove_Mode when switch -gnatdF used.
2032 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2034 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2037 2017-09-25 Javier Miranda <miranda@adacore.com>
2039 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2040 expansion of user-defined enumeration types when the generation of
2041 names for enumeration literals is suppressed.
2043 2017-09-25 Gary Dismukes <dismukes@adacore.com>
2045 * libgnarl/s-taprop__linux.adb: Minor reformatting.
2047 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2049 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2050 that appear as selector names of parameter associations, as these are
2051 never resolved by visibility.
2053 2017-09-25 Justin Squirek <squirek@adacore.com>
2055 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2057 2017-09-25 Doug Rupp <rupp@adacore.com>
2059 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2061 2017-09-25 Javier Miranda <miranda@adacore.com>
2063 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2064 (Expand_User_Defined_Enumeration_Image): New subprogram.
2065 (Expand_Image_Attribute): Enable speed-optimized expansion of
2066 user-defined enumeration types when we are compiling with optimizations
2069 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2071 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2072 routine is already provided by Einfo.
2073 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2074 Sem_Util, which had better comments and avoided double calls to
2077 2017-09-25 Bob Duff <duff@adacore.com>
2079 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2081 2017-09-25 Doug Rupp <rupp@adacore.com>
2083 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2084 (Compute_Base_Monotonic_Clock): New function.
2085 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2086 (Timed_Delay): Likewise.
2087 (Monotonic_Clock): Likewise.
2088 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2090 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2092 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2095 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2097 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2100 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2102 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2104 2017-09-18 Bob Duff <duff@adacore.com>
2106 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2107 reference types in the access-to-access case.
2109 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2111 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2112 of the "aliased" keyword on the prefix from here to...
2113 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
2114 to Check_No_Implicit_Aliasing.
2115 * sinfo.ads (Non_Aliased_Prefix): Delete.
2116 (Set_Non_Aliased_Prefix): Likewise.
2117 * sinfo.adb (Non_Aliased_Prefix): Delete.
2118 (Set_Non_Aliased_Prefix): Likewise.
2120 2017-09-18 Bob Duff <duff@adacore.com>
2122 * exp_ch5.adb (Build_Formal_Container_Iteration,
2123 Expand_Formal_Container_Element_Loop): Convert the container to the
2124 root type before passing it to the iteration operations, so it will be
2127 2017-09-18 Bob Duff <duff@adacore.com>
2129 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2131 2017-09-18 Bob Duff <duff@adacore.com>
2133 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2134 and it's a bit-packed array, pass False to the Consider_IS parameter of
2135 Needs_Simple_Initialization.
2137 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2139 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2140 the preexisting body.
2141 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2142 (Process_Inline): Verify the placement of pragma Inline_Always. The
2143 pragma must now appear on the initial declaration of the related
2146 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2148 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
2149 declarative list in a subprogram body, analyze aspext specifications to
2150 provide basic semantic information, because otherwise the aspect
2151 specifications might only be snalyzed during expansion, when related
2152 subprograms are generated.
2154 2017-09-18 Bob Duff <duff@adacore.com>
2156 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2157 validity checks have rewritten the tree.
2159 2017-09-18 Bob Duff <duff@adacore.com>
2161 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2163 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2165 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
2166 qualified exxpression for an aggregate in a generic unit, verify that
2167 the scope of the type is itself visible and not hidden, so that the
2168 qualified expression is correctly resolved in any instance.
2170 2017-09-18 Bob Duff <duff@adacore.com>
2172 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
2173 mark refers to the current instance. Set the type to Any_Type in that
2174 case, to avoid later crashes.
2176 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2178 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
2179 subsidiary of Build_Assignment, used to handle the initialization code
2180 for a mutable record component whose default value is an aggregate that
2181 sets the values of the discriminants of the components.
2183 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2185 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
2186 the entity as being volatile for an overlay that toggles the scalar
2189 2017-09-18 Fedor Rybin <frybin@adacore.com>
2191 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
2192 options -U main and --harness-only are not compatible.
2194 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2196 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
2198 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
2200 * einfo.ads (Is_Imported): Update comment, as this
2201 routine also applies to constants.
2203 2017-09-18 Yannick Moy <moy@adacore.com>
2205 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
2208 2017-09-18 Justin Squirek <squirek@adacore.com>
2210 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
2211 constant indication for Pragma_Linker_Section.
2213 2017-09-18 Bob Duff <duff@adacore.com>
2215 Alternate fix for PR ada/71358
2216 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
2217 Instead, make a local copy of Config, and if it's null, allocate an
2218 empty Command_Line_Configuration_Record, so we won't crash on null
2219 pointer dereference.
2221 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
2223 * libgnarl/a-intnam__rtems.ads: Update copyright date.
2224 * libgnarl/s-interr__hwint.adb: Likewise.
2225 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
2226 * libgnarl/s-osinte__rtems.adb: Likewise.
2227 * libgnarl/s-osinte__rtems.ads: Likewise.
2229 2017-09-13 Nicolas Roche <roche@adacore.com>
2231 * Make-lang.in: In the fallback mechanim, parse the associated .ali
2232 file and try to guess the locations of dependencies.
2234 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
2236 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
2237 the suppression status of Alignment_Check on the current scope.
2238 (Alignment_Checks_Suppressed): New function to use the saved instead of
2239 the current suppression status of Alignment_Check.
2240 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
2241 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
2242 the table, call Register_Address_Clause_Check.
2243 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
2244 recorded address clause instead of its entity.
2246 2017-09-13 Jerome Guitton <guitton@adacore.com>
2248 * libgnarl/s-tpopsp__vxworks-tls.adb,
2249 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
2250 (Self): Register thread if task id is null.
2252 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2254 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
2256 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2258 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
2259 from an entity to only scope index, as a mapping from an entity to the
2260 same entity was useless.
2261 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
2263 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
2265 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
2266 variable, just use return statements.
2268 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2270 * libgnarl/s-vxwext__kernel-smp.adb,
2271 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
2274 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
2276 * einfo.adb: Flag42 is now Is_Controlled_Active.
2277 (Is_Controlled): This attribute is now synthesized.
2278 (Is_Controlled_Active): This attribute is now an explicit flag rather
2279 than a synthesized attribute. (Set_Is_Controlled): Removed.
2280 (Set_Is_Controlled_Active): New routine.
2281 (Write_Entity_Flags): Update the output for Flag42.
2282 * einfo.ads: Update the documentation of the following attributes:
2283 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
2284 and Is_Controlled_Active have swapped their functionality.
2285 (Is_Controlled): Renamed to Is_Controlled_Active.
2286 (Is_Controlled_Active): Renamed to Is_Controlled.
2287 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
2288 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
2290 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
2291 (Needs_Finalization): Code clean up. Remove the tests for
2292 Disable_Controlled because a) they were incorrect as they would reject
2293 a type which is sublect to the aspect, but may contain controlled
2294 components, and b) they are no longer necessary.
2295 * exp_util.ads (Needs_Finalization): Update comment on documentation.
2296 * freeze.adb (Freeze_Array_Type): Restore the original use of
2298 (Freeze_Record_Type): Restore the original use of Is_Controlled.
2299 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
2301 (Array_Type_Declaration): Restore the original use of Is_Controlled.
2302 (Build_Derived_Private_Type): Restore the original use of
2304 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
2305 type derived from Ada.Finalization.[Limited_]Controlled.
2306 (Build_Derived_Type): Restore the original use of Is_Controlled.
2307 (Record_Type_Definition): Restore the original use of Is_Controlled.
2308 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
2310 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
2311 (Analyze_Aspect_Specifications): Use routine
2312 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
2314 2017-09-13 Vincent Celier <celier@adacore.com>
2316 * clean.adb (Gnatclean): Fix error when looking for target
2317 of <target>-gnatclean
2319 2017-09-13 Javier Miranda <miranda@adacore.com>
2320 Ed Schonberg <schonberg@adacore.com>
2322 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
2323 expanded name that designates the current instance of a child unit in
2324 its own body and appears as the prefix of a reference to an entity
2325 local to the child unit.
2327 2017-09-12 Bob Duff <duff@adacore.com>
2329 * sem_warn.adb: Minor comment.
2331 2017-09-12 Bob Duff <duff@adacore.com>
2333 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
2334 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
2335 be Default_Initialized_Item, and apply pragma Unmodified to it,
2336 to suppress the warning.
2338 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
2340 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
2343 2017-09-12 Yannick Moy <moy@adacore.com>
2345 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
2346 together with Global when ignoring one in CodePeer mode.
2348 2017-09-12 Javier Miranda <miranda@adacore.com>
2350 * sem_ch3.adb (Analyze_Declarations): In nested
2351 package declarations that have a private part enable missing check
2352 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
2353 resolved at the end of the immediately enclosing declaration list.
2355 2017-09-12 Bob Duff <duff@adacore.com>
2357 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
2360 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
2362 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
2363 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
2365 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
2366 in preparation for the evolution of the SPARK language that
2367 includes a pointer analysis for checking non-aliasing of access
2368 types. The Check_Safe_Pointers function is the entry point, and
2369 will traverse the AST and raise compile-time errors everytime
2370 it detects non-begign aliasing. Detailed comments are present
2371 in the sem_spark.ads file.
2372 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
2373 functions to iterate over the list of globals of a subprogram.
2374 * libgnat/system.ads: Add restriction No_Finalization.
2375 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
2376 dependency on g-dynhta.adb.
2378 2017-09-12 Bob Duff <duff@adacore.com>
2380 * sem_ch6.adb (Analyze_Expression_Function): Call
2381 Check_Dynamically_Tagged_Expression.
2382 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
2383 "and then Is_Tagged_Type (Typ)" because there is an earlier
2384 "Assert (Is_Tagged_Type (Typ))".
2386 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
2388 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
2390 2017-09-11 Arnaud Charlet <charlet@adacore.com>
2392 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
2393 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
2394 for no longer supported platforms.
2395 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
2396 description of the semantics for dimensionality analysis.
2397 * gnat_ugn.texi: Regenerated.
2399 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
2401 * freeze.adb (Has_Incomplete_Compoent): Delete.
2403 Do not inhibit the freezing of the profile of an expression
2405 (Freeze_Subprogram): Do not re-create extra formals.
2406 * sem_ch6.adb (Analyze_Expression_Function): Always
2407 pre-analyze the expression if the function is not a completion.
2408 (Analyze_Subprogram_Body_Helper): For the body generated
2409 from an expression function that is not a completion, do
2410 not freeze the profile and temporary mask the types declared
2411 outside the expression that are not yet frozen.
2412 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
2413 during the pre-analysis of an expression function.
2415 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
2417 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
2420 2017-09-11 Yannick Moy <moy@adacore.com>
2422 * lib-xref-spark_specific.adb: Minor rewrite.
2424 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
2426 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
2427 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
2428 renaming into account.
2430 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
2432 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
2433 * gcc-interface/Makefile.in: Take this renaming into account.
2435 2017-09-11 Arnaud Charlet <charlet@adacore.com>
2437 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
2440 2017-09-11 Yannick Moy <moy@adacore.com>
2442 * sem_util.adb (Check_Result_And_Post_State):
2443 Do not issue a warning about missing reference to an outcome if
2444 the subprogram is ghost and has no outputs.
2445 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
2448 2017-09-11 Yannick Moy <moy@adacore.com>
2450 * gnat1drv.adb (Adjust_Global_Switches): Set
2451 Check_Validity_Of_Parameters to False in GNATprove mode.
2452 * opt.ads (Check_Validity_Of_Parameters): Document switch to
2455 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
2457 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
2458 generate debug info for inner record types if -fgnat-encodings=minimal.
2459 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
2460 type as the debug type.
2462 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2464 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
2465 packed record types if pragma Optimize_Alignment (Space) is enabled.
2467 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2469 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
2470 limits for expression functions.
2471 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
2473 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2475 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
2476 layout of the record from the parent type only if both are or are not
2478 (is_stored_discriminant): Return false for an unchecked union.
2480 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2482 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
2485 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2487 * gcc-interface/decl.c (promote_object_alignment): New function taken
2489 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
2490 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
2491 create a padding type on success before doing the atomic check.
2493 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2495 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
2496 promotion to static memory earlier in the processing.
2498 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2500 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
2501 and TYPE_BY_REFERENCE_P flags on types after various promotions.
2502 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2503 Consider all kinds of entities.
2505 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2507 * gcc-interface/utils.c (convert): When converting to a padding type,
2508 reuse an existing CONSTRUCTOR if it has got the right size.
2510 2017-09-08 Nicolas Roche <roche@adacore.com>
2512 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
2514 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
2515 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
2516 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
2517 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
2518 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
2519 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
2520 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
2521 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
2522 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
2523 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
2524 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
2525 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
2526 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
2527 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
2528 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
2529 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
2530 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
2531 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
2532 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
2533 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
2534 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
2535 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
2536 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
2537 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
2538 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
2539 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
2540 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
2541 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
2542 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
2543 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
2544 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
2545 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
2546 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
2547 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
2548 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
2549 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
2550 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
2551 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
2552 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
2553 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
2554 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
2555 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
2556 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
2557 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
2558 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
2559 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
2560 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
2561 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
2562 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
2563 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
2564 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
2565 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
2566 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
2567 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
2568 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
2569 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
2570 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
2571 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
2572 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
2573 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
2574 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
2575 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
2576 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
2577 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
2578 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
2579 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
2580 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
2581 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
2582 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
2583 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
2584 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
2585 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
2586 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
2587 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
2588 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
2589 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
2590 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
2591 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
2592 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
2593 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
2594 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
2595 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
2596 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
2597 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
2598 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
2599 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
2600 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
2601 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
2602 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
2603 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
2604 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
2605 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
2606 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
2607 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
2608 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
2609 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
2610 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
2611 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
2612 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
2613 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
2614 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
2615 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
2616 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
2617 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
2618 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
2619 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
2620 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
2621 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
2622 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
2623 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
2624 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
2625 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
2626 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
2627 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
2628 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
2629 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
2630 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
2631 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
2632 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
2633 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
2634 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
2635 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
2636 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
2637 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
2638 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
2639 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
2640 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
2641 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
2642 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
2643 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
2644 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
2645 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
2646 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
2647 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
2648 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
2649 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
2650 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
2651 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
2652 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
2653 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
2654 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
2655 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
2656 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
2657 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
2658 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
2659 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
2660 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
2661 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
2662 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
2663 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
2664 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
2665 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
2666 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
2667 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
2668 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
2669 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
2670 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
2671 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
2672 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
2673 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
2674 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
2675 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
2676 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
2677 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
2678 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
2679 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
2680 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
2681 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
2682 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
2683 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
2684 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
2685 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
2686 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
2687 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
2688 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
2689 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
2690 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
2691 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
2692 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
2693 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
2694 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
2695 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
2696 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
2697 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
2698 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
2699 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
2700 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
2701 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
2702 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
2703 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
2704 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
2705 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
2706 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
2707 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
2708 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
2709 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
2710 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
2711 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
2712 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
2713 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
2714 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
2715 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
2716 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
2717 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
2718 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
2719 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
2720 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
2721 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
2722 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
2723 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
2724 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
2725 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
2726 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
2727 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
2728 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
2729 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
2730 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
2731 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
2732 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
2733 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
2734 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
2735 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
2736 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
2737 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
2738 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
2739 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
2740 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
2741 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
2742 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
2743 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
2744 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
2745 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
2746 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
2747 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
2748 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
2749 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
2750 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
2751 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
2752 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
2753 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
2754 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
2755 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
2756 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
2757 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
2758 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
2759 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
2760 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
2761 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
2762 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
2763 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
2764 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
2765 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
2766 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
2767 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
2768 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
2769 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
2770 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
2771 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
2772 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
2773 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
2774 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
2775 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
2776 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
2777 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
2778 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
2779 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
2780 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
2781 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
2782 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
2783 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
2784 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
2785 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
2786 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
2787 to libgnat subdirectory.
2789 2017-09-08 Yannick Moy <moy@adacore.com>
2791 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
2792 return the entity associated with the call.
2793 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
2794 Replace the internal Get_Function_Id with the new
2795 Sem_Aux.Get_Called_Entity.
2796 (Iterate_Call_Parameters): New
2797 procedure to iterate on formals and actuals at the same time.
2798 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
2799 Set SPARK_Mode from spec when set, for analysis
2800 of instance. Restore after analysis of instance.
2801 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
2802 set, for analysis of body instance. Restored automatically at
2803 the end of the subprogram.
2804 * gnat1drv.adb (Adjust_Global_Switches): Set
2805 Check_Validity_Of_Parameters to False in GNATprove mode.
2806 * opt.ads (Check_Validity_Of_Parameters): Document switch to
2809 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2811 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
2812 (New_Copy_Tree): ...there. Reset the hash tables only if they
2813 were used in the previous invocation.
2814 * s-htable.adb: Fix typo.
2816 2017-09-08 Bob Duff <duff@adacore.com>
2818 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
2820 2017-09-08 Arnaud Charlet <charlet@adacore.com>
2822 * sem_aggr.adb: minor style fix.
2824 2017-09-08 Bob Duff <duff@adacore.com>
2826 * sprint.adb (Write_Corresponding_Source): Ignore if there is
2827 no current source file.
2828 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
2829 Print something helpful in case N is invalid.
2830 * sprint.ads: Minor comment fix.
2832 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2834 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
2837 2017-09-08 Bob Duff <duff@adacore.com>
2839 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
2840 Ada_2020, along the same lines as the other Ada version pragmas.
2842 2017-09-08 Gary Dismukes <dismukes@adacore.com>
2844 * sem_ch12.adb: Minor typo fixes and reformatting.
2846 2017-09-08 Yannick Moy <moy@adacore.com>
2848 * sem_aggr.adb (Resolve_Record_Aggregate):
2849 Rewrite bounds of aggregate subexpressions which may depend on
2850 discriminants of the enclosing aggregate.
2852 2017-09-08 Yannick Moy <moy@adacore.com>
2854 * sem_ch5.adb: Prevent assertion failure on illegal code.
2856 2017-09-08 Yannick Moy <moy@adacore.com>
2858 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
2859 calling Renamed_Entity on an entity which cannot be a renaming.
2861 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2863 * exp_aggr.adb: Add with & use clause for Urealp.
2864 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
2865 elementary types instead of just discrete types.
2866 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
2867 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
2868 Be prepared for the FP zero value in the memset case. Add small
2871 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2873 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
2876 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
2878 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
2879 of New_Copy because the latter leaves the syntactic structure of
2880 the tree inconsistent (a child is accessible through two parents)
2881 and prevents proper replication of itypes by subsequent calls
2883 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
2884 New_Copy because the latter leaves the syntactic structure of the
2885 tree inconsistent (a child is accessible through two parents)
2886 and prevents proper replication of itypes by subsequent calls
2888 * sem_util.adb (In_Subtree): New routine.
2889 (New_Copy_Tree): Reimplemented.
2890 * sem_util.ads (In_Subtree): New routine.
2891 (New_Copy_Tree): Reimplemented.
2893 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2895 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
2896 for aspect Default_Value is a static scalar value, but it does
2897 not freeze the type. Yhis allows for subsequent representation
2898 clauses for the type.
2900 2017-09-08 Javier Miranda <miranda@adacore.com>
2902 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
2903 not add entries into the undefined reference table when we are
2904 compiling with errors ignored.
2906 2017-09-08 Ed Schonberg <schonberg@adacore.com>
2908 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
2909 check if the instance is within an enclosing instance body. The
2910 formal package was legal in the enclosing generic, and is
2911 legal in the enclosing instantiation. This optimisation may be
2912 applicable elsewhere, and it also removes spurious errors that
2913 may arise with on-the-fly processing of instantiations that
2914 contain Inline_Always subprograms.
2916 2017-09-08 Vincent Celier <celier@adacore.com>
2918 * gnatcmd.adb: Disregard empty argument of GNAT driver.
2920 2017-09-08 Justin Squirek <squirek@adacore.com>
2922 * checks.adb (Insert_Valid_Check): Manually decorate
2923 the generated temporary for range valdity checks.
2925 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
2927 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
2929 2017-09-08 Justin Squirek <squirek@adacore.com>
2931 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
2932 case to handle underscore flags.
2933 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
2934 new procedure to handle underscores.
2936 2017-09-08 Javier Miranda <miranda@adacore.com>
2938 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
2939 divisions with fixed point results to avoid generating twice
2940 the runtime check on divide by zero.
2941 * checks.adb (Apply_Divide_Checks): Ensure that operands are
2942 not evaluated twice (once for their runtime checks and once for
2943 their regular computation).
2945 2017-09-08 Yannick Moy <moy@adacore.com>
2947 * sem_prag.adb (Analyze_Part_Of): Add missing
2948 return statements after issuing errors. Add detection of
2949 out-of-order item and single concurrent type.
2951 2017-09-08 Nicolas Roche <roche@adacore.com>
2953 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
2954 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
2955 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
2956 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
2957 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
2958 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
2959 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
2960 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
2961 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
2962 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
2963 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
2964 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
2965 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
2966 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
2967 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
2968 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
2969 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
2970 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
2971 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
2972 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
2973 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
2974 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
2975 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
2976 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
2977 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
2978 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
2979 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
2980 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
2981 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
2982 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
2983 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
2984 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
2985 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
2986 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
2987 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
2988 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
2989 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
2990 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
2991 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
2992 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
2993 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
2994 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
2995 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
2996 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
2997 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
2998 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
2999 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3000 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3001 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3002 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3003 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3004 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3005 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3006 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3008 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3010 * doc/share/conf.py, doc/share/latex_elements.py,
3011 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3014 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3016 * gnat_rm.texi, gnat_ugn.texi,
3017 doc/gnat_ugn/the_gnat_compilation_model.rst,
3018 doc/gnat_ugn/getting_started_with_gnat.rst,
3019 doc/gnat_ugn/inline_assembler.rst,
3020 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3021 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3022 doc/gnat_ugn/about_this_guide.rst,
3023 doc/gnat_ugn/platform_specific_information.rst,
3024 doc/gnat_ugn/example_of_binder_output.rst,
3025 doc/gnat_ugn/gnat_and_program_execution.rst,
3026 doc/gnat_ugn/gnat_utility_programs.rst,
3027 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3028 doc/gnat_rm/interfacing_to_other_languages.rst,
3029 doc/gnat_rm/implementation_defined_aspects.rst,
3030 doc/gnat_rm/intrinsic_subprograms.rst,
3031 doc/gnat_rm/implementation_defined_characteristics.rst,
3032 doc/gnat_rm/implementation_advice.rst,
3033 doc/gnat_rm/implementation_defined_attributes.rst,
3034 doc/gnat_rm/compatibility_and_porting_guide.rst,
3035 doc/gnat_rm/standard_library_routines.rst,
3036 doc/gnat_rm/the_gnat_library.rst,
3037 doc/gnat_rm/implementation_defined_pragmas.rst,
3038 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3039 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3040 doc/gnat_rm/obsolescent_features.rst,
3041 doc/gnat_rm/about_this_guide.rst,
3042 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3043 doc/gnat_rm/implementation_of_ada_2012_features.rst,
3045 doc/gnat_rm.rst: Update documentation.
3047 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3049 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3050 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3051 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3053 2017-09-08 Bob Duff <duff@adacore.com>
3055 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3056 New routine to read the Tag robustly.
3057 * exp_attr.adb (Input): Change the expansion of 'Input,
3058 in the class-wide case, to call String_Input_Tag instead of
3059 String_Input_Blk_IO.
3061 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3063 * s-rident.ads (Restriction_Id): reorder enum
3064 literals, so that Pure_Barriers is no longer in range of the
3065 Cunit_Boolean_Restrictions subtype.
3067 2017-09-08 Nicolas Roche <roche@adacore.com>
3069 * a-taster.ads, a-taster.adb: Move to libgnarl
3070 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3071 Add support for files in libgnarl.
3073 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3075 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3076 accessibility check to an interface conversion, whose purpose
3077 is to perform a pointer adjustment in a dispatching call.
3078 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3079 when the actual is a construct that involves a dereference of an
3080 expression that includes a formal of the enclosing subprogram,
3081 In such cases, the accessibility level of the actual is that of
3082 the corresponding formal, which is passed in as an additional
3083 actual in the outer call.
3085 2017-09-08 Bob Duff <duff@adacore.com>
3087 * exp_intr.adb (Add_Source_Info): Do not decode
3088 file names; they were not encoded in the first place.
3090 2017-09-08 Bob Duff <duff@adacore.com>
3092 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3093 exceptions instead of crashes. Check for absurdly long strings
3094 and empty strings. Empty strings cause trouble because they can
3095 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3096 be empty, which causes an array index out of bounds.
3097 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3100 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3102 * sem_util.adb (Is_CCT_Instance): allow use in
3103 the context of protected types.
3105 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3107 * a-tigeli.adb: minor remove extra whitespace.
3109 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3111 * par-ch4.adb: Reformatting of an error message.
3113 2017-09-08 Javier Miranda <miranda@adacore.com>
3115 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3116 identifiers to ensure their correct decoration of names on
3119 2017-09-08 Yannick Moy <moy@adacore.com>
3121 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3122 not skip a loop coming from source which is rewritten into a loop.
3124 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3126 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3127 wrapper has convention Ada, to prevent spurious warnings on
3128 unconstrained array parameters.
3130 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3132 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3133 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3135 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3137 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3139 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3141 * exp_intr.adb (Append_Entity_Name): Move to ...
3142 * sem_util.ads, sem_util.adb: ... here to share it.
3143 (Subprogram_Name): New subprogram, to compute the name of the enclosing
3145 * errutil.adb (Error_Msg): Fill new field Node.
3146 * erroutc.ads (Subprogram_Name_Ptr): New.
3147 (Error_Msg_Object): New field Node.
3148 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3149 * errout.adb (Error_Msg): New variant with node id parameter.
3150 Fill new parameter Node when emitting messages. Revert previous
3151 changes for Include_Subprogram_In_Messages.
3152 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3153 generating warning message.
3155 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3157 * par-ch4.adb (P_Iterated_Component_Association): Place construct
3158 under -gnat2020 flag, given that it is a future feature of
3160 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
3161 defining identifier as referenced to prevent spurious warnings:
3162 corresponding loop is expanded into one or more loops whose
3163 variable has the same name, and the expression uses those names
3164 and not the original one.
3166 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3168 * sem_elab.adb (Check_A_Call): Do not consider
3169 references to internal variables for SPARK semantics.
3171 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3173 * inline.adb (In_Package_Spec): refine type of
3174 the parameter from Node_Id to Entity_Id.
3176 2017-09-08 Justin Squirek <squirek@adacore.com>
3178 * exp_ch5.adb (Expand_Formal_Container_Loop):
3179 Reset the scope of the loop parameter after it is reanalyzed.
3181 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3183 * sem_util.ads (Set_Rep_Info): New inline procedure.
3184 * sem_util.adb (Set_Rep_Info): Implement it.
3185 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
3186 always copy the representation aspects onto the subtype.
3188 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
3190 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
3191 Correction of the return type from access type to option type.
3192 (Simple_HTable): Moving the Instance_Data to ads file.
3194 2017-09-08 Yannick Moy <moy@adacore.com>
3196 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
3198 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3200 * opt.ads (Include_Subprogram_In_Messages): New variable.
3201 * errout.ads (Current_Subprogram_Ptr): New variable.
3202 * errout.adb (Error_Msg): Prepend current subprogram info
3203 in messages if Include_Subprogram_In_Messages is set.
3204 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
3206 * gnat1drv.adb (Adjust_Global_Switches): Set
3207 Include_Subprogram_In_Messages when -gnatdJ is set.
3208 * debug.adb: Document and reserve -gnatdJ.
3210 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
3212 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
3213 functions to iterate over simple hastables.
3214 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
3216 2017-09-08 Javier Miranda <miranda@adacore.com>
3218 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
3219 missing checks on the presence of Entity() before checking the
3222 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3224 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
3225 statements, use local variable and remove unnecessary processing.
3227 2017-09-08 Javier Miranda <miranda@adacore.com>
3229 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
3231 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
3232 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3234 (Unqual_BIP_Iface_Function_Call): New subprogram.
3235 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
3236 subprogram containing code that was previously inside
3237 Make_Build_In_Place_Call_In_Object_Declaration since it is also
3238 required for one of the new subprograms.
3240 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
3241 (Expand_N_Extended_Return_Statement): Extend the
3242 cases covered by an assertion on expected BIP object
3244 (Make_Build_In_Place_Call_In_Assignment):
3245 Removing unused code; found working on this ticket.
3246 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
3247 that replaces the internal name of the renaming declaration
3248 into the new subprogram Replace_Renaming_Declaration_Id.
3249 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
3250 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
3252 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3254 (Unqual_BIP_Iface_Function_Call): New subprogram.
3255 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
3256 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
3257 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
3258 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3259 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
3260 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
3261 (Expand_N_Indexed_Component): Invoke the new subprogram
3262 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3263 (Expand_N_Selected_Component): Invoke the new subprogram
3264 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3265 (Expand_N_Slice): Invoke the new subprogram
3266 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3267 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
3268 Invoke the new subprogram
3269 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3271 2017-09-08 Javier Miranda <miranda@adacore.com>
3273 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
3274 access to interface types. Remove also the accessibility check.
3276 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3278 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
3279 all the types that are referenced by the expression.
3280 (Analyze_Expression_Function): Call Freeze_Expr_Types for
3281 a completion instead of manually freezing the type of the
3283 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
3285 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3287 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
3288 New procedure, auxiliary to Expand_Pragma_Check, to handle
3289 references to the discriminants of a protected type within a
3290 precondition of a protected operation. This is needed because
3291 the original precondition has been analyzed in the context of
3292 the protected declaration, but in the body of the operation
3293 references to the discriminants have been replaved by references
3294 to the discriminants of the target object, and these references
3295 are only created when expanding the protected body.
3297 2017-09-08 Yannick Moy <moy@adacore.com>
3299 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
3302 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3304 * exp_attr.adb (Build_Record_VS_Func): If the record is an
3305 unchecked union, do not emit checks for its (non-existent)
3306 discriminants, or for variant parts that depend on them.
3308 2017-09-08 Justin Squirek <squirek@adacore.com>
3310 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
3311 Find_Comparison_Type.Try_One_Interp): Add check for generic
3314 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3316 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
3317 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
3318 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
3319 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
3320 remaining references to AAMP_On_Target.
3322 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3324 * style.adb: Fix typo.
3326 2017-09-08 Javier Miranda <miranda@adacore.com>
3328 * einfo.adb (Underlying_Type): Add missing support for class-wide
3329 types that come from the limited view.
3330 * exp_attr.adb (Attribute_Address): Check class-wide type
3331 interfaces using the underlying type to handle limited-withed
3333 (Attribute_Tag): Check class-wide type interfaces using
3334 the underlying type to handle limited-withed types.
3336 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3338 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
3339 over a subtype of a type with a static predicate, taking into
3340 account the predicate function of the parent type and the bounds
3341 given in the loop specification.
3342 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
3343 a loop specification that is a subtype indication whose type mark
3344 is a type with a static predicate, inherit predicate function,
3345 used to build case statement for rewritten loop.
3347 2017-09-08 Justin Squirek <squirek@adacore.com>
3349 * lib-load.adb: Modify printing of error message to exclude file
3352 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3354 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
3355 don't inline subprograms declared in both visible and private
3357 (In_Package_Spec): previously In_Package_Visible_Spec; now
3358 detects subprograms declared both in visible and private parts
3361 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3363 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
3364 the type is an anonymous array in an object declaration, whose
3365 component type has an invariant, use the object declaration
3366 as the insertion point for the invariant procedure, given that
3367 there is no explicit type declaration for an anonymous array type.
3369 2017-09-08 Bob Duff <duff@adacore.com>
3371 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
3373 2017-09-08 Bob Duff <duff@adacore.com>
3375 * a-strfix.adb (Trim): Compute Low and High only if needed.
3377 2017-09-08 Justin Squirek <squirek@adacore.com>
3379 * lib-load.adb (Load_Main_Source): Add error output in the case a
3380 source file is missing.
3382 2017-09-08 Bob Duff <duff@adacore.com>
3385 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
3386 Default_WCEM by default (i.e. if the encoding is not specified
3387 by the Form string).
3389 2017-09-08 Bob Duff <duff@adacore.com>
3391 * s-trasym.ads (Hexa_Traceback): If
3392 Suppress_Hex is True, print "..." instead of a hexadecimal
3394 * s-trasym.adb: Ignore No_Hex in this version.
3397 2017-09-08 Bob Duff <duff@adacore.com>
3399 * debug.adb: Minor reformatting.
3401 2017-09-08 Bob Duff <duff@adacore.com>
3403 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
3404 code so it doesn't trigger an "uninit var" warning.
3406 2017-09-08 Nicolas Roche <roche@adacore.com>
3408 * s-hibaen.ads: Remove obsolete file.
3410 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3412 * a-locale.ads: Add comment explaining the state of this package.
3414 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3416 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
3418 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
3419 allow calls in the context of package spec (for pragma
3420 Initializes) and bodies (for pragma Refined_State).
3422 2017-09-08 Bob Duff <duff@adacore.com>
3424 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
3427 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3429 * debug.adb (dA): Adjust comment.
3430 * gnat1drv.adb (Gnat1drv): Likewise.
3431 * opt.ads (List_Representation_Info_Extended): New variable.
3432 * repinfo.adb (List_Record_Info): Split implementation into...
3433 (Compute_Max_Length): ...this. Recurse on records if requested.
3434 (List_Record_Layout): Likewise.
3435 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
3436 statement, accept '0' and set List_Representation_Info_Extended
3438 * usage.adb (Usage): Document new -gnatRe variant.
3440 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3442 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
3443 Do not save the given entity in the global variable Default_Pool
3444 if the pragma appears within a generic unit.
3446 2017-09-08 Bob Duff <duff@adacore.com>
3448 * errout.adb (Delete_Warning): Do not
3449 decrement Warnings_Treated_As_Errors. This is called before
3450 Warnings_Treated_As_Errors has been incremented to account for
3451 this warning. Decrementing it here can lead to negative values
3452 of Warnings_Treated_As_Errors, raising Constraint_Error in
3453 checks-on builds, and causing the compiler to return an error
3454 code in checks-off builds.
3456 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3458 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
3459 entities of named concurrent types as Ref_Id and not of anonymous
3460 concurrent objects (because callers already know when a conversion
3461 is necessary and can easily do it); also, do not expect protected
3462 types or protected objects as Context_Id (because no flow-related
3463 SPARK pragmas are attached there); reflect these changes in a
3464 more precise comment.
3466 2017-09-08 Olivier Hainque <hainque@adacore.com>
3468 * g-altive.ads: Add documentation.
3470 2017-09-08 Bob Duff <duff@adacore.com>
3472 * sem_util.ads, debug.adb: Minor comment fix.
3473 * erroutc.ads: Comment fix.
3475 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3477 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
3478 for compatibility of component types of formal and actual in an
3479 instantiation of a child unit, when the component type of the
3480 formal is itself a formal of an enclosing generic.
3482 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3484 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
3485 sem_prag.adb to make it available for GNATprove; for concurrent
3486 types replace custom scope climbing with Scope_Same_Or_Within; for
3487 single concurrent objects add scope climbing (with Scope_Within),
3488 which was not there (that's the primary semantic change of this
3489 commit); also, when comparing a single concurrent object with
3490 its corresponding concurrent type rely on equality of types,
3491 not of objects (because that's simpler to code).
3492 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
3493 (Analyze_Global_Item): adjust special-casing of references to the
3494 current instance of a concurrent unit in the Global contracts
3495 of task types and single tasks objects; similar for references
3496 in the protected operations and entries of protected types and
3497 single protected objects (in all these cases the current instance
3498 behaves as an implicit parameter and must not be mentioned in
3499 the Global contract).
3501 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3503 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
3504 function calls returning a record within a subprogram call,
3507 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3509 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
3510 name that designates the current instance of a child unit in its
3511 own body and appears as the prefix of a reference to an entity
3512 local to the child unit.
3513 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
3516 2017-09-08 Yannick Moy <moy@adacore.com>
3518 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
3521 2017-09-08 Tristan Gingold <gingold@adacore.com>
3523 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
3524 warnings on internal units in configurable run time mode.
3526 2017-09-08 Bob Duff <duff@adacore.com>
3528 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
3529 representation items from interfaces that the derived type
3530 implements, not just from the parent type.
3531 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
3532 this to return an empty list when there are no interfaces.
3533 * einfo.ads, sem_ch13.adb: Minor comment fixes.
3534 * sem_attr.adb: Minor comment fix.
3536 2017-09-08 Doug Rupp <rupp@adacore.com>
3538 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
3541 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3543 * exp_ch4.adb (Expand_N_Allocator): Generate a
3544 call to Allocate_Any_Controlled when the allocation does not
3545 require any initialization.
3547 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3549 * sem_util.adb (Copy_Node_With_Replacement):
3550 Update the Renamed_Object field of a replicated object renaming
3553 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
3555 * exp_ch9.adb (Is_Pure_Barrier): Allow type
3556 conversions and components of objects. Simplified the detection
3557 of the Count attribute by identifying the corresponding run-time
3560 2017-09-08 Yannick Moy <moy@adacore.com>
3562 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
3563 sem_type.adb, sinfo.ads: Minor reformatting.
3565 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3567 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
3568 of Freeze_Profile, used to inhibit the freezing of the profile
3569 of an expression function declared within a nested package, when
3570 some type in the profile depends on a private type declared in
3571 an enclosing package.
3573 2017-09-08 Bob Duff <duff@adacore.com>
3575 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
3576 the subunit case. It's still OK to set it in the "missing subunits"
3577 case, because that won't cause the obsolete .ali files that cause
3580 2017-09-08 Bob Duff <duff@adacore.com>
3582 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
3583 unclear why this didn't cause a warning.
3584 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
3585 pragmas. It's unclear why this didn't cause an error.
3587 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3589 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
3591 (Expand_SPARK_Potential_Renaming): Code clean up.
3592 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
3593 the item does not have a proper entity.
3594 (Analyze_Input_Item): Add a guard in case the item does not have a
3596 (Collect_States_And_Objects): Include object renamings in the
3597 items being collected.
3598 (Resolve_State): Update the documentation of this routine.
3599 * sem_util.adb (Entity_Of): Add circuitry to handle
3600 renamings of function results.
3601 (Remove_Entity): New routine.
3602 (Remove_Overloaded_Entity): Take advantage of factorization.
3603 * sem_util.ads (Entity_Of): Update the documentation
3605 (Remove_Entity): New routine.
3606 (Remove_Overloaded_Entity): Update the documentation of this
3609 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3611 * repinfo.adb (List_Record_Info): During first loop,
3612 do not override the normalized position and first bit
3613 if they have already been set. Move fallback code
3614 for the packed case to the case where it belongs.
3615 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
3616 Also adjust the normalized position of components.
3617 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
3619 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3621 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
3622 the placement of a primitive operation O that renames an operation
3623 R declared in an inner package, and which is thus not a primitive
3624 of the dispatching type of O. In this case O is a new primitive
3625 and does not inherit its dispatch table position from R (which
3628 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3630 * sem_dim.adb (Analyze_Dimension_If_Expression,
3631 Analyze_Dimension_Case_Expression): new subprograms to verify
3632 the dimensional correctness of Ada2012 conditional expressions,
3633 and set properly the dimensions of the construct.
3634 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
3635 call Analyze_Dimension.
3637 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3639 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
3640 loop on an interface declared as a private extension of another
3641 synchronized interface.
3643 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3645 * sem_ch12.adb (Check_Generic_Parent): New procedure within
3646 Analyze_Associations, to handle actual packages that depend on
3647 previous instances. If a package IAP that is an instantiation is
3648 used as an actual in a subsequent instantiation SI in the same
3649 scope, and IAP has a body, IAP must be frozen before SI. If
3650 the generic parent of IAP is itself declared in a previous
3651 instantiation in the same scope, that instantiation must also
3652 be frozen before SI.
3653 (Install_Body): Prevent double insertion of freeze node for
3656 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3658 * sem_prag.adb (Resolve_State): Update the
3659 comment on documentation. Generate a reference to the state once
3660 resolution takes place.
3662 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3664 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3665 Linker_Section): If the aspect applies to an object declaration
3666 with explicit initialization, do not delay the freezing of the
3667 object, to prevent access-before-elaboration in the generated
3668 initialization code.
3670 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3672 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
3673 (Integer_Value (Item)) when the size of the fixed decimal type
3674 is larger than Integer.
3676 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3679 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
3680 in order of increasing position in more cases.
3682 2017-09-07 Yannick Moy <moy@adacore.com>
3684 * a-exetim-mingw.ads: Add contract Global=>null
3685 on all operations that are modeled as having no read or write
3686 of global variables in SPARK.
3688 2017-09-07 Raphael Amiard <amiard@adacore.com>
3690 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
3691 to Hmaps.Generic_Ops.
3692 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
3694 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
3696 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
3697 position in cursors.
3699 2017-09-07 Javier Miranda <miranda@adacore.com>
3701 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
3702 allow disabling the generation of implicit pragma Elaborate_All
3705 2017-09-07 Javier Miranda <miranda@adacore.com>
3707 * exp_disp.adb (Make_Tags): Avoid suffix counter
3708 in the external name of the elaboration flag. Required to fix
3709 the regressions introduced by the initial version of this patch.
3711 2017-09-07 Bob Duff <duff@adacore.com>
3713 * sem_ch6.adb (Analyze_Function_Return): Do not
3714 insert an explicit conversion to force the displacement of the
3715 "this" pointer to reference the secondary dispatch table in the
3716 case where the return statement is returning a raise expression,
3717 as in "return raise ...".
3719 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3721 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
3722 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
3723 procedure from sem_disp.adb.
3724 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
3726 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
3727 return the instantiation node for subprograms. Update references
3728 to Get_Unit_Instantiation_Node.
3729 * sem_ch7.adb (Install_Parent_Private_Declarations): update
3730 reference to Get_Unit_Instantiation_Node.
3731 * exp_dist.adb (Build_Package_Stubs): update reference to
3732 Get_Unit_Instantiation_Node.
3733 * sem_ch9.adb: minor typo in comment.
3734 * lib-xref-spark_specific.adb
3735 (Traverse_Declaration_Or_Statement): traverse into task type
3738 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3740 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
3741 to handle properly various cases of type conversions where the
3742 target type and/or the expression carry dimension information.
3743 (Dimension_System_Root); If a subtype carries dimension
3744 information, obtain the source parent type that carries the
3747 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
3749 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
3751 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3753 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
3754 If the prefix is a reference to an object, rewrite it as an
3755 explicit dereference, as required by 3.7.2 (2) and as is done
3756 with most other attributes whose prefix is an access value.
3758 2017-09-07 Bob Duff <duff@adacore.com>
3760 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
3761 Refined_Depends aspect.
3762 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
3763 Refined_Depends pragma.
3764 * scans.ads: Fix documentation of Inside_Depends flag.
3765 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
3767 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
3769 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
3770 Account for the case where the are no lists to insert, but the
3771 secondary stack still requires management.
3772 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
3773 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
3774 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
3775 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
3778 2017-09-07 Vincent Celier <celier@adacore.com>
3780 * clean.adb: Do not get the target parameters before calling
3783 2017-09-07 Nicolas Roche <roche@adacore.com>
3785 * s-osinte-solaris-posix.ads: Removed.
3787 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3789 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
3790 single concurrent objects.
3792 2017-09-07 Javier Miranda <miranda@adacore.com>
3794 * s-regexp.ads: Fix documentation of the globbing grammar.
3796 2017-09-07 Gary Dismukes <dismukes@adacore.com>
3798 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
3800 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3802 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
3803 in CodePeer mode, to support more legacy code automatically.
3805 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3807 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
3808 and thus not a controlling argument, preserve its type after
3809 rewriting because it may appear in an nested call with a classwide
3812 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3814 * comperr.adb (Delete_SCIL_Files): Handle case of
3815 N_Package_Instantiation.
3817 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3819 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
3820 clause for a unit U appears in a context that includes a regular
3821 with_clause on U, rewrite the redundant private clause into a null
3822 statement, rather than removing it altogether from the context,
3823 so that ASIS tools can reconstruct the original source.
3825 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3827 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
3828 for aspect Small can be of any real type (not only a universal
3829 real literal) as long as it is a static constant.
3831 2017-09-07 Thomas Quinot <quinot@adacore.com>
3833 * par_sco.adb: Minor reformatting.
3835 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3837 * s-parame-ae653.ads: Removed.
3839 2017-09-07 Nicolas Roche <roche@adacore.com>
3841 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
3842 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
3843 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
3844 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
3845 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
3846 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
3848 2017-09-07 Yannick Moy <moy@adacore.com>
3850 * a-ngelfu.ads Add preconditions to all functions
3851 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
3853 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3855 * lib-xref.adb (Generate_Reference): ignore
3856 references to entities which are Part_Of single concurrent
3859 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3861 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
3864 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3866 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
3867 Null_Task_Id is passed.
3869 2017-09-07 Javier Miranda <miranda@adacore.com>
3871 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
3872 attribute. Defined for record types and subtypes.
3873 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
3874 (Init_Tags_List) to facilitate generating separate code in the
3875 IP routine to initialize the object components and for completing
3876 the elaboration of dispatch tables.
3877 * exp_ch3.adb (Build_Init_Procedure): Improve the code
3878 generated in the IP routines by means of keeping separate
3879 the initialization of the object components from the
3880 initialization of its dispatch tables. (Init_Secondary_Tags):
3881 Adding new formal (Init_Tags_List) and adjusting calls to
3882 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
3883 adjusting also calls to Ada.Tags.Register_Interface_Offset
3884 because the type of one of its formals has been changed.
3885 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
3886 modified. Instead of receiving a pointer to an object this
3887 routine receives now a primary tag.
3888 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
3889 additional formal: the tag of the primary dispatch table.
3890 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
3891 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
3892 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
3893 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
3894 formal in calls to Init_Secondary_Tags.
3896 2017-09-07 Javier Miranda <miranda@adacore.com>
3898 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
3900 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
3901 applied to generic subprograms.
3903 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3905 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
3906 (because it refers to the anonymous concurrent object, not its type);
3907 fix condition for emitting error message about task/protected type,
3909 2017-09-07 Bob Duff <duff@adacore.com>
3911 * binde.adb (Debug_Flag_Old): If both -do and -dp
3912 are specified, behave as if just -do was specified, rather than
3915 2017-09-07 Nicolas Roche <roche@adacore.com>
3917 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
3918 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
3920 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3922 * sem_prag.adb (Find_Role): The Global_Seen flag
3923 is now consulted not only for abstract states and variables,
3924 but for all kinds of items.
3925 (Collect_Subprogram_Inputs_Outputs): Do not process formal
3926 generic parameters, because unlike ordinary formal parameters,
3927 generic formals only act as input/ outputs if they are explicitly
3928 mentioned in a Global contract.
3930 2017-09-07 Yannick Moy <moy@adacore.com>
3932 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
3933 predicate procedure. Check predicate pragma/aspect with Ghost entity.
3934 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
3937 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3939 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
3941 * sem_ch3.adb (Build_Derived_Record_Type):i Call
3942 Copy_Dimensions_Of_Components after creating the copy of the
3944 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
3945 derived recor type, copy the dikensions if any of each component
3946 of the parent record to the corresponding component declarations
3947 of the derived record. These expressions are used among other
3948 things as default values in aggregates with box associations.
3949 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
3950 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
3953 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3955 * sem_util.adb: Remove extra space after THEN.
3957 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3959 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
3960 also mark the renamed subprogram as referenced.
3962 2017-09-07 Ed Schonberg <schonberg@adacore.com>
3964 * par-ch6.adb (P_Subprogram): Improve error message on null
3965 procedure with misplaced aspect specification, which the parser
3966 first attempts to interpret as a malformed expression function.
3968 2017-09-07 Gary Dismukes <dismukes@adacore.com>
3970 * sem_attr.adb (Analyze_Attribute_Old_Result):
3971 Allow attributes Result and Old in the case of an expression
3974 2017-09-07 Justin Squirek <squirek@adacore.com>
3976 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
3977 Volatile to subcomponents.
3979 2017-09-07 Bob Duff <duff@adacore.com>
3981 * exp_ch7.adb (Find_Last_Init): Check for the
3982 case where a build-in-place function call has been replaced by a
3983 'Reference attribute reference.
3985 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3987 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
3990 2017-09-07 Bob Duff <duff@adacore.com>
3992 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
3993 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
3994 secondary stack for all functions that return limited tagged
3995 types -- just do it for dispatching calls. Misc cleanup.
3996 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
3997 remove qualifications and type conversions. Fix various bugs
3998 where only a single level of qualification or conversion was
3999 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4001 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4004 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4006 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4007 do not create actual subtypes that may generate further predicate
4009 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4010 of body is a predicate function as well.
4011 (Resolve_Aspect_Expressions, Resolve_Name): For a component
4012 association, only the expression needs resolution, not the name.
4013 (Resolve_Aspect_Expressions, case Predicates): Construct and
4014 analyze the predicate function declaration in the scope of the
4015 type, before making the type and its discriminants visible.
4017 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4019 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4020 only if the record type itself comes from source.
4022 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4024 * sem_ch5.adb: Minor reformatting and a typo fix
4026 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4028 * sinput-l.ads: minor remove extra period at the end of comment
4030 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4032 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4034 (Find_Role): remove support for E_Discriminant.
4036 2017-09-06 Javier Miranda <miranda@adacore.com>
4038 * exp_ch6.adb (Expand_Simple_Function_Return):
4039 Add missing implicit type conversion to force displacement of the
4042 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4044 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4046 2017-09-06 Yannick Moy <moy@adacore.com>
4048 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4049 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4051 2017-09-06 Bob Duff <duff@adacore.com>
4053 * sem_ch8.adb: Change Assert to be consistent with
4056 2017-09-06 Bob Duff <duff@adacore.com>
4058 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4059 requested. Previously, the -do switch meant "run Elab_New and
4060 Elab_Old and use the order chosen by Elab_Old, possibly with
4061 debugging printouts comparing the two orders." Now it means
4062 "do not run Elab_New." This is of use if there are bugs that
4063 cause Elab_New to crash.
4064 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4066 * ali.ads (Elab_Position): Change type to Nat, to avoid various
4069 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4071 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4072 reference to SPARK RM.
4074 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4076 * layout.adb: Use SSU short hand consistently throughout the file.
4078 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4080 * freeze.adb (Freeze_Record_Type)
4081 <Sized_Component_Total_Round_RM_Size>: New local variable to
4082 accumulate the rounded RM_Size of components. Update it for
4083 every component whose RM_Size is statically known. Add missing
4084 guard to check that bit packing is really required before issuing
4085 the error about packing. Swap condition for clarity's sake.
4086 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4088 2017-09-06 Fedor Rybin <frybin@adacore.com>
4090 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4091 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4092 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4093 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4094 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4095 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4096 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4097 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4098 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4099 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4100 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4101 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4102 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4103 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4104 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4105 project manager sources.
4107 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4109 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4110 entity of a mutable type and the right-hand side is a conditional
4111 expression, resolve the alternatives of the conditional using
4112 the base type of the target entity, because the alternatives
4113 may have distinct subtypes. This is particularly relevant if
4114 the alternatives are aggregates.
4116 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4118 * checks.adb (Apply_Predicate_Check): If the expression is an
4119 aggregate that is the RHS of an assignment, apply the check to
4120 the LHS after the assignment, rather than to the aggregate. This
4121 is more efficient than creating a temporary for the aggregate,
4122 and prevents back-end crashes when the aggregate includes a
4123 dynamic "others' association.
4125 2017-09-06 Yannick Moy <moy@adacore.com>
4127 * sem_ch12.adb (Analyze_Instance_And_Renamings):
4128 Set variable to ignore SPARK_Mode in instance before the analysis
4129 of the generated package declaration.
4131 2017-09-06 Yannick Moy <moy@adacore.com>
4133 * sem_res.adb (Resolve_Call): Do not issue a
4134 message for calls inside expression function, unless body was
4135 seen and is candidate for inlining.
4137 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4139 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4140 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4141 body. do not freeze the formals of the generic unit.
4143 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4145 * errout.adb (Error_Msg): Separate the
4146 treatment for warning vs. style messages in inlinings and
4147 instantiations. Prevents blowups on calls to Warn_Insertion for
4148 style messages, which should not be called in that case because
4149 Warning_Msg_Char is not set.
4151 2017-09-06 Justin Squirek <squirek@adacore.com>
4153 * sem_prag.adb (Check_VFA_Conflicts): Created
4154 to group all Volatile_Full_Access checks relating to other
4155 representation pragmas (Mark_Component_Or_Object): Created
4156 to centeralize the flagging of attributes for the record type
4157 component case, a pragma applied individually to a component, and
4159 (Process_Atomic_Independent_Shared_Volatile):
4160 Add propagation of certain pragmas to record components and move
4161 evaluation of VFA checks
4163 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4165 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
4166 Do not warn on conditions that are not obeyed for Inline_Always
4167 subprograms, when assertions are not enabled.
4169 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4171 * sem_util.adb (Unique_Entity): For abstract states return their
4174 2017-09-06 Bob Duff <duff@adacore.com>
4176 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
4177 that is a proper body corresponding to a stub, we defer the
4178 adjustment of the sloc until after the correct adjustment has
4179 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
4180 the adjustment, because it will be outside the range in (the old,
4181 incorrect) S_Adjustment.
4182 * inline.adb: Use named notation for readability and uniformity.
4183 * sinput-l.adb: Minor improvements to debugging output printed
4185 * sinput-l.ads (Create_Instantiation_Source): Minor comment
4188 2017-09-06 Vincent Celier <celier@adacore.com>
4190 * make.adb: Do not invoke gprbuild for -bargs -P.
4192 2017-09-06 Sylvain Dailler <dailler@adacore.com>
4194 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
4195 case when Op is of kind N_Qualified_Expression. In this case,
4196 the function is called recursively on the subexpression like in
4198 * make.adb: Minor reformatting
4200 2017-09-06 Justin Squirek <squirek@adacore.com>
4202 * einfo.adb (Set_Linker_Section_Pragma): Modify
4203 Set_Linker_Section_Pragma to be consistant with the "getter"
4204 Linker_Section_Pragma.
4205 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
4206 checking for container loops so that the index cursor is not
4207 directly changable by the user with the use of E_Loop_Parameter.
4208 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
4209 * sem_warn.adb (Check_References): Revert previous change.
4211 2017-09-06 Bob Duff <duff@adacore.com>
4213 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
4216 2017-09-06 Yannick Moy <moy@adacore.com>
4218 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
4219 declarations to only consider valid uses of Global/Depends those on
4220 single concurrent objects.
4222 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4224 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
4225 error as soon as one of the specified components overlaps the
4228 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4230 * sem_prag.ads: minor fix typo in comment.
4232 2017-09-06 Justin Squirek <squirek@adacore.com>
4234 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
4235 from source before checking source references.
4236 * sem_warn.adb (Check_References): Add check for internal block
4239 2017-09-06 Vincent Celier <celier@adacore.com>
4241 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
4242 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
4243 gnatname.adb: Remove the Project Manager from the GNAT tools.
4244 * gcc-interface/Makefile.in: ditto.
4246 2017-09-06 Bob Duff <duff@adacore.com>
4248 * sem_util.ads: Minor comment fix.
4250 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4252 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
4253 Generate a freeze node for the actual of a formal package, if
4254 the actual is declared in the same unit and has a corresponding
4255 body, to prevent the current instance from being frozen before
4258 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4260 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
4262 2017-09-06 Yannick Moy <moy@adacore.com>
4264 * sem_warn.adb: Minor refactoring.
4266 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4268 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
4269 to retrieve the inherited classwide precondition/postcondition
4271 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
4272 freezing a subprogram, to complete the generation of the
4273 corresponding checking code.
4275 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4277 * exp_util.adb (Is_Controlled_Indexing): New routine.
4278 (Is_Displace_Call): Use routine Strip to remove indirections.
4279 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
4280 missing case of controlled generalized indexing.
4281 (Is_Source_Object): Use routine Strip to remove indirections.
4282 (Strip): New routine.
4284 2017-09-06 Bob Duff <duff@adacore.com>
4286 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
4287 we include the proper header. Otherwise, we just declare the necessary
4288 things from the capabilities library. This is so we can build on
4289 machines without that library, while still enabling that library.
4290 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
4291 simply return 0 if the library is not present, or not included
4294 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
4296 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
4297 for renamings that involve function calls in prefix form.
4299 2017-09-06 Bob Duff <duff@adacore.com>
4301 * sem_ch3.adb (Analyze_Subtype_Declaration):
4302 Set Has_Delayed_Freeze on a subtype of an incomplete type.
4304 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
4306 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
4307 has no parameter specification and no entry index, use the entry name
4308 as the end of the generated SCO statement.
4310 2017-09-06 Steve Baird <baird@adacore.com>
4312 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
4313 uses of 'Image and related attributes as having side effects in
4314 order to avoid replicating such uses.
4315 * pprint.ads (Expression_Image) Add new generic formal flag
4316 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
4317 (eventually) override the default.
4318 * pprint.adb (Expression_Image) If the new flag is set, then
4319 suppress the ".all" suffix when displaying a dereference whose
4320 prefix is a use of a value-capturing compiler temp of the sort
4321 generated by Expr_Util.Remove_Side_Effects .
4322 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
4323 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
4325 * inline.adb: Minor wording change.
4327 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4329 * sem_ch7.adb: Update comment.
4331 2017-09-06 Yannick Moy <moy@adacore.com>
4333 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
4334 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
4335 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
4336 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
4337 so that applies to any entity.
4339 2017-09-06 Yannick Moy <moy@adacore.com>
4341 * sem_ch3.adb (Derived_Type_Declaration): Use
4342 Incomplete_Or_Partial_View rather than local Find_Partial_View.
4344 2017-09-06 Javier Miranda <miranda@adacore.com>
4346 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
4349 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4351 * sem_dim.adb (Analyze_Dimension): In an instance, a type
4352 conversion takes its dimensions from the expression, not from
4354 (Dimensions_Of_Operand): Ditto.
4356 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4358 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
4359 null procedures when GNAT coverage is used, so that their (empty)
4360 bodies are properly covered.
4362 2017-09-06 Bob Duff <duff@adacore.com>
4364 * sem_ch13.adb (Resolve_Aspect_Expressions): If
4365 the entity is a type with discriminants, make the discriminants
4366 directly visible in aspect clauses.
4368 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4370 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
4371 Universal_Real and the context is a floating-point type, resolve
4372 both operands to the target type.
4374 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4376 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
4377 sem_ch3.adb, sem_util.adb: Minor reformatting.
4379 2017-09-06 Yannick Moy <moy@adacore.com>
4381 * freeze.adb (Check_Inherited_Conditions): Rewriting
4382 of inherited preconditions and postconditions should only occur
4383 in GNATprove mode, that is, when GNATprove_Mode is True, not to
4384 be confused with SPARK_Mode being On.
4386 2017-09-06 Yannick Moy <moy@adacore.com>
4388 * sem_warn.adb (Check_References): Take into
4389 account possibility of attribute reference as original node.
4391 2017-09-06 Yannick Moy <moy@adacore.com>
4393 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
4396 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4398 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
4399 on the procedure created to encapsulate the body.
4400 * sem_ch7.adb: Add with clause for GNAT.HTable.
4401 (Entity_Table_Size): New constant.
4402 (Entity_Hash): New function.
4403 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
4404 (Is_Subprogram_Ref): Rename into...
4405 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
4406 the table instead of bailing out on them. Scan the value of constants
4407 if it is not known at compile time.
4408 (Contains_Subprograms_Refs): Rename into...
4409 (Scan_Subprogram_Refs): ...this.
4410 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
4411 Is_Public flag on subprograms if they are not actually referenced.
4412 (Hide_Public_Entities): Beef up comment on the algorithm.
4413 Reset the table of subprograms on entry.
4415 2017-09-06 Yannick Moy <moy@adacore.com>
4417 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
4419 2017-09-06 Javier Miranda <miranda@adacore.com>
4421 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
4422 cannot handle a type conversion of an array as an aggregate
4425 2017-09-06 Bob Duff <duff@adacore.com>
4427 * g-comlin.adb (Try_Help): Remove ".exe" so we
4428 get the same results on windows and unix.
4430 2017-09-06 Justin Squirek <squirek@adacore.com>
4432 * exp_imgv.adb (Expand_Image_Attribute),
4433 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
4434 Added case to handle new-style 'Image expansion
4435 (Rewrite_Object_Image): Moved from exp_attr.adb
4436 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4437 attribute cases so that the relevant subprograms in exp_imgv.adb
4438 handle all expansion.
4439 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
4440 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
4441 cases to call common function Analyze_Image_Attribute.
4442 (Analyze_Image_Attribute): Created as a common path for all
4443 image attributes (Check_Object_Reference_Image): Removed
4444 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4445 Removed and refactored into Is_Object_Image (Is_Object_Image):
4446 Created as a replacement for Is_Image_Applied_To_Object
4448 2017-09-06 Yannick Moy <moy@adacore.com>
4450 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
4451 message for missing input.
4453 2017-09-06 Yannick Moy <moy@adacore.com>
4455 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
4456 of protected subprograms and entries.
4457 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
4458 New function to detect when a subprogram of entry is defined
4459 inside a protected object.
4461 2017-09-06 Bob Duff <duff@adacore.com>
4463 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
4464 whether the current process has the CAP_SYS_NICE capability.
4465 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
4466 ceiling priorities if the current process has the CAP_SYS_NICE
4469 2017-09-06 Bob Duff <duff@adacore.com>
4471 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
4472 check back to the body, because SPARK is not yet ready for
4473 "or else raise Constraint_Error".
4475 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4477 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
4478 procedure by a single null statement, after evaluating the
4479 actuals that require it.
4481 2017-09-06 Javier Miranda <miranda@adacore.com>
4483 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
4484 Generating C code improve the code that checks the use of nested
4485 aggregates to initialize object declarations.
4487 2017-09-06 Yannick Moy <moy@adacore.com>
4489 * sem_ch3.adb (Derived_Type_Declaration): Detect
4490 violations of new rule SPARK RM 3.4(1). Also refactor existing
4491 check to use the new function Find_Partial_View.
4493 2017-09-06 Vincent Celier <celier@adacore.com>
4495 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
4496 from the Prj hierarchy has been removed from the GNAT driver.
4498 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4500 * sem_type.adb (Interface_Present_In_Ancestor): Within an
4501 expression function, or within a spec expression (default value,
4502 etc) a reference to an incomplete type is legal: legality of
4503 the operation will be checked when some related entity (type,
4504 object or subprogram) is frozen.
4506 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4508 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
4509 adjustments and a typo fix.
4511 2017-09-06 Yannick Moy <moy@adacore.com>
4513 * sem_res.adb (Resolve_Call): Do not issue info
4514 message about inlining of calls to functions in assertions,
4515 for functions whose body has not been seen yet.
4517 2017-09-06 Bob Duff <duff@adacore.com>
4519 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
4520 we can use modern Ada in this package.
4521 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
4522 Move Ada.Command_Line.Response_File to System.Response_File,
4523 and make Ada.Command_Line.Response_File into a rename of
4524 System.Response_File. This is to avoid having gnatbind depend
4525 Ada.Command_Line, which would damage the bootstrap process now
4526 that Ada.Command_Line contains modern Ada (the raise expression).
4527 * gnatbind.adb: Avoid dependence on
4528 Ada.Command_Line. Depend on System.Response_File instead
4529 of Ada.Command_Line.Response_File. Change one call to
4530 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
4531 to Ada.Command_Line.Argument_Count to use Arg_Count.
4532 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
4534 2017-09-06 Bob Duff <duff@adacore.com>
4536 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
4537 switch, because we've already read gnat.adc by default.
4539 2017-09-06 Bob Duff <duff@adacore.com>
4541 * exp_ch5.adb (Get_Default_Iterator): Replace
4542 "Assert(False)" with "return Iter", because if an iterable
4543 type is derived from a noniterable one, then we won't find an
4544 overriding or inherited default iterator.
4546 2017-09-06 Yannick Moy <moy@adacore.com>
4548 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
4549 literal index used to access a string is null or negative.
4551 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4553 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
4554 allowed on loop parameters.
4555 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
4557 (Write_Field15_Name): Update the output for
4558 Status_Flag_Or_Transient_Decl.
4559 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
4560 to loop parameters. Update the documentation of the attribute
4561 and the E_Loop_Parameter entity.
4562 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
4563 which assumes that cursors can never be controlled.
4564 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
4565 guard which assumes that cursors can never be controlled.
4567 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4569 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
4570 sem_warn.adb: Minor reformatting.
4572 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4574 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
4575 fix and preserve older GNAT warning on overlapping actuals that
4576 are not elementary types.
4578 2017-09-06 Justin Squirek <squirek@adacore.com>
4580 * sem_attr.adb: Comment correction.
4582 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4584 * sem_util.adb: Minor reformatting.
4586 2017-09-06 Yannick Moy <moy@adacore.com>
4588 * a-comlin.ads (Argument): Add precondition for analysis.
4590 2017-09-06 Yannick Moy <moy@adacore.com>
4592 * sem_res.adb (Resolve): Update message for function call as statement.
4594 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4596 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
4597 generated bodies for renamings that are completions, when renamed
4598 procedure is No_Return.
4599 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
4600 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
4601 with No_Return, the renamed entity must be No_Return as well.
4603 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4605 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
4608 2017-09-06 Justin Squirek <squirek@adacore.com>
4610 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4611 attribute cases (Rewrite_Object_Reference_Image): Created to
4612 aid the rewriting of new-style 'Image attributes.
4613 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
4614 (Check_Object_Reference_Image): Created to handle verification of
4615 'Image with object-references as prefixes.
4616 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4617 Create predicate to identify cases where an 'Image attribute's
4618 prefix applies to an object reference.
4620 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4622 * freeze.adb (Freeze_Entity): Do not generate a freeze
4623 node for a generic unit, even if it includes delayed aspect
4624 specifications. Freeze nodes for generic entities must never
4625 appear in the tree that reaches the back-end of the compiler.
4627 2017-09-06 Yannick Moy <moy@adacore.com>
4629 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
4631 2017-09-06 Yannick Moy <moy@adacore.com>
4633 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
4634 to subprograms in other units as possibly inlined.
4636 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4638 * freeze.adb (Freeze_Entity): For a derived type that has no
4639 explicit delayed aspects but may inherit delayed aspects from its
4640 parent type, analyze aspect at freeze point for proper capture
4641 of an inherited aspect.
4643 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4645 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
4646 renamings; also, avoid repeated calls to Renamed_Object when getting
4647 through object renamings.
4649 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4651 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
4652 array type declaration in a private part, when an index is a
4653 subtype indication of a discrete type with a private partial view.
4655 2017-09-06 Javier Miranda <miranda@adacore.com>
4657 * exp_ch4.adb (Expand_Modular_Op): Force generating
4658 temporary to improve the generated code.
4660 2017-09-06 Tristan Gingold <gingold@adacore.com>
4662 * s-fatgen.adb: Minor typo fix in comment.
4664 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4666 * exp_ch5.adb (Make_Field_Assign): If the type
4667 of the right-hand side has stored constraint, use its values
4668 (except for those that are renamings of parent discriminants)
4669 to produce additional assignments for the discriminants of the
4670 left-hand side, which are invisible in the righ-hand side and
4671 not retrievable as selected components.
4673 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4675 * sem_util.adb (Needs_One_Formal): The first formal of such a
4676 function must be a controlling formal, so that Obj.F (X, Y)
4677 can have the interpretation F(Obj)(X, Y).
4678 * sem_util.ads: Clarify documentation.
4680 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4682 * table.ads, table.adb: Restore original implementation.
4683 * namet.h (Names_Ptr): Adjust back.
4684 (Name_Chars_Ptr): Likewise.
4685 * uintp.h (Uints_Ptr): Likewise.
4686 (Udigits_Ptr): Likewise.
4687 * g-table.ads: Remove pragma Compiler_Unit_Warning.
4688 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
4689 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
4690 * spark_xrefs.ads: Likewise.
4691 * scos.h: Undo latest changes.
4693 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4695 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
4696 No_Return flag to instance if pragma applies to generic unit. This
4697 must be done explicitly because the pragma does not appear
4698 directly in the generic declaration (unlike the corresponding
4699 aspect specification).
4701 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4703 * sem_ch7.adb (Has_Referencer): Move up and expand comment
4704 explaining the test used to detect inlining. Use same test
4705 in second occurrence.
4706 (Analyze_Package_Body_Helper): Minor formatting fixes.
4708 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4710 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
4711 derived type with a mixture of renamed and constrained parent
4712 discriminants, the constraint for the target must obtain the
4713 discriminant values from both the operand and from the stored
4714 constraint for it, given that the constrained discriminants are
4715 not visible in the object.
4716 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
4717 side may be derived from that of the left-hand side (as in the
4718 case of an assignment with a change of representation) so the
4719 discriminant to be used in the retrieval of the value of the
4720 component must be the entity in the type of the right-hand side.
4722 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4724 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
4725 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4726 * exp_util.adb (Is_Source_Object): Account for
4727 the cases where the source object may appear as a dereference
4728 or within a type conversion.
4729 * exp_ch6.adb: Fix missing space in error message.
4731 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4733 * sem_prag.adb: Update description of Eliminate.
4735 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4737 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
4738 properly an attribute reference 'Loop_Entry that appears in the
4739 list of indices of an indexed expression, to prevent an infinite
4740 loop in the compiler.
4742 2017-09-06 Bob Duff <duff@adacore.com>
4744 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
4746 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4748 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
4749 in a set membership is an overloaded enumeration literal, and
4750 the type of the alternative is resolved from a previous one,
4751 replace the entity of the alternative as well as the type,
4752 to prevent inconsistencies between the entity and the type.
4754 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4756 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
4757 (No_Component_Reordering_Specified): New switch.
4758 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
4759 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
4760 * bcheck.adb (Check_Consistent_No_Component_Reordering):
4762 (Check_Configuration_Consistency): Invoke it.
4763 * debug.adb (d.r): Toggle the effect of the switch.
4764 (d.v): Change to no-op.
4765 * einfo.ads (Has_Complex_Representation):
4766 Restrict to record types.
4767 (No_Reordering): New alias for Flag239.
4768 (OK_To_Reorder_Components): Delete.
4769 (No_Reordering): Declare.
4770 (Set_No_Reordering): Likewise.
4771 (OK_To_Reorder_Components): Delete.
4772 (Set_OK_To_Reorder_Components): Likewise.
4773 * einfo.adb (Has_Complex_Representation): Expect record types.
4774 (No_Reordering): New function.
4775 (OK_To_Reorder_Components): Delete.
4776 (Set_Has_Complex_Representation): Expect base record types.
4777 (Set_No_Reordering): New procedure.
4778 (Set_OK_To_Reorder_Components): Delete.
4779 (Write_Entity_Flags): Adjust to above change.
4780 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
4781 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
4782 OK_To_Reorder_Components on record types with convention Ada.
4783 * lib-writ.adb (Write_ALI): Deal with NC marker.
4784 * opt.ads (No_Component_Reordering): New flag.
4785 (No_Component_Reordering_Config): Likewise.
4786 (Config_Switches_Type): Add No_Component_Reordering component.
4787 * opt.adb (Register_Opt_Config_Switches): Copy
4788 No_Component_Reordering onto No_Component_Reordering_Config.
4789 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
4790 (Save_Opt_Config_Switches): Save No_Component_Reordering.
4791 (Set_Opt_Config_Switches): Set No_Component_Reordering.
4792 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
4793 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
4794 No_Reordering flag from the default.
4795 (Build_Derived_Private_Type): Likewise.
4796 (Build_Derived_Record_Type): Likewise. Then inherit it
4797 for untagged types and clean up handling of similar flags.
4798 (Record_Type_Declaration): Likewise.
4799 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
4800 remove redundant test on Is_Tagged_Type.
4801 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
4802 (Sig_Flags): Likewise.
4803 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
4804 (Pragma_Id): Add Pragma_No_Component_Reordering value.
4805 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
4806 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
4807 Copy the layout of the parent type only if the No_Reordering
4809 (components_to_record): Reorder record types with
4810 convention Ada by default unless No_Reordering is set or -gnatd.r
4811 is specified and do not warn if No_Reordering is set in GNAT mode.
4813 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4815 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
4816 new predicate to reject declarations that can be completions,
4817 when there is a visible prior homograph that is a null procedure.
4818 * sem_ch6.adb (Analyze_Null_Procedure): use it.
4819 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
4821 2017-09-06 Thomas Quinot <quinot@adacore.com>
4823 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
4824 run of 253 characters or more.
4826 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4828 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
4829 properly incomplete subtypes that may be created by explicit or
4830 implicit declarations.
4831 (Is_Base_Type): Take E_Incomplete_Subtype into account.
4832 (Subtype_Kind): Ditto.
4833 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
4834 Ekind of a subtype of a discriminated incomplete type.
4835 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
4836 incomplete types, to preserve error reporting.
4837 (Process_Incomplete_Dependents): Do not create a subtype
4838 declaration for an incomplete subtype that is created internally.
4839 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
4840 incomplete subtypes that do not require a completion, either
4841 because they are limited views, of they are generic actuals.
4843 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4845 * checks.adb (Insert_Valid_Check): Remove the
4846 suspicious manipulation of the Do_Range_Check flag as ths is
4847 no linger needed. Suppress validity check when analysing the
4848 validation variable.
4850 2017-09-06 Philippe Gil <gil@adacore.com>
4852 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
4855 2017-09-06 Bob Duff <duff@adacore.com>
4857 * sem_elim.adb: Minor comment fix.
4859 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4861 * sem_util.adb (Is_Object_Reference): A function call is an
4862 object reference, and thus attribute references for attributes
4863 that are functions (such as Pred and Succ) as well as predefined
4864 operators are legal in contexts that require an object, such as
4865 the prefix of attribute Img and the Ada2020 version of 'Image.
4867 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4869 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
4870 exp_ch3.adb, xoscons.adb: Minor reformatting.
4872 2017-09-06 Raphael Amiard <amiard@adacore.com>
4874 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
4875 Position parameter. If supplied, use it to provide efficient iteration.
4876 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
4877 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
4880 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4882 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
4883 designated type is class-wide and the expression is an unchecked
4884 conversion, preserve the conversion when checking the tag of the
4885 designated object, to prevent spurious semantic errors when the
4886 expression in the conversion has an untagged type (for example
4887 an address attribute).
4889 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4891 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
4892 operation is subject to a pragma Eliminate.
4894 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4896 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
4898 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4900 * fe.h (Eliminate_Error_Msg): Remove.
4902 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
4904 * gcc-interface/utils.c (make_packable_type): Update call to
4907 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
4909 * gcc-interface/utils2.c (build_load_modify_store):
4910 Use int_mode_for_size.
4912 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4915 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
4916 for Itypes that are E_Record_Subtype with a cloned subtype.
4917 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
4919 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4921 * gcc-interface/trans.c (convert_with_check): Use a custom base type
4922 if the base type of the expression has a different machine mode.
4923 Rename a couple of parameters and local variable.
4925 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4927 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
4928 conversions around prefixes that are not references.
4930 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4932 * gcc-interface/utils.c (unchecked_convert): When the result type is a
4933 non-biased integral type with size 0, set the result to 0 directly.
4935 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4937 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
4938 (renaming_from_instantiation_p): ...this.
4939 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
4940 instead of explicit tests on kind of entities. Adjust for renaming.
4941 (gnat_to_gnu_profile_type): Likewise.
4942 (gnat_to_gnu_subprog_type): Likewise.
4943 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
4944 (Case_Statement_to_gnu): Likewise.
4945 (gnat_to_gnu): Likewise.
4946 (process_freeze_entity): Likewise.
4947 (process_type): Likewise.
4948 (add_stmt_with_node): Adjust for renaming.
4949 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
4950 (renaming_from_generic_instantiation_p): Rename to...
4951 (renaming_from_instantiation_p): ...this. Use inline predicate.
4952 (pad_type_hasher::keep_cache_entry): Fold.
4954 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4956 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
4957 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
4958 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
4959 (N_Slice): Likewise.
4960 (N_Selected_Component): Likewise. Do not try again to translate it.
4961 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
4963 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4965 * repinfo.ads: Document new treatment of dynamic values.
4966 (TCode): Bump upper bound to 29.
4967 (Dynamic_Val): New constant set to 29.
4968 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
4969 (Rep_Value) <Dynamic_Val>: Likewise.
4970 * repinfo.h (Dynamic_Val): New macro.
4971 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
4973 <INTEGER_CST>: Set TCODE instead of recursing.
4974 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
4975 <VAR_DECL>: New case.
4976 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
4977 <BIT_AND_EXPR>: Adjust.
4978 <CALL_EXPR>: Do not fall through.
4980 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4982 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
4983 there is no target, do not create a temporary for the return value for
4984 an allocator either.
4986 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
4988 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
4989 unconstrained array type.
4991 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4992 Alan Hayward <alan.hayward@arm.com>
4993 David Sherwood <david.sherwood@arm.com>
4995 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
4996 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
4998 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4999 Alan Hayward <alan.hayward@arm.com>
5000 David Sherwood <david.sherwood@arm.com>
5002 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5003 is_a <scalar_int_mode>.
5004 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5005 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5007 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5008 Alan Hayward <alan.hayward@arm.com>
5009 David Sherwood <david.sherwood@arm.com>
5011 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5012 instead of mode_for_size.
5013 (gnat_to_gnu_subprog_type): Likewise.
5014 * gcc-interface/utils.c (make_type_from_size): Likewise.
5016 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5017 Alan Hayward <alan.hayward@arm.com>
5018 David Sherwood <david.sherwood@arm.com>
5020 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5021 (fp_size_to_prec): Likewise.
5023 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5024 Alan Hayward <alan.hayward@arm.com>
5025 David Sherwood <david.sherwood@arm.com>
5027 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5028 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5030 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5031 Alan Hayward <alan.hayward@arm.com>
5032 David Sherwood <david.sherwood@arm.com>
5034 * gcc-interface/decl.c (validate_size): Update use of
5035 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5037 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5038 Alan Hayward <alan.hayward@arm.com>
5039 David Sherwood <david.sherwood@arm.com>
5041 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5042 (fp_size_to_prec): Likewise.
5044 2017-08-29 Martin Liska <mliska@suse.cz>
5047 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5049 2017-08-08 Martin Liska <mliska@suse.cz>
5051 * gcc-interface/trans.c: Include header files.
5053 2017-07-29 Jakub Jelinek <jakub@redhat.com>
5055 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5056 as new argument to the imported_module_or_decl debug hook.
5058 2017-07-25 Javier Miranda <miranda@adacore.com>
5060 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5063 2017-07-19 Jakub Jelinek <jakub@redhat.com>
5065 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5066 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5067 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5069 2017-07-18 Mike Frysinger <vapier@chromium.org>
5071 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5072 (../../gnatlink$(exeext)): Likewise.
5074 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
5077 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5078 (Backend_Overflow_Checks): Set to True.
5080 2017-06-23 Jakub Jelinek <jakub@redhat.com>
5082 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5084 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
5086 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5088 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5090 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5092 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5093 imported subprograms for the current compilation unit as
5094 definitions. Disable debug info for references to variables.
5095 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5096 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5097 not built-in functions to their binding scope.
5098 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
5099 the function as a definition. Update all callers.
5100 (gnat_write_global_declarations): Emit debug info for imported
5101 functions. Filter out external variables for which debug info
5104 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
5107 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5108 (i[3456]86-pc-gnu): Likewise.
5109 (x86_64 kfreebsd): Likewise.
5111 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5114 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5116 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5119 * s-interr-hwint.adb: Reinstate.
5120 * gcc-interface/Makefile.in (RTEMS): Use it again.
5122 2017-06-08 Olivier Hainque <hainque@adacore.com>
5124 * vx_crtbegin_auto.c: Update year in copyright notice.
5125 * vx_crtbegin.c: Likewise.
5126 * vx_crtbegin.inc: Likewise.
5127 * vx_crtend.c: Likewise.
5129 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
5131 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5132 * s-tpopsp-rtems.adb: Delete.
5134 2017-06-02 Olivier Hainque <hainque@adacore.com>
5136 * vx_crtbegin_auto.c: New file.
5137 * vx_crtbegin.c: New file.
5138 * vx_crtbegin.inc: New file.
5139 * vx_crtend.c: New file.
5141 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
5143 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5144 const qualifiers that cause -Wignored-qualifiers warnings.
5146 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5148 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5149 for Itypes that are E_Access_Subtype.
5150 <E_Access_Subtype>: Use the DECL of the base type directly.
5152 2017-05-22 Ed Schonberg <schonberg@adacore.com>
5153 Eric Botcazou <ebotcazou@adacore.com>
5155 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5156 limited view may appear in the profile of a function, and a call to
5157 that function in another unit in which the full view is available must
5158 use this full view to spurious type errors at the point of call.
5159 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
5160 of parent body with a with clause for the main unit.
5161 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
5162 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
5163 types declared in external units like types from limited with clauses.
5164 Adjust final processing of defer_limited_with_list accordingly.
5165 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
5166 again to translate the prefix after the field if it is incomplete.
5168 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5170 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
5171 alignment for simple volatile fields and remove associated errors.
5173 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5175 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
5176 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
5178 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
5180 * gcc-interface/utils.c (can_materialize_object_renaming_p):
5181 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
5182 process Original_Node instead of expanded names.
5184 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5186 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
5187 addressability check in the constrained case.
5189 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5191 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
5192 types not coming from a limited context.
5194 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5196 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
5197 the inlined list that are not public.
5198 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
5199 there is a pragma Inline_Always on the subprogram.
5201 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5203 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
5204 <N_Allocator>: Use properly typed constants.
5205 (extract_values): Move around.
5206 (pos_to_constructor): Minor tweaks.
5207 (Sloc_to_locus): Fix formatting.
5208 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
5209 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
5210 (Gigi_Equivalent_Type): Adjust head comment.
5211 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
5213 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5215 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
5216 is a representation clause on an extension, propagate the alignment of
5217 the parent type only if the platform requires strict alignment.
5219 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
5221 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
5222 instead of Word_Size.
5225 2017-03-28 Andreas Schwab <schwab@suse.de>
5228 * system-linux-aarch64-ilp32.ads: New file.
5229 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
5230 from LIBGNAT_TARGET_PAIRS.
5231 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
5232 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
5233 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
5234 or -mabi=ilp32, resp.
5236 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
5239 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
5240 instead of Word_Size.
5242 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5244 * raise-gcc.c (exception_class_eq): Make ec parameter const.
5246 2017-05-02 Richard Biener <rguenther@suse.de>
5248 * gcc-interface/misc.c (gnat_post_options): Do not set
5251 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5253 * gcc-interface/trans.c (assoc_to_constructor): Make sure
5254 Corresponding_Discriminant is only called on discriminants.
5255 Skip the saving of the result only for them.
5256 (gnat_to_gnu) <N_Selected_Component>: Likewise.
5257 <N_Unchecked_Type_Conversion>: Translate the result type first.
5258 (gigi): Set TREE_NOTHROW on Begin_Handler.
5259 (stmt_list_cannot_raise_p): New predicate.
5260 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
5261 a cleanup if the statements of the handler cannot raise.
5262 (process_freeze_entity): Use Is_Record_Type.
5263 (process_type): Likewise.
5265 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5267 * einfo.ads (Corresponding_Record_Component): New alias
5268 for Node21 used for E_Component and E_Discriminant.
5269 * einfo.adb (Corresponding_Record_Component): New function.
5270 (Set_Corresponding_Record_Component): New procedure.
5271 (Write_Field21_Name): Handle Corresponding_Record_Component.
5272 * sem_ch3.adb (Inherit_Component): Set
5273 Corresponding_Record_Component for every component in
5274 the untagged case. Clear it afterwards for non-girder
5276 * gcc-interface/decl.c (gnat_to_gnu_entity)
5277 <E_Record_Type>: For a derived untagged type with discriminants
5278 and constraints, apply the constraints to the layout of the
5279 parent type to deduce the layout.
5280 (field_is_aliased): Delete.
5281 (components_to_record): Test DECL_ALIASED_P directly.
5282 (annotate_rep): Check that fields are present except for
5284 (create_field_decl_from): Add DEBUG_INFO_P
5285 parameter and pass it in recursive and other calls. Add guard
5286 for the manual CSE on the size.
5287 (is_stored_discriminant): New predicate.
5288 (copy_and_substitute_in_layout): Consider only
5289 stored discriminants and check that original fields are present
5290 in the old type. Deal with derived types. Adjust call to
5291 create_variant_part_from.
5293 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5295 * exp_ch6.adb (Expand_Call_Helper): When locating the
5296 accessibility entity created for an access parameter, handle
5297 properly a reference to a formal of an enclosing subprogram. if
5298 the reference appears in an inherited class-wide condition, it
5299 is the rewriting of the reference in the ancestor expression,
5300 but the accessibility entity must be that of the current formal.
5302 2017-05-02 Javier Miranda <miranda@adacore.com>
5304 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
5305 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
5306 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
5307 Call Expand_Non_Binary_Modular_Op.
5309 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5311 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
5312 has discriminants, do not override the Stored_Constraint list of
5313 the full view of the derived type with that of the derived type.
5315 2017-05-02 Bob Duff <duff@adacore.com>
5317 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
5319 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5321 * s-os_lib.ads: Minor typo fix.
5323 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5325 * gnatls.adb: Merge and refactor code from Prj.Env and remove
5326 this deprecated dependency.
5328 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5330 * exp_util.ads: minor comment addition.
5332 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5334 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
5335 pastos in part #3 of the head comment.
5337 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5339 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
5340 procedure body for a local (sub)type declaration within a
5341 predicate function. Invariant checks do not apply to these, and
5342 the expansion of the procedure will happen in the wrong scope,
5343 leading to misplaced freeze nodes.
5345 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5347 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
5348 to analyze generated actions. If the main unit is a body,
5349 the required scope is that of the corresponding unit declaration.
5351 2017-05-02 Arnaud Charlet <charlet@adacore.com>
5353 * einfo.adb (Declaration_Node): flip branches of
5354 an IF statement to avoid repeated negations in its condition;
5355 no change in semantics, only to improve readability.
5357 2017-05-02 Arnaud Charlet <charlet@adacore.com>
5359 * sem_case.adb: Remove extra spaces in parameter declarations.
5361 2017-05-02 Justin Squirek <squirek@adacore.com>
5363 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
5364 in usage line for new -gnatwE switch.
5366 2017-05-02 Claire Dross <dross@adacore.com>
5368 * a-cofuve.ads (Remove): Remove unnecessary
5369 conditions in precondition.
5371 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5373 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
5374 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
5376 2017-05-02 Justin Squirek <squirek@adacore.com>
5378 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5379 alternative expression.
5380 * sem_res.adb (Resolve_Case_Expression): Ditto.
5382 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5384 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
5385 Refine predicate for the case where the primitive operation
5386 is a renaming of equality. An overriding operation that is
5387 a user-defined renaming of predefined equality inherits its
5388 slot from the overridden operation. Otherwise it is treated
5389 as a predefined op and occupies the same predefined slot as
5390 equality. A call to it is transformed into a call to its alias,
5391 which is the predefined equality. A dispatching call thus uses
5392 the proper slot if operation is further inherited and called
5393 with class-wide arguments.
5395 2017-05-02 Justin Squirek <squirek@adacore.com>
5397 * errout.adb (Set_Msg_Text): Add a case to switch the message
5398 type when the character '[' is detected signifying a warning
5399 about a run-time exception.
5400 * opt.ads Add a new Warning_Mode value for new switch
5401 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
5402 to handle new warning mode
5403 * usage.adb (Usage): Add usage entry for -gnatwE
5404 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
5406 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5408 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
5409 declaration that operates on some fixed point type.
5411 2017-05-02 Justin Squirek <squirek@adacore.com>
5413 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
5415 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5417 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
5419 2017-05-02 Justin Squirek <squirek@adacore.com>
5421 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5422 expression (Analyze_If_Expression): Add check for valid condition
5423 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
5425 * sem_res.adb (Resolve_If_Expression): Add check for valid
5426 condition and then-expression.
5428 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5430 * exp_ch3.adb (Build_Initialization_Call): Generate a null
5431 statement if the initialization call is a null procedure, as
5432 can happen with a controlled type with no explicit Initialize
5433 procedure, or an array of such.
5434 * exp_ch7.adb (Process_Object_Declaration): For a type with
5435 controlled components that has a trivial Initialize procedure,
5436 insert declaration for finalization counter after object
5438 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
5439 finalization block and attendant declarations if component has
5440 a trivial Initialize procedure.
5441 (Make_Init_Call): Do not generate a call if controlled type has
5442 a trivial Initialize procedure.
5444 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5446 * g-forstr.ads (Data): Move Format component last.
5447 * g-forstr.adb ("+"): Adjust for above change.
5448 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
5449 * g-sechas.ads (Context): Move Key last.
5450 * g-socket.ads (Service_Entry_Type): Move Aliases last.
5451 * s-fileio.adb (Temp_File_Record): Move Name last.
5452 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
5453 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
5455 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
5457 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
5458 switch introduced recently. finally not needed.
5460 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5462 * sem_ch6.adb (Analyze_Null_Procedure): Set the
5463 Corresponding_Body link for a null procedure declaration.
5465 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5467 * atree.h (Flag290): Add missing terminating parenthesis.
5468 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
5469 (Set_Is_Class_Wide_Clone): Likewise.
5470 * einfo.ads (Is_Class_Wide_Clone): Likewise.
5472 2017-05-02 Gary Dismukes <dismukes@adacore.com>
5474 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
5475 parameter Array_Comp to indicate the case of an array object
5476 with null-excluding components.
5477 * checks.adb (Null_Exclusion_Static_Checks):
5478 Call Compile_Time_Constraint_Error instead of
5479 Apply_Compile_Time_Constraint_Error in the component case. Also
5480 call that when Array_Comp is True, with an appropriate warning for
5481 the array component case. Only create an explicit initialization
5482 by null in the case of an object of a null-excluding access type
5483 (and no longer do that in the component case).
5484 * sem_ch3.adb (Check_Component): Add a Boolean parameter
5485 Array_Comp defaulted to False. Pass Empty for the Comp
5486 actual when calling Null_Exclusion_Static_Checks in the case
5487 where Comp_Decl matches Object_Decl, because we don't have a
5488 component in that case. In the case of an object or component
5489 of an array type, pass True for Array_Comp on the recursive call
5492 2017-05-02 Bob Duff <duff@adacore.com>
5494 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
5495 compute the linux priority from the Ada priority. Call this everywhere
5496 required. In particular, the previous version was not doing this
5497 computation when setting the ceiling priority in various places. It
5498 was just converting to C.int, which results in a ceiling that is off
5501 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5503 * sem_ch3.adb: Comment predicate inheritance.
5505 2017-05-02 Tristan Gingold <gingold@adacore.com>
5507 * s-trasym.ads: Add comment.
5509 2017-05-02 Bob Duff <duff@adacore.com>
5511 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
5512 * sem_ch4.adb: Minor reformatting.
5513 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
5514 * s-taspri-posix-noaltstack.ads: Minor refactoring.
5515 * sinput.ads: Minor typo fix.
5517 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5519 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
5520 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
5521 here from exp_ch9, to recognize objects whose creation requires
5522 dynamic allocation, so that the proper warning can be emitted
5523 when restriction No_Implicit_Heap_Allocation is in effect.
5524 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
5525 to emit proper warning when an object that requires dynamic
5526 allocation is declared.
5528 2017-05-02 Tristan Gingold <gingold@adacore.com>
5530 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
5532 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5534 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
5535 visibility rules for equality operators that apply within an
5536 instantiation apply within an inlined body.
5537 * sem_type.adb (Add_One_Interp): ditto.
5539 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5541 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
5544 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5547 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
5548 Name_No_Tagged_Streams): Move to regular pragmas. Add
5549 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
5550 and Secondary_Stack_Size.
5551 (Pragma_Id): Move Pragma_Assume,
5552 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
5553 Pragma_No_Tagged_Streams to second part.
5555 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5557 * exp_attr.adb: Minor reformatting.
5559 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5561 * sem_ch4.adb (Analyze_Selected_Component): Improve error
5562 detection for illegal references to private components or
5563 operations of a protected type in the body of the type.
5565 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5567 * opt.ads: Add missing GNAT markers in comments.
5568 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
5569 settings of Optimize_Alignment at the end.
5571 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5573 * checks.adb (Apply_Constraint_Check): Do not apply
5574 a discriminant check when the associated type is a constrained
5575 subtype created for an unconstrained nominal type.
5576 * exp_attr.adb: Minor reformatting.
5578 2017-05-02 Bob Duff <duff@adacore.com>
5580 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
5581 the N_Raise_Expression case.
5582 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
5585 2017-05-02 Yannick Moy <moy@adacore.com>
5587 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
5588 optimize length comparison in GNATprove mode.
5589 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
5590 operator /= into negation of operator = when needed.
5591 (Expand_SPARK): Call new
5592 function to expand operator /=.
5594 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5596 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
5597 Simplify the expression for a fixed-fixed division to remove
5598 divisions by constants whenever possible, as an optimization
5599 for restricted targets.
5601 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5603 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
5605 2017-05-02 Bob Duff <duff@adacore.com>
5607 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
5608 to find primitive ops, instead of using an Identifier that will
5609 later be looked up. This is necessary because these ops are not
5610 necessarily visible at all places where we need to call them.
5611 * exp_util.ads: Minor comment fix.
5613 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5615 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
5616 references are fully conformant if they are both expansions
5617 of the discriminant of a protected type, within one of the
5618 protected operations. One occurrence may be expanded into a
5619 constant declaration while the other is an input parameter to
5620 the corresponding generated subprogram.
5622 2017-05-02 Justin Squirek <squirek@adacore.com>
5624 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
5625 recursivly searching composite-types for null-excluding access
5626 types and verifying them.
5627 (Analyze_Object_Declaration): Add a
5628 call to Check_Null_Excluding_Components for static verification
5629 of non-initialized objects.
5630 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
5631 a parameter for a composite-type's component and an extra case
5632 for printing component information.
5634 2017-05-02 Yannick Moy <moy@adacore.com>
5636 * sem_ch10.adb (Analyze_Subunit): Take
5637 configuration pragma into account when restoring appropriate
5638 pragma for analysis of subunit.
5640 2017-05-02 Justin Squirek <squirek@adacore.com>
5642 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
5643 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
5644 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
5645 clauses from the runtime.
5647 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5649 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
5650 array components specially.
5652 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5654 * sem_ch8.adb (Premature_Usage): If the premature usage of
5655 an entity is as the expression in its own object decaration,
5656 rewrite the reference as Any_Id to prevent cascaded errors or
5657 compiler loops when such an entity is used in an address clause.
5659 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
5661 * gcc-interface/decl.c (components_to_record): Add missing guard.
5663 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
5665 * gcc-interface/decl.c (components_to_record): Add more comments.
5666 Put back pending fields onto the regular list if the misalignment
5667 happens to cancel itself.
5669 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5671 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
5672 controlling actual in a prefixed call, preserve the original node
5673 information if the prefix itself has been rewritten, for ASIS use.
5675 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5677 * exp_ch6.adb (Insert_Post_Call_Actions):
5678 Code clean up. Insert the post-call actions after an enclosing
5679 procedure call when N denotes a function call and appears as an
5680 actual parameter in the procedure call.
5682 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5684 * freeze.adb (Check_Component_Storage_Order): If there is a clause
5685 for the component, also reject the attribute if the component
5686 doesn't end on a byte boundary and its scalar storage order is
5687 different from that of the enclosing record type.
5689 2017-04-28 Javier Miranda <miranda@adacore.com>
5691 * atree.ads (Info_Messages): Removed.
5692 (Warning_Info_Messages): New counter.
5693 (Report_Info_Messages): New counter.
5694 * err_vars.ads Update documentation.
5695 * errout.adb (Delete_Warning_And_Continuations): Update
5696 Info_Message occurrences.
5697 (Error_Msg_Internal): Update Info_Message occurrences.
5698 (Delete_Warning): Update Info_Message occurrences.
5699 (Write_Error_Summary): Update Info_Message occurrences.
5700 (Output_Messages): Update Info_Message occurrences.
5701 (To_Be_Removed): Update Info_Message occurrences.
5702 (Reset_Warnings): Update Info_Message occurrences.
5703 * errutil.adb (Error_Msg): Update Info_Message occurrences.
5704 (Finalize): Update Info_Message occurrences.
5705 (Initialize): Update Info_Message occurrences.
5706 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
5707 (Compilation_Errors): Update Info_Message_Occurences.
5709 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5711 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
5712 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
5713 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
5714 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
5715 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
5716 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
5718 * sem_eval.adb (Why_Not_Static): Initialize Typ.
5719 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
5721 2017-04-28 Bob Duff <duff@adacore.com>
5723 * sem_util.ads, sem_util.adb (Might_Raise): New function
5724 that replaces Is_Exception_Safe, but has the opposite
5725 sense. Is_Exception_Safe was missing various cases -- calls inside
5726 a pragma Debug, calls inside an 'if' or assignment statement,
5727 etc. Might_Raise now walks the entire subtree looking for things
5729 * exp_ch9.adb (Is_Exception_Safe): Remove.
5730 (Build_Protected_Subprogram_Body): Replace call to
5731 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
5732 constants where possible).
5733 * exp_ch7.adb: Rename Is_Protected_Body -->
5734 Is_Protected_Subp_Body. A protected_body is something different
5737 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5739 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
5740 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
5741 (P_Discrete_Choice_List): Initialize Expr_Node variable.
5742 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
5743 (P_Protected): Likewise.
5744 * sem_case.adb (Check_Duplicates):
5745 Add pragma Warnings on variable.
5746 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
5747 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
5748 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
5749 (Analyze_Exit_Statement): Initialize Scope_Id variable.
5750 (Analyze_Iterator_Specification): Initialize Bas variable.
5751 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
5752 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
5753 (Analyze_Accept_Statement): Initialize Task_Nam.
5755 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5757 * checks.adb (Install_Primitive_Elaboration_Check):
5758 Do not generate an elaboration check if all checks have been
5761 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5763 * sem_ch13.adb (Analyze_Aspect_Specifications, case
5764 Interrupt_Handler and Attach_Handler): Generate reference
5765 to protected operation to prevent spurious warnings about
5766 unreferenced entities. Previous scheme failed with style checks
5769 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5771 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
5772 that follows an expression function must not be relocated to
5773 the generated body, because it applies to the code that follows.
5775 2017-04-28 Gary Dismukes <dismukes@adacore.com>
5777 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
5778 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
5779 code that might violate the more stringent checking for 'Access
5780 introduced in Ada 2005.
5782 2017-04-28 Arnaud Charlet <charlet@adacore.com>
5784 * a-cforse.adb: minor style fix in comment.
5786 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5788 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
5789 initialize Block_Decls variable.
5790 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
5791 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
5792 * exp_disp.adb (Expand_Interface_Actuals): Initialize
5793 Formal_DDT and Actual_DDT variables.
5794 (Expand_Interface_Thunk): Initialize Iface_Formal.
5795 (Make_DT): Initialize Size_Comp.
5796 (Make_Select_Specific_Data_Table): Initialize Decls.
5797 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
5798 Also initialize more RPC_Receiver_* variables.
5799 (Build_To_Any_Function): Initialize Cstr_Formal.
5800 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
5802 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5804 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
5805 node between access types, freeze the designated type as well,
5806 so that dispatch table pointers are created in the proper scope,
5807 and not in the constructed body of the expression function.
5809 2017-04-28 Bob Duff <duff@adacore.com>
5811 * alloc.ads (Nodes_Initial): Go back to previous value. The large
5812 value makes large compilations faster, but small compilations slower.
5814 2017-04-28 Arnaud Charlet <charlet@adacore.com>
5816 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
5818 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5820 * erroutc.adb (Compilation_Errors): Do not consider info messages
5821 as suitable warnings when warnings must be treated as errors.
5822 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
5823 internally-generated packages when outputting completion
5825 * errout.adb (Output_Messages): Do not consider info messages as
5826 suitable warnings when warnings must be treated as errors.
5827 * errutil.adb (Finalize): Do not consider info messages as
5828 suitable warnings when warnings must be treated as errors.
5830 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5832 * warnsw.ads: Minor fix for incorrect wording in comment.
5834 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5836 * sem_res.adb (In_Instance_Code): New predicate in
5837 Valid_Conversion, to determine whether a type conversion appears
5838 as (or within) an actual for a formal object. Type conversions
5839 in instances are not rechecked in Valid_Conversion because
5840 visibility changes between generic location andi instance may
5841 lead to spurious errors, but conversions within an actual must be
5842 fully checked, and they are not fully resolved when pre-analyzing
5845 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5847 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
5848 New_Copy_Tree instead of Relocate_Node as any subsequent copies
5849 of the relocated node will have mangled Parent pointers.
5850 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
5851 tables used in conjunction with entity and itype replication.
5852 (Visit_Entity): Rewrite the restriction on which entities
5853 require duplication. The restriction now includes all types.
5855 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5857 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
5858 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
5859 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
5862 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5864 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
5865 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
5867 2017-04-28 Gary Dismukes <dismukes@adacore.com>
5869 * exp_util.adb: Minor reformatting.
5871 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5873 * sem_ch4.adb: Fix copy/pasto.
5875 2017-04-27 Tristan Gingold <gingold@adacore.com>
5877 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
5878 raise-gcc.c. Fix include search path for raise-gcc.c
5880 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
5882 * fe.h (Warn_On_Questionable_Layout): Declare.
5883 * warnsw.ads (Warn_On_Record_Holes): Move down.
5884 (Warn_On_Questionable_Layout): New boolean variable.
5885 (Warning_Record): Add Warn_On_Questionable_Layout field.
5886 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
5887 (Restore_Warnings): Likewise.
5888 (Save_Warnings): Likewise.
5889 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
5890 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
5891 components_to_record.
5892 (gnu_field_to_gnat): New function.
5893 (warn_on_field_placement): Likewise.
5894 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
5895 parameters. Rename local variables and adjust recursive call.
5896 Rework final scan of the field list and implement warnings on the
5897 problematic placement of specific sorts of fields.
5899 2017-04-27 Bob Duff <duff@adacore.com>
5901 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
5902 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
5903 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
5904 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
5905 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
5906 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
5907 For efficiency, cache results of Is_Internal_File_Name and
5908 Is_Predefined_File_Name in the Units table. This avoids a lot
5909 of repeated text processing.
5911 2017-04-27 Emmanuel Briot <briot@adacore.com>
5913 * g-comlin.adb (Sort_Sections): remove useless test.
5915 2017-04-27 Claire Dross <dross@adacore.com>
5917 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
5918 allow the use of regular equality over elements in contracts.
5919 (Formal_Model): Ghost package containing model functions that are
5920 used in subprogram contracts.
5921 (Current_To_Last): Removed, model functions should be used instead.
5922 (First_To_Previous): Removed, model functions should be used instead.
5923 (Strict_Equal): Removed, model functions should be used instead.
5924 (No_Overlap): Removed, model functions should be used instead.
5925 (Equivalent_Keys): Functions over cursors are removed. They were
5926 awkward with explicit container parameters.
5927 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
5928 allow the use of regular equality over elements in contracts.
5929 (Formal_Model): Ghost package containing model functions that
5930 are used in subprogram contracts.
5931 (Current_To_Last): Removed, model functions should be used instead.
5932 (First_To_Previous): Removed, model functions should be used instead.
5933 (Strict_Equal): Removed, model functions should be used instead.
5934 (No_Overlap): Removed, model functions should be used instead.
5936 2017-04-27 Yannick Moy <moy@adacore.com>
5938 * gnat1drv.adb: Code cleanup.
5940 2017-04-27 Ed Schonberg <schonberg@adacore.com>
5942 * exp_util.adb (Replace_Entity): The prefix of a 'Result
5943 attribute reference in a post- condition is the subprogram to
5944 which the condition applies. If the condition is inherited
5945 by a type extension, the prefix becomes a reference to the
5946 inherited operation, but there is no need to create a wrapper
5947 for this operation, because 'Result is expanded independently
5948 when elaborating the postconditions.
5950 2017-04-27 Bob Duff <duff@adacore.com>
5952 * sinput.adb: Minor code cleanup.
5953 * namet.adb (Append): Create faster versions of
5954 Append(String) and Append(Name_Id) by using slice assignment
5956 * sem_util.adb (In_Instance): Speed this up by removing
5957 unnecessary tests; Is_Generic_Instance is defined for all
5959 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
5960 Remove unused function.
5961 * alloc.ads (Nodes_Initial): Use a much larger value, because
5962 the compiler was spending a lot of time copying the nodes table
5963 when it grows. This number was chosen in 1996, so is rather out
5964 of date with current memory sizes. Anyway, it's virtual memory.
5965 Get rid of Orig_Nodes_...; use Node_... instead.
5966 * atree.adb (Lock): Do not release the Nodes tables; it's a
5968 Orig_Nodes_ ==> Nodes_
5969 * nlists.adb: Orig_Nodes_ ==> Nodes_
5970 * g-table.adb: Remove unused "with" clause.
5971 * g-table.ads, table.ads: Remove Big_Table_Type, which should
5972 not be used by clients.
5973 * g-dyntab.adb (Last_Allocated): New function
5974 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
5976 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5978 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
5980 (Subtypes_Statically_Match): Remove duplicate check.
5981 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
5983 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
5985 * exp_aggr.adb (Replace_Type): Remove the special processing
5986 for selected components.
5987 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
5988 processing for attributes Fixed_Value and Integer_Value.
5989 * exp_util.adb (Side_Effect_Free): Merge the processing for
5990 qualified expressions, type conversions, and unchecked type
5992 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
5994 * par-ch3.adb (P_Declarative_Items): Merge the processing for
5995 tokens function, not, overriding, and procedure.
5996 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
5997 for qualified expressions, type conversions, and unchecked
5999 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6000 processing for Ada 83 and instances.
6001 (Object_Access_Level): Merge the processing for indexed components
6002 and selected components.
6003 * uname.adb (Add_Node_Name): Merge the processing for stubs.
6005 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6007 * checks.adb (Install_Primitive_Elaboration_Check):
6008 Do not generate the check when restriction No_Elaboration_Code
6011 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6013 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6014 of Expand_Dispatching_Call. If the denoted subprogram has a
6015 class-wide precondition, this is the only precondition that
6016 applies to the call, rather that the class-wide preconditions
6017 that may apply to the body that is executed. (This is specified
6020 2017-04-27 Yannick Moy <moy@adacore.com>
6022 * gnat1drv.adb (Adjust_Global_Switches): Issue
6023 a warning in GNATprove mode if the runtime library does not
6024 support IEEE-754 floats.
6026 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6028 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6029 is itself inherited it does not carry any contract information,
6030 so examine its parent operation which is its Alias.
6032 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6034 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6035 prefix can be an object reference in which case Obj'Image (X)
6036 can only be interpreted as an indexing of the parameterless
6037 version of the attribute.
6038 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6039 an indexing or a slice operation if the attribute does not require
6040 parameters. In Ada2012 'Image also belongs in this category,
6041 and A'Image (lo .. hi) is legal and must be parsed as a slice.
6043 2017-04-27 Yannick Moy <moy@adacore.com>
6045 * exp_ch4.adb: Minor reformatting.
6046 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6047 disable the CodePeer and C generation modes. Similar to the
6048 opposite actions done in CodePeer mode.
6050 2017-04-27 Yannick Moy <moy@adacore.com>
6052 * sem_res.adb: Remove duplicate code.
6053 * sem_attr.adb: Delete duplicate code.
6055 2017-04-27 Bob Duff <duff@adacore.com>
6057 * g-dyntab.adb: Reduce the amount of copying in
6058 Release. No need to copy items past Last.
6060 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6062 * checks.adb Add with and use clauses for Sem_Disp.
6063 (Install_Primitive_Elaboration_Check): New routine.
6064 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6065 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6066 processing of 'Elaborated.
6067 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6070 2017-04-27 Bob Duff <duff@adacore.com>
6072 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6073 If the table grows and then shrinks back to empty, we won't necessarily
6074 point back to the empty array. Code cleanups.
6075 * sinput.ads: Add 'Base to Size clause to match the declared
6078 2017-04-27 Claire Dross <dross@adacore.com>
6080 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6081 allow the use of regular equality over elements in contracts.
6082 (Formal_Model): Ghost package containing model functions that
6083 are used in subprogram contracts.
6084 (Current_To_Last): Removed, model functions should be used instead.
6085 (First_To_Previous): Removed, model functions should be used instead.
6086 (Strict_Equal): Removed, model functions should be used instead.
6087 (No_Overlap): Removed, model functions should be used instead.
6088 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6089 Boolean generic parameter to disable contracts for equivalence
6091 (Witness): Create a witness of a key that is used for handling of
6092 equivalence between keys.
6093 (Has_Witness): Check whether a witness is contained in a map.
6094 (W_Get): Get the element associated to a witness.
6095 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6097 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6098 Boolean generic parameter to disable contracts for equivalence
6100 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6101 of equivalence on functional maps.
6102 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6103 of equivalence on functional maps.
6105 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6107 * exp_ch9.adb (Expand_Entry_Barrier): Code
6108 cleanup. Do not perform the optimization which removes the
6109 declarations of the discriminant and component renamings when
6110 validity checks on operands and attributes are in effect.
6112 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6114 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6115 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6116 a-cfhama.ads, a-cofove.ads: Minor reformatting.
6118 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6120 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6121 pointer dereference.
6122 * g-spipat.adb (Dump): Code clean up. Protect against a possible
6123 null pointer dereference.
6125 2017-04-27 Bob Duff <duff@adacore.com>
6127 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6128 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6129 Free renames Init, since they do the same thing.
6130 * g-table.ads: Default for Table_Low_Bound.
6131 * table.ads: Default for Table_Low_Bound, Table_Initial, and
6134 2017-04-27 Bob Duff <duff@adacore.com>
6136 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6138 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6139 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6140 Reorder code so that above assertions do not fail.
6141 * table.ads: Remove obsolete comment on Locked.
6143 2017-04-27 Claire Dross <dross@adacore.com>
6145 * a-cfdlli.ads: Code cleanup.
6147 2017-04-27 Yannick Moy <moy@adacore.com>
6149 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6150 when needed for proof. (Expand_SPARK): Call the new procedure.
6151 * exp_util.ads Fix typo.
6153 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6155 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6158 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6160 * sem_elab.adb Add new type Visited_Element
6161 and update the contents of table Elab_Visited. Various code clean up.
6162 (Check_Elab_Call): Determine whether a prior call to
6163 the same subprogram was already examined within the same context.
6164 (Check_Internal_Call_Continue): Register the subprogram being
6165 called as examined within a particular context. Do not suppress
6166 elaboration warnings.
6168 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6170 * xoscons.adb, osint.ads: Minor reformatting.
6172 2017-04-27 Bob Duff <duff@adacore.com>
6174 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
6175 Table_Count_Type --> Table_Last_Type, because the name
6176 was confusing (a "count" usually starts at zero). Add
6177 functionality supported or needed by other tables packages
6178 (Move, Release_Threshold).
6179 * g-table.ads, g-table.adb: This is now just a thin wrapper
6180 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
6181 or needed by other tables packages (Save, Restore).
6182 * table.ads, table.adb: This is now just a thin wrapper around
6183 * g-table.ads/g-table.adb.
6184 * namet.h, scos.h, uintp.h: These files are reaching into the
6185 private data of some instances of g-table, whose names changed,
6186 so the above change requires some adjustment here. It now uses
6189 2017-04-27 Bob Duff <duff@adacore.com>
6191 * namet.adb, namet.ads: Minor: remove unused procedures.
6193 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6195 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
6196 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
6197 Add pragma Warnings on Rtype variable in nested block. *
6198 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
6199 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
6200 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
6201 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
6202 (Process_Component_List_For_Finalize): Initialize Counter_Id.
6203 (Build_Finalize_Statements): Initialize Bod_Stmts.
6204 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
6206 2017-04-27 Claire Dross <dross@adacore.com>
6208 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
6209 allow the use of regular equality over elements in contracts.
6210 (Formal_Model): Ghost package containing model functions that are
6211 used in subprogram contracts.
6212 (Current_To_Last): Removed, model
6213 functions should be used instead.
6214 (First_To_Previous): Removed, model functions should be used instead.
6215 (Strict_Equal): Removed, model functions should be used instead.
6216 (No_Overlap): Removed, model functions should be used instead.
6217 (Equivalent_Keys): Functions over cursors are removed. They were
6218 awkward with explicit container parameters.
6219 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
6220 (proof only) procedure to help GNATprove when equivalence over
6221 keys is not equality.
6223 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6225 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
6226 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
6227 Minor reformatting and code cleanups.
6229 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6231 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
6232 subsidiary of Check_Inherited_Conditions, to build pragmas for an
6233 operation whose ancestor has classwide pre/postconditions. This
6234 is used both to check the legality of the inheritance in Ada
6235 and in SPARK, and to determine whether a wrapper is needed for
6236 an inherited operation.
6237 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
6238 Improve placement of error message for inherited classwide
6239 conditions that become illegal on type derivation.
6241 2017-04-27 Yannick Moy <moy@adacore.com>
6243 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
6244 SPARK_Mode from context on generic package.
6245 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
6248 2017-04-27 Claire Dross <dross@adacore.com>
6250 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
6251 overflows in computations.
6252 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
6253 overflows in computations.
6254 (Insert): Rewrite precondition to avoid overflows in computations.
6255 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
6256 overflows in computations.
6257 (Insert): Rewrite precondition to avoid overflows in computations.
6259 2017-04-27 Steve Baird <baird@adacore.com>
6261 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
6262 flag when it is declared in order to avoid confusing CodePeer about
6263 the possibility of an uninitialized variable read.
6265 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6267 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
6268 no dimensionality error if the subtype of the expression is
6269 identical to the nominal subtype in the declaration, even though
6270 the expression itself may have been constant-folded and lack a
6272 * sem_dim.ads: Add comments on setting of dimension vectors and
6273 its interaction with node rewritings and side-effect removal.
6275 2017-04-27 Bob Duff <duff@adacore.com>
6277 * debug.adb: Minor comment correction.
6278 * sem_dim.ads: Minor reformatting and typo fixes.
6280 2017-04-27 Bob Duff <duff@adacore.com>
6282 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
6283 Last of the tables via function calls, rather than relying on layout
6286 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6288 * exp_util.adb: No wrapper in GNATprove mode.
6290 2017-04-27 Yannick Moy <moy@adacore.com>
6292 * sem_res.adb (Resolve_Comparison_Op): Always
6293 evaluate comparisons between values of universal types.
6295 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6297 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
6298 an elaboration counter nor a check when in GNATprove mode.
6299 * sem_util.adb (Build_Elaboration_Entity): Do not create an
6300 elaboration counter when in GNATprove mode.
6302 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6304 * freeze.adb: copy-paste typo.
6306 2017-04-27 Yannick Moy <moy@adacore.com>
6308 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
6309 Use correct test to detect call in GNATprove mode instead of
6312 2017-04-27 Claire Dross <dross@adacore.com>
6314 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
6315 New property function expressing that the element of a
6316 sequence are contained in the union of two sequences.
6317 (Formal_Model.M_Elements_Included): New property function
6318 expressing that the element of a sequence are another sequence.
6319 (Generic_Sorting): Use new property functions to state that
6320 elements are preserved by Sort and Merge.
6321 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
6322 allow the use of regular equality over elements in contracts.
6323 (Formal_Model): Ghost package containing model functions
6324 that are used in subprogram contracts. (Capacity):
6325 On unbounded containers, return the maximal capacity.
6326 (Current_To_Last): Removed, model functions should be used instead.
6327 (First_To_Previous): Removed, model functions should be used instead.
6328 (Append): Default parameter value replaced
6329 by new wrapper to allow more precise contracts.
6330 (Insert): Subprogram restored, it seems it was useful to users even if
6332 (Delete): Subprogram restored, it seems it was useful to users even if
6334 (Prepend): Subprogram restored, it seems it was useful to users even
6335 if it is inefficient.
6336 (Delete_First): Subprogram restored, it seems it
6337 was useful to users even if it is inefficient. (Delete_Last):
6338 Default parameter value replaced by new wrapper to allow more
6340 (Generic_Sorting.Merge): Subprogram restored.
6341 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
6342 allow the use of regular equality over elements in contracts.
6343 (Formal_Model): Ghost package containing model functions
6344 that are used in subprogram contracts. (Capacity):
6345 On unbounded containers, return the maximal capacity.
6346 (Current_To_Last): Removed, model functions should be used
6348 (First_To_Previous): Removed, model functions should be used instead.
6349 (Append): Default parameter value replaced
6350 by new wrapper to allow more precise contracts.
6351 (Insert): Subprogram restored, it seems it was useful to users even if
6353 (Delete): Subprogram restored, it seems it was useful to users even if
6355 (Prepend): Subprogram restored, it seems it was useful to users even
6356 if it is inefficient.
6357 (Delete_First): Subprogram restored, it seems it
6358 was useful to users even if it is inefficient. (Delete_Last):
6359 Default parameter value replaced by new wrapper to allow more
6361 (Generic_Sorting.Merge): Subprogram restored.
6362 (Vector): Do not reuse formal vectors, as it is no longer possible
6363 to supply them with an equality function over elements.
6365 2017-04-27 Bob Duff <duff@adacore.com>
6367 * g-dyntab.adb (Release): When allocating the new
6368 table, use the correct slice of the old table to initialize it.
6370 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6372 * einfo.ads: Minor fixes in comments.
6374 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6376 * sem_prag.adb: disable clones in SPARK_Mode.
6378 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6380 * sem_util.ads, contracts.adb: Minor reformatting.
6382 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6384 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
6385 Build body of subprogram that has a class-wide condition that
6386 contains calls to other primitives.
6387 (Build_Class_Wide_Clone_Call); Build a call to the common
6388 class-wide clone of a subprogram with classwide conditions. The
6389 body of the subprogram becomes a wrapper for a call to the
6390 clone. The inherited operation becomes a similar wrapper to which
6391 modified conditions apply, and the call to the clone includes
6392 the proper conversion in a call the parent operation.
6393 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
6394 subprogram that has a classwide condition that contains calls to
6395 other primitives, build an internal subprogram that is invoked
6396 through a type-specific wrapper for all inherited subprograms
6397 that may have a modified condition.
6398 * sem_prag.adb (Check_References): If subprogram has a classwide
6399 condition, create entity for corresponding clone, to be invoked
6400 through wrapper subprograns.
6401 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
6402 message about placement if pragma isi internally generated.
6403 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
6404 a classwide clone, build body of clone as copy of original body,
6405 and rewrite original body as a wrapper as a wrapper for a call to
6406 the clone, so that it incorporates the original pre/postconditions
6408 * freeze.adb (Check_Inherited_Conditions): For an inherited
6409 subprogram that inherits a classwide condition, build spec and
6410 body of corresponding wrapper so that call to inherited operation
6411 gets the modified conditions.
6412 * contracts.adb (Analyze_Contracts): If analysis of classwide
6413 condition has created a clone for a primitive operation, analyze
6414 declaration of clone.
6416 2017-04-27 Steve Baird <baird@adacore.com>
6418 * exp_util.adb (Build_Allocate_Deallocate_Proc):
6419 Add "Suppress => All_Checks" to avoid generating unnecessary
6422 2017-04-27 Yannick Moy <moy@adacore.com>
6424 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
6425 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
6426 inlining body in GNATprove mode when switch -gnatdm used.
6427 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
6428 in GNATprove mode when switch -gnatdm used.
6430 2017-04-27 Arnaud Charlet <charlet@adacore.com>
6432 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
6433 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
6434 clauses, so that we keep an indication of the address clause
6435 before removing it from the tree.
6437 2017-04-27 Yannick Moy <moy@adacore.com>
6439 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
6440 of expression being qualified, when not an object name, or else
6441 evaluate the underlying name.
6443 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
6445 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
6447 2017-04-27 Justin Squirek <squirek@adacore.com>
6449 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
6450 Process_Component_List_For_Finalization as a local variable.
6451 (Process_Component_For_Finalize): Add an extra parameter to avoid
6453 (Process_Component_List_For_Finalization): Correct calls to
6454 Process_Component_For_Finalize to take Num_Comps as a parameter.
6456 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6458 * sem_ch8.adb (Find_Direct_Name): Account for the case where
6459 a use-visible entity is defined within a nested scope of an
6460 instance when giving priority to entities which were visible in
6461 the original generic.
6462 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
6464 2017-04-27 Tristan Gingold <gingold@adacore.com>
6466 * raise-gcc.c: Don't use unwind.h while compiling
6467 for the frontend, but mimic host behavior.
6469 2017-04-27 Javier Miranda <miranda@adacore.com>
6471 * sem_ch3.adb (Build_Discriminated_Subtype):
6472 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
6474 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6476 * sem_prag.adb (Analyze_Global_Item):
6477 Do not consider discriminants because they are not "entire
6478 objects". Remove the discriminant-related checks because they are
6480 (Analyze_Input_Output): Do not consider discriminants
6481 because they are not "entire objects".
6483 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6485 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
6486 perform check if the current scope does not come from source,
6487 as is the case for a rewritten task body, because check has
6488 been performed already, and may not be doable because of changed
6491 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6493 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
6494 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
6497 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6499 * sem_ch4.adb (Analyze_Call): If the return type of a function
6500 is incomplete in an context in which the full view is available,
6501 replace the type of the call by the full view, to prevent spurious
6503 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
6504 abstract subprogram so that compiler does not reject a parameter
6505 of a primitive operation of a tagged type being frozen, when
6506 the untagged type of that parameter cannot be frozen.
6508 2017-04-27 Bob Duff <duff@adacore.com>
6510 * sem_attr.adb (Compute_Type_Key): Don't walk
6511 representation items for irrelevant types, which could be in a
6512 different source file.
6514 2017-04-27 Steve Baird <baird@adacore.com>
6516 * exp_attr.adb (Expand_N_Attribute_Reference):
6517 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
6520 2017-04-27 Yannick Moy <moy@adacore.com>
6522 * exp_unst.ads: Fix typos in comments.
6524 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6526 * sem_eval.adb (Choice_Matches): Handle properly a real literal
6527 whose type has a defined static predicate.
6529 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6531 * exp_ch4.adb (Insert_Dereference_Action):
6532 Do not adjust the address of a controlled object when the
6533 associated access type is subject to pragma No_Heap_Finalization.
6536 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
6538 * gcc-interface/utils.c (gnat_type_for_size): Set
6539 TYPE_ARTIFICIAL on created types.
6541 2017-04-27 Claire Dross <dross@adacore.com>
6543 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6544 modifications in functional containers.
6545 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6546 to improve readablity. Subprograms are separated between basic
6547 operations, constructors and properties. Universally quantified
6548 formulas in contracts are factorized in independant functions
6549 with a name and a comment. Names of parameters are improved.
6551 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6553 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6555 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6557 * sem_res.adb (Resolve_Type_Conversion): Do not
6558 install a predicate check here since this is already done during
6559 the expansion phase. Verify whether the operand satisfies the
6560 static predicate (if any) of the target type.
6561 * sem_ch3.adb (Analyze_Object_Declaration): Do
6562 not install a predicate check if the object is initialized by
6563 means of a type conversion because the conversion is subjected
6566 2017-04-27 Tristan Gingold <gingold@adacore.com>
6568 * raise.c (__gnat_builtin_longjmp): Remove.
6569 (__gnat_bracktrace):
6570 Add a dummy definition for the compiler (__gnat_eh_personality,
6571 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
6572 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
6573 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
6574 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
6575 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
6576 and a-except-2005.adb.
6577 * raise-gcc.c: Allow build in compiler, compiled as a C++
6579 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
6580 (db): Constify msg_format.
6581 (get_call_site_action_for): Don't use void arithmetic.
6582 * system.ads (Frontend_Exceptions): Set to False.
6583 (ZCX_By_Default): Set to True.
6584 (GCC_ZC_Support): Set to True.
6585 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
6587 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
6588 in gnat1 and gnatbind.
6589 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
6590 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
6591 * s-excmac.ads, s-excmac.adb: Copy of variants.
6592 * a-except.o: Adjust preequisites.
6593 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
6595 2017-04-27 Claire Dross <dross@adacore.com>
6597 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6598 modifications in functional containers.
6599 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6600 to improve readablity. Subprograms are separated between basic
6601 operations, constructors and properties. Universally quantified
6602 formulas in contracts are factorized in independant functions
6603 with a name and a comment. Names of parameters are improved.
6605 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6607 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6609 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6611 * sem_res.adb (Resolve_Type_Conversion): Do not
6612 install a predicate check here since this is already done during
6613 the expansion phase. Verify whether the operand satisfies the
6614 static predicate (if any) of the target type.
6615 * sem_ch3.adb (Analyze_Object_Declaration): Do
6616 not install a predicate check if the object is initialized by
6617 means of a type conversion because the conversion is subjected
6620 2017-04-27 Tristan Gingold <gingold@adacore.com>
6622 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
6623 replaced by their variants).
6625 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6627 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
6628 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
6629 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
6631 2017-04-27 Tristan Gingold <gingold@adacore.com>
6633 * s-excmac-gcc.ads, s-excmac-gcc.adb,
6634 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
6637 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6639 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
6640 the loop which detects potential enclosing transient scopes. The
6641 loop now terminates much earlier as transient scopes are bounded
6642 by packages and subprograms.
6644 2017-04-27 Claire Dross <dross@adacore.com>
6646 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
6647 allow the use of regular equality over elements in contracts.
6648 (Cursor): Type is now public so that it can be used in
6650 (Formal_Model): Ghost package containing
6651 model functions that are used in subprogram contracts.
6652 (Current_To_Last): Removed, model functions should be used
6654 (First_To_Previous): Removed, model functions should
6656 (Strict_Equal): Removed, model functions
6657 should be used instead.
6658 (Append): Default parameter value
6659 replaced by new wrapper to allow more precise contracts.
6660 (Insert): Default parameter value replaced by new wrapper to
6661 allow more precise contracts.
6662 (Delete): Default parameter
6663 value replaced by new wrapper to allow more precise contracts.
6664 (Prepend): Default parameter value replaced by new wrapper to
6665 allow more precise contracts.
6666 (Delete_First): Default parameter
6667 value replaced by new wrapper to allow more precise contracts.
6668 (Delete_Last): Default parameter value replaced by new wrapper
6669 to allow more precise contracts.
6671 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6673 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
6674 for object declarations.
6675 (Expand_SPARK_N_Object_Declaration): New routine.
6676 * sem_elab.adb (Check_A_Call): Include calls to the
6677 Default_Initial_Condition procedure of a type under the SPARK
6678 elaboration checks umbrella.
6680 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6682 * sem.adb (Analyze): Diagnose an illegal iterated component
6684 * sem_util.ads, sem_util.adb
6685 (Diagnose_Iterated_Component_Association): New routine.
6687 2017-04-27 Bob Duff <duff@adacore.com>
6689 * adaint.c (__gnat_get_current_dir): Return 0 in length if
6691 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
6692 exception if getcwd failed.
6694 2017-04-27 Yannick Moy <moy@adacore.com>
6696 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
6697 entities with special prefix.
6699 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6701 * debug.adb Change the documentation of switch -gnatd.s.
6702 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
6703 to manage the secondary stack when an enclosing scope already
6704 performs this functionality (aka relaxed management). Switch
6705 -gnatd.s may be used to force strict management in which case
6706 the block will manage the secondary stack unconditionally. Add
6707 a guard to stop the traversal when encountering a package or a
6710 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6712 * sem_res.adb (Resolve_Call): Refine further the handling of
6713 limited views of return types in function calls. If the function
6714 that returns a limited view appears in the current unit,
6715 we do not replace its type by the non-limited view because
6716 this transformation is performed int the back-end. However,
6717 the type of the call itself must be the non-limited view, to
6718 prevent spurious resolution errors.
6720 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6722 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
6723 Removed, proposed implementation using generics for class-wide
6724 preconditions proved impractical.
6725 (Class_Wide_Clone): New attribute of subprogram. Designates
6726 subprogram created for primitive operations with class-wide
6727 pre/postconditions that contain calls to other primitives. The
6728 clone holds the body of the original primitive, but the
6729 pre/postonditions do not apply to it. The original body is
6730 rewritten as a wrapper for a call to the clone.
6731 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
6732 the flag is set, no code for the corresponding pre/postconditions
6733 is inserted into its body.
6735 2017-04-27 Bob Duff <duff@adacore.com>
6737 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
6738 Scalar_Storage_Order if -gnatI is given.
6739 * sem_prag.adb (Analyze_Pragma): Ignore
6740 Default_Scalar_Storage_Order if -gnatI is given.
6742 2017-04-27 Claire Dross <dross@adacore.com>
6744 * a-cofuba.ads (Add): Take as an additional input parameter
6745 the position where the element should be inserted.
6746 (Remove): New function that removes an element from the container.
6747 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
6748 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
6749 (Remove): New function that removes an element from a set.
6750 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
6751 (Remove): New function that removes an element from a sequence.
6752 (Insert): New function that adds anywhere in a sequence.
6754 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6756 * checks.adb (Generate_Range_Check): Revert previous change.
6758 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6760 * sem_util.adb: Minor reformatting/rewording.
6762 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6764 * lib-xref.adb (Generate_Reference): The use
6765 of attribute 'Result is not considered a violation of pragma
6768 2017-04-27 Justin Squirek <squirek@adacore.com>
6770 * cstand.adb (Create_Standard): Correctly set
6771 Directly_Designated_Type for Any_Access.
6772 * sem_type.adb (Covers): Minor grammar fixes.
6774 2017-04-27 Bob Duff <duff@adacore.com>
6776 * sem_attr.adb: Minor cleanup.
6778 2017-04-27 Claire Dross <dross@adacore.com>
6780 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
6781 private child of Ada.Containers used to implement all functional
6783 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
6784 child of Ada.Containers. It provides functional indefinite unbounded
6785 maps which can be used as high level models for specification
6787 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
6788 child of Ada.Containers. It provides functional indefinite unbounded
6789 sets which can be used as high level models for specification
6791 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
6792 child of Ada.Containers. It provides functional indefinite unbounded
6793 vectors which can be used as high level models for specification
6795 * Makefile.rtl: Add new packages.
6796 * impunit.adb: Add new packages.
6798 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6800 * sem_ch4.adb: Minor reformatting.
6802 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6804 * sem_ch12.adb (Analyze_Associations): minor reformatting.
6805 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
6806 point type actual that has user-defined arithmetic primitives,
6807 when there is a previous actual for a formal package that defines
6808 a fixed-point type with the parent user-defined operator.
6810 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6812 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
6813 * sem_attr.adb (Resolve_Attribute): Generate a range check when
6814 the component type allows range checks.
6816 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6818 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
6819 corresponding declaration, because formal derived types are
6820 rewritten as private extensions.
6822 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6824 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
6825 dimensions of operands if node has been analyzed already, because
6826 previous analysis and dimension checking will have removed the
6827 dimension information from the operands.
6829 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6831 * debug.adb: Document the use of switch -gnatd.s.
6832 * einfo.ads Update the documentation on attribute
6833 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
6834 the uses of these attributes from certain entities.
6835 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
6836 which determines whether the block should continue to manage
6837 the secondary stack.
6838 (Manages_Sec_Stack): New routine.
6840 2017-04-27 Bob Duff <duff@adacore.com>
6842 * atree.ads: Minor edit.
6844 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6846 * sinfo.ads: Update the section on Ghost mode. Add
6847 a section on SPARK mode. Update the placement of section on
6848 expression functions.
6850 2017-04-27 Bob Duff <duff@adacore.com>
6852 * sinput.adb (Get_Source_File_Index): Don't
6853 assert that S is in the right range in the case where this is
6854 a .dg file under construction.
6856 2017-04-27 Yannick Moy <moy@adacore.com>
6858 * sem_util.adb (Check_Result_And_Post_State):
6859 Handle more precisely each conjunct in expressions formed by
6860 and'ing sub-expressions.
6862 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6864 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
6866 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6868 * gnat_rm.texi, gnat_ugn.texi,
6869 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
6870 doc/gnat_ugn/platform_specific_information.rst,
6871 doc/gnat_ugn/gnat_and_program_execution.rst,
6872 doc/gnat_ugn/gnat_utility_programs.rst,
6873 doc/gnat_ugn/the_gnat_compilation_model.rst,
6874 doc/gnat_rm/implementation_defined_attributes.rst,
6875 doc/gnat_rm/the_gnat_library.rst,
6876 doc/gnat_rm/implementation_defined_pragmas.rst,
6877 doc/gnat_rm/representation_clauses_and_pragmas.rst,
6878 doc/gnat_rm/implementation_of_specific_ada_features.rst,
6879 doc/gnat_rm/implementation_defined_aspects.rst,
6880 doc/gnat_rm/implementation_defined_characteristics.rst: Update
6883 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6885 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
6886 generating C code on complex case expressions.
6888 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6890 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
6891 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
6892 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
6893 Ada_2012 instead of Ada_2005 to be compatible with the above
6895 * bindgen.adb: Silence new warning on pragma Ada_95.
6897 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6899 * checks.adb (Generate_Range_Check): Revert part of previous change.
6901 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6903 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
6904 container indexing operation that appears as a an actual in a
6905 parameter association in a procedure call.
6907 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
6909 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
6910 Fix spelling mistakes.
6912 2017-04-25 Bob Duff <duff@adacore.com>
6914 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
6915 * sinput-p.adb: Use regular fat pointers, with bounds checking,
6916 for source buffers. Fix misc obscure bugs.
6917 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
6918 checking, for source buffers. Modify representation clause for
6919 Source_File_Record as appropriate. Move Source_File_Index_Table
6920 from spec to body, because it is not used outside the body.
6921 Move Set_Source_File_Index_Table into the private part, because
6922 it is used only in the body and in children. Use trickery to
6923 modify the dope in the generic instantiation case. It's ugly,
6924 but not as ugly as the previous method. Fix documentation.
6925 Remove obsolete code.
6926 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
6927 indexing in source buffers.
6928 * fmap.adb: Avoid conversions from one string type to another.
6929 Remove a use of global name buffer.
6930 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
6933 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6935 * exp_util.adb, exp_ch4.adb: Minor reformatting.
6937 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6939 * checks.adb: Code clean up in various routines.
6940 (Generate_Range_Check): Do not generate a range check when the
6941 expander is not active or when index/range checks are suppressed
6943 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
6944 Remove variants that include a Supress parameter. These routines
6945 are never used, and were introduced before the current scope-based
6946 check suppression method.
6948 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
6950 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
6951 code and some subprogram calls that are now noop.
6953 2017-04-25 Arnaud Charlet <charlet@adacore.com>
6955 * exp_ch4.adb (Expand_N_Case_Expression): Take
6956 Minimize_Expression_With_Actions into account when possible.
6958 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
6960 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
6961 (Known_Null): Moved to Sem_Util.
6962 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
6963 (Known_Null): Moved to Sem_Util.
6964 * sem_util.adb Add new enumeration type Null_Status_Kind.
6965 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
6966 this routine is now carried out by Null_Status.
6967 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
6968 is now carried out by Null_Status.
6969 (Null_Status): New routine.
6970 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
6971 (Known_Null): Moved from Exp_Util.
6973 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6975 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
6976 error on the return type of an expression function that is a
6977 completion, if the type is derived from a generic formal type.
6979 2017-04-25 Ed Schonberg <schonberg@adacore.com>
6981 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
6982 conversion are those of the target type.
6984 2017-04-25 Bob Duff <duff@adacore.com>
6986 * a-clrefi.adb: Minor cleanup.
6988 2017-04-25 Gary Dismukes <dismukes@adacore.com>
6990 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
6992 2017-04-25 Bob Duff <duff@adacore.com>
6994 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
6995 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
6996 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
6997 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
6998 the Internal_Source buffer. This removes the incorrect call to "="
6999 the customer noticed.
7000 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7001 eventually need to eliminate them altogether. Or else get rid
7002 of zero-origin addressing.
7004 2017-04-25 Claire Dross <dross@adacore.com>
7006 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7007 function used in GNATprove to know if an expression contains
7008 non-dispatching calls on primitives of a tagged type.
7010 2017-04-25 Bob Duff <duff@adacore.com>
7012 * rtsfind.adb (Initialize): Initialize
7013 First_Implicit_With. Building the compiler with Normalize_Scalars
7014 and validity checking finds this being used as an uninitialized
7017 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7019 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7020 Add a warning about SPARK mode management. The routine now
7021 saves and restores both the mode and associated pragma.
7022 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7023 SPARK mode management. The routine now saves and restores both
7024 the mode and associated pragma.
7025 (Analyze_Object_Contract):
7026 Add a warning about SPARK mode management. The routine
7027 now saves and restores both the mode and associated pragma.
7028 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7029 management. The routine now saves and restores both the mode
7030 and associated pragma. (Analyze_Package_Contract): Add a warning
7031 about SPARK mode management. The routine now saves and restores
7032 both the mode and associated pragma.
7033 (Analyze_Task_Contract):
7034 Add a warning about SPARK mode management. The routine now saves
7035 and restores both the mode and associated pragma.
7036 * expander.adb (Expand): Change the way the Ghost mode is saved
7038 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7040 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7042 * exp_util.adb (Build_DIC_Procedure_Body):
7043 Change the way the Ghost mode is saved and restored.
7044 (Build_DIC_Procedure_Declaration): Change the way the Ghost
7045 mode is saved and restored.
7046 (Build_Invariant_Procedure_Body):
7047 Change the way the Ghost mode is saved and restored.
7048 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7049 mode is saved and restored.
7050 (Make_Predicate_Call): Change the
7051 way the Ghost mode is saved and restored.
7052 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7054 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7056 (Mark_And_Set_Ghost_Body): Remove parameter
7057 Mode and its assignment.
7058 (Mark_And_Set_Ghost_Completion):
7059 Remove parameter Mode and its assignment.
7060 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7062 (Mark_And_Set_Ghost_Instantiation): Remove parameter
7063 Mode and its assignment.
7064 (Mark_And_Set_Ghost_Procedure_Call):
7065 Remove parameter Mode and its assignment.
7067 Remove parameter Mode and its assignment.
7068 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7069 and update the comment on usage.
7070 (Mark_And_Set_Ghost_Body):
7071 Remove parameter Mode and update the comment on usage.
7072 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7073 update the comment on usage.
7074 (Mark_And_Set_Ghost_Declaration):
7075 Remove parameter Mode and update the comment on usage.
7076 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7077 update the comment on usage.
7078 (Mark_And_Set_Ghost_Procedure_Call):
7079 Remove parameter Mode and update the comment on usage.
7080 (Set_Ghost_Mode): Remove parameter Mode and update the comment
7082 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7084 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7085 of obsolete field SPARK_Mode_Pragma.
7086 (Load_Main_Source): Remove
7087 the assignment of obsolete field SPARK_Mode_Pragma.
7088 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7089 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7090 the assignment of obsolete field SPARK_Mode_Pragma.
7091 (Ensure_System_Dependency): Remove the assignment of obsolete
7092 field SPARK_Mode_Pragma.
7093 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7094 mode management. Change the way Ghost and SPARK modes are saved
7096 * sem.adb (Analyze): Change the way the Ghost mode is saved
7098 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7099 Ghost mode is saved and restored.
7100 (Process_Full_View): Change
7101 the way the Ghost mode is saved and restored.
7102 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7103 mode is saved and restored.
7104 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7105 mode is saved and restored.
7106 (Analyze_Subprogram_Body_Helper):
7107 Change the way the Ghost mode is saved and restored.
7108 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7109 Ghost mode is saved and restored.
7110 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7111 management. Save the SPARK mode-related data prior to any changes
7112 to the scope stack and contexts. The mode is then reinstalled
7113 before the subunit is analyzed in order to restore the original
7114 view of the subunit.
7115 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7116 warning on region management. Change the way the Ghost and
7117 SPARK modes are saved and restored.
7118 (Inline_Instance_Body):
7119 Add a warning about SPARK mode management. Code clean up.
7120 (Analyze_Subprogram_Instantiation): Update the warning on region
7121 management. Change the way the Ghost and SPARK modes are saved
7123 (Instantiate_Package_Body): Update the warning
7124 on region management. Change the way the Ghost and SPARK modes
7125 are saved and restored.
7126 (Instantiate_Subprogram_Body): Update
7127 the warning on region management. Change the way the Ghost and
7128 SPARK modes are saved and restored.
7129 (Set_Instance_Env): Add a
7130 warning about SPARK mode management. Change the way SPARK mode
7131 is saved and restored.
7132 * sem_ch13.adb (Build_Predicate_Functions):
7133 Change the way the Ghost mode is saved and restored.
7134 (Build_Predicate_Function_Declaration): Change the way the Ghost
7135 mode is saved and restored.
7136 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7137 mode management. Change the way SPARK mode is saved and restored.
7138 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7139 Change the way the Ghost mode is saved and restored.
7140 (Analyze_Initial_Condition_In_Decl_Part): Change the way
7141 the Ghost mode is saved and restored.
7143 Change the way the Ghost mode is saved and restored.
7144 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7145 Ghost mode is saved and restored.
7146 * sem_util.adb (Install_SPARK_Mode): New routine.
7147 (Restore_SPARK_Mode): New routine.
7148 (Save_SPARK_Mode_And_Set): Removed.
7149 (Set_SPARK_Mode): New routine.
7150 * sem_util.ads (Install_SPARK_Mode): New routine.
7151 (Restore_SPARK_Mode): New routine.
7152 (Save_SPARK_Mode_And_Set): Removed.
7153 (Set_SPARK_Mode): New routine.
7155 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7157 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
7158 to determine whether a type is declared in a local package that
7159 has not yet been frozen.
7160 * freeze.adb (Freeze_Before): Use new predicate to determine
7161 whether a local package must be installed on the scope stack
7162 in order to evaluate in the proper scope actions generated by
7163 aspect specifications, such as Predicate
7164 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
7165 using new predicate.
7167 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7169 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
7170 comparisons between non- scalar expressions expressions because
7171 their values cannot be invalidated.
7172 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
7175 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7177 * par_sco.adb: Minor reformatting.
7179 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7181 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
7182 is a type from an unfrozen local package, install package to
7183 complete the analysis of delayed aspects of the type.
7185 2017-04-25 Tristan Gingold <gingold@adacore.com>
7187 * bingen.adb (System_Version_Control_Used): New variable.
7188 (Resolve_Binder_Options): Set the above variable.
7189 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
7190 (Gen_Elab_Order): Emit blank line before.
7192 2017-04-25 Justin Squirek <squirek@adacore.com>
7194 * sem_cat.adb (Validate_RT_RAT_Component): Added
7195 an extra check to ignore incomplete types.
7197 2017-04-25 Thomas Quinot <quinot@adacore.com>
7199 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
7200 bogus circuitry for the case where Name is Predicate.
7202 2017-04-25 Thomas Quinot <quinot@adacore.com>
7204 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
7205 Create SCOs for Predicate aspects in disabled
7206 state initially, to be enabled later on by...
7207 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
7208 SCO for predicate as enabled.
7210 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7212 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
7213 pragmas Warnings Off / On.
7214 * namet.adb (Finalize): Remove now obsolete pair of pragmas
7216 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
7217 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
7218 consider comparisons between static expressions because their
7219 values cannot be invalidated.
7220 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
7222 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
7223 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
7225 2017-04-25 Bob Duff <duff@adacore.com>
7227 * sem_elab.adb (In_Task_Activation): Trace internal calls in
7230 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7232 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
7235 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7237 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
7238 On/Off to defend against a spurious warning in conditional
7240 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
7241 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
7242 defend against a spurious warning in conditional compilation.
7243 * output.adb Add a pair of pragma Warnings On/Off to defend
7244 against a spurious warning in conditional compilation.
7245 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
7246 (Fold_General_Op): New routine.
7247 (Fold_Static_Real_Op): New routine.
7248 (Test_Comparison): New routine.
7249 * sem_eval.ads (Test_Comparison): New routine.
7250 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
7251 (Warn_On_Constant_Valid_Condition): New routine.
7252 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
7253 to detect a specific case.
7254 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
7255 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
7256 to defend against a spurious warning in conditional compilation.
7257 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
7258 against a spurious warning in conditional compilation.
7259 * usage.adb Add a pair of pragma Warnings On/Off to defend
7260 against a spurious warning in conditional compilation.
7262 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7264 * sinfo.ads, sem_ch13.adb: Update comment.
7266 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7268 * sem_util.adb (Is_Post_State): A reference to a
7269 generic in out parameter is considered a change in the post-state
7272 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7274 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
7275 declaration of a subprogram instance within its wrapper package,
7276 skip over null statements that may result from the rewriting of
7279 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7281 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
7282 If the type is an unchecked_union, replace the attribute with
7283 a Raise_Program_Error (rather than inserting such before the
7284 attribute reference) to handle properly the case where we are
7285 processing a component of a larger record, and we need to prevent
7286 further expansion for the unchecked union.
7287 (Expand_Attribute_Reference, case 'Write): If the type is
7288 an unchecked_union, check whether enclosing scope is a Write
7289 subprogram. Replace attribute with a Raise_Program_Error if the
7290 discriminants of the unchecked_union type have not default values
7291 because such a use is erroneous..
7293 2017-04-25 Tristan Gingold <gingold@adacore.com>
7295 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
7296 Add relative_deadline to task record on edf profile.
7297 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
7298 (Make_Task_Create_Call): Pass relative_deadline value.
7299 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
7300 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
7301 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
7302 * sem_prag.adb (Set_Ravenscar_Profile): Handle
7303 GNAT_Ravenscar_EDF (set scheduling policy).
7304 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
7306 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
7307 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
7309 (Pragma_Deadline_Floor): New pragma.
7310 * targparm.adb (Get_Target_Parameters): Recognize
7311 GNAT_Ravenscar_EDF profile.
7313 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7315 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
7317 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7319 * sem_aux.adb (Nearest_Ancestor): Use original node of type
7320 declaration to locate nearest ancestor, because derived
7321 type declarations for record types are rewritten as record
7323 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
7324 properly derivations that are completions of private types.
7325 (Add_Predicates): If type is private, examine rep. items of full
7326 view, which may include inherited predicates.
7327 (Build_Predicate_Functions): Ditto.
7329 2017-04-25 Javier Miranda <miranda@adacore.com>
7331 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
7332 to generate new entities for subtype declarations located in
7333 Expression_With_Action nodes.
7335 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7337 * sem_elab.adb (Check_A_Call): Remove
7338 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
7339 need for Elaborate_All when SPARK elaboration checks are
7340 required. Update the checks for instances, variables, and calls
7341 to Default_Initial_Condition procedures.
7343 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7345 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
7346 into a boolean aspect, in analogy with the Ada aspect No_Return.
7348 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7350 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
7352 2017-04-25 Bob Duff <duff@adacore.com>
7354 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
7355 Is_True_Constant for an array variable that is passed to a
7356 foreign function as an 'in' parameter.
7357 * debug.adb: Document -gnatd.q.
7359 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7361 * sem_ch6.adb (Analyze_Expression_Function): If expression function
7362 is completion and return type is an access type do not freeze
7363 designated type: this will be done in the process of freezing
7364 the expression if needed.
7365 (Freeze_Expr_Types): Check whether type is complete before
7366 creating freeze node, to provide a better error message if
7367 reference is premature.
7368 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
7369 functions created by type derivations.
7371 2017-04-25 Pascal Obry <obry@adacore.com>
7373 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
7375 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7377 * sem_res.adb (Resolve_Type_Conversion):
7378 When resolving against any fixed type, set the type of the
7379 operand as universal real when the operand is a multiplication
7380 or a division where both operands are of any fixed type.
7381 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
7382 placement of an error message by pointing to the operand of a
7383 type conversion rather than the conversion itself.
7385 2017-04-25 Thomas Quinot <quinot@adacore.com>
7387 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
7388 Needs_Debug_Info when producing SCOs.
7390 2017-04-25 Thomas Quinot <quinot@adacore.com>
7392 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
7393 Always pass a null finalization master for a library level named access
7394 type to which a pragme No_Heap_Finalization applies.
7396 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7400 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
7401 set to A'First(2) and vice versa.
7403 2017-04-25 Yannick Moy <moy@adacore.com>
7405 * freeze.adb (Freeze_Record_Type): Remove obsolete
7406 rule on volatile tagged record restriction on SPARK code.
7408 2017-04-25 Yannick Moy <moy@adacore.com>
7410 * sem_prag.adb (minor) Fix SPARK RM reference.
7412 2017-04-25 Yannick Moy <moy@adacore.com>
7414 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
7415 comment to reflect which entity is chosen as unique entity.
7416 (Unique_Entity): Return full view instead of private spec for
7417 protected type or task type. Fix possible incorrect access when
7420 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7422 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
7423 array types only instead of all packed array types.
7425 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7427 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
7428 dimension system, verify that dimensions of both match.
7429 (Check_Conformance): Add error message in case of dimension
7431 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
7434 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7436 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
7439 2017-04-25 Yannick Moy <moy@adacore.com>
7441 * sem_util.adb: Minor refactoring.
7442 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
7444 2017-04-25 Claire Dross <dross@adacore.com>
7446 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
7447 ultimate alias when accessing overridden operation. Indeed, if the
7448 overridden operation is itself inherited, it won't have any explicit
7451 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7453 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
7454 overlap if the two formals have different types, because formally
7455 the corresponding actuals cannot designate the same objects.
7457 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7459 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
7460 dimensions are present from context, use them. b) If operand is
7461 a static constant rewritten as a literal, obtain the dimensions
7462 from the original declaration, otherwise use dimensions of type
7463 established from context.
7465 2017-04-25 Yannick Moy <moy@adacore.com>
7467 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
7468 of array that is private.
7470 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7472 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
7475 2017-04-25 Yannick Moy <moy@adacore.com>
7477 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
7480 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7482 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
7483 the check that recognizes a call to a private overridding and
7484 replaces the called subprogram with its alias.
7486 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7488 * exp_util.adb: Minor reformatting.
7490 2017-04-25 Justin Squirek <squirek@adacore.com>
7492 * exp_ch3.adb (Freeze_Type): Add condition to always treat
7493 interface types as a partial view of a private type for the
7494 generation of invariant procedure bodies.
7495 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
7496 Add a condition to get the Corresponding_Record_Type for
7497 concurrent types, add condition to return in the absence of a
7498 class in the pragma, remove call to Replace_Type_References,
7499 and add call to Replace_References.
7500 (Add_Interface_Invariatns),
7501 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
7502 to including the working type T.
7503 (Add_Own_Invariants): Remove
7504 legacy condition for separate units, remove dispatching for ASIS
7505 and save a copy of the expression in the pragma expression.
7506 (Build_Invariant_Procedure_Body): Default initalize vars,
7507 remove return condition on interfaces, always use the
7508 private type for interfaces, and move the processing of types
7509 until after the processing of invariants for the full view.
7510 (Build_Invariant_Procedure_Declaration): Remove condition
7511 to return if an interface type is encountered and add
7512 condition to convert the formal parameter to its class-wide
7513 counterpart if Work_Typ is abstract.
7514 (Replace_Type): Add call to Remove_Controlling_Arguments.
7515 (Replace_Type_Ref): Remove class-wide dispatching for the current
7516 instance of the type.
7517 (Replace_Type_References): Remove parameter "Derived"
7518 (Remove_Controlling_Arguments): Created in order to removing
7519 the controlliong argument from calls to primitives in the case
7520 of the formal parameter being an class-wide abstract type.
7521 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
7522 to the change made to Freeze_Type in exp_ch3. Add a condition
7523 to treat interface types as a partial view.
7524 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
7525 to Build_Invariant_Procedure_Declaration to properly generate a
7526 "partial" invariant procedure when Typ is an interface.
7528 2017-04-25 Bob Duff <duff@adacore.com>
7530 * a-numeri.ads: Go back to using brackets encoding for the Greek
7533 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7535 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
7536 (10-15): if derived type T with progenitors is abstract,
7537 and primitive P of this type inherits non-trivial classwide
7538 preconditions from both a parent operation and from an interface
7539 operation, then the inherited operation is abstract if the parent
7540 operation is not null.
7541 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
7542 with Covered_Interface_Op to yield the actual interface operation
7543 that is implemented by a given inherited operation.
7545 2017-04-25 Javier Miranda <miranda@adacore.com>
7547 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
7548 and right operands after performing the validity checks. Required
7549 because validity checks may remove side effects from the operands.
7551 2017-04-25 Javier Miranda <miranda@adacore.com>
7553 * exp_attr.adb (Attribute_Unrestricted_Access):
7554 Do not disable implicit type conversion. Required to generate
7555 code that displaces the pointer to reference the secondary
7558 2017-04-25 Pascal Obry <obry@adacore.com>
7560 * prj-attr.adb, snames.ads-tmpl: Add package Install's
7561 Required_Artifacts attribute.
7563 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7565 * sem_util.adb (Same_Value): String literals are compile-time
7566 values, and comparing them must use Expr_Value_S.
7568 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7570 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
7571 dereference is introduced for the object, and the object is
7572 overloaded, do not check whether it is aliased, because it may
7573 include an implicit dereference.
7574 * sem_type.adb (Disambiguate): If two interpretations are access
7575 attribute types with the same designated type keep either of
7576 them and do not report an ambiguity. A true ambiguity will be
7579 2017-04-25 Bob Duff <duff@adacore.com>
7581 * a-numeri.ads: Change the encoding of Greek letter Pi from
7582 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
7583 to indicate the encoding. We considered using a byte order mark
7584 (BOM), but that causes various trouble (misc software eats the
7585 BOM, if you have a patch with a BOM, then it's not at the start
7586 of the patch, so it's not a BOM, the BOM affects with-ing files,
7588 * scng.adb, s-wchcnv.adb: Minor.
7590 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7592 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
7593 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7595 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
7596 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
7597 Improve error message on operations that inherit non-conforming
7598 classwide preconditions from ancestor and progenitor.
7599 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
7600 moved here from sem_ch3.
7601 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
7602 check given in RM 6.1.1 (17) concerning renamings of overriding
7603 operations that inherits class-wide preconditions from ancestor
7606 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7608 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
7609 (Build_Adjust_Statements): Code cleanup.
7610 (Build_Finalizer): Update the initialization of
7612 (Build_Finalize_Statements): Code cleanup.
7613 (Build_Initialize_Statements): Code cleanup.
7614 (Make_Deep_Array_Body): Update the initialization of
7616 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
7617 (Process_Object_Declaration): Generate a null exception handler only
7618 when exceptions are allowed.
7619 (Process_Transients_In_Scope): Update the initialization of
7621 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
7623 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
7624 restrictions when the handler is internally generated and the
7627 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7629 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
7630 enforce legality rule on classwide preconditions inherited from
7631 both an ancestor and a progenitor (RM 6.1.1 (10-13).
7632 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
7633 subprogram need not be dispatching if it appears in a precondition
7634 for an abstract or null subprogram.
7636 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7638 * sem_ch10.adb: Minor typo fix.
7640 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7642 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
7644 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7646 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
7647 have a length which is a power of 2.
7648 (Is_Predefined_File_Name): Likewise. Adjust comment.
7650 2017-04-25 Bob Duff <duff@adacore.com>
7652 * exp_aggr.adb (Component_Count): Protect the
7653 arithmetic from attempting to convert a value >= 2**31 to Int,
7654 which would otherwise raise Constraint_Error.
7656 2017-04-25 Bob Duff <duff@adacore.com>
7658 * opt.ads (Locking_Policy): Fix incorrect documentation. The
7659 first character of the policy name is not unique.
7661 2017-04-25 Bob Duff <duff@adacore.com>
7663 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
7664 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
7665 about this flag not being used. It was already used, and it is
7668 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7670 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
7671 (Ignore_SPARK_Mode_Pragmas): New routine.
7672 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
7673 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
7674 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
7676 (Ignore_SPARK_Mode_Pragmas): New routine
7677 along with pragma Inline.
7678 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
7679 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
7680 Ignore_SPARK_Mode_Pragmas_In_Instance.
7681 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7682 Save and restore the value of global flag
7683 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
7684 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
7685 the corresponding spec or the body must ignore all SPARK_Mode
7686 pragmas found within.
7687 (Analyze_Subprogram_Declaration): Mark
7688 the spec when it needs to ignore all SPARK_Mode pragmas found
7689 within to allow the body to infer this property in case it is
7690 instantiated or inlined later.
7691 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
7692 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
7693 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
7694 when the corresponding spec also ignored all SPARK_Mode pragmas
7696 (Analyze_Package_Declaration): Mark the spec when
7697 it needs to ignore all SPARK_Mode pragmas found within to allow
7698 the body to infer this property in case it is instantiated or
7700 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
7701 Save and restore the value of flag
7702 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
7703 formal spec when it needs to ignore all SPARK_Mode
7704 pragmas found within to allow the body to infer this
7705 property in case it is instantiated or inlined later.
7706 (Analyze_Package_Instantiation): Save and restore the value
7707 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
7708 the instance spec when it needs to ignore all SPARK_Mode
7709 pragmas found within to allow the body to infer this
7710 property in case it is instantiated or inlined later.
7711 (Analyze_Subprogram_Instantiation): Save and restore the value
7712 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
7713 instance spec and anonymous package when they need to ignore
7714 all SPARK_Mode pragmas found within to allow the body to infer
7715 this property in case it is instantiated or inlined later.
7716 (Instantiate_Package_Body): Save and restore the value of global
7717 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
7718 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
7719 corresponding instance spec also ignored all SPARK_Mode pragmas
7721 (Instantiate_Subprogram_Body): Save and restore the
7722 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
7723 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
7724 when the corresponding instance spec also ignored all SPARK_Mode
7725 pragmas found within.
7726 * sem_prag.adb (Analyze_Pragma): Update the reference to
7727 Ignore_Pragma_SPARK_Mode.
7728 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
7729 all SPARK_Mode pragmas defined within yields mode "off".
7731 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7733 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
7735 2017-04-25 Bob Duff <duff@adacore.com>
7737 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
7738 All_Checks" to avoid generating unnecessary checks.
7739 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
7741 * sem.ads: Fix comment.
7742 * expander.ads: Fix comment.
7743 * exp_atag.ads: Fix comment: "Index = 0" should be
7746 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7748 * s-taprop-linux.adb: Minor editorial fixes.
7750 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7752 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
7753 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
7754 variable and set it to True whenever the main hash table is
7755 populated. Short- circuit the Assoc function if it is false
7756 and add associated guards.
7758 2017-04-25 Olivier Hainque <hainque@adacore.com>
7760 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
7761 specs without elaboration code that have an elaboration counter
7762 nevertheless, e.g. when compiled with -fpreserve-control-flow.
7763 * sem_ch10.adb (Analyze_Compilation_Unit):
7764 Set_Elaboration_Entity_Required when requested to preserve
7765 control flow, to ensure the unit elaboration is materialized at
7766 bind time, resulting in the inclusion of the unit object file
7767 in the executable closure at link time.
7769 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
7771 * exp_dbug.adb: In Debug_Renaming_Declaration,
7772 when dealing with indexed component, accept to produce a renaming
7773 symbol when the index is an IN parameter or when it is a name
7774 defined in an outer scope.
7776 2017-04-25 Yannick Moy <moy@adacore.com>
7778 * errout.adb (Error_Msg): Adapt continuation
7779 message in instantiations and inlined bodies for info messages.
7781 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7783 * fname.adb (Has_Internal_Extension): Add pragma Inline.
7784 Use direct 4-character slice comparisons.
7786 pragma Inline. (Has_Suffix): Delete.
7787 (Is_Internal_File_Name):
7788 Test Is_Predefined_File_Name first.
7789 (Is_Predefined_File_Name):
7790 Use direct slice comparisons as much as possible and limit all
7791 comparisons to at most 8 characters.
7793 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7795 * checks.adb (Insert_Valid_Check): Code cleanup.
7796 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
7797 (Expand_Actuals): Generate proper copy-back for a validation
7798 variable when it acts as the argument of a type conversion.
7799 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
7800 predicate to operate on type qualifications.
7802 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7804 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
7807 2017-04-25 Bob Duff <duff@adacore.com>
7809 * sem_prag.adb (No_Return): Give an error if the pragma applies
7810 to a body. Specialize the error for the specless body case,
7811 as is done for (e.g.) pragma Convention.
7812 * debug.adb: Add switch -gnatd.J to disable the above legality
7813 checks. This is mainly for use in our test suite, to avoid
7814 rewriting a lot of illegal (but working) code. It might also
7815 be useful to customers. Under this switch, if a pragma No_Return
7816 applies to a body, and the procedure raises an exception (as it
7817 should), the pragma has no effect. If the procedure does return,
7818 execution is erroneous.
7820 2017-04-25 Bob Duff <duff@adacore.com>
7822 * exp_ch6.adb (Expand_Actuals): This is the
7823 root of the problem. It took N as an 'in out' parameter, and in
7824 some cases, rewrote N, but then set N to Original_Node(N). So
7825 the node returned in N had no Parent. The caller continued
7826 processing of this orphaned node. In some cases that caused a
7827 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
7828 and trips over the Empty Parent). The solution is to make N an
7829 'in' parameter. Instead of rewriting it, return the list of
7830 post-call actions, so the caller can do the rewriting later,
7831 after N has been fully processed.
7832 (Expand_Call_Helper): Move most of Expand_Call here. It has
7833 too many premature 'return' statements, and we want to do the
7834 rewriting on return.
7835 (Insert_Post_Call_Actions): New procedure to insert the post-call
7836 actions in the appropriate place. In the problematic case,
7837 that involves rewriting N as an Expression_With_Actions.
7838 (Expand_Call): Call the new procedures Expand_Call_Helper and
7839 Insert_Post_Call_Actions.
7841 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7843 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
7844 properly type derived from generic formal types, to handle
7845 properly modified version of ACATS 4.1B B611017.
7847 2017-04-25 Javier Miranda <miranda@adacore.com>
7849 * exp_unst.adb (Subp_Index): Adding missing
7850 support for renamings and functions that return a constrained
7851 array type (i.e. functions for which the frontend built a
7852 procedure with an extra out parameter).
7854 2017-04-25 Pascal Obry <obry@adacore.com>
7856 * s-string.adb: Minor code clean-up.
7858 2017-04-25 Bob Duff <duff@adacore.com>
7860 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
7862 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
7863 function for Non_Blocking_Wait_Process.
7865 2017-04-25 Bob Duff <duff@adacore.com>
7867 * prep.adb (Preprocess): Remove incorrect
7868 Assert. Current character can be ASCII.CR.
7870 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7872 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
7873 convention Stdcall, which has a number of exceptions. Convention
7874 is legal on a component declaration whose type is an anonymous
7875 access to subprogram.
7877 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7879 * sem_ch4.adb: sem_ch4.adb Various reformattings.
7880 (Try_One_Prefix_Interpretation): Use the base type when dealing
7881 with a subtype created for purposes of constraining a private
7882 type with discriminants.
7884 2017-04-25 Javier Miranda <miranda@adacore.com>
7886 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
7887 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
7888 dispatching primitives (Restore_Warnings): Restore warning on
7889 late dispatching primitives (Save_Warnings): Save warning on late
7890 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
7891 to enable/disable this warning.
7892 (WA_Warnings): Set warning on late dispatching primitives.
7893 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
7894 that its parent type has a private extension.
7895 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
7897 * usage.adb: Document -gnatw.j and -gnatw.J.
7899 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7901 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
7904 2017-04-25 Bob Duff <duff@adacore.com>
7906 * binde.adb (Validate): Do not pass dynamic strings
7907 to pragma Assert, because older compilers do not support that.
7909 2017-04-25 Bob Duff <duff@adacore.com>
7911 * s-fileio.adb (Close): When a temp file is
7912 closed, delete it and clean up its Temp_File_Record immediately,
7913 rather than waiting until later.
7914 (Temp_File_Record): Add File
7915 component, so Close can know which Temp_File_Record corresponds
7916 to the file being closed.
7917 (Delete): Don't delete temp files,
7918 because they are deleted by Close.
7919 (Open): Set the File component
7920 of Temp_File_Record. This requires moving the creation of the
7921 Temp_File_Record to the end, after the AFCB has been created.
7923 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7925 * checks.adb (Insert_Valid_Check): Do not generate
7926 a validity check when inside a generic.
7928 2017-04-25 Yannick Moy <moy@adacore.com>
7930 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
7932 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7934 * snames.ads-tmpl (Snames): More names for detecting predefined
7935 potentially blocking subprograms.
7937 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7939 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
7940 concerning inheritance of class-wide preconditions do not apply
7943 2017-04-25 Bob Duff <duff@adacore.com>
7945 * s-ficobl.ads: Minor comment fix.
7947 2017-04-25 Yannick Moy <moy@adacore.com>
7949 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
7950 conversions from float to integer in GNATprove mode.
7951 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
7952 to call Apply_Type_Conversion_Checks, so that range checks
7953 are properly positioned when needed on conversions, including
7954 when converting from float to integer. (Determine_Range): In
7955 GNATprove mode, take into account the possibility of conversion
7956 from float to integer.
7957 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
7958 check on conversions from fixed-point to integer, not anymore
7959 on conversions from floating-point to integer, when in GNATprove
7962 2017-04-25 Yannick Moy <moy@adacore.com>
7964 * checks.adb (Determine_Range_R): Special case type conversions
7965 from integer to float in order to get bounds in that case too.
7966 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
7967 mode, for computations involved in interval checking.
7969 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7971 * checks.adb (Insert_Valid_Check): Partially reimplement validity
7973 * einfo.adb Node36 is now used as Validated_Object.
7974 (Validated_Object): New routine.
7975 (Set_Validated_Object): New routine.
7976 (Write_Field36_Name): Add an entry for Validated_Object.
7977 * einfo.ads Add new attribute Validated_Object along with
7979 (Validated_Object): New routine along with pragma Inline.
7980 (Set_Validated_Object): New routine along with pragma Inline.
7981 * exp_attr.adb (Make_Range_Test): Add processing for validation
7982 variables to avoid extra reads and copies of the prefix.
7983 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
7984 variables in order to reflect any changes done in the variable
7985 back into the original object.
7986 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
7987 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
7989 2017-04-25 Steve Baird <baird@adacore.com>
7991 * exp_ch7.adb (Build_Array_Deep_Procs,
7992 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
7993 generate Finalize_Address routines for CodePeer.
7995 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7997 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
7998 Analyze_Pre_Post_Condition, to implement the legality checks
7999 mandated by AI12-0131: Pre'Class shall not be specified for an
8000 overriding primitive subprogram of a tagged type T unless the
8001 Pre'Class aspect is specified for the corresponding primitive
8002 subprogram of some ancestor of T.
8004 2017-04-25 Bob Duff <duff@adacore.com>
8006 * sem_ch8.adb (Use_One_Type): If a use_type_clause
8007 is redundant, set its Used_Operations to empty. This is only
8008 necessary for use clauses that appear in the parent of a generic
8009 child unit, because those use clauses get reanalyzed when we
8010 instantiate the generic, and we don't want the Used_Operations
8011 carried over from the original context (where it was probably
8014 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8016 * exp_ch6.adb: Minor reformatting.
8018 2017-04-25 Bob Duff <duff@adacore.com>
8020 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8021 Use Source_Index (Current_Sem_Unit) to find the correct casing.
8022 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8023 (Current_Sem_Unit) to find the correct casing.
8024 * par.adb (Par): Null out Current_Source_File, to ensure that
8025 the above bugs won't rear their ugly heads again.
8027 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8029 * sem_ch8.adb (Find_Type): For an attribute reference
8030 'Class, if prefix type is synchronized and previous errors
8031 have suppressed the creation of the corresponding record type,
8032 create a spurious class-wide for the synchonized type itself,
8033 to catch other misuses of the attribute
8035 2017-04-25 Steve Baird <baird@adacore.com>
8037 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8038 is True, then don't generate the accessibility check for the
8039 tag of a tagged result.
8040 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8041 if CodePeer_Mode is True, then don't generate the
8042 tag checks for the result of call to an instance of
8043 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8044 descendant of" check and the accessibility check).
8046 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8048 * sem_ch13.adb: Code cleanups.
8049 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8050 * sem_ch8.ads: Minor comment fix.
8052 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8054 * exp_ch4.adb (Library_Level_Target): New function.
8055 (Expand_Concatenate): When optimization is enabled, also expand
8056 the operation out-of-line if the concatenation is present within
8057 the expression of the declaration of a library-level object and
8058 not only if it is the expression of the declaration.
8060 2017-04-25 Bob Duff <duff@adacore.com>
8062 * freeze.adb (Freeze_Object_Declaration): Do
8063 not Remove_Side_Effects if there is a pragma Linker_Section,
8064 because in that case we want static initialization in the
8065 appropriate section.
8067 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8069 * exp_dbug.adb: Minor rewording and reformatting.
8071 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8073 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8074 handle the proposed changes to rules concerning potentially
8075 unevaluated expressions, to include selected components that
8076 do not depend on discriminants, and indexed components with
8078 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8079 predicate in quantified expression, and fix bugs in the handling
8080 of case expressions and membership test.
8081 (Analyze_Attribute_Old_Result): use new predicate.
8082 (Analyze_Attribute, case Loop_Entry): ditto.
8084 2017-04-25 Bob Duff <duff@adacore.com>
8086 * s-secsta.adb (SS_Info): Add a comment
8087 explaining why we don't need to walk all the chunks in order to
8088 compute the total size.
8090 2017-04-25 Bob Duff <duff@adacore.com>
8092 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8093 of the global name buffer to 4*Max_Line_Length.
8095 2017-04-25 Javier Miranda <miranda@adacore.com>
8097 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8098 renaming entity for debug information, mark the entity as needing debug
8099 info if it comes from sources.
8101 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8103 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8104 restriction converning the use of 'Address where the prefix is
8105 of a controlled type.
8107 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8109 * exp_dbug.adb: In Debug_Renaming_Declaration,
8110 skip slices that are made redundant by an indexed component
8112 * atree.h: New definition for Original_Node.
8114 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8116 * sem_prag.adb, sem_prag.ads: Minor reformatting.
8118 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8120 * sem_ch3.adb (Check_Entry_Contract): Call
8121 Preanalyze_Spec_Expression so that resolution takes place as well.
8122 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8123 internal calls that appear in preconditions of protected
8124 operations, in default values for same, and in contract guards
8125 for contract cases in SPARK.
8127 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8129 * a-numaux.ads: Fix description of a-numaux-darwin
8131 (Double): Define to Long_Float.
8132 * a-numaux-vxworks.ads (Double): Likewise.
8133 * a-numaux-darwin.ads
8135 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8136 * a-numaux-x86.ads: Fix package description.
8137 * a-numaux-x86.adb (Is_Nan): Minor tweak.
8138 (Reduce): Adjust and complete description. Call Is_Nan instead of
8139 testing manually. Use an integer temporary to hold rounded value.
8140 * a-numaux-darwin.adb (Reduce): Likewise.
8141 (Is_Nan): New function.
8143 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8145 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8146 on analysis of prefix whose type is a current instance of a
8147 synchronized type, but where the prefix itself is an entity that
8150 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8152 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8153 the identity of callable entities therein, because they have been
8154 properly resolved, and prefixed calls may have been rewritten
8157 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
8159 * exp_ch3.adb (Build_Init_Statements): Convert
8160 the expression of the pragma/aspect Secondary_Stack_Size to
8161 internal type System.Parameters.Size_Type before assigning
8162 it to the Secondary_Stack_Size component of the task type's
8163 corresponding record.
8165 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8167 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
8168 (etc) optimizations when the type is modular and the offsets
8171 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8173 * s-osinte-freebsd.ads: Minor comment tweaks
8175 2017-04-25 Javier Miranda <miranda@adacore.com>
8177 * urealp.adb (UR_Write): Reverse previous patch
8178 adding documentation on why we generate multiplications instead
8179 of divisions (needed to avoid expressions whose computation with
8180 large numbers may cause division by 0).
8182 2017-04-25 Bob Duff <duff@adacore.com>
8184 * erroutc.adb (Set_Specific_Warning_Off,
8185 Set_Warnings_Mode_Off): Use the correct source file for
8186 Stop. Was using Current_Source_File, which is only valid during
8187 parsing. Current_Source_File will have a leftover value from
8188 whatever file happened to be parsed last, because of a with_clause
8191 2017-04-25 Bob Duff <duff@adacore.com>
8193 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
8194 to In_Predefined_Unit, but including GNAT units.
8195 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
8196 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
8197 because Should_Ignore_Pragma was not working reliably outside
8198 the parser, because Current_Source_File is not valid.
8199 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
8200 * par-prag.adb: Call Should_Ignore_Pragma_Par.
8202 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8204 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
8207 2017-04-25 Javier Miranda <miranda@adacore.com>
8209 * urealp.adb (UR_Write): Fix output of constants with a base other
8212 2017-04-25 Justin Squirek <squirek@adacore.com>
8214 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
8215 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
8216 Add extra parameter for Process_Interface_Name.
8217 (Process_Interface_Name): Add parameter for pragma to analyze
8218 corresponding aspect.
8219 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
8222 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8224 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
8227 2017-04-25 Yannick Moy <moy@adacore.com>
8229 * sem_res.adb (Resolve_Comparison_Op): Do not
8230 attempt evaluation of relational operations inside assertions.
8232 2017-04-25 Justin Squirek <squirek@adacore.com>
8234 * exp_util.adb (Add_Interface_Invariants):
8235 Restored, code moved back from Build_Invariant_Procedure_Body.
8236 (Add_Parent_Invariants): Restored, code moved back from
8237 Build_Invariant_Procedure_Body.
8238 (Build_Invariant_Procedure_Body):
8239 Remove refactored calls and integrated code from
8240 Add_Parent_Invariants and Add_Interface_Invariants.
8242 2017-04-25 Johannes Kanig <kanig@adacore.com>
8244 * errout.adb (Output_Messages): Adjust computation of total
8246 * erroutc.adb (Error_Msg): In statistics counts, deal
8247 correctly with informational messages that are not warnings.
8248 * errutil.adb (Finalize): adjust computation of total errors.
8250 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8252 * terminals.c (__gnat_terminate_pid): New.
8253 * g-exptty.ads (Terminate_Process): New. Update comments.
8255 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8257 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
8259 2017-04-25 Justin Squirek <squirek@adacore.com>
8261 * sem_ch3.adb (Analyze_Declarations): Minor
8262 correction to comments, move out large conditional and scope
8263 traversal into a predicate.
8264 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
8267 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8269 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
8270 of prefix whose type is a current instance of a synchronized
8271 type. If the prefix is an object this is an external call (or
8272 requeue) that can only access public operations of the object. The
8273 previous predicate was too restrictive, and did not allow public
8274 protected operations, only task entries.
8276 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8278 * sem_ch5.adb, fname.adb: Minor reformatting.
8280 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8282 * einfo.adb (Is_Anonymous_Access_Type): New routine.
8283 * einfo.ads Update the placement of
8284 E_Anonymous_Access_Subprogram_Type along with all subtypes that
8286 (Is_Anonymous_Access_Type): New routine.
8287 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
8288 master for an access type subject to pragma No_Heap_Finalization.
8289 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
8290 allocated or deallocated does not finalization actions if the
8291 associated access type is subject to pragma No_Heap_Finalization.
8292 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
8293 * par-prag.adb Pragma No_Heap_Finalization does not need special
8294 processing from the parser.
8295 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
8296 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
8297 * sem_prag.adb Add an entry in table Sig_Flags for pragma
8298 No_Heap_Finalization.
8299 (Analyze_Pragma): Add processing for
8300 pragma No_Heap_Finalization. Update various error messages to
8301 use Duplication_Error.
8302 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
8303 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
8304 and corresponding pragma id.
8306 2017-04-25 Bob Duff <duff@adacore.com>
8308 * freeze.adb (Freeze_Record_Type): Use the
8309 underlying type of the component type to determine whether it's
8310 elementary. For representation clause purposes, a private type
8311 should behave the same as its full type.
8312 * fname.ads, fname.adb (Is_Predefined_File_Name):
8313 Make sure things like "system.ali" are recognized as predefined.
8315 2017-04-25 Javier Miranda <miranda@adacore.com>
8317 * debug.adb: Update documentation of -gnatd.6.
8319 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8321 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
8322 element iterator when the name is an overloaded function call,
8323 one of whose interpretations yields an array.
8325 2017-04-25 Bob Duff <duff@adacore.com>
8327 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
8328 Is_Internal_Unit_Name): New functions for operating on unit
8329 names, as opposed to file names. There's some duplicated code
8330 with fname.adb, which is unfortunate, but it seems like we don't
8331 want to add dependencies here.
8332 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
8333 to Is_Predefined_Unit_Name; the former was wrong, because Uname
8334 is not a file name at all.
8335 * fname.ads, fname.adb: Document the fact that
8336 Is_Predefined_File_Name and Is_Internal_File_Name can be called
8337 for ALI files, and fix the code so it works properly for ALI
8338 files. E.g. these should return True for "system.ali".
8340 2017-04-25 Justin Squirek <squirek@adacore.com>
8342 * exp_util.adb (Add_Invariant): Removed,
8343 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
8344 and Add_Own_Invariant. (Add_Invariant_Check): Used
8345 for adding runtime checks from any kind of invariant.
8346 (Add_Inherited_Invariant): Generates invariant checks for
8347 class-wide invariants (Add_Interface_Invariants): Removed, code
8348 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
8349 Create a types own invariant procedure (Add_Parent_Invariants):
8350 Removed, code moved to Build_Invariant_Procedure_Body
8351 (Build_Invariant_Procedure_Body): Add refactored calls
8352 and integrated code from Add_Parent_Invariants and
8353 Add_Interface_Invariants.
8354 (Process_Type): Removed, the
8355 relavant code was inlined into both Add_Own_Invariant and
8356 Add_Inherited_Invariant.
8358 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8360 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
8361 scn.adb, osint.adb, fname.adb: Minor reformatting.
8363 2017-04-25 Pascal Obry <obry@adacore.com>
8365 * s-taprop-mingw.adb: Do not check for CloseHandle in
8368 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8370 * sem_util.adb (Check_Part_Of_Reference):
8371 Continue to examine the context if the reference appears within
8372 an expression function.
8374 2017-04-25 Justin Squirek <squirek@adacore.com>
8376 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
8377 and Build_Invariant_Procedure_Declaration.
8378 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
8379 and Build_Invariant_Procedure_Declaration from exp_ch7
8380 and break-out Is_Untagged_Private_Derivation from
8381 Build_Invariant_Procedure_Body.
8382 (Replace_Type_References):
8383 Append an extra parameter to allow for dispatching replacements
8384 and add the corrasponding logic.
8385 (Type_Invariant): Remove
8386 Replace_Typ_Refs and replace its references with calls to
8387 Replace_Type_References.
8388 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
8390 2017-04-25 Bob Duff <duff@adacore.com>
8392 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
8393 that returns True when appropriate.
8394 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
8395 when compiling predefined files.
8396 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
8397 "gnat.adc" should not be considered a predefined file name.
8398 That required (or at least encouraged) a lot of cleanup of global
8399 variable usage. We shouldn't be communicating information via
8400 the global name buffer.
8401 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
8402 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
8403 required by the above-mentioned cleanup.
8405 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8407 * osint.adb (Find_File): Handle properly a request for a
8408 configuration file whose name is a directory.
8410 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8412 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
8414 2017-04-25 Bob Duff <duff@adacore.com>
8416 * types.ads: Minor: Fix '???' comment.
8417 * sem_ch8.adb: Minor comment fix.
8419 2017-04-25 Bob Duff <duff@adacore.com>
8421 * sem_prag.adb: Remove suspicious uses of Name_Buf.
8422 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
8423 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
8424 Add String_To_Name with no side effects.
8426 2017-04-25 Justin Squirek <squirek@adacore.com>
8428 * sem_ch3.adb (Analyze_Declarations): Add
8429 additional condition for edge case.
8431 2017-04-25 Bob Duff <duff@adacore.com>
8433 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
8434 reserved words inside pragmas. This is necessary to allow the
8435 pragma name Interface to be used in pragma Ignore_Pragma.
8436 * par.adb: Minor comment fix.
8438 2017-04-25 Javier Miranda <miranda@adacore.com>
8440 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
8441 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
8442 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
8443 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
8444 occurrences of RE_Type_Is_Abstract
8446 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8448 * exp_util.adb (Build_Chain): Account for ancestor
8449 subtypes while traversing the derivation chain.
8451 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8453 * sem_attr.adb: minor reformatting.
8455 2017-04-25 Doug Rupp <rupp@adacore.com>
8457 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
8459 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8461 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
8462 the first pass over an assignment statement with target names,
8463 to prevent the generation of subtypes (such as discriminated
8464 record components)that may carry the target name outside of the
8465 tree for the assignment. The subtypes will be generated when
8466 the assignment is reanalyzed in full.
8467 (Analyze_Target_Name): Handle properly class-wide types.
8469 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8471 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
8472 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
8473 the purposes of freezing.
8474 * exp_util.adb Update the documentation and structure of the
8475 type map used in class-wide semantics of assertion expressions.
8476 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
8477 and resolve the triaged expression because all substitutions
8478 refer to the proper entities. Update the replacement of
8480 (Build_DIC_Procedure_Body): Add formal parameter
8481 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
8482 are now only processed when freezing occurs. Build a body only
8484 (Entity_Hash): Removed.
8485 (Map_Types): New routine.
8486 (Replace_Object_And_Primitive_References): Removed.
8487 (Replace_References): New routine.
8488 (Replace_Type_References): Moved to the library level of Exp_Util.
8489 (Type_Map_Hash): New routine.
8490 (Update_Primitives_Mapping): Update the mapping call.
8491 (Update_Primitives_Mapping_Of_Types): Removed.
8492 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
8493 parameter For_Freeze and update the comment on usage.
8494 (Map_Types): New routine.
8495 (Replace_References): New routine.
8496 (Replace_Type_References): Moved to the library level of Exp_Util.
8497 (Update_Primitives_Mapping_Of_Types): Removed.
8498 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
8499 properties of the private type to the full view in case the full
8500 view derives from a parent type and inherits a DIC pragma.
8501 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
8502 DIC pragma is placed at the top of a declarative region.
8504 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8506 * a-tasatt.adb: Complete previous change and use an unsigned
8507 int to avoid overflow checks.
8509 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8511 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
8512 the error message when the attribute reference is an actual in
8513 a call to a subprogram inherited from a generic formal type with
8514 unknown discriminants, which makes the subprogram and its formal
8515 parameters intrinsic (see RM 6.3.1 (8) and (13)).
8517 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8519 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
8520 sem_prag.adb: Minor reformatting.
8522 2017-04-25 Bob Duff <duff@adacore.com>
8524 * sem_attr.adb (Type_Key): Add code in the
8525 recursive Compute_Type_Key to protect against fetching the source
8526 code for Standard, in case a component of the type is declared
8527 in Standard. There was already code to do this for the original
8528 type, but not for its components.
8530 2017-04-25 Javier Miranda <miranda@adacore.com>
8532 * exp_ch3.adb (Build_Initialization_Call): Handle
8533 subtypes of private types when searching for the underlying full
8534 view of a private type.
8536 2017-04-25 Javier Miranda <miranda@adacore.com>
8538 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
8539 real conditional expression can appear in a fixed-type context
8540 and must be resolved with that context to facilitate the code
8541 generation to the backend.
8543 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8545 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
8546 to indicate whether during inline processing, when some unit U1
8547 appears in the context of a unit U2 compiled for instantiation
8548 or inlining purposes, the body of U1 needs to be compiled as well.
8549 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
8550 context is a package declaration.
8551 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
8552 Analyze_Generic_Package_Declaration): ditto.
8553 * inline.adb (Analyze_Inlined_Bodies): Check
8554 Body_Needed_For_Inlining.
8556 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8558 * par.adb (Current_Assign_Node): Global variable use to record
8559 the presence of a target_name in the right hand side of the
8560 assignment being parsed.
8561 * par-ch4.adb (P_Name): If the name is a target_name, mark the
8562 enclosing assignment node accordingly.
8563 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
8565 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
8566 analyzing RHS if the statement has target_names.
8567 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
8568 properly choices that are subtype marks.
8569 * exp_ch5.adb: Code cleanup.
8571 2017-04-25 Bob Duff <duff@adacore.com>
8573 * s-memory.adb: Add a comment regarding efficiency.
8574 * atree.adb: Fix the assertion, and combine 2 assertions into one,
8575 "the source has an extension if and only if the destination does."
8576 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
8578 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8580 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
8583 2017-04-25 Doug Rupp <rupp@adacore.com>
8585 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
8586 handling for ppc64-vx7.
8587 * sigtramp-vxworks-target.inc
8588 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
8590 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8592 * ada_get_targ.adb: New file.
8594 2017-04-25 Bob Duff <duff@adacore.com>
8596 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
8597 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
8598 (UI_GCD): Remove ??? comment involving possible efficiency
8599 improvements. This just isn't important after all these years.
8601 * uintp.ads: Minor cleanup.
8603 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8605 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
8606 Revert previous changes.
8607 * scng.adb: Minor reformatting.
8608 * s-stratt.ads: Fix unbalanced parens in comment.
8610 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8612 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
8615 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8617 * scng.adb (Scan): Handle '@' appropriately.
8618 * sem_ch5.adb: Code cleanup.
8620 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8622 * freeze.adb (Check_Expression_Function): Do not check for the
8623 use of deferred constants if the freezing of the expression
8624 function is triggered by its generated body, rather than a
8627 2017-04-25 Javier Miranda <miranda@adacore.com>
8629 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
8630 subtypes of private types when performing the view conversion.
8632 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8634 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
8635 the purposes of freezing.
8636 * exp_util.adb Update the documentation and structure of the
8637 type map used in class-wide semantics of assertion expressions.
8638 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
8639 and resolve the triaged expression because all substitutions
8640 refer to the proper entities. Update the replacement of
8642 (Build_DIC_Procedure_Body): Add formal parameter
8643 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
8644 are now only processed when freezing occurs. Build a body only
8646 (Entity_Hash): Removed.
8647 (Map_Types): New routine.
8648 (Replace_Object_And_Primitive_References): Removed.
8649 (Replace_References): New routine.
8650 (Replace_Type_References): Moved to the library level of Exp_Util.
8651 (Type_Map_Hash): New routine.
8652 (Update_Primitives_Mapping): Update the mapping call.
8653 (Update_Primitives_Mapping_Of_Types): Removed.
8654 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
8655 parameter For_Freeze and update the comment on usage.
8656 (Map_Types): New routine.
8657 (Replace_References): New routine.
8658 (Replace_Type_References): Moved to the library level of Exp_Util.
8659 (Update_Primitives_Mapping_Of_Types): Removed.
8660 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
8661 properties of the private type to the full view in case the full
8662 view derives from a parent type and inherits a DIC pragma.
8663 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
8664 DIC pragma is placed at the top of a declarative region.
8666 2017-04-25 Tristan Gingold <gingold@adacore.com>
8668 * s-mmap.ads (Data): Add pragma Inline.
8670 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8672 * checks.adb (Insert_Valid_Check): Do not use
8673 a renaming to alias a volatile name because this will lead to
8674 multiple evaluations of the volatile name. Use a constant to
8675 capture the value instead.
8677 2017-04-25 Doug Rupp <rupp@adacore.com>
8679 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
8681 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8683 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
8684 Add out parameter to indicate to caller that a wrapper must
8685 be constructed for an inherited primitive whose inherited
8686 pre/postcondition has called to overridden primitives.
8687 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
8688 for inherited primitive that requires it.
8689 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
8690 legal primitive operations and belong to the list of bodies
8691 generated after the freeze point of a type.
8692 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
8693 of Build_Class_Wide_Expression.
8694 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
8695 to construct the specification of the wrapper subprogram created
8696 for an inherited operation.
8698 2017-04-25 Bob Duff <duff@adacore.com>
8700 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
8701 pthread_mutexattr_setprioceiling): Add new interfaces for these
8703 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
8704 protocols as appropriate for Locking_Policy 'C' and 'I'.
8705 * s-taprop-posix.adb: Minor reformatting to make it more similar
8706 to s-taprop-linux.adb.
8708 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8710 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
8711 Handle properly a multi- level derivation involving both renamed
8712 and constrained parent discriminants, when the type to be
8713 constrained has fewer discriminants that the ultimate ancestor.
8715 2017-04-25 Bob Duff <duff@adacore.com>
8717 * sem_util.adb (Is_Object_Reference): In the
8718 case of N_Explicit_Dereference, return False if it came from a
8719 conditional expression.
8721 2017-04-25 Bob Duff <duff@adacore.com>
8723 * par-ch4.adb (P_Case_Expression): If a semicolon
8724 is followed by "when", assume that ";" was meant to be ",".
8726 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8728 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
8731 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8733 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
8734 loading of an entity.
8735 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
8736 previously repeated in the analysis.
8737 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
8738 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
8739 use new procedure SPARK_Implicit_Load.
8740 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
8741 SPARK_Implicit_Load.
8743 2017-04-25 Javier Miranda <miranda@adacore.com>
8745 * sem_util.adb (New_Copy_Tree): By default
8746 copying of defining identifiers is prohibited because
8747 this would introduce an entirely new entity into the
8748 tree. This patch introduces an exception to this general
8749 rule: the declaration of constants and variables located in
8750 Expression_With_Action nodes.
8751 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
8752 (In_Map): New subprogram.
8753 (Visit_Entity): New subprogram.
8754 (Visit_Node): Handle EWA_Level,
8755 EWA_Inner_Scope_Level, and take care of defining entities defined
8756 in Expression_With_Action nodes.
8758 2017-04-25 Thomas Quinot <quinot@adacore.com>
8760 * exp_ch6.adb: minor comment edit.
8761 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
8762 procedure specifications that come from source.
8763 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
8764 Null_Statement attribute.
8765 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
8766 procedure, generate statement SCO for the generated NULL statement.
8767 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
8768 parser, if available.
8770 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8772 * system-linux-s390.ads: Use Long_Integer'Size to define
8775 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
8777 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
8779 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
8781 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
8782 * g-socket.adb (To_Host_Entry): Fix typo in comment.
8783 * gnat_ugn.texi: Fix typo.
8784 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
8785 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
8786 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
8787 * sem_util.adb (Mark_Coextensions): Likewise.
8788 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
8790 2017-03-28 Andreas Schwab <schwab@suse.de>
8793 * system-linux-aarch64-ilp32.ads: New file.
8794 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
8795 from LIBGNAT_TARGET_PAIRS.
8796 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
8797 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
8798 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
8799 or -mabi=ilp32, resp.
8801 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
8803 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
8805 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
8808 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
8810 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
8813 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
8815 * system-linux-arm.ads (Default_Bit_Order): Likewise.
8816 * system-linux-mips.ads (Default_Bit_Order): Likewise.
8817 * system-linux-armeb.ads: Delete.
8818 * system-linux-mipsel.ads: Likewise.
8819 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
8820 (ARM/Linux): Likewise.
8822 2017-02-24 Jakub Jelinek <jakub@redhat.com>
8825 * gcc-interface/misc.c (gnat_handle_option): Pass true to
8826 handle_generated_option GENERATED_P.
8828 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8830 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
8831 around a justified modular type if it doesn't have the same scalar
8832 storage order as the enclosing record type.
8834 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8836 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
8837 of boolean rvalues to function calls.
8839 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8841 * gcc-interface/utils.c (fold_bit_position): New function.
8842 (rest_of_record_type_compilation): Call it instead of bit_position to
8843 compute the field position and remove the call to remove_conversions.
8844 (compute_related_constant): Factor out the multiplication in both
8845 operands, if any, and streamline the final test.
8847 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8849 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
8851 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8853 * gcc-interface/decl.c: Include demangle.h.
8854 (is_cplusplus_method): Return again true for a primitive operation
8855 only if it is dispatching. For a subprogram with an interface name,
8856 call the demangler to get the number of C++ parameters and compare it
8857 with the number of Ada parameters.
8859 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8861 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
8862 there is no end label, put the location of the At_End procedure on
8863 the call to the procedure.
8865 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8867 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
8868 value for array types with TYPE_INDEX_TYPE set on their domain type.
8869 * gcc-interface/utils.c (max_size): For operations and expressions, do
8870 not build a new node if the operands have not changed or are missing.
8872 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
8874 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
8875 argument when recursing on TRUTH_NOT_EXPR.
8877 2017-02-12 John Marino <gnugcc@marino.st>
8879 * system-freebsd-x86.ads: Rename into...
8880 * system-freebsd.ads: ...this.
8881 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
8882 * gcc-interface/Makefile.in: Support aarch64-freebsd.
8883 (x86-64/FreeBSD): Adjust to above renaming.
8884 (i386/FreeBSD): Likewise.
8886 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
8888 * comperr.adb: Update FSF bug reporting URL.
8890 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
8891 Jakub Jelinek <jakub@redhat.com>
8894 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
8896 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
8899 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
8900 to build_translation_unit_decl.
8902 2017-01-23 Javier Miranda <miranda@adacore.com>
8904 * sem_util.adb (New_Copy_Tree): Code cleanup:
8905 removal of the internal map (ie. variable Actual_Map, its
8906 associated local variables, and all the code handling it).
8907 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
8908 force loading of the System package when processing a task type.
8909 (Analyze_Protected_Type_Declaration): in GNATprove mode force
8910 loading of the System package when processing a protected type.
8911 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
8912 force loading of the System package when processing compilation
8913 unit with a main-like subprogram.
8914 * frontend.adb (Frontend): remove forced loading of the System
8917 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8919 * sem_prag.adb (Default_Initial_Condition): If the desired type
8920 declaration is a derived type declaration with discriminants,
8921 it is rewritten as a private type declaration.
8922 * sem_ch13.adb (Replace_Type_References_Generic,
8923 Visible_Component): A discriminated private type with descriminnts
8924 has components that must be rewritten as selected components
8925 if they appear as identifiers in an aspect expression such as
8926 a Default_Initial_Condition.
8927 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
8930 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8932 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
8933 * gnat1drv.adb Generate an empty object file for an ignored
8934 Ghost compilation unit.
8935 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
8937 2017-01-23 Yannick Moy <moy@adacore.com>
8939 * sem_ch4.adb (Analyze_Indexed_Component_Form):
8940 Adapt to inlined prefix with string literal subtype.
8941 * inline.adb (Expand_Inlined_Call): Keep unchecked
8942 conversion inside inlined call when formal type is constrained.
8944 2017-01-23 Javier Miranda <miranda@adacore.com>
8946 * sem_util.adb (New_Copy_Tree): Code cleanup:
8947 removal of global variables. All the global variables, global
8948 functions and tables of this subprogram are now declared locally.
8950 2017-01-23 Gary Dismukes <dismukes@adacore.com>
8952 * exp_strm.ads: Minor reformatting and typo fixes.
8954 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8956 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
8957 exp_aggr.adb: Minor reformatting.
8958 * g-diopit.adb: minor grammar/punctuation fix in comment.
8959 * g-byorma.ads: minor fix of unbalanced parens in comment.
8961 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
8963 * par.adb: Update the documentation of component Labl.
8964 * par-ch6.adb (P_Return_Statement): Set the expected label of
8965 an extended return statement to Error.
8967 2017-01-23 Tristan Gingold <gingold@adacore.com>
8969 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
8971 2017-01-23 Ed Schonberg <schonberg@adacore.com>
8973 * expander.adb: Handle N_Delta_Aggregate.
8975 2017-01-23 Javier Miranda <miranda@adacore.com>
8977 * exp_ch6.adb (Expand_Call): Improve the code that
8978 checks if some formal of the called subprogram is a class-wide
8979 interface, to handle subtypes of class-wide interfaces.
8981 2017-01-23 Javier Miranda <miranda@adacore.com>
8983 * checks.adb (Apply_Parameter_Aliasing_Checks):
8984 Remove side effects of the actuals before generating the overlap
8987 2017-01-23 Justin Squirek <squirek@adacore.com>
8989 * exp_strm.ads, exp_strm.ads
8990 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
8991 as to avoid getting the underlying type by default.
8992 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
8993 underlying type in the Iiput and output attribute cases when
8994 building their respective functions.
8996 2017-01-23 Gary Dismukes <dismukes@adacore.com>
8998 * scng.adb: Minor reformatting of error message.
9000 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9002 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9003 to freeze the return type of an expression funxtion that is a
9004 completion, if the type is a limited view and the non-limited
9007 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9009 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9010 aggregate construct.
9011 (P_Record_Or_Array_Component_Association): An array aggregate
9012 can start with an Iterated_Component_Association.
9013 * scng.adb: Modify error message on improper use of @ in earlier
9014 versions of the language.
9015 * sinfo.ads: New node kind N_Delta_Aggregate.
9016 * sinfo.adb: An N_Delta_Aggregate has component associations and
9018 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9019 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9020 Create a new index for each one of the choices in the association,
9021 to prevent spurious homonyms in the scope.
9022 (Resolve_Delta_Aggregate): New.
9023 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9024 * exp_util.adb (Insert_Actions): Take into account
9026 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9027 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9028 and local procedures Expand_Delta_Array_Aggregate and
9029 expand_Delta_Record_Aggregate.
9030 * sprint.adb: Handle N_Delta_Aggregate.
9032 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9034 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9035 empty name when the exception declaration is subject to pragma
9037 (Null_String): New routine.
9039 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9041 * par-ch9.adb (P_Protected_Definition): Parse
9042 any optional and potentially illegal pragmas which appear in
9043 a protected operation declaration list.
9044 (P_Task_Items): Parse
9045 any optional and potentially illegal pragmas which appear in a
9048 2017-01-23 Pascal Obry <obry@adacore.com>
9050 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9051 is needed when a foreign thread call a Win32 API using a thread handle
9052 like GetThreadTimes() for example.
9054 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9056 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9057 allow an 'Address clause to be specified on a prefix of a
9060 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9062 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9063 attribute 'Valid is a renaming of the original expression when
9064 the expression denotes a name. For all other kinds of expression,
9065 use a constant to capture the value.
9066 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9067 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9069 2017-01-23 Justin Squirek <squirek@adacore.com>
9071 * sem_eval.adb (Eval_Integer_Literal): Add special
9072 case to avoid optimizing out check if the literal appears in
9075 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9077 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9078 allow an 'Address clause to be specified on a prefix of a
9081 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9083 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9084 attribute 'Valid is a renaming of the original expression when
9085 the expression denotes a name. For all other kinds of expression,
9086 use a constant to capture the value.
9087 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9088 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9090 2017-01-23 Justin Squirek <squirek@adacore.com>
9092 * sem_eval.adb (Eval_Integer_Literal): Add special
9093 case to avoid optimizing out check if the literal appears in
9096 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9098 * sem_ch4.adb (Try_Primitive_Operations,
9099 Is_Valid_First_Argument_Of): argument is valid if it is a derived
9100 type with unknown discriminants that matches its underlying
9102 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9103 expression if its type is derived from a limited type with
9104 unknown discriminants, because the expansion (which is a call)
9105 must be expanded in the enclosing context to add the proper build-
9106 in-place parameters to the call.
9107 * lib.ads, exp_ch9.adb: Minor fixes in comments.
9109 2017-01-23 Yannick Moy <moy@adacore.com>
9111 * frontend.adb (Frontend): Do not load runtime
9112 unit for GNATprove when parsing failed.
9113 * exp_ch9.adb: minor removal of extra whitespace
9114 * exp_ch6.adb: minor typo in comment
9115 * sem_util.adb: Code cleanup.
9116 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9117 * a-ngcefu.adb: minor style fix in whitespace
9119 2017-01-23 Thomas Quinot <quinot@adacore.com>
9121 * scos.ads: Document usage of 'd' as default SCO kind for
9123 * par_sco.adb (Traverse_Declarations_Or_Statements.
9124 Traverse_Degenerate_Subprogram): New supporting routine for expression
9125 functions and null procedures.
9126 (Traverse_Declarations_Or_Statements.Traverse_One): Add
9127 N_Expression_Function to the subprogram case; add required
9128 support for null procedures and expression functions.
9130 2017-01-23 Bob Duff <duff@adacore.com>
9132 * namet.ads (Bounded_String): Decrease the size of type
9133 Bounded_String to avoid running out of stack space.
9134 * namet.ads (Append): Don't ignore buffer overflow; raise
9135 Program_Error instead.
9137 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9139 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9140 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9142 * exp_ch9.adb: minor style fix in comment.
9144 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9146 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9147 for a limited record extension with unknown discriminants whose
9148 full view has no discriminants.
9150 2017-01-23 Yannick Moy <moy@adacore.com>
9152 * exp_spark.adb: Alphabetize with clauses.
9154 2017-01-23 Yannick Moy <moy@adacore.com>
9156 * sem_util.adb (Has_Enabled_Property): Treat
9157 protected objects and variables differently from other variables.
9159 2017-01-23 Thomas Quinot <quinot@adacore.com>
9161 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
9162 Split original Ada 95 part off into new subprogram
9163 below. Call that subprogram (instead of proceeding with
9164 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
9165 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
9166 * debug.adb Document new switch -gnatd.p
9167 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
9168 record for reverse bit order if an error has already been posted
9169 on the record type. This avoids generating extraneous "info:"
9170 messages for illegal code.
9172 2017-01-23 Justin Squirek <squirek@adacore.com>
9174 * sem_ch3.adb (Analyze_Declarations): Correct comments
9175 * freeze.adb (Find_Constant): Add detection of deferred constants
9176 so they are not incorrectly flagged as premature.
9178 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9180 * scans.ads: New token At_Sign. Remove '@' from list of illegal
9181 characters for future version of the language. '@' is legal name.
9182 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
9183 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
9184 denotes a Target_Name.
9185 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
9186 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
9187 (Has_Target_Names): New flag on N_Assignment_Statement, to
9188 indicate that RHS has occurrences of N_Target_Name.
9189 * sem.adb: Call Analyze_Target_Name.
9190 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
9191 (urrent_LHS): Global variable that denotes LHS of assignment,
9192 used in the analysis of Target_Name nodes.
9193 * sem_res.adb (Resolve_Target_Name): New procedure.
9194 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
9195 N is an assignment statement whose RHS contains occurences of @
9196 that designate the value of the LHS of the assignment. If the
9197 LHS is side-effect free the target names can be replaced with
9198 a copy of the LHS; otherwise the semantics of the assignment
9199 is described in terms of a procedure with an in-out parameter,
9200 and expanded as such.
9201 (Expand_N_Assignment_Statement): Call
9202 Expand_Assign_With_Target_Names when needed.
9203 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
9204 * sprint.adb: Handle N_Target_Name.
9206 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
9208 * checks.adb: Minor fix in comment.
9210 2017-01-23 Philippe Gil <gil@adacore.com>
9212 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
9213 count in Sort = Memory_Usage or Allocations_Count
9215 2017-01-23 Justin Squirek <squirek@adacore.com>
9217 * sem_ch3.adb: Code cleanup.
9219 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9221 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
9222 variables to the local variable section. Update the profile
9223 of various nested routine that previously had visibility
9224 of those globals. One the matching phase has completed,
9225 remove certain classes of clauses which are considered noise.
9226 (Check_Dependency_Clause): Properly detect a match between two
9227 'Result attributes. Update the various post-match cases to use
9228 Is_Already_Matched as this routine now automatically recognizes
9229 a previously matched 'Result attribute.
9230 (Is_Already_Matched): New routine.
9231 (Remove_Extra_Clauses): New routine.
9232 (Report_Extra_Clauses): Remove the detection of ... => null
9233 clauses as this is now done in Remove_Extra_Clauses.
9235 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9237 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
9238 report on spurious overlaps between values involving a subtype
9239 with a static predicate, because the expansion of such a subtype
9240 into individual ranges in inhibited in ASIS mode.
9242 2017-01-23 Justin Squirek <squirek@adacore.com>
9244 * sem_ch3.adb (Analyze_Declarations): Add detection
9245 of an edge case and delay freezing if it is present.
9247 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9249 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
9250 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
9252 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9254 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
9255 access-to-subprogram types inherit the convention of the
9256 associated subprogram. (Set_Profile_Convention): New routine.
9257 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
9258 of the two entities directly, use Conventions_Match to account
9259 for anonymous access-to-subprogram and subprogram types.
9260 (Conventions_Match): New routine.
9262 2017-01-23 Claire Dross <dross@adacore.com>
9264 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
9265 which return Universal_Integer, force the overflow check flag for
9266 Length and Range_Length for types as big as Long_Long_Integer.
9268 2017-01-23 Claire Dross <dross@adacore.com>
9270 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
9271 attributes which return Universal_Integer, introduce a conversion
9272 to the expected type with the appropriate check flags set.
9273 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
9274 base type if the range is null. It may still be invalid if it
9275 is higher than the lower bound. This is checked later in the
9276 context in which the range appears.
9278 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
9280 * scos.ads: Introduce a constant to represent ignored
9281 dependencies in SCO_Unit_Table_Entry.
9283 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9285 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
9286 spaces from error messages.
9288 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9290 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
9291 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
9292 an object declaration for an array type with a modular index type
9293 with the size of Long_Long_Integer. Special processing is needed
9294 in this case to compute reliably the size of the object, and
9295 eventually to raise Storage_Error, when wrap-around arithmetic
9296 might compute a meangingless size for the object.
9298 2017-01-23 Justin Squirek <squirek@adacore.com>
9300 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
9301 sem_type.adb: Code cleanups.
9303 2017-01-23 Bob Duff <duff@adacore.com>
9305 * sem_res.adb (Resolve_Call): In the part of the code where
9306 it is deciding whether to turn the call into an indexed
9307 component, avoid doing so if the call is to an instance of
9308 Unchecked_Conversion. Otherwise, the compiler turns it into an
9309 indexed component, and resolution of that turns it back into a
9310 function call, and so on, resulting in infinite recursion.
9311 * sem_util.adb (Needs_One_Actual): If the first formal has a
9312 default, then return False.
9314 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
9316 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
9317 optimizations when the type is modular and the offsets are equal.
9319 2017-01-20 Thomas Quinot <quinot@adacore.com>
9321 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
9324 2017-01-20 Nicolas Roche <roche@adacore.com>
9326 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
9328 2017-01-20 Bob Duff <duff@adacore.com>
9330 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
9331 (etc) optimizations when the type is modular.
9333 2017-01-20 Yannick Moy <moy@adacore.com>
9335 * sem_ch6.adb (Move_Pragmas): move some pragmas,
9336 but copy the SPARK_Mode pragma instead of moving it.
9337 (Build_Subprogram_Declaration): Ensure that the generated spec
9338 and original body share the same SPARK_Pragma aspect/pragma.
9339 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
9340 procedure to copy SPARK_Mode aspect.
9342 2017-01-20 Bob Duff <duff@adacore.com>
9344 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
9346 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
9347 Empty even in ASIS mode.
9349 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9351 * exp_ch9.adb: minor style fixes in comments.
9352 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
9353 relative statement introduces an implicit dependency on
9354 Ada.Real_Time.Clock_Time.
9355 * sem_util.adb: Minor reformatting.
9357 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9359 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
9360 must be treated as delayed aspect even if the expression is
9361 a literal, because the aspect affects the freezing and the
9362 elaboration of the object to which it applies.
9364 2017-01-20 Tristan Gingold <gingold@adacore.com>
9366 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
9368 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9370 * lib-xref.adb (Generate_Reference): Do not warn about the
9371 presence of a pragma Unreferenced if the entity appears as the
9372 actual in a procedure call that does not come from source.
9374 2017-01-20 Pascal Obry <obry@adacore.com>
9376 * expect.c, terminals.c: Fix some warnings about unused variables.
9377 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
9380 2017-01-20 Bob Duff <duff@adacore.com>
9382 * exp_attr.adb (Constrained): Apply an access check (check that
9383 the prefix is not null) when the prefix denotes an object of an
9384 access type; that is, when there is an implicit dereference.
9386 2017-01-20 Gary Dismukes <dismukes@adacore.com>
9388 * s-rident.ads (constant Profile_Info): Remove
9389 No_Calendar from GNAT_Extended_Ravenscar restrictions.
9391 2017-01-20 Tristan Gingold <gingold@adacore.com>
9393 * s-maccod.ads: Add pragma No_Elaboration_Code_All
9395 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9397 * ghost.adb (Mark_Ghost_Clause): New routine.
9398 (Prune_Node): Do not prune compilation unit nodes.
9399 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
9400 This does not touch the node itself, but does prune all its fields.
9401 * ghost.ads (Mark_Ghost_Clause): New routine.
9402 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
9403 package clause mentions Ghost and non-Ghost packages. Mark a
9404 use package clause as Ghost when it mentions a Ghost package.
9405 (Analyze_Use_Type): Emit an error when a use type clause mentions
9406 Ghost and non-Ghost types. Mark a use type clause as Ghost when
9407 it mentions a Ghost type.
9408 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
9409 Ghost when it withs a Ghost unit.
9411 2017-01-20 Javier Miranda <miranda@adacore.com>
9413 * sem_res.adb (Resolve_Call): If a function call
9414 returns a limited view of a type and at the point of the call the
9415 function is not declared in the extended main unit then replace
9416 it with the non-limited view, which must be available. If the
9417 called function is in the extended main unit then no action is
9418 needed since the back-end handles this case.
9420 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
9422 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
9423 (Contains_Subprograms_Refs): ...this. Adjust comment
9424 for constants. (Is_Subp_Or_Const_Ref): Rename into...
9425 (Is_Subprogram_Ref): ...this.
9426 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
9427 Has_Non_Subprograms_Referencer and adjust comment. Remove
9428 incorrect shortcut for package declarations and bodies.
9430 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9432 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
9433 base type differs from that of the completion and the private
9434 subtype is an itype (created for a constraint on an access
9435 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
9438 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9440 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
9441 When inheriting the SPARK_Mode of a prior expression function,
9442 look at the properly resolved entity rather than the initial
9443 candidate which may denote a homonym.
9445 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9447 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
9448 Precondition or Postcondition, and the context is pragma
9449 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
9450 and suggest the standard names Assertion_Policy /Pre /Post
9453 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9455 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
9457 2017-01-20 Javier Miranda <miranda@adacore.com>
9459 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
9461 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
9462 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
9465 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9467 * sem_ch13.adb (Analyze_Aspect_Specification, case
9468 Dynamic_Predicate): If the entity E is a subtype that inherits
9469 a static predicate for its parent P,, the inherited and the
9470 new predicate combine in the generated predicate function,
9471 and E only has a dynamic predicate.
9473 2017-01-20 Tristan Gingold <gingold@adacore.com>
9475 * s-boustr.ads, s-boustr.adb: New package.
9476 * Makefile.rtl: Add s-boustr.
9478 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9480 * inline.adb (Process_Formals): Qualify the
9481 expression of a return statement when it yields a universal type.
9483 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9485 * freeze.adb (Freeze_All): Freeze the default
9486 expressions of all eligible formal parameters that appear in
9487 entries, entry families, and protected subprograms.
9489 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9491 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
9492 for illegal inherited Implicit_Dereference aspects with renamed
9495 2017-01-20 Javier Miranda <miranda@adacore.com>
9497 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
9498 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
9499 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
9500 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
9501 Set_Prev, Tree_Read): Adding assertion.
9502 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
9503 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
9504 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
9505 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
9506 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
9507 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
9508 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
9509 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
9510 Set_ListN_With_Parent): Adding assertion.
9512 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9514 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
9515 import that applies to several homograph subprograms. when one
9516 of them is declared by a subprogram body.
9518 2017-01-20 Justin Squirek <squirek@adacore.com>
9520 * exp_ch6.adb (Expand_Call): Remove optimization
9521 that nulls out calls to null procedures.
9523 2017-01-20 Yannick Moy <moy@adacore.com>
9525 * inline.adb (Expand_Inlined_Call): Keep more
9526 precise type of actual for inlining whenever possible. In
9527 particular, do not switch to the formal type in GNATprove mode in
9528 some case where the GNAT backend might require it for visibility.
9530 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9532 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
9533 aspect Implicit_Dereference can be inherited by a full view if
9534 the partial view has no discriminants, because there is no way
9535 to apply the aspect to the partial view.
9536 (Build_Derived_Record_Type): If derived type renames discriminants
9537 of the parent, the new discriminant inherits the aspect from
9539 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
9540 call through an access discriminant designating a subprogram.
9541 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
9542 properly a parameterless call through an access discriminant on
9543 the left-hand side of an assignment.
9544 * sem_res.adb (resolve): If an interpreation involves a
9545 discriminant with an implicit dereference and the expression is an
9546 entity, resolution takes place later in the appropriate routine.
9547 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
9548 access discriminants that designate a subprogram type.
9550 2017-01-20 Pascal Obry <obry@adacore.com>
9552 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
9554 2017-01-20 Yannick Moy <moy@adacore.com>
9556 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
9557 on implicitly with'ed units in GNATprove mode.
9558 * sinfo.ads (Implicit_With): Document use of flag for implicitly
9559 with'ed units in GNATprove mode.
9561 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9563 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
9564 unit Do not report an error on a non-static entity that appears
9565 in the context of a spec expression, such as an aspect expression.
9567 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9569 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
9570 (Is_Underlying_Full_View): New routine.
9571 (Set_Is_Underlying_Full_View): New routine.
9572 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
9573 * einfo.ads Add new attribute Is_Underlying_Full_View.
9574 (Is_Underlying_Full_View): New routine along with pragma Inline.
9575 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
9576 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
9577 class-wide types and underlying full views. The first subtype
9578 is used as the working type for all Itypes, not just array base types.
9579 (Build_DIC_Procedure_Declaration): Do not consider
9580 class-wide types and underlying full views. The first subtype
9581 is used as the working type for all Itypes, not just array
9583 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
9584 view or an underlying full view without clobbering the attributes
9585 of a previous freeze node.
9586 (Inherit_Freeze_Node): New routine.
9587 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
9589 (Build_Underlying_Full_View): Mark an underlying full view as such.
9590 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
9593 2017-01-20 Yannick Moy <moy@adacore.com>
9595 * sinfo.ads: Document lack of Do_Division_Check flag
9596 on float exponentiation.
9598 2017-01-19 Javier Miranda <miranda@adacore.com>
9600 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
9601 identifier attribute of a block-statement node. Required to avoid
9602 assertion failure when building the new containers library.
9604 2017-01-19 Bob Duff <duff@adacore.com>
9606 * exp_ch3.adb: Update comment.
9608 2017-01-19 Vincent Celier <celier@adacore.com>
9610 * gprep.adb (Gnatprep): Parse the definition file without
9611 "replace in comments" even when switch -C is used.
9613 2017-01-19 Justin Squirek <squirek@adacore.com>
9615 * exp_ch9.adb (Is_Pure_Barrier): Create function
9616 Is_Count_Attribute to identify an expansion of the 'Count
9619 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9621 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
9622 statements within an element iterator loop are only analyzed
9623 agter the loop is rewritten. Within a generic the analysis must
9624 be performed in any case to complete name capture.
9626 2017-01-19 Bob Duff <duff@adacore.com>
9628 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
9629 before checking for unrecognized pragmas.
9630 Initialize Pname on its declarations; that's always good style.
9632 2017-01-19 Claire Dross <dross@adacore.com>
9634 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
9635 body into the tree for GNATprove by setting its Parent field. The
9636 components invariants of composite types are not checked by
9637 the composite type's invariant procedure in GNATprove mode.
9638 (Build_Invariant_Procedure_Declaration): Semi-insert the
9639 declaration into the tree for GNATprove by setting its Parent
9641 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
9642 the component invariants to the array type invariant procedure
9643 so that the procedure can be used to check the array type
9645 (Freeze_Record_Type): In GNATprove mode, do
9646 not add the component invariants to the record type invariant
9647 procedure so that the procedure can be used to check the record
9648 type invariants if any.
9650 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9652 * lib-xref-spark_specific.adb: Minor reformatting.
9653 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
9655 2017-01-19 Javier Miranda <miranda@adacore.com>
9657 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
9658 Build_Back_End_Aggregate.
9659 (Generate_Aggregate_For_Derived_Type): Code cleanup.
9660 (Prepend_Stored_Values): Code cleanup.
9662 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9664 * sem_ch6.adb (Analyze_Expression_Function): Check for an
9665 incomplete return type after attempting to freeze it, so that
9666 other freeze actiona are generated in the proper order.
9668 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9670 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
9671 type, ie. a type whose component is a character type, and the
9672 aggregate is positional, do not convert into a string literal
9673 if the index type is not an integer type, because the original
9674 type may be required in an enclosing operation.
9676 2017-01-19 Bob Duff <duff@adacore.com>
9678 * binde.adb, debug.adb: Enable new elaboration order algorithm
9679 by default. -dp switch reverts to the old algorithm.
9681 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9683 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
9684 (Analyze_Declarations): Create the DIC and Invariant
9685 procedure bodies s after all freezing has taken place.
9686 (Build_Assertion_Bodies): New routine.
9687 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
9689 (Analyze_Package_Specification): Remove the
9690 generation of the DIC and Invariant procedure bodies. This is
9691 now done by Analyze_Declarations.
9692 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
9693 procedures are never treated as primitives.
9695 2017-01-19 Yannick Moy <moy@adacore.com>
9697 * frontend.adb: Analyze inlined bodies and check elaboration
9698 rules in GNATprove mode too.
9699 * sem_elab.adb (Delay_Element): Add Boolean component to save
9700 indication that call is in SPARK code. (Check_Elab_Calls):
9701 Check elaboration rules in GNATprove mode, and correctly set
9702 the current value of SPARK_Mode.
9703 * lib-xref-spark_specific.adb
9704 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
9706 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9708 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
9709 checks on the expression for the high bound of concatenation
9710 when checks are disabled, to suppress warnings about potential
9711 constraint errors in restricted runtimes.
9713 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9715 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
9716 representation-to-position function as inlined.
9717 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
9718 the purity of an internally generated entity if it has been
9719 explicitly marked as pure for optimization purposes.
9720 * exp_aggr.adb: Minor reformatting.
9722 2017-01-19 Javier Miranda <miranda@adacore.com>
9724 * exp_ch6.adb (Expand_Call): Remove side effects on
9725 actuals that are allocators with qualified expression since the
9726 initialization of the object is performed by means of individual
9727 statements (and hence it must be done before the call).
9729 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9731 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
9732 (Build_Derived_Enumeration_Type): If the derived type inherits a
9733 dynamic predicate from its parent, the bounds of the type must
9734 freeze because an explicit constraint is constructed for the
9735 type and the corresponding range is elaborated now.
9737 2017-01-19 Arnaud Charlet <charlet@adacore.com>
9739 * sem_attr.ads: minor fix of inconsistent casing in comment
9740 * lib-writ.ads: minor align comments in columns
9741 * sem_ch3.adb: Minor reformatting.
9742 * spark_xrefs.ads: minor fix typo in SPARK-related comment
9743 * table.ads: minor style fix in comment
9744 * lib-xref-spark_specific.adb
9745 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
9746 * sem_ch12.adb: minor whitespace fix
9747 * freeze.adb: Add comment.
9748 * sem_util.adb (Unique_Name): for instances of
9749 generic subprograms ignore the name of the wrapper package.
9751 2017-01-19 Javier Miranda <miranda@adacore.com>
9753 * exp_aggr.adb (Resolve_Record_Aggregate):
9754 Factorize code needed for aggregates of limited and unlimited
9755 types in a new routine.
9756 (Pass_Aggregate_To_Back_End): New subprogram.
9758 2017-01-19 Yannick Moy <moy@adacore.com>
9760 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
9762 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9764 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
9765 public, for use elsewhere.
9766 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
9767 an Inlined_body, recognize a call that uses object notation
9768 and has not been rewritten as a regular call because regular
9769 expansion has not taken place.
9771 2017-01-19 Bob Duff <duff@adacore.com>
9773 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
9774 in case of generic formal discrete types, because it causes crashes in
9775 the compiler when built with assertions on.
9777 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9779 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
9780 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
9782 2017-01-19 Bob Duff <duff@adacore.com>
9784 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
9785 Increment Warnings_Detected. It was decrementing, which is
9786 wrong since we just issued a warning message.
9787 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
9788 these variables to be of subtype Nat instead of Int, because
9789 they should never be negative.
9791 2017-01-19 Javier Miranda <miranda@adacore.com>
9793 * contracts.adb (Build_Postconditions_Procedure): Replace
9794 Generate_C_Code by Modify_Tree_For_C.
9795 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
9796 Replace Generate_C_Code by Modify_Tree_For_C.
9797 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
9799 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
9800 Generate_C_Code by Modify_Tree_For_C.
9801 * exp_ch4.adb (Expand_Allocator_Expression): Replace
9802 Generate_C_Code by Modify_Tree_For_C.
9803 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
9804 by Modify_Tree_For_C.
9805 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
9806 Generate_C_Code by Modify_Tree_For_C.
9807 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
9808 by Modify_Tree_For_C.
9809 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
9811 2017-01-19 Javier Miranda <miranda@adacore.com>
9813 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
9815 (Is_Inlinable_Expression_Function): New subprogram.
9816 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
9818 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
9820 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9822 * sem_ch4.adb (Diagnose_Call): Improve error message when a
9823 selected component has a prefix that might be interpreted
9824 as a parameterless function call, but none of the candidate
9825 interpretations is parameterless, and there is a hidden homonym
9826 of the prefix that is a package.
9827 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
9828 interpreted as a parameterless function call and its analysis
9829 fails, do not call Analyze_Selected_Component.
9831 2017-01-19 Steve Baird <baird@adacore.com>
9833 * sem_util.ads: Add new Use_Full_View Boolean parameter to
9835 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
9836 calls to a newly-defined Scalar_Range_Of_Right_View function.
9838 2017-01-19 Arnaud Charlet <charlet@adacore.com>
9840 * gnat1drv.adb: minor fix of unbalanced parens in comment
9841 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
9842 to visible part of the package to allow re-use in GNATprove.
9843 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
9844 from repeated code of Traverse_Compilation_Unit.
9845 (Traverse_Declaration_Or_Statement): fixed detection of
9846 generic subprograms and packages; also, iteration over case
9847 statement alternatives rewritten to avoid testing if the first
9848 alternative is present (since it must be present due to Ada
9849 syntax restrictions).
9851 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9853 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
9854 returning by reference not just for subprogram body stubs,
9855 but for all subprogram cases.
9856 * sem_util.adb: Code reformatting.
9857 (Requires_Transient_Scope): Update the call to Results_Differ.
9858 (Results_Differ): Update the parameter profile and the associated
9861 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9863 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
9864 identifier nodes that do not come from source, to handle properly
9865 dimensionality check within an inlined body which inclddes both
9866 original operands and rewritten operands. This removes spurious
9867 dimensionality errors in the presence of front-end inlining,
9868 as well as in SPARK mode.
9870 2017-01-16 Jakub Jelinek <jakub@redhat.com>
9873 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
9875 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9877 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
9879 2017-01-13 Arnaud Charlet <charlet@adacore.com>
9881 * doc/gnat_ugn/getting_started_with_gnat.rst,
9882 doc/gnat_ugn/inline_assembler.rst,
9883 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
9884 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
9885 doc/gnat_ugn/about_this_guide.rst,
9886 doc/gnat_ugn/platform_specific_information.rst,
9887 doc/gnat_ugn/example_of_binder_output.rst,
9888 doc/gnat_ugn/gnat_and_program_execution.rst,
9889 doc/gnat_ugn/gnat_utility_programs.rst,
9890 doc/gnat_ugn/the_gnat_compilation_model.rst,
9891 doc/gnat_rm/implementation_defined_attributes.rst,
9892 doc/gnat_rm/compatibility_and_porting_guide.rst,
9893 doc/gnat_rm/standard_library_routines.rst,
9894 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
9895 doc/gnat_rm/implementation_defined_pragmas.rst,
9896 doc/gnat_rm/the_gnat_library.rst,
9897 doc/gnat_rm/obsolescent_features.rst,
9898 doc/gnat_rm/about_this_guide.rst,
9899 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
9900 doc/gnat_rm/implementation_of_ada_2012_features.rst,
9901 doc/gnat_rm/interfacing_to_other_languages.rst,
9902 doc/gnat_rm/implementation_defined_aspects.rst,
9903 doc/gnat_rm.rst: Update documentation.
9904 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
9906 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9908 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
9909 * scil_ll.adb: Minor style fix in comment.
9910 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
9911 even if entity is already set, because the node may be renalyzed
9912 after inlining transformations.
9914 2017-01-13 Javier Miranda <miranda@adacore.com>
9916 * sem_res.adb (Resolve_Call): Do not establish a transient scope
9917 for a call to inlinable expression function (since the call will
9918 be replaced by its returned object).
9919 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
9920 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
9921 (Expand_Call): For inlinable expression function call replace the
9922 call by its returned object.
9923 (Is_Inlinable_Expression_Function): New subprogram.
9925 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9927 * checks.adb: Minor typo fix and reformatting.
9929 2017-01-13 Javier Miranda <miranda@adacore.com>
9931 * contracts.adb (Contract_Only_Subprograms): Remove formal.
9932 (Copy_Original_Specification): Removed.
9933 (Skip_Contract_Only_Subprogram): Move here checks previously
9934 located in the caller of this routine (to leave the code more clean).
9935 (Build_Contract_Only_Subprogram): Code cleanup.
9936 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
9937 (Get_Contract_Only_Missing_Body_Name): Removed.
9939 2017-01-13 Javier Miranda <miranda@adacore.com>
9941 * sem_ch6.adb (Cloned_Expression): New subprogram.
9942 (Freeze_Expr_Types): Complete previous patch since the expression
9943 of an expression-function may have iterators and loops with
9944 defining identifiers which, as part of the preanalysis of the
9945 expression, may be left decorated with itypes that will not be
9946 available in the tree passed to the backend.
9948 2017-01-13 Ed Schonberg <schonberg@adacore.com>
9950 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
9951 conversion to Integer of an expression that is an attribute
9952 reference 'Pos on an enumeration type.
9954 2017-01-13 Bob Duff <duff@adacore.com>
9956 * atree.ads: Minor comment fix.
9958 2017-01-13 Justin Squirek <squirek@adacore.com>
9960 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
9961 calls in accessibility check on return statement.
9963 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
9965 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
9966 Ensure that the input body is a subprogram body before trying to
9967 determine whether it denoted an expression function. Note that
9968 subprogram body stubs cannot denote expression functions.
9970 2017-01-13 Gary Dismukes <dismukes@adacore.com>
9972 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
9975 2017-01-13 Javier Miranda <miranda@adacore.com>
9977 * einfo.ads (Component_Bit_Offset): Fix documentation.
9978 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
9979 on record holes for components with unknown compile-time offsets.
9981 2017-01-13 Bob Duff <duff@adacore.com>
9983 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
9984 * g-locfil.ads: Minor comment fix.
9986 2017-01-13 Bob Duff <duff@adacore.com>
9988 * binde.adb (Elab_New): New elaboration order algorithm
9989 that is expected to cause fewer ABE issues. This is a work in
9990 progress. The new algorithm is currently disabled, and can be
9991 enable by the -dp switch, or by modifying the Do_Old and Do_New
9992 etc. flags and rebuilding. Experimental code is included to
9993 compare the results of the old and new algorithms.
9994 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
9995 can have multiple of these tables, so the old and new algorithms
9997 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
9998 parameter of type array. This avoids the global variable, and
9999 allows bounds checking (which is normally defeated by the tables
10000 packages). It also ensures that the Elab_Order is read-only
10002 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10003 subprograms that need it, as above.
10004 * debug.adb: Document new -dp switch. Modify doc of old -do
10006 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10007 and Bindgen. Move writing of closure (-R and -Ra switches)
10008 to Binde; that's more convenient.
10010 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10012 * sem_ch6.adb (Analyze_Expression_Function): If the expression
10013 function is a completion, all entities referenced in the
10014 expression are frozen. As a consequence, a reference to an
10015 uncompleted private type from an enclosing scope is illegal.
10017 2017-01-13 Javier Miranda <miranda@adacore.com>
10019 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10020 (Analyze_Subprogram_Body_Helper): At the occurrence of an
10021 expression function declaration that is a completion, its
10022 expression causes freezing (AI12-0103).
10024 2017-01-13 Vadim Godunko <godunko@adacore.com>
10026 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10027 Reference functions of Ada.Containers.Indefinite_Holders.
10029 2017-01-13 Bob Duff <duff@adacore.com>
10031 * s-os_lib.ads: Minor comment fixes.
10033 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10035 * exp_ch3.adb (Default_Initialize_Object): Do not default
10036 initialize an object when it is of a task type and restriction
10037 No_Tasking is in effect because the initialization is obsolete.
10038 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10039 restriction No_Tasking is in effect.
10040 (Build_Master_Renaming): Do not rename a master when restriction
10041 No_Tasking is in effect.
10043 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10045 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10046 the legality of An others clause applies as well to a choice in
10047 an Iterated_component_ association.
10048 (Resolve_Iterated_Component_Association): An others choice
10050 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10051 Iterated_Component_Association is not static.
10053 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10055 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10056 control is passed to the expresion handler before the new mode
10058 * sem_ch12.adb (Analyze_Package_Instantiation,
10059 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10060 in case control is passed to the expresion handler before the
10063 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10065 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10066 exp_aggr.adb: Minor reformatting.
10068 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10070 * inline.adb: Minor reformatting and typo fix.
10072 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10074 * sem_util.ads, sem_util.adb (Choice_List): Move function here
10075 from sem_aggr.adb, for use elsewhere.
10076 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10077 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10078 Iterated_Component_Present.
10079 * exp_aggr.adb: Use Choice_List throughout, to handle
10080 Iterated_Component_Associations.
10081 (Gen_Loop): Generate proper loop for an
10082 Iterated_Component_Association: loop variable has the identifier
10083 of the original association. Generate a loop even for a single
10084 component choice, in order to make loop parameter visible in
10086 (Flatten): An Iterated_Component_Association is not static.
10088 2017-01-13 Yannick Moy <moy@adacore.com>
10090 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10091 float exponentiation for statically known small negative values
10092 is the reciprocal of the exponentiation for the opposite value
10094 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10095 Ensure that the value of float exponentiation for negative values
10096 is the reciprocal of the exponentiation for the opposite value
10098 * inline.adb (Expand_Inlined_Call): Fix the count
10099 for the number of generated gotos.
10101 2017-01-13 Yannick Moy <moy@adacore.com>
10103 * inline.adb: Code cleanup.
10104 * sem_util.adb (Is_OK_Volatile_Context): Add
10105 expression in delay statement as OK for volatile context.
10107 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10109 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10110 mode a choice that is a subtype with a static predicate is
10111 replaced by the values it covers. This transformation must not
10112 be performed in ASIS mode, to preserve the source for analysis.
10114 2017-01-13 Justin Squirek <squirek@adacore.com>
10116 * nlists.ads: Correct minor typo.
10118 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10120 * sem_ch13.adb: Minor reformatting and typo fix.
10122 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10124 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10125 Iterated_Component_Association is a named association in an
10127 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10128 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10129 and resolve the discrete choices and the expression of the
10131 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10132 Loop_Actions and Box_Present are attributes of
10133 N_Iterated_Component_Association nodes. Box_Present is always
10134 False in this case.
10135 * sprint.adb (Sprint_Node): An Iterated_Component_Association
10136 has a Discrete_Choices list, as specified in the RM. A
10137 Component_Association for aggregate uses instead a Choices list.
10138 We have to live with this small inconsistency because the new
10139 construct also has a defining identifier, and there is no way
10140 to merge the two node structures.
10142 2017-01-13 Yannick Moy <moy@adacore.com>
10144 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10145 list of pragmas to remove. Remove pragmas from the list of
10146 statements in the body to inline.
10147 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10149 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10151 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10152 Analyze_Declarations, to analyze and resolve the expressions of
10153 aspect specifications in the current declarative list, so that
10154 the expressions have proper entity and type info. This is needed
10155 for ASIS when there is no subsequent expansion to generate this
10156 semantic information.
10157 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
10158 original expression, to suppress cascaded errors when expression
10159 has been constant-folded.
10160 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
10161 ASIS mode, because there is no subsequent expansion to decorate
10164 2017-01-13 Yannick Moy <moy@adacore.com>
10166 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
10167 New function to detect when a call may be inlined or not in
10169 (Expand_Inlined_Call): Ensure that a temporary
10170 is always created in the cases where a type conversion may be
10171 needed on an input parameter in GNATprove mode, so that GNATprove
10172 sees the check to perform.
10173 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
10174 when not applicable due to actual requiring type conversion
10175 with possible check but no temporary value can be copied for
10176 GNATprove to see the check.
10178 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10180 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
10181 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
10182 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
10183 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
10184 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
10185 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
10186 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
10187 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
10188 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
10189 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
10190 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
10191 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
10192 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
10193 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
10194 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
10195 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
10196 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
10197 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
10198 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
10199 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
10200 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
10201 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
10202 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
10203 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
10204 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
10205 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
10206 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
10207 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
10208 statements to reflect the new style for case alternatives. Various
10209 code clean up and reformatting.
10211 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10213 * exp_util.adb: Minor reformatting.
10215 2017-01-13 Yannick Moy <moy@adacore.com>
10217 * exp_spark.adb: Code cleanup.
10218 * sem_ch9.adb (Analyze_Delay_Until): Resolve
10219 expression so that calls are identified as such inside delay
10222 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10224 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
10225 * par-ch3.adb (P_Discrete_Choice_List): An
10226 Iterated_Component_Association is an array aggregate component.
10227 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
10228 (Is_Quantified_Expression): New function that performs a lookahead
10229 to distinguish quantified expressions from iterated component
10231 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
10233 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
10234 * sem.adb (Analyze): Handle Iterated_Component_Association.
10235 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
10236 component associations.
10237 * sinfo.ads, sinfo.adb: Entries for for
10238 N_Iterated_Component_Association and its fields.
10239 * sprint.adb (Sprint_Node_Actual): Handle
10240 N_Iterated_Component_Association.
10242 2017-01-13 Justin Squirek <squirek@adacore.com>
10244 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
10245 of the style check until after preanalysis of acutals.
10247 2017-01-13 Yannick Moy <moy@adacore.com>
10249 * sem_ch13.adb: Minor reformatting.
10250 * par-ch11.adb: minor style fix in whitespace
10251 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
10252 reduced to Add_Artificial_ALI_File; style fix in declaration of
10253 Text; grammar fix in comment.
10254 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
10255 * freeze.adb: Cleanup to pass pragma instead of
10256 expression to call.
10257 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
10258 replace System'To_Address by equivalent call.
10260 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10262 * bindusg.adb: Improve usage output for -f switch.
10264 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10266 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
10267 Minor reformatting.
10269 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10271 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
10272 treat comparisons on strings as legal in a Static_Predicate.
10273 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
10274 a function call that is the expansion of a string comparison.The
10275 function call is built when compiling the corresponding predicate
10276 function, but the expression has been found legal as a static
10277 predicate during earlier analysis.
10278 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
10279 properly a function call that is the expansion of a string
10280 comparison operation, in order to recover the Static_Predicate
10281 expression and apply it to a static argument when needed.
10283 2017-01-13 Tristan Gingold <gingold@adacore.com>
10285 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
10286 (Open_Read): Re-implement using Open_Read_No_Exception.
10287 (Open_Write): Raise exception in case of error.
10288 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
10289 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
10291 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
10293 2017-01-13 Yannick Moy <moy@adacore.com>
10295 * checks.adb: Code cleanup.
10297 2017-01-13 Yannick Moy <moy@adacore.com>
10299 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
10300 expression instead of unanalyzed aspect expression for checking
10301 the validity of inheriting an operation. Also copy the expression
10302 being passing it to Build_Class_Wide_Expression, as this call
10303 modifies its argument.
10304 * sem_util.ads Fix comment to reference correct function name
10307 2017-01-13 Javier Miranda <miranda@adacore.com>
10309 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
10310 when we propagate information about the indexes back to the original
10311 indexing mode and the prefix of the index is a function call, do not
10312 remove any parameter from such call.
10314 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10316 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
10317 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
10318 a build-in-place function whose result type is tagged.
10320 2017-01-13 Yannick Moy <moy@adacore.com>
10322 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10323 Do not generate a wrapper when the only candidate is a class-wide
10325 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
10326 inside a generic context.
10328 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10330 * exp_util.adb (Add_Inherited_Tagged_DIC):
10331 Pass the object parameters of both the parent and the derived
10332 type DIC procedure to the reference replacement circuitry.
10333 (Find_DIC_Type): Modify the circuitry to present the partial
10334 view of a private type in case the private type defines its own
10336 (Replace_Object_And_Primitive_References): Add two
10337 optional formal parameters. Update the comment on usage. Update
10338 the replacement of references to object parameters.
10340 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10342 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
10344 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10346 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
10347 an out parameter that is a type conversion, independently of th
10348 range check that may apply to the expression of the conversion,
10349 for use in GNATProve.
10351 2017-01-13 Yannick Moy <moy@adacore.com>
10353 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
10354 GNATprove_Mode here to Frontend.
10355 * frontend.adb (Frontend): Move the implicit with for System
10356 in GNATprove_Mode here as it ismore correct this way; the old
10357 place only worked by chance, since there were no overloaded names.
10358 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
10359 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
10360 four attributes identified in SRM 9(18), add an implicit with
10361 to Ada.Task_Identification.
10362 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10363 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
10365 * checks.adb (Apply_Discriminant_Check,
10366 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
10367 In GNATprove mode, we do not apply the checks, but we still
10368 analyze the expression to possibly issue errors on SPARK
10369 code when a run-time error can be detected at compile time.
10370 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
10373 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10375 * expander.adb (Expand): Add a warning about using return
10376 statements in Ghost management code.
10377 * exp_ch3.adb (Freeze_Type): Add a warning about using return
10378 statements in Ghost management code.
10379 * exp_ch7.adb (Build_Invariant_Procedure_Body,
10380 Build_Invariant_Procedure_Declaration): Add a warning about
10381 using return statements in Ghost management code.
10382 * exp_disp.adb (Make_DT): Add a warning about using return
10383 statements in Ghost management code.
10384 * exp_util.adb (Build_DIC_Procedure_Body,
10385 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
10386 warning about using return statements in Ghost management code.
10387 * freeze.adb (Freeze_Entity): Add a warning about using return
10388 statements in Ghost management code.
10389 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
10390 statements in Ghost management code.
10391 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
10392 a warning about using return statements in Ghost management code.
10393 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
10394 return statements in Ghost management code.
10395 * sem_ch6.adb (Analyze_Procedure_Call,
10396 Analyze_Subprogram_Body_Helper): Add a warning about using return
10397 statements in Ghost management code.
10398 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
10399 using return statements in Ghost management code.
10400 * sem_ch12.adb (Analyze_Package_Instantiation,
10401 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
10402 Instantiate_Subprogram_Body): Add a warning about using return
10403 statements in Ghost management code.
10404 * sem_ch13.adb (Build_Predicate_Functions,
10405 Build_Predicate_Function_Declarations): Add a warning about
10406 using return statements in Ghost management code.
10407 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
10408 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
10409 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
10410 using return statements in Ghost management code.
10412 2017-01-13 Tristan Gingold <gingold@adacore.com>
10414 * s-mmosin-mingw.adb: Fix pragma import.
10416 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10418 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
10421 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10423 * atree.adb (Allocate_Initialize_Node): A newly created node is
10424 no longer marked as Ghost at this level.
10425 (Mark_New_Ghost_Node): New routine.
10426 (New_Copy): Mark the copy as Ghost.
10427 (New_Entity): Mark the entity as Ghost.
10428 (New_Node): Mark the node as Ghost.
10429 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
10430 apply to unanalyzed entities.
10431 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
10433 (Set_Is_Checked_Ghost_Entity): This attribute now
10434 applies to all entities as well as unanalyzed entities.
10435 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
10436 all entities as well as unanalyzed entities.
10437 * expander.adb Add with and use clauses for Ghost.
10438 (Expand): Install and revert the Ghost region associated with the node
10440 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
10441 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
10442 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
10443 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
10444 (Freeze_Type): Install and revert the Ghost region associated
10445 with the type being frozen.
10446 * exp_ch5.adb Remove with and use clauses for Ghost.
10447 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
10448 * exp_ch6.adb Remove with and use clauses for Ghost.
10449 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
10450 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
10451 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
10452 Ghost region of the working type.
10453 (Build_Invariant_Procedure_Declaration): Install and revert
10454 the Ghost region of the working type.
10455 (Expand_N_Package_Body): Remove all Ghost-related code.
10456 * exp_ch8.adb Remove with and use clauses for Ghost.
10457 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
10459 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
10460 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
10461 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
10463 * exp_ch13.adb Remove with and use clauses for Ghost.
10464 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
10465 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
10466 the tagged type. Move the generation of various entities within
10467 the Ghost region of the type.
10468 * exp_prag.adb Remove with and use clauses for Ghost.
10469 (Expand_Pragma_Check): Remove all Ghost-related code.
10470 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
10471 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
10472 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
10473 * exp_util.adb (Build_DIC_Procedure_Body): Install
10474 and revert the Ghost region of the working types.
10475 (Build_DIC_Procedure_Declaration): Install and revert the
10476 Ghost region of the working type.
10477 (Make_Invariant_Call): Install and revert the Ghost region of the
10479 (Make_Predicate_Call): Reimplemented. Install and revert the
10480 Ghost region of the associated type.
10481 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
10482 of the entity being frozen.
10483 (New_Freeze_Node): Removed.
10484 * ghost.adb Remove with and use clauses for Opt.
10485 (Check_Ghost_Completion): Update the parameter profile
10486 and all references to formal parameters.
10487 (Ghost_Entity): Update the comment on usage.
10488 (Install_Ghost_Mode): New routines.
10489 (Is_Ghost_Assignment): New routine.
10490 (Is_Ghost_Declaration): New routine.
10491 (Is_Ghost_Pragma): New routine.
10492 (Is_Ghost_Procedure_Call): New routine.
10493 (Is_Ghost_Renaming): Removed.
10494 (Is_OK_Declaration): Reimplemented.
10495 (Is_OK_Pragma): Reimplemented.
10496 (Is_OK_Statement): Reimplemented.
10497 (Is_Subject_To_Ghost): Update the comment on usage.
10498 (Mark_And_Set_Ghost_Assignment): New routine.
10499 (Mark_And_Set_Ghost_Body): New routine.
10500 (Mark_And_Set_Ghost_Completion): New routine.
10501 (Mark_And_Set_Ghost_Declaration): New routine.
10502 (Mark_And_Set_Ghost_Instantiation): New routine.
10503 (Mark_And_Set_Ghost_Procedure_Call): New routine.
10504 (Mark_Full_View_As_Ghost): Removed.
10505 (Mark_Ghost_Declaration_Or_Body): New routine.
10506 (Mark_Ghost_Pragma): New routine.
10507 (Mark_Ghost_Renaming): New routine.
10508 (Mark_Pragma_As_Ghost): Removed.
10509 (Mark_Renaming_As_Ghost): Removed.
10510 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
10511 (Prune_Node): Freeze nodes no longer need special pruning, they
10512 are processed by the general ignored Ghost code mechanism.
10513 (Restore_Ghost_Mode): New routine.
10514 (Set_Ghost_Mode): Reimplemented.
10515 (Set_Ghost_Mode_From_Entity): Removed.
10516 * ghost.ads Add with and use clauses for Ghost.
10517 (Check_Ghost_Completion): Update the parameter profile
10518 along with the comment on usage.
10519 (Install_Ghost_Mode): New routine.
10520 (Is_Ghost_Assignment): New routine.
10521 (Is_Ghost_Declaration): New routine.
10522 (Is_Ghost_Pragma): New routine.
10523 (Is_Ghost_Procedure_Call): New routine.
10524 (Mark_And_Set_Ghost_Assignment): New routine.
10525 (Mark_And_Set_Ghost_Body): New routine.
10526 (Mark_And_Set_Ghost_Completion): New routine.
10527 (Mark_And_Set_Ghost_Declaration): New routine.
10528 (Mark_And_Set_Ghost_Instantiation): New routine.
10529 (Mark_And_Set_Ghost_Procedure_Call): New routine.
10530 (Mark_Full_View_As_Ghost): Removed.
10531 (Mark_Ghost_Pragma): New routine.
10532 (Mark_Ghost_Renaming): New routine.
10533 (Mark_Pragma_As_Ghost): Removed.
10534 (Mark_Renaming_As_Ghost): Removed.
10535 (Restore_Ghost_Mode): New routine.
10536 (Set_Ghost_Mode): Redefined.
10537 (Set_Ghost_Mode_From_Entity): Removed.
10538 * sem.adb (Analyze): Install and revert the Ghost region of the
10539 node being analyzed.
10540 (Do_Analyze): Change the way a clean Ghost
10541 region is installed and reverted.
10542 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
10543 all Ghost-related code.
10544 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
10545 (Analyze_Number_Declaration): Remove all Ghost-related code.
10546 (Analyze_Object_Declaration): Install and revert the Ghost region of
10547 a deferred object declaration's completion.
10548 (Array_Type_Declaration): Remove all Ghost-related code.
10549 (Build_Derived_Type): Update the comment on
10550 the propagation of Ghost attributes from a parent to a derived type.
10551 (Derive_Subprogram): Remove all Ghost-related code.
10552 (Make_Class_Wide_Type): Remove all Ghost-related code.
10553 (Make_Implicit_Base): Remove all Ghost-related code.
10554 (Process_Full_View): Install and revert the Ghost region of
10555 the partial view. There is no longer need to check the Ghost
10557 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
10558 region of the left hand side.
10559 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
10560 all Ghost-related code.
10561 (Analyze_Expression_Function): Remove all Ghost-related code.
10562 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
10563 (Analyze_Procedure_Call): Install and revert the Ghost region of
10564 the procedure being called.
10565 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
10566 region of the spec or body.
10567 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
10568 (Build_Subprogram_Declaration): Remove all Ghost-related code.
10569 (Find_Corresponding_Spec): Remove all Ghost-related code.
10570 (Process_Formals): Remove all Ghost-related code.
10571 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
10572 the Ghost region of the spec.
10573 (Analyze_Package_Declaration): Remove all Ghost-related code.
10574 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
10575 Ghost when it aliases a Ghost entity.
10576 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
10578 (Analyze_Object_Renaming): Mark a renaming as Ghost when
10579 it aliases a Ghost entity.
10580 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
10582 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
10583 aliases a Ghost entity.
10584 * sem_ch11.adb Remove with and use clauses for Ghost.
10585 (Analyze_Exception_Declaration): Remove all Ghost-related code.
10586 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
10587 Ghost-related code.
10588 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
10590 (Analyze_Package_Instantiation): Install and revert the Ghost region
10591 of the package instantiation.
10592 (Analyze_Subprogram_Instantiation): Install
10593 and revert the Ghost region of the subprogram instantiation.
10594 (Instantiate_Package_Body): Code clean up. Install and revert the
10595 Ghost region of the package body.
10596 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
10597 Ghost region of the subprogram body.
10598 * sem_ch13.adb (Build_Predicate_Functions): Install
10599 and revert the Ghost region of the related type.
10600 (Build_Predicate_Function_Declaration): Code clean up. Install
10601 and rever the Ghost region of the related type.
10602 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
10603 Install and revert the Ghost region of the pragma.
10604 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
10605 Ghost region of the pragma.
10606 (Analyze_Pragma): Install and revert the Ghost region of various
10607 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
10608 or encloses a Ghost entity.
10609 (Analyze_Pre_Post_Condition): Install and revert the Ghost
10610 region of the pragma.
10611 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
10612 Ghost region of the pragma.
10613 * sem_res.adb (Resolve): Remove all Ghost-related code.
10614 * sem_util.adb (Is_Declaration): Reimplemented.
10615 (Is_Declaration_Other_Than_Renaming): New routine.
10616 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
10617 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
10618 (Is_Ghost_Pragma): Removed.
10619 (Is_Ignored_Ghost_Pragma): New routine.
10620 (Set_Is_Checked_Ghost_Pragma): New routine.
10621 (Set_Is_Ghost_Pragma): Removed.
10622 (Set_Is_Ignored_Ghost_Pragma): New routine.
10623 * sinfo.ads: Update the documentation on Ghost mode and
10624 Ghost regions. New attributes Is_Checked_Ghost_Pragma
10625 and Is_Ignored_Ghost_Pragma along with usages in nodes.
10626 Remove attribute Is_Ghost_Pragma along with usages in nodes.
10627 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
10628 (Is_Ghost_Pragma): Removed along with pragma Inline.
10629 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
10630 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
10631 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
10632 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
10634 2017-01-12 Tristan Gingold <gingold@adacore.com>
10636 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
10637 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
10639 2017-01-12 Yannick Moy <moy@adacore.com>
10641 * errout.adb, errout.ads (Initialize): Factor common treatment
10643 (Reset_Warnings): New procedure to reset counts related to warnings.
10644 (Record_Compilation_Errors): New variable to store the presence of an
10645 error, used in gnat2why to allow changing the Warning_Mode.
10646 (Compilation_Errors): Use new variable Record_Compilation_Errors to
10647 store the presence of an error.
10649 2017-01-12 Javier Miranda <miranda@adacore.com>
10651 * sem_ch13.adb (Analyze_Aspect_Specifications):
10652 For Interrupt_Handler and Attach_ Handler aspects, decorate the
10653 internally built reference to the protected procedure as coming
10654 from sources and force its analysis.
10656 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10658 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
10659 inherit predicates if any from the first_subtype of the parent,
10660 not from the anonymous parent type.
10661 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
10662 predicate is not a static subtype.
10664 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10666 * freeze.adb (Check_Suspicious_Convention): New procedure
10667 performing a warning check on discriminated record types with
10668 convention C or C++. Factored out of procedure Freeze_Record_Type,
10669 and changed to only apply to base types (to avoid spurious
10670 warnings on subtypes). Minor improvement of warning messages
10671 to refer to discriminated rather than variant record types.
10672 (Freeze_Record_Type): Remove code for performing a suspicious
10674 (Freeze_Entity): Only call Freeze_Record_Type
10675 on types that aren't declared within any enclosing generic units
10676 (rather than just excluding the type when the innermost scope
10677 is generic). Call Check_Suspicious_Convention whether or not
10678 the type is declared within a generic unit.
10679 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
10680 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
10683 2017-01-12 Tristan Gingold <gingold@adacore.com>
10685 * sysdep.c, adaint.c, rtinit.c, ming32.h:
10686 (__gnat_current_codepage): Renamed from CurrentCodePage
10687 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
10689 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10691 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
10692 quantified expressions, following AI12-050: the loop parameters
10693 of two quantified expressions are conformant if they have the
10696 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10698 * gcc-interface/Makefile.in: Clean up VxWorks targets.
10700 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10702 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
10703 Hnadle properly the attribute reference when it appears as part
10704 of an expression in another loop aspect.
10706 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10708 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
10709 subsidiary of Build_Initialization_Call, to complete generation
10710 of predicate checks on discriminants whose (sub)types have
10711 predicates, and to add checks on variants that do not have an
10713 * sem_util.adb (Gather_Components): A missing Others alternative is
10714 not an error when the type of the discriminant is a static predicate
10715 (and coverage has been checked when analyzing the case statement). A
10716 runtime check is generated to verify that a given discriminant
10717 satisfies the predicate (RM 3.8.1. (21.1/2)).
10719 2017-01-12 Yannick Moy <moy@adacore.com>
10721 * gnat1drv.adb (Adjust_Global_Switches): Only
10722 perform checking of exception mechanism when generating code.
10724 2017-01-12 Justin Squirek <squirek@adacore.com>
10726 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
10727 Remove handling of access component with invariant.
10728 (Build_Invariant_Procedure_Declaration): Remove return on class
10730 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
10731 conditional exception for component or array so Has_Own_Invariants
10732 flag is not falsly set.
10733 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
10734 wide type to have no invariant flags.
10736 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10738 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
10739 sem_ch13.adb: Minor reformatting.
10741 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10743 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
10744 adjustment primitive when the ancestor type was not properly frozen.
10745 (Gen_Assign): Guard against a missing initialization
10746 primitive when the component type was not properly frozen.
10747 (Initialize_Array_Component): Guard against a missing adjustment
10748 primitive when the component type was not properly frozen.
10749 (Initialize_Record_Component): Guard against a missing adjustment
10750 primitive when the component type was not properly frozen.
10751 (Process_Transient_Component_Completion): The transient object may
10752 not be finalized when its associated type was not properly frozen.
10753 * exp_ch3.adb (Build_Assignment): Guard against a missing
10754 adjustment primitive when the component type was not properly frozen.
10755 (Build_Initialization_Call): Guard against a missing
10756 initialization primitive when the associated type was not properly
10758 (Expand_N_Object_Declaration): Guard against a missing
10759 adjustment primitive when the base type was not properly frozen.
10760 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
10761 body when there is no adjustment primitive available. Create an
10762 empty Deep_Finalize body when there is no finalization primitive
10764 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
10765 missing finalization primitive when the designated type was
10766 not properly frozen.
10767 (Expand_N_Allocator): Guard against a missing initialization primitive
10768 when the designated type was not properly frozen.
10769 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
10770 only when the corresponding adjustment primitive is available.
10771 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
10772 adjustment/finalization statements only when there is an available
10773 primitive to carry out the action.
10774 (Build_Initialize_Statements): Generate the initialization/finalization
10775 statements only when there is an available primitive to carry out the
10777 (Make_Adjust_Call): Do not generate a call when the underlying
10778 type is not present due to a possible missing full view.
10779 (Make_Final_Call): Do not generate a call when the underlying
10780 type is not present due to a possible missing full view.
10781 (Make_Finalize_Address_Stmts): Generate an empty body when the
10782 designated type lacks a finalization primitive.
10783 (Make_Init_Call): Do not generate a call when the underlying type is
10784 not present due to a possible missing full view.
10785 (Process_Component_For_Adjust): Add the adjustment call only when the
10786 corresponding adjustment primitive is available.
10787 (Process_Component_For_Finalize): Add the finalization call only when
10788 the corresponding finalization primitive is available.
10789 (Process_Object_Declaration): Use a null statement to emulate a
10790 missing call to the finalization primitive of the object type.
10791 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
10792 (Make_Final_Call): Update the comment on usage.
10793 (Make_Init_Call): Update the comment on usage.
10794 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
10796 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10798 * einfo.ads: Update documentation of Address_Taken.
10799 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
10800 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
10801 for subprograms when setting Address_Taken flag.
10803 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
10805 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
10806 Configurable_Run_Time_Mode off when analysing with'ed predefined
10809 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10811 * sem_prag.adb: Minor reformatting.
10812 * sem_util.adb (Unique_Entity): fix result for
10813 bodies of entry families.
10815 2017-01-12 Justin Squirek <squirek@adacore.com>
10817 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
10818 Resolve_Suppressible in the pragma Assertion_Policy case.
10819 (Resolve_Suppressible): Created this function to factor out
10820 common code used to resolve Suppress to either Ignore or Check
10821 * snames.ads-tmpl: Add name for Suppressible.
10823 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10825 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
10827 * debug.adb: Minor comment fixes.
10829 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10831 * sem_util.adb (Unique_Entity): For concurrent
10832 bodies that are defined with stubs and complete a declaration
10833 of a single concurrent object return the entity of an implicit
10834 concurrent type, not the entity of the anonymous concurrent
10836 * debug.adb: -gnatd.J is no longer used.
10837 * make.adb (Globalize): Removed, no longer used.
10838 * sem_ch9.adb: minor typo in comment for entry index
10840 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
10842 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
10843 * exp_ch3.adb (Build_Init_Statements): As part of initialising
10844 the value record of a task, set its _Secondary_Stack_Size field
10846 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
10847 a _Secondary_Stack_Size field in the value record of
10848 the task if a Secondary_Stack_Size rep item is present.
10849 (Make_Task_Create_Call): Include secondary stack size
10850 parameter. If No_Secondary_Stack restriction is in place, passes
10852 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
10853 Secondary_Stack_Size.
10854 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
10855 function to define the overhead of the secondary stack.
10856 * s-tarest.adb (Create_Restricted_Task,
10857 Create_Restricted_Task_Sequential): Functions now include
10858 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
10859 * s-tarest.adb (Create_Restricted_Task,
10860 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
10861 include Secondary_Stack_Size parameter.
10862 (Task_Wrapper): Secondary stack now allocated to the size specified by
10863 the Secondary_Stack_Size parameter in the task's ATCB.
10864 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
10865 Secondary_Stack_Size component.
10866 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
10867 Create_Restricted_Task_Sequential): Function now include
10868 Secondary_Stack_Size parameter.
10869 (Task_Wrapper): Secondary stack now allocated to the size
10870 specified by the Secondary_Stack_Size parameter in the task's
10872 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
10873 to include Secondary_Stack_Size parameter.
10874 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
10875 Secondary_Stack_Size aspect, turning the aspect into its corresponding
10876 internal attribute.
10877 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
10878 * snames.adb-tmpl, snames.ads-tmpl: Added names
10879 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
10880 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
10882 2017-01-12 Yannick Moy <moy@adacore.com>
10884 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
10887 2017-01-12 Justin Squirek <squirek@adacore.com>
10889 * exp_attr.adb (Expand_N_Attribute_Reference):
10890 Fix Finalization_Size case by properly resolving the type after
10891 rewritting the node.
10893 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10895 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
10897 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
10898 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
10899 exp_sel.ads: Minor reformatting.
10901 2017-01-12 Justin Squirek <squirek@adacore.com>
10903 * exp_ch6.adb (Expand_Call): Add guard to prevent
10904 invariant checks from being created for internally generated
10907 2017-01-12 Bob Duff <duff@adacore.com>
10909 * lib-writ.ads: Remove incorrect comment.
10911 2017-01-12 Javier Miranda <miranda@adacore.com>
10913 * debug.adb (-gnatd.K): Enable generation of contract-only
10914 procedures in CodePeer mode.
10915 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
10917 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
10919 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
10921 (Get_Contract_Only_Missing_Body_Name): New subprogram.
10922 (Get_Contract_Only_Body): New subprogram.
10923 (Set_Contract_Only_Body): New subprogram.
10924 (Is_Contract_Only_Body): New subprogram.
10925 (Set_Is_Contract_Only_Body): New subprogram.
10926 (SCIL_Nodes): Replace table by hash-table.
10928 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10930 * exp_ch6.adb: Minor reformatting.
10931 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
10933 2017-01-12 Bob Duff <duff@adacore.com>
10935 * binde.adb (Forced): New reason for a dependence.
10936 (Force_Elab_Order): Implementation of the new switch.
10937 * binde.ads: Minor comment fixes.
10938 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
10939 long ago that is no longer supported; removed comment about that.
10940 * opt.ads (Force_Elab_Order_File): Name of file specified for
10942 * switch-b.adb: Parse -f switch.
10944 2017-01-12 Justin Squirek <squirek@adacore.com>
10946 * exp_ch6.adb (Check_View_Conversion): Created this function
10947 to properly chain calls to check type invariants that may be
10948 present in a subprogram call after the subprogram.
10949 (Expand_Call): Add a conditional to identify when a view conversion
10950 needs to be checked.
10951 * nlists.adb, nlists.ads (Prepend_New): New routine.
10952 (Prepend_New_To): New routine.
10954 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10956 * sinfo.ads: Minor reformatting.
10958 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10960 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
10963 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10965 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
10966 variable Definite. Create a local object and pass its 'Access to the
10967 BIP function when the result type is either definite or it does not
10968 require any finalization or secondary stack management.
10970 2017-01-12 Bob Duff <duff@adacore.com>
10972 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
10973 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
10974 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
10975 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
10976 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
10977 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
10978 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
10979 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
10980 Change name to Pragma_Name_Unmapped.
10981 (Pragma_Name_Mapped): Change name to Pragma_Name.
10982 This is because the "mapped" version should be the usual case.
10984 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
10986 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
10987 Is_Default_Init_Cond_Procedure, and
10988 Has_Inherited_Default_Init_Cond. Add uses of flags
10989 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
10990 (Default_Init_Cond_Procedure): Removed.
10991 (DIC_Procedure): New routine.
10992 (Has_Default_Init_Cond): Removed.
10993 (Has_DIC): New routine.
10994 (Has_Inheritable_Invariants): The attribute applies to the base type.
10995 (Has_Inherited_Default_Init_Cond): Removed.
10996 (Has_Inherited_DIC): New routine.
10997 (Has_Inherited_Invariants): The attribute applies to the base type.
10998 (Has_Own_DIC): New routine.
10999 (Has_Own_Invariants): The attribute applies to the base type.
11000 (Is_Default_Init_Cond_Procedure): Removed.
11001 (Is_DIC_Procedure): New routine.
11002 (Set_Default_Init_Cond_Procedure): Removed.
11003 (Set_DIC_Procedure): New routine.
11004 (Set_Has_Default_Init_Cond): Removed.
11005 (Set_Has_Inheritable_Invariants): The attribute applies
11007 (Set_Has_Inherited_Default_Init_Cond): Removed.
11008 (Set_Has_Inherited_DIC): New routine.
11009 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11010 (Set_Has_Own_DIC): New routine.
11011 (Set_Has_Own_Invariants): The attribute applies to the base type.
11012 (Set_Is_Default_Init_Cond_Procedure): Removed.
11013 (Set_Is_DIC_Procedure): New routine.
11014 (Write_Entity_Flags): Update the output of all flags related to
11015 default initial condition.
11016 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11017 of the call to the DIC procedure.
11018 (Freeze_Type): Generate the body of the DIC procedure.
11019 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11020 all occurrences of Create_Append with Append_New_To. Do
11021 not generate an invariant procedure for a class-wide type.
11022 The generated body acts as a freeze action of the working type.
11023 (Build_Invariant_Procedure_Declaration): Do not generate an
11024 invariant procedure for a class-wide type.
11025 (Create_Append): Removed.
11026 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11027 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11028 class-wide pre/postcondition description and data structures from
11030 (Build_Class_Wide_Expression): Moved from Sem_Prag.
11031 (Build_DIC_Call): New routine.
11032 (Build_DIC_Procedure_Body): New routine.
11033 (Build_DIC_Procedure_Declaration): New routine.
11034 (Entity_Hash): Moved from Sem_Prag.
11035 (Find_DIC_Type): New routine.
11036 (Update_Primitives_Mapping): Reimplemented.
11037 (Update_Primitives_Mapping_Of_Types): New routine.
11038 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11039 (Build_DIC_Call): New routine.
11040 (Build_DIC_Procedure_Body): New routine.
11041 (Build_DIC_Procedure_Declaration): New routine.
11042 (Update_Primitives_Mapping): Moved from Sem_Prag.
11043 (Update_Primitives_Mapping_Of_Types): New routine.
11044 * nlists.adb (Append_New): New routine.
11045 (Append_New_To): New routine.
11046 * nlists.ads (Append_New): New routine.
11047 (Append_New_To): New routine.
11048 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11049 of DIC procedures here. This is now done at the end of the
11050 visible declarations, private declarations, and at the freeze
11052 (Analyze_Private_Extension_Declaration):
11053 A private extension inherits the DIC pragma of a parent type.
11054 (Analyze_Subtype_Declaration): No need to propagate invariant
11055 attributes to a subtype as those apply to the base type.
11056 (Build_Derived_Record_Type): No need to inherit invariants here
11057 as this is now done in Build_Derived_Type.
11058 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11060 (Process_Full_View): Update the propagation of DIC attributes.
11061 (Propagate_Default_Init_Cond_Attributes): Removed.
11062 * sem_ch7.adb Add with and use clauses for Exp_Util.
11063 (Analyze_Package_Specification): Create the body of the DIC
11064 procedure at the end of the visible and private declarations.
11065 (Preserve_Full_Attributes): Propagate DIC attributes.
11066 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11068 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11069 * sem_elab.adb (Check_A_Call): Update the call to
11070 Is_Nontrivial_Default_Init_Cond_Procedure.
11071 * sem_prag.adb Remove the with and use clauses for
11072 GNAT.HTable. Move the handling of class- wide pre/postcondition
11073 description and data structures to Exp_Util.
11074 (Analyze_Pragma): Create the declaration of the DIC procedure. There
11075 is no need to propagate invariant-related attributes at this point
11076 as this is done in Build_Invariant_Procedure_Declaration.
11077 (Build_Class_Wide_Expression): Moved to Exp_Util.
11078 (Entity_Hash): Moved to Exp_Util.
11079 (Update_Primitives_Mapping): Moved to Exp_Util.
11080 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11081 (Update_Primitives_Mapping): Moved to Exp_Util.
11082 * sem_util.adb: Remove with and use clauses for Ghost
11084 (Build_Default_Init_Cond_Call): Removed.
11085 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11086 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11087 (Get_Views): Reimplemented.
11088 (Has_Full_Default_Initialization): Reimplement the section on DIC.
11089 (Inherit_Default_Init_Cond_Procedure): Removed.
11090 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11091 (Is_Nontrivial_DIC_Procedure): New routine.
11092 (Is_Verifiable_DIC_Pragma): New routine.
11093 (Propagate_DIC_Attributes): New routine.
11094 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11095 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11096 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11097 (Inherit_Default_Init_Cond_Procedure): Removed.
11098 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11099 (Is_Nontrivial_DIC_Procedure): New routine.
11100 (Is_Verifiable_DIC_Pragma): New routine.
11101 (Propagate_DIC_Attributes): New routine.
11102 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11104 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11106 (Expression_Copy): New routine along with pragma Inline.
11107 (Set_Expression_Copy): New routine along with pragma Inline.
11109 2017-01-06 Bob Duff <duff@adacore.com>
11111 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11112 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11113 we won't generate the call to s_stalib_adafinal when the main
11114 is not written in Ada.
11116 2017-01-06 Bob Duff <duff@adacore.com>
11118 * sem_prag.adb: Minor: remove pragma Warnings.
11120 2017-01-06 Tristan Gingold <gingold@adacore.com>
11122 * Makefile.rtl: Do not compile s-stchop by default.
11124 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11126 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11127 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11128 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11129 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11130 Reverted previous change for now.
11132 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11134 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11135 check to default discriminant value if checks are enabled.
11136 (Build_Assignment): If type of component has static predicate,
11137 apply check to its default value, if any.
11139 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11141 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11142 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11143 the value record of a task, set its _Secondary_Stack_Size field
11145 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11146 a _Secondary_Stack_Size field in the value record of
11147 the task if a Secondary_Stack_Size rep item is present.
11148 (Make_Task_Create_Call): Include secondary stack size
11149 parameter. If No_Secondary_Stack restriction is in place, passes
11151 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11152 Secondary_Stack_Size.
11153 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11154 function to define the overhead of the secondary stack.
11155 * s-tarest.adb (Create_Restricted_Task,
11156 Create_Restricted_Task_Sequential): Functions now include
11157 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11158 * s-tarest.adb (Create_Restricted_Task,
11159 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
11160 now include Secondary_Stack_Size parameter.
11162 Secondary stack now allocated to the size specified by the
11163 Secondary_Stack_Size parameter in the task's ATCB.
11164 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
11165 Secondary_Stack_Size component.
11166 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11167 Create_Restricted_Task_Sequential): Function now include
11168 Secondary_Stack_Size parameter.
11169 (Task_Wrapper): Secondary stack
11170 now allocated to the size specified by the Secondary_Stack_Size
11171 parameter in the task's ATCB.
11172 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
11173 for Secondary_Stack_Size aspect, turning the aspect into its
11174 corresponding internal attribute.
11175 (Analyze_Attribute_Definition):
11176 Process Secondary_Stack_Size attribute.
11177 * snames.adb-tmpl, snames.ads-tmpl: Added names
11178 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11179 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11181 2017-01-06 Pascal Obry <obry@adacore.com>
11183 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
11184 Sequential_IO and Direct_IO.
11186 2017-01-06 Bob Duff <duff@adacore.com>
11188 * snames.ads-tmpl (Renamed): New name for the pragma argument.
11189 * par-ch2.adb: Allow the new pragma (with analysis deferred
11191 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
11192 Keep a mapping from new pragma names to old names.
11193 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
11194 implement it by calling Map_Pragma_Name.
11195 * checks.adb, contracts.adb, einfo.adb, errout.adb,
11196 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
11197 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
11198 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
11199 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
11200 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11201 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
11204 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11206 * exp_ch9.adb: Minor reformatting.
11208 2017-01-06 Tristan Gingold <gingold@adacore.com>
11210 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
11211 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
11212 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
11214 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
11215 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
11216 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
11217 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
11219 2017-01-06 Bob Duff <duff@adacore.com>
11221 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
11222 dummy implementation of Map_Pragma_Name.
11224 2017-01-06 Tristan Gingold <gingold@adacore.com>
11226 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
11227 entry_body variable constant.
11228 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
11229 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
11231 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
11232 now access to constant.
11234 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11236 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
11237 reformatting and typo fixes.
11239 2017-01-06 Bob Duff <duff@adacore.com>
11241 * snames.ads-tmpl: New names for pragma renaming.
11242 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
11243 * par-prag.adb: Add new pragma name to case statement.
11244 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
11246 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
11247 Dummy implementation of Pragma_Name_Mapped.
11249 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11251 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
11252 better detect call within an entry_wrapper.
11253 * sem_res.adb (Resolve_Call): A protected call within an
11254 entity_wrapper is analyzed in the context of the protected
11255 object but corresponds to a pre-analysis and is not an access
11256 before elaboration.
11257 * sem_attr.adb: Minor reformatting.
11259 2017-01-06 Justin Squirek <squirek@adacore.com>
11261 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
11262 Finalization_Size to allow a prefix of any non-class-wide type.
11263 * sem_attr.ads Modify comment for Finalization_Size to include
11264 definite type use case.
11266 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11268 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
11269 on procedures that are wrappers created for entries that have
11271 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
11272 body is an entry_wrapper, compile it in the context of the
11273 synchronized type, because a precondition may refer to funtions
11275 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
11277 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
11278 within an Entry_Wrapper this is an external call whose target
11279 is the synchronized object that is the actual in the call to
11282 2017-01-06 Yannick Moy <moy@adacore.com>
11284 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
11285 in tree, which means not analyzing the previous prefix if the node has
11286 been rewritten into its prefix.
11288 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11290 * s-tpobop.adb: Minor reformatting.
11292 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11294 * checks.adb (Ensure_Valid): Do not generate a validity check
11295 within a generated predicate function, validity checks will have
11296 been applied earlier when required.
11298 2017-01-06 Tristan Gingold <gingold@adacore.com>
11300 * s-tpoben.ads (Protection_Entries): Add comment and reorder
11301 components for performances.
11302 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
11305 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11307 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
11308 If expression is compile-time known and obeys a static predicate
11309 it must be labelled as static, to prevent spurious warnings and
11310 run-time errors, e.g. in case statements. This is relevant when
11311 the expression is the result of constant-folding a type conversion
11312 whose expression is a variable with a known static value.
11314 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11316 * exp_attr.adb, sem_attr.ads: Minor reformatting.
11318 2017-01-06 Justin Squirek <squirek@adacore.com>
11320 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
11321 expansion of Finalization_Size attribute.
11322 * sem_attr.adb (Analyze_Attribute): Add entry to check the
11323 semantics of Finalization_Size.
11324 (Eval_Attribute): Add null entry for Finalization_Size.
11325 * sem_attr.ads: Add Finalization_Size to the implementation
11326 dependent attribute list.
11327 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
11329 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11331 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
11332 iterator specification with a serious syntactic error, transform
11333 construct into an infinite loop in order to continue analysis
11334 and prevent a compiler abort.
11336 2017-01-06 Tristan Gingold <gingold@adacore.com>
11338 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
11339 max_queue_lengths_array if unused.
11341 2017-01-06 Bob Duff <duff@adacore.com>
11343 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
11344 array access, in case "\" is at the end of Text.
11345 * stylesw.adb (Set_Style_Check_Options): Don't include input
11346 characters in the error message template, because they could
11347 be control characters such as "\", which Errout will try to
11350 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11352 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
11353 For a private type examine the visible declarations that follow
11354 the partial view, not just the private declarations that follow
11357 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11359 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
11362 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11364 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
11365 alias of the inherited op is the parent iterator, no need to
11366 examine dispatch table positions which might not be established
11367 yet if type is not frozen.
11368 * sem_disp.adb (Check_Controlling_Formals): The formal of a
11369 predicate function may be a subtype of a tagged type.
11370 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
11371 of representation items for the completion of a type extension
11372 where a predicate applies to the partial view.
11373 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
11374 parameter that designates function whose actual receives a
11375 predicate check, to improve warning message when the check will
11376 lead to infinite recursion.
11377 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
11378 Apply_Predicate_Check.
11380 2017-01-06 Tristan Gingold <gingold@adacore.com>
11382 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
11383 Gnat_Extended_Ravenscar.
11384 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
11386 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11388 * sem_util.ads: Minor typo fix and reformatting.
11390 2017-01-06 Yannick Moy <moy@adacore.com>
11392 * ghost.adb Minor fixing of references to SPARK RM.
11393 (Check_Ghost_Context): Check whether reference is to a lvalue
11394 before issuing an error about violation of SPARK RM 6.9(13)
11395 when declaration has Ghost policy Check and reference has Ghost
11397 * sem_util.adb Minor indentation.
11398 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
11399 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
11400 * sem_util.ads (Unique_Defining_Entity): Document the result
11401 for package body stubs.
11403 2017-01-06 Tristan Gingold <gingold@adacore.com>
11405 * raise-gcc.c (abort): Macro to call Abort_Propagation.
11406 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
11408 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11409 Do not generate the Entry_Max_Queue_Lengths_Array if all default
11411 * exp_util.adb (Corresponding_Runtime_Package): Consider
11412 Max_Queue_Length pragma.
11414 2017-01-06 Justin Squirek <squirek@adacore.com>
11416 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11417 Remove declaration generation in the case of
11418 System_Tasking_Protected_Objects_Single_Entry being used,
11419 and add a warning message when this is detected to occur.
11420 (Make_Initialize_Protection): Remove reference pass in the case
11421 of System_Tasking_Protected_Objects_Single_Entry.
11422 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
11423 * s-tposen.adb (Initialize_Protection_Entry): Remove
11424 Entry_Queue_Max parameter.
11425 * s-tposen.ads: Remove the types use to store the entry queue
11427 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
11429 2017-01-06 Yannick Moy <moy@adacore.com>
11431 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
11432 behavior of function, to also accept out of range positions
11433 and raise Constraint_Error in such case, and to copy sloc from
11434 literal if No_Location passed as location.
11435 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
11436 of functions to raise Constraint_Error in case of value not in
11439 2017-01-06 Tristan Gingold <gingold@adacore.com>
11441 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
11442 Invalidate_Stack_Cache.
11444 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
11446 * s-os_lib.adb: Minor fix to the signature of Readlink.
11448 2017-01-06 Javier Miranda <miranda@adacore.com>
11450 * sem_ch6.adb (Conforming_Types): Handle another
11451 confusion between views in a nested instance with an actual
11452 private type whose full view is not in scope.
11454 2017-01-06 Arnaud Charlet <charlet@adacore.com>
11456 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
11457 mark a rewritten if statement as explicit (Comes_From_Source).
11459 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11461 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
11463 2017-01-06 Tristan Gingold <gingold@adacore.com>
11465 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
11467 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11469 * sem_case.adb: Minor reformatting.
11471 2017-01-06 Thomas Quinot <quinot@adacore.com>
11473 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
11475 2017-01-06 Justin Squirek <squirek@adacore.com>
11477 * aspects.adb: Register aspect in Canonical_Aspect.
11478 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
11479 into respective tables.
11480 * einfo.ads, einfo.adb: Add a new attribute for
11481 handling the parameters for Pragma_Max_Entry_Queue
11482 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
11483 for accessing and setting were added as well.
11484 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
11485 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
11486 declaration for pramga arguments and store them in the protected
11488 (Make_Initialize_Protection): Pass a reference to
11489 the Entry_Max_Queue_Lengths_Array in the protected type node to
11491 * rtsfind.adb: Minor grammar fix.
11492 * rtsfind.ads: Register new types taken from the
11493 runtime libraries RE_Protected_Entry_Queue_Max and
11494 RE_Protected_Entry_Queue_Max_Array
11495 * s-tposen.adb, s-tpoben.adb
11496 (Initialize_Protection_Entry/Initialize_Protection_Entries):
11497 Add extra parameter and add assignment to local object.
11498 * s-tposen.ads, s-tpoben.ads: Add new types to
11499 store entry queue maximums and a field to the entry object record.
11500 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
11501 for Aspect_Max_Queue_Length.
11502 (Check_Aspect_At_Freeze_Point):
11503 Add aspect to list of aspects that don't require delayed analysis.
11504 * sem_prag.adb (Analyze_Pragma): Add case statement for
11505 Pragma_Max_Queue_Length, check semantics, and register arugments
11506 in the respective entry nodes.
11507 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
11508 and Has_Max_Queue_Length
11509 * snames.ads-tmpl: Add constant for the new aspect-name
11510 Name_Max_Queue_Length and corrasponding pragma.
11512 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11514 * exp_util.adb (Is_Controlled_Function_Call):
11515 Reimplemented. Consider any node which has an entity as the
11516 function call may appear in various ways.
11518 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11520 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
11521 an unchecked type conversion when performing a view conversion
11522 to/from a private type. In all other cases use a regular type
11523 conversion to ensure that any relevant checks are properly
11526 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11528 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
11530 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11532 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
11533 error on case expression that is an entity, when coverage is
11534 incomplete and entity has a static value obtained by local
11536 (Handle_Static_Predicate): New procedure, subsidiary of
11537 Check_Choices, to handle case alternatives that are either
11538 subtype names or subtype indications involving subtypes that
11539 have static predicates.
11541 2017-01-06 Thomas Quinot <quinot@adacore.com>
11543 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
11544 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
11546 2017-01-06 Bob Duff <duff@adacore.com>
11548 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
11549 Elaborate_All(P) to P itself. That could happen in obscure cases,
11550 and always introduced a cycle (P body must be elaborated before
11552 * lib-writ.ads: Comment clarification.
11553 * ali-util.ads: Minor comment fix.
11554 * ali.adb: Minor reformatting.
11556 2017-01-06 Tristan Gingold <gingold@adacore.com>
11558 * a-exexpr-gcc.adb: Improve comment.
11560 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
11562 * s-linux-mips.ads: Use correct signal and errno constants.
11563 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
11565 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
11567 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
11568 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
11571 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
11573 * gnatvsn.ads: Bump copyright year.
11575 2017-01-01 Jakub Jelinek <jakub@redhat.com>
11577 * gnat_ugn.texi: Bump @copying's copyright year.
11578 * gnat_rm.texi: Likewise.
11580 Copyright (C) 2017 Free Software Foundation, Inc.
11582 Copying and distribution of this file, with or without modification,
11583 are permitted in any medium without royalty provided the copyright
11584 notice and this notice are preserved.