1 2017-11-16 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
4 syntactically denote a type, return Any_Type to prevent subsequent
5 compiler crashes or infinite loops.
7 2017-11-16 Steve Baird <baird@adacore.com>
9 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
10 cases when writing out a .ali file when a Rename_Pragma pragma is in
12 * lib-writ.adb (Write_Unit_Information): Replace call to
13 Pragma_Name_Unmapped with call to Pragma_Name.
15 2017-11-16 Gary Dismukes <dismukes@adacore.com>
17 * sem_elab.adb: Minor typo fixes.
19 2017-11-16 Justin Squirek <squirek@adacore.com>
21 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
24 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
26 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
27 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
28 the elaboration flag as elaboration code.
29 * einfo.adb (Contract): Update the comments.
30 (Ignore_SPARK_Mode_Pragmas): Update the comments.
31 (SPARK_Aux_Pragma): Update the comments.
32 (SPARK_Aux_Pragma_Inherited): Update the comments.
33 (SPARK_Pragma): Update the comments. The attribute now applies
34 to all types and abstract states.
35 (SPARK_Pragma_Inherited): Update the comments. The attribute now
36 applies to all types and abstract states.
37 (Set_Contract): Update the comments.
38 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
39 (Set_SPARK_Aux_Pragma): Update the comments.
40 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
41 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
42 all types and abstract states.
43 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
44 applies to all types and abstract states.
45 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
46 type and abstract states.
47 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
48 SPARK_Pragma_Inherited. Both of them now apply to all types and
50 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
51 elaboration flag as elaboration code.
52 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
53 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
54 a derived type for later processing by the ABE mechanism.
55 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
56 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
58 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
60 * sem_elab.adb: Define the term "early call region". Update the
61 terminology for "scenario" and "target". Update the architecture of
62 the ABE mechanism. Update the steps which must be taken when adding a
63 new scenario. Update the section on debugging ABE issues. Add new
64 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
65 table SPARK_Scenarios. Hash table Elaboration_Context is now
66 Elaboration_Statuses. The majority of Process_xxx routines have been
67 updated to better reflect their role.
68 (Add_Unit): Reimplemented.
69 (Check_Elaboration_Constituent): New routine.
70 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
71 conditional ABE issues. Verify previously recorded SPARK scenarios.
72 (Check_SPARK_Derived_Type): New routine.
73 (Check_SPARK_Instantiation): New routine.
74 (Check_SPARK_Scenario): New routine.
75 (Check_SPARK_Refined_State_Pragma): New routine.
76 (Early_Call_Region): New routine.
77 (Elaboration_Status): New routine.
78 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
79 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
80 (Find_Early_Call_Region): New routine.
81 (Info_Scenario): Add output for refinement constituents.
82 (Is_Recorded_SPARK_Scenario): New routine.
83 (Is_Suitable_SPARK_Derived_Type): New routine.
84 (Is_Suitable_SPARK_Instantiation): New routine.
85 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
86 (Is_Visited_Body): New routine.
87 (Kill_Elaboration_Scenario): Reimplemented.
88 (Output_Active_Scenarios): Add output for pragma Refined_State.
89 (Output_SPARK_Refined_State_Pragma): New routine.
90 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
91 is now achieved by different means.
92 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
93 the subprogram body appears within the early call region of the body.
94 Either ensure the prior elaboration of external subprograms or verify
95 that the context meets the suitable elaboration requirement.
96 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
97 (Record_Elaboration_Scenario): Reimplement the portion which enforces
98 the level restrictions of the static model. Add support for SPARK
100 (Record_SPARK_Elaboration_Scenario): New routine.
101 (Reset_Visited_Bodies): New routine.
102 (Set_Early_Call_Region): New routine.
103 (Set_Elaboration_Status): New routine.
104 (Set_Is_Recorded_SPARK_Scenario): New routine.
105 (Update_Elaboration_Scenario): Reimplemented.
106 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
107 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
108 for examination by the ABE Processing phase.
109 (Create_Abstract_State): Save the SPARK_Mode from the context.
110 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
111 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
112 * sinfo.adb (Is_Elaboration_Code): New routine.
113 (Set_Is_Elaboration_Code): New routine.
114 (Nkind_In): Add 10 and 11 parameter versions.
115 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
116 occurrences in nodes.
117 (Is_Elaboration_Code): New routine along with pragma Inline.
118 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
119 (Nkind_In): Add 10 and 11 parameter versions.
121 2017-11-16 Justin Squirek <squirek@adacore.com>
123 * sem.adb (Analyze): Remove requirement that the original node of N be
124 an operator in the case that analysis on the node yields the relevant
125 operator - so prefer it instead.
127 2017-11-16 Bob Duff <duff@adacore.com>
129 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
130 formal must not have a designated type that is the full view coming
131 from a limited-with'ed package.
132 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
133 function called from sem_ch6.
134 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
135 specially for b-i-p cases.
137 2017-11-10 Martin Sebor <msebor@redhat.com>
140 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
141 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
143 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
145 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
146 not fall through to the next case.
147 <ARRAY_TYPE>: Deal specially with a dereference from another array
148 type with the same element type.
150 2017-11-09 Gary Dismukes <dismukes@adacore.com>
152 * exp_util.adb, freeze.adb: Minor reformatting.
154 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
156 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
158 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
160 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
161 N_Variable_Reference_Marker nodes.
163 2017-11-09 Ed Schonberg <schonberg@adacore.com>
165 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
166 the pragma Compile_Time_Error when it appears in a generic package
167 declaration and uses an expanded name to denote the current unit.
169 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
171 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
172 * tracebak.c: Add support for tracebacks in QNX.
174 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
176 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
178 2017-11-09 Yannick Moy <moy@adacore.com>
180 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
183 2017-11-09 Joel Brobecker <brobecker@adacore.com>
185 * doc/gnat_ugn/platform_specific_information.rst: Document packages
186 needed on GNU/Linux by GNAT.
187 * gnat_ugn.texi: Regenerate.
189 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
191 * contracts.adb (Analyze_Contracts): Remove the three parameter
192 version. This routine now only analyzes contracts and does not perform
193 any freezing actions.
194 (Analyze_Previous_Contracts): Removed.
195 (Freeze_Previous_Contracts): New routine.
196 * contracts.ads (Analyze_Previous_Contracts): Removed.
197 (Freeze_Previous_Contracts): New routine.
198 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
199 enclosing package spec regardless of whether the list denotes the
200 visible or private declarations. Fix the removal of partial state
201 refinements when the context is a package spec.
202 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
204 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
205 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
206 (Analyze_Protected_Body): Freeze previous contracts.
207 (Analyze_Task_Body): Freeze previous contracts.
208 * sem_prag.adb: Comment reformatting.
210 2017-11-09 Bob Duff <duff@adacore.com>
212 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
213 Export this so users can use it without importing
214 System.Tasking.Utilities.
215 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
216 that fails when Make_Independent is called on a user task.
217 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
218 capitalization style ((style) bad casing of "Master_of_Task").
220 2017-11-09 Ed Schonberg <schonberg@adacore.com>
222 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
223 uninitialized variable uncovered by Codepeer.
225 2017-11-09 Arnaud Charlet <charlet@adacore.com>
227 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
229 2017-11-09 Javier Miranda <miranda@adacore.com>
231 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
232 (Static_Dispatch_Tables): Minor rewording.
233 * gnat_rm.texi: Regenerate.
235 2017-11-09 Justin Squirek <squirek@adacore.com>
237 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
238 use_clauses within instances.
239 (Use_One_Package): Add condition to check for "hidden" open scopes to
240 avoid skipping over packages that have not been properly installed even
241 though they are visible.
243 2017-11-09 Ed Schonberg <schonberg@adacore.com>
245 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
246 private operation of a protected type, when the type has no visible
249 2017-11-09 Javier Miranda <miranda@adacore.com>
251 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
252 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
255 2017-11-09 Bob Duff <duff@adacore.com>
257 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
258 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
259 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
262 2017-11-09 Yannick Moy <moy@adacore.com>
264 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
267 2017-11-09 Pascal Obry <obry@adacore.com>
269 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
270 only for foreign threads. We initialize the thread handle only if not
271 yet initialized. This happens in Enter_Task for foreign threads only.
272 But for native threads (Ada tasking) we do want to keep the real
273 handle (from Create_Task) to be able to free the corresponding
274 resources in Finalize_TCB (CloseHandle).
276 2017-11-09 Yannick Moy <moy@adacore.com>
278 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
280 (Error_Attr_P): Fix name in pragma No_Return.
281 (Unexpected_Argument): Add pragma No_Return.
282 (Placement_Error): Add pragma No_Return.
284 2017-11-09 Javier Miranda <miranda@adacore.com>
286 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
287 dispatch table is statically built.
288 (Make_DT): Declare constant the Interface_Table object associated with
289 an statically built dispatch table. For this purpose the Offset_To_Top
290 value of each interface is computed using the dummy object.
291 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
292 the Offset_To_Top field of secondary dispatch tables when the dispatch
293 table is statically built.
294 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
295 when the dispatch table is statically built.
296 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
297 Document the new GNAT restriction Static_Dispatch_Tables.
298 * gnat_rm.texi: Regenerate.
300 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
302 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
303 to avoid a dormant bug.
305 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
307 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
308 as such capability is not available on the OS.
309 * link.c: Make sure linker options for QNX are correct.
310 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
311 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
312 in particular a workaround with locks priority ceiling where a higher
313 priority task is allowed to lock a lower ceiling priority lock. This
314 also fixes the scheduling of FIFO tasks when the priority of a task is
316 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
318 2017-11-09 Yannick Moy <moy@adacore.com>
320 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
322 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
324 * namet.adb (Copy_One_Character): Add assumption for static analysis,
325 as knowledge that Hex(2) is in the range 0..255 is too complex for
327 (Finalize): Add assumption for static analysis, as the fact that there
328 are symbols in the table depends on a global invariant at this point in
330 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
331 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
334 2017-11-09 Javier Miranda <miranda@adacore.com>
336 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
337 * exp_disp.adb (Building_Static_DT): Check restriction.
338 (Building_Static_Secondary_DT): Check restriction.
339 (Make_DT): Initialize the HT_Link to No_Tag.
340 * opt.ads (Static_Dispatch_Tables): Rename flag...
341 (Building_Static_Dispatch_Tables): ... into this. This will avoid
342 conflict with the restriction name.
343 * gnat1drv.adb: Update.
344 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
345 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
347 2017-11-09 Pascal Obry <obry@adacore.com>
349 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
352 2017-11-09 Yannick Moy <moy@adacore.com>
354 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
355 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
356 use. Default initialize Hi, Lo.
357 (Selected_Range_Checks): Retype Num_Checks more precisely.
358 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
360 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
362 (Process_Postconditions): Mark parameter Stmts as Unmodified.
363 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
364 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
365 (Expand_Concatenate): Default initialize High_Bound.
366 (Optimize_Length_Comparison): Default initialize Ent, Index.
367 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
369 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
371 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
372 remove pragma Warnings(Off).
373 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
374 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
375 * freeze.adb (Check_Component_Storage_Order): Default initialize
376 Comp_Byte_Aligned rather than silencing messages with pragma
377 Warnings(Off), which does not work for CodePeer initialization
378 messages, and given that here the possible read of an unitialized value
379 depends on a proper use of parameters by the caller.
380 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
381 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
382 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
384 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
385 pragma Warnings(Off).
386 (Analyze_Case_Expression): Rescope checking block within branch where
387 Others_Present is set by the call to Check_Choices.
388 * sem_ch5.adb (Analyze_Assignment): Default initialize
390 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
391 and restructure code to defend against previous errors, so that, in
392 that case, control does not flow to the elsif condition which read an
393 uninitialized Obj_Decl.
394 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
395 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
396 which seem to be left uninitialized and possibly read in some cases.
397 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
398 precisely. This requires to exchange the test for exiting in case of
399 too many positions and the increment to Position, inside the loop.
400 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
401 which cannot be read uninitialized, but the reasons for that are quite
403 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
404 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
406 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
407 and test for presence of non-null Opnd_Type before testing its scope,
408 in a test which would read its value uninitialized, and is very rarely
409 exercized (it depends on the presence of an extension of System).
410 * sem_spark.ads: Update comment to fix name of main analysis procedure.
411 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
413 * set_targ.adb (FailN): Mark procedure with No_Return.
414 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
415 initialize all array Options to white space, as there is already code
416 doing the same for the remaining positions in Options at the end of the
419 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
421 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
422 generic instantiations either.
424 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
426 * sem_prag.adb (Analyze_Part_Of): Reword error message.
427 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
428 SPARK_Mode appears with an illegal mode, treat this as a non-existent
431 2017-11-09 Ed Schonberg <schonberg@adacore.com>
433 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
434 a limited view of a type T declared in unit U1, when the function is
435 declared in another unit U2 and the call appears in a procedure within
438 2017-11-09 Justin Squirek <squirek@adacore.com>
440 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
441 when processing generic instances.
443 2017-11-09 Bob Duff <duff@adacore.com>
445 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
446 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
447 objects can have those special values. Valid_Name_Id could usefully be
448 used all over the compiler front end, but that's too much trouble for
449 now. If we did that, we might want to rename:
450 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
451 For parameters of type Valid_Name_Id, remove some redundant tests,
452 including the ones found by CodePeer. Use Is_Valid_Name instead of
453 membership test when appropriate.
454 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
455 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
456 "in Error_Name_Or_No_Name".
457 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
458 Error_Name_Or_No_Name".
460 2017-11-09 Arnaud Charlet <charlet@adacore.com>
462 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
463 mode here unless -gnateC is specified.
464 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
467 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
469 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
470 part of the ALI writing; they are now processed directly from memory
471 when requested by the backend.
472 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
473 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
474 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
475 (Add_SPARK_File): Remove.
476 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
477 that are trivially uninteresting to the SPARK backend.
478 * spark_xrefs.ads: Remove code that is no longer needed.
479 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
481 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
483 * sem_elab.adb: Update the documentation on adding a new elaboration
484 schenario. Add new hash table Recorded_Top_Level_Scenarios.
485 (Is_Check_Emitting_Scenario): Removed.
486 (Is_Recorded_Top_Level_Scenario): New routine.
487 (Kill_Elaboration_Scenario): Reimplemented.
488 (Record_Elaboration_Scenario): Mark the scenario as recorded.
489 (Set_Is_Recorded_Top_Level_Scenario): New routine.
490 (Update_Elaboration_Scenario): Reimplemented.
491 * sinfo.adb (Is_Recorded_Scenario): Removed.
492 (Set_Is_Recorded_Scenario): Removed.
493 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
494 occurrences in nodes.
495 (Is_Recorded_Scenario): Removed along with pragma Inline.
496 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
498 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
500 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
503 2017-11-09 Justin Squirek <squirek@adacore.com>
505 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
506 to the allocation of an anonymous access-to-controlled object.
508 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
510 * sigtramp-qnx.c: Fix obvious typo.
512 2017-11-09 Doug Rupp <rupp@adacore.com>
514 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
516 2017-11-09 Ed Schonberg <schonberg@adacore.com>
518 * sem_res.adb (Resolve): If expression is an entity whose type has
519 implicit dereference, generate reference to it, because no reference is
520 generated for an overloaded entity during analysis, given that its
521 identity may not be known.
523 2017-11-09 Javier Miranda <miranda@adacore.com>
525 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
526 offset-to-top field by addition.
527 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
529 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
530 return a negative offset-to-top value.
531 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
532 Set_Static_Offset_To_Top passing a negative offet-to-top value;
533 initialize also the offset-to-top field with a negative offset.
534 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
535 an addition since the offset-to-top field is now a negative value.
536 (Displace): Displace the pointer to the object means of a substraction
537 since it is now a negative value.
538 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
539 means of a substraction since it is now a negative value.
541 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
543 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
544 before Errout.Output_Messages also in the case of compilation errors.
546 2017-11-09 Javier Miranda <miranda@adacore.com>
548 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
549 the Class Level): Fix error interfacing with C strings.
550 * gnat_ugn.texi: Regenerate.
552 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
554 * system-qnx-aarch64.ads: Fix the priority constants.
555 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
557 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
558 corresponds to an idle priority on QNX.
560 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
562 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
565 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
567 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
568 in expression funtions that are expanded into variables.
570 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
572 * sem_util.adb: Minor whitespace cleanup.
574 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
576 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
577 s-taprop version rather than a custom one.
578 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
580 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
582 * lib-xref.ads, lib-xref-spark_specific.adb
583 (Traverse_Compilation_Unit): Move declaration to package body.
585 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
587 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
588 the type of the renaming from its defining entity, rather then the
589 subtype mark as there may not be a subtype mark.
591 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
593 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
594 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
595 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
596 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
597 terminals.c: Initial port of GNAT for aarch64-qnx
599 2017-11-08 Elisa Barboni <barboni@adacore.com>
601 * exp_util.adb (Find_DIC_Type): Move...
602 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
604 2017-11-08 Justin Squirek <squirek@adacore.com>
606 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
607 the owner and corresponding coextension.
609 2017-11-08 Ed Schonberg <schonberg@adacore.com>
611 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
612 following separate procedures.
613 (Resolve_Delta_Array_Aggregate): Previous code form
614 Resolve_Delta_Aggregate.
615 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
616 ARG decisions on the legality rules for delta aggregates for records:
617 in the case of a variant record, components from different variants
618 cannot be specified in the delta aggregate, and this must be checked
621 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
623 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
624 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
627 2017-11-08 Gary Dismukes <dismukes@adacore.com>
629 * sem_ch4.adb: Minor typo fix.
631 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
633 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
634 Spec_Scope_Num components.
635 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
636 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
638 (Collect_SPARK_Xrefs): Skip setting proper values of removed
641 2017-11-08 Gary Dismukes <dismukes@adacore.com>
643 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
644 name is a discriminant in check for unconditional accessibility
645 violation within instances.
647 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
649 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
650 for constants (with variable input).
651 (Is_Constant_Object_Without_Variable_Input): Remove.
653 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
655 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
657 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
659 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
661 (dspark): Remove hardcoded table bound.
663 2017-11-08 Ed Schonberg <schonberg@adacore.com>
665 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
666 the type of the base of the construct to determine the type (or
667 candidate interpretations) of the delta aggregate. This allows the
668 construct to appear in a context that expects a private extension.
669 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
672 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
674 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
675 with Entity_Id of the reference.
676 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
677 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
678 reference, not the file and scope indices.
680 2017-11-08 Arnaud Charlet <charlet@adacore.com>
682 * errout.ads (Current_Node): New.
683 * errout.adb (Error_Msg): Use Current_Node.
684 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
686 * style.adb: Call Error_Msg_N when possible.
688 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
690 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
692 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
693 the Scope_Id record component.
695 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
697 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
698 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
699 SPARK_File_Record components.
700 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
701 representation of files/units.
703 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
705 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
706 Remove Inside_Stubs parameter.
708 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
710 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
711 represented by Entity_Id.
712 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
713 represented by Entity_Id; this information is not repeated as
715 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
716 Name_Of_Heap_Variable.
717 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
719 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
720 scope and xrefs tables to above changes in data types.
722 2017-11-08 Justin Squirek <squirek@adacore.com>
724 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
725 primitives of generic actuals.
726 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
727 base type clauses as per ARM 8.4 (8.2/3).
729 2017-11-08 Ed Schonberg <schonberg@adacore.com>
731 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
732 categorization dependency of the body, as is done for non-generic
734 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
735 through declarations (Simple optimization, no behavior change).
737 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
739 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
740 (SPARK_Scope_Record): Remove inessential components.
741 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
743 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
744 removed record components.
745 (Add_SPARK_Xrefs): Remove setting of removed record components.
747 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
749 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
752 2017-11-08 Javier Miranda <miranda@adacore.com>
754 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
755 functionality of this routine to handle multiple levels of derivations.
757 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
759 * einfo.adb: Elist36 is now used as Nested_Scenarios.
760 (Nested_Scenarios): New routine.
761 (Set_Nested_Scenarios): New routine.
762 (Write_Field36_Name): New routine.
763 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
765 (Nested_Scenarios): New routine along with pragma Inline.
766 (Set_Nested_Scenarios): New routine along with pragma Inline.
767 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
768 (Process_Nested_Scenarios): New routine.
769 (Traverse_Body): When a subprogram body is traversed for the first
770 time, find, save, and process all suitable scenarios found within.
771 Subsequent traversals of the same subprogram body utilize the saved
774 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
776 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
777 protected operations.
778 (Add_SPARK_Xrefs): Simplify detection of empty entities.
779 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
780 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
781 reading and testing SPARK cross-references stored in the ALI files.
782 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
783 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
785 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
786 with description of the SPARK xrefs ALI format.
787 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
788 and put_spark_refs.o.
790 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
792 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
793 when the associated access type is subject to pragma
794 No_Heap_Finalization.
795 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
796 designated type in case it comes from a limited withed unit.
798 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
800 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
801 SPARK-related flags. Add ??? comment.
802 * exp_util.adb (Insert_Actions): Add an entry for node
803 N_Variable_Reference_Marker.
804 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
805 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
806 and record a variable reference marker for the current name.
807 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
808 a variable reference marker for the current name.
809 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
810 (Extract_Variable_Reference_Attributes): Reimplemented.
811 (Info_Scenario): Add output for variable references and remove output
813 (Info_Variable_Read): Removed.
814 (Info_Variable_Reference): New routine.
815 (Is_Suitable_Scenario): Variable references are now suitable scenarios
816 while variable reads are not.
817 (Output_Active_Scenarios): Add output for variable references and
818 remove output for variable reads.
819 (Output_Variable_Read): Removed.
820 (Output_Variable_Reference): New routine.
821 (Process_Variable_Read): Removed.
822 (Process_Variable_Reference): New routine.
823 (Process_Variable_Reference_Read): New routine.
824 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
825 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
826 marker for the current actual.
827 * sem_spark.adb (Check_Node): Add an entry for node
828 N_Variable_Reference_Marker.
829 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
830 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
831 * sinfo.adb (Is_Read): New routine.
832 (Is_Write): New routine.
833 (Target): Updated to handle variable reference markers.
834 (Set_Is_Read): New routine.
835 (Set_Is_Write): New routine.
836 (Set_Target): Updated to handle variable reference markers.
837 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
838 occurrences in nodes. Update attribute Target. Add new node
839 kind N_Variable_Reference_Marker.
840 (Is_Read): New routine along with pragma Inline.
841 (Is_Write): New routine along with pragma Inline.
842 (Set_Is_Read): New routine along with pragma Inline.
843 (Set_Is_Write): New routine along with pragma Inline.
844 * sprint.adb (Sprint_Node_Actual): Add an entry for node
845 N_Variable_Reference_Marker.
847 2017-11-08 Arnaud Charlet <charlet@adacore.com>
849 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
852 2017-11-08 Yannick Moy <moy@adacore.com>
854 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
855 about unused use-type or use-package clauses inside inlined bodies.
857 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
859 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
860 In_Partial_Fin along with a comment on its usage. Do not guarantee the
861 prior elaboration of a unit when the need came from a partial
862 finalization context.
863 (In_Initialization_Context): Relocated to Process_Call.
864 (Is_Partial_Finalization_Proc): New routine.
865 (Process_Access): Add new parameter In_Partial_Fin along with a comment
867 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
868 a comment on its usage.
869 (Process_Activation_Conditional_ABE_Impl): Add new parameter
870 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
871 diagnostics when the activation occurs in a partial finalization
873 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
874 In_Partial_Fin along with a comment on its usage.
875 (Process_Call): Add new parameter In_Partial_Fin along with a comment
876 on its usage. A call is within a partial finalization context when it
877 targets a finalizer or primitive [Deep_]Finalize, and the call appears
878 in initialization actions. Pass this information down to the recursive
879 steps of the Processing phase.
880 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
881 comment on its usage. Remove the guard which suppresses the generation
882 of implicit Elaborate[_All] pragmas. This is now done in
883 Ensure_Prior_Elaboration.
884 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
885 with a comment on its usage. Do not emit any ABE diagnostics when the
886 call occurs in a partial finalization context.
887 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
888 comment on its usage.
889 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
890 comment on its usage.
891 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
892 with a comment on its usage.
893 (Process_Instantiation_Conditional_ABE): Add new parameter
894 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
895 diagnostics when the instantiation occurs in a partial finalization
897 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
898 with a comment on its usage.
899 (Process_Scenario): Add new parameter In_Partial_Fin along with a
900 comment on its usage.
901 (Process_Single_Activation): Add new parameter In_Partial_Fin along
902 with a comment on its usage.
903 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
906 2017-11-08 Arnaud Charlet <charlet@adacore.com>
908 * sem_ch13.adb: Add optional parameter to Error_Msg.
910 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
912 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
913 for the Interfaces.* hierarchy as longer unit names are now allowed.
915 2017-11-08 Arnaud Charlet <charlet@adacore.com>
917 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
918 subprogram as well. Support more cases of entities.
919 (Append_Entity_Name): Add some defensive code.
921 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
923 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
925 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
928 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
930 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
932 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
934 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
936 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
937 (convert): Do not use an unchecked conversion for converting from a
938 type to another type padding it.
940 2017-10-20 Doug Rupp <rupp@adacore.com>
942 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
943 needed for using monotonic clock.
944 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
946 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
947 out monotonic clock related functions body.
948 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
949 Compute_Deadline): Move to...
950 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
952 2017-10-20 Ed Schonberg <schonberg@adacore.com>
954 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
955 case where the controlling formal is an anonymous access to interface
957 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
958 access type, handle properly the the constructed dereference that
959 designates the object used in the rewritten synchronized call.
960 (Parameter_Block_Pack): If the type of the actual is by-copy, its
961 generated declaration in the parameter block does not need an
962 initialization even if the type is a null-excluding access type,
963 because it will be initialized with the value of the actual later on.
964 (Parameter_Block_Pack): Do not add controlling actual to parameter
965 block when its type is by-copy.
967 2017-10-20 Justin Squirek <squirek@adacore.com>
969 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
970 scope stack traversal into the context clause.
972 2017-10-20 Bob Duff <duff@adacore.com>
974 * sinfo.ads: Fix a comment typo.
976 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
978 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
979 warning against usage in conjunction with -gnatn.
980 (-fdump-xref): Delete entry.
981 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
983 * gnat_ugn.texi: Regenerate.
985 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
987 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
990 2017-10-20 Yannick Moy <moy@adacore.com>
992 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
993 compare a dimensioned expression with a literal.
994 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
996 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
997 dimensionality system in GNAT.
998 * gnat_ugn.texi: Regenerate.
1000 2017-10-20 Yannick Moy <moy@adacore.com>
1002 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1003 inadequate silencing of errors.
1004 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1005 checking the subprogram body generated from an expression function,
1006 when this is done as part of the preanalysis done on expression
1007 functions, as the subprogram body may not yet be attached in the AST.
1008 The error if any will be issued later during the analysis of the body.
1009 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1011 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1013 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1014 warning on ineffective use clause.
1016 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1018 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1019 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1020 to issue the warning on the absence of local raise.
1021 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1022 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1023 absence of local raise.
1024 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1025 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1026 where a scenario could give rise to raising Program_Error.
1027 * sem_elab.adb: Typo fixes.
1028 * fe.h (Warn_If_No_Local_Raise): Declare.
1029 * gcc-interface/gigi.h (get_exception_label): Change return type.
1030 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1031 simple vector of Entity_Id.
1032 (gnu_storage_error_label_stack): Likewise.
1033 (gnu_program_error_label_stack): Likewise.
1034 (gigi): Adjust to above changes.
1035 (Raise_Error_to_gnu): Likewise.
1036 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1037 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1038 (N_Push_Storage_Error_Label): Likewise.
1039 (N_Push_Program_Error_Label): Likewise.
1040 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1041 a warning on the absence of local raise.
1042 (N_Pop_Storage_Error_Label): Likewise.
1043 (N_Pop_Program_Error_Label): Likewise.
1044 (push_exception_label_stack): Delete.
1045 (get_exception_label): Change return type to Entity_Id and adjust.
1046 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1047 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1048 (build_call_raise): Adjust calls to get_exception_label and also
1050 (build_call_raise_column): Likewise.
1051 (build_call_raise_range): Likewise.
1052 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1053 Document actual default behavior.
1055 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1057 * einfo.ads: Minor consistent punctuation in comment. All numbered
1058 items in the comment of Is_Internal are now terminated with a period.
1060 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1062 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1065 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1067 * sem_type.adb (In_Generic_Actual): Simplified.
1069 2017-10-20 Justin Squirek <squirek@adacore.com>
1071 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1072 verify a renaming exists for a generic formal before comparing it to
1073 the actual as defaulted formals will not have a renamed_object.
1075 2017-10-20 Javier Miranda <miranda@adacore.com>
1077 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1078 N_Block_Statement nodes.
1080 2017-10-20 Bob Duff <duff@adacore.com>
1082 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1083 component of an array aggregate if it is initialized by a
1084 build-in-place function call.
1085 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1086 bip for nonlimited types.
1087 * debug.adb: Document -gnatd.9.
1089 2017-10-20 Bob Duff <duff@adacore.com>
1091 * sem_ch12.adb: Remove redundant setting of Parent.
1093 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1095 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1096 of the operands is a string literal.
1098 2017-10-20 Bob Duff <duff@adacore.com>
1100 * einfo.ads: Comment fix.
1102 2017-10-20 Clement Fumex <fumex@adacore.com>
1104 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1106 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1108 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1109 non-negative integers when the dimensioned base type is an Integer
1112 2017-10-20 Bob Duff <duff@adacore.com>
1114 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1115 that an allocator came from a b-i-p return statement.
1116 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1117 object of a nonlimited build-in-place function call.
1118 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1119 Alloc_For_BIP_Return flag on generated allocators.
1120 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1121 If the N_Assignment_Statement has been transformed into something else,
1122 then Should_Transform_BIP_Assignment won't work.
1123 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1124 "Remove Adjust if we're building the return object of an extended
1125 return statement in place." Back out that part of the change, because
1126 the Alloc_For_BIP_Return flag is now used for that.
1128 2017-10-19 Bob Duff <duff@adacore.com>
1130 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1131 should be "T". Handle case of a subtype of a class-wide type.
1133 2017-10-19 Bob Duff <duff@adacore.com>
1135 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1136 which node kinds can legitimately be ignored, and raise Program_Error
1139 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
1141 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1142 instantiation that acts as a compilation unit.
1143 (Find_Code_Unit): Reimplemented.
1144 (Find_Top_Unit): Reimplemented.
1145 (Find_Unit_Entity): New routine.
1146 (Process_Instantiation_SPARK): Correct the elaboration requirement a
1147 package instantiation imposes on a unit.
1149 2017-10-19 Bob Duff <duff@adacore.com>
1151 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1152 for a narrow set of controlled types.
1154 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1156 * sinput.ads (Line_Start): Add pragma Inline.
1157 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1159 2017-10-19 Bob Duff <duff@adacore.com>
1161 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1162 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1163 build-in-place function call so that the temp is declared in the right
1166 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
1168 * gcc-interface/misc.c (gnat_tree_size): Move around.
1170 * gcc-interface/utils.c (max_size): Deal with SSA names.
1172 2017-10-17 Jakub Jelinek <jakub@redhat.com>
1174 * gcc-interface/misc.c (gnat_tree_size): New function.
1175 (LANG_HOOKS_TREE_SIZE): Redefine.
1177 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1179 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1180 Remote_Call_Interface is not a suitable preelaboratd context when the
1181 call appears in the package body.
1183 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1185 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1186 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
1187 alignment for consistency. If Align is non-zero, use the minimum of
1188 Align and M for the alignment.
1189 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1190 setting the alignment directly.
1192 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1194 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1195 optional string in an Assert pragma until the expansion of the pragma
1196 has rewritten it as a conditional statement, so that the string
1197 argument is only evaluaed if the assertion fails. This is mandated by
1200 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1202 * debug.adb: Switch -gnatd.v and associated flag are now used to
1203 enforce the SPARK rules for elaboration in SPARK code.
1204 * sem_elab.adb: Describe switch -gnatd.v.
1205 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1206 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1208 (Process_Variable_Assignment): Clarify why variable assignments are
1209 processed reglardless of whether -gnatd.v is in effect.
1210 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1211 sections on elaboration code and compilation switches.
1212 * gnat_ugn.texi: Regenerate.
1214 2017-10-14 Gary Dismukes <dismukes@adacore.com>
1216 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1217 sem_warn.adb: Minor reformattings.
1219 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1221 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1222 for reverse iteration over formal containers.
1223 * gnat_rm.texi: Regenerate.
1225 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1227 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1228 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1229 (Ensure_Static_Prior_Elaboration): Renamed to
1230 Ensure_Prior_Elaboration_Static for consistency reasons.
1231 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1232 reflect its new purpose.
1233 (Is_Initialized): New routine.
1234 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1235 in order to reflect its new purpose.
1236 (Is_Variable_Read): New routine.
1237 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1238 to reflect its new purpose.
1239 (Process_Variable_Assignment): This routine now acts as a top level
1240 dispatcher for variable assignments.
1241 (Process_Variable_Assignment_Ada): New routine.
1242 (Process_Variable_Assignment_SPARK): New routine.
1243 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1244 to reflects its new purpose. A reference to a variable is now suitable
1245 for ABE processing only when it is a read. The logic in the routine now
1246 reflects the latest SPARK elaboration rules.
1248 2017-10-14 Justin Squirek <squirek@adacore.com>
1250 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
1251 triggers marking on formal subprograms.
1253 2017-10-14 Javier Miranda <miranda@adacore.com>
1255 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
1256 renamings of objects that come from the sources.
1258 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1260 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
1261 parameter and set the alignment of the type to Align.
1262 (Copy_Float_Type): Adjust call to Build_Float_Type.
1263 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
1264 call to Build_Float_Type and do not set RM_Size and Alignment.
1266 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1268 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
1269 GNATRTL_NONTASKING_OBJ.
1271 2017-10-14 Bob Duff <duff@adacore.com>
1273 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
1274 enabling b-i-p for nonlimited controlled types (but disabled).
1276 2017-10-14 Justin Squirek <squirek@adacore.com>
1278 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
1279 Has_Warnings_Off with Warnings_Off.
1281 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
1283 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
1285 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1287 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1288 enclosing package at the end of the visible declarations.
1289 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
1290 an initialization item which is undefined due to some illegality.
1292 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
1294 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
1295 within each unit that require a default-sized primary and secondary
1296 stack to be generated by the binder.
1297 (Scan_ALI): Scan new 'T' lines.
1298 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
1299 * bindgen.adb (Gen_Output_File): Count the number of default-sized
1300 stacks within the closure that are to be created by the binder.
1301 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
1302 stacks and record these in System.Secodnary_Stack.
1303 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
1304 closure of the program being bound.
1305 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
1306 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
1307 (Expand_N_Object_Declaration): Count the number of default-sized stacks
1308 used by task objects contained within the object whose declaration is
1309 being expanded. Only performed when either the restrictions
1310 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
1312 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
1313 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
1314 the expansion of a task type if the size of the stack is known at
1315 run-time and the restrictions No_Implicit_Heap_Allocations or
1316 No_Implicit_Task_Allocations are in effect.
1317 (Make_Task_Create_Call): If using a restricted profile provide
1318 secondary stack parameter: either the statically created stack or null.
1319 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
1320 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
1321 Unit_Record initialization expressions.
1322 * lib-writ.adb (Add_Preprocessing_Dependency,
1323 Ensure_System_Dependency): Include Primary_Stack_Count and
1324 Sec_Stack_Count in Unit_Record initialization expression.
1325 (Write_ALI): Write T lines.
1326 (Write_Unit_Information): Do not output 'T' lines if there are no
1327 stacks for the binder to generate.
1328 * lib-writ.ads: Updated library information documentation to include
1330 * lib.adb (Increment_Primary_Stack_Count): New routine.
1331 (Increment_Sec_Stack_Count): New routine.
1332 (Primary_Stack_Count): New routine.
1333 (Sec_Stack_Count): New routine.
1334 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
1335 Unit_Record and updated documentation.
1336 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
1337 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
1338 (Primary_Stack_Count): New routine along with pragma Inline.
1339 (Sec_Stack_Count): New routine along with pragma Inline.
1340 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
1341 redefined. New flag Default_Sec_Stack_Size and
1342 Quantity_Of_Default_Size_Sec_Stacks.
1343 * rtfinal.c Fixed erroneous comment.
1344 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
1345 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
1346 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
1347 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
1348 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
1349 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
1350 (Set_Sec_Stack_Addr): Removed routine.
1351 (Get_Sec_Stack): New routine.
1352 (Set_Sec_Stack): New routine.
1353 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
1354 reflect new procedure and global names.
1355 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
1356 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
1357 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
1358 parameter profile to allow the secondary stack size to be specified.
1359 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
1360 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
1361 call to remove Secondary_Stack_Size reference. Add secondary stack
1362 address and size to SSL.Create_TSD call.
1363 (Task_Wrapper): Remove secondary stack creation.
1364 * libgnarl/s-tarest.ads (Create_Restricted_Task,
1365 Create_Restricted_Task_Sequential): Update parameter profile to include
1366 Sec_Stack_Address and clarify the Size parameter.
1367 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
1368 from profile and body.
1369 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
1370 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
1372 (Initialize_ATCB): Update the parameter profile to remove
1373 Secondary_Stack_Size.
1374 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
1375 call to Initialize_ATCB. Add secondary stack address and size to
1376 SSL.Create_TSD call, and catch any storage exception from the call.
1377 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
1378 new subprogram and component names.
1379 (Task_Wrapper): Remove secondary stack creation.
1380 (Vulnerable_Complete_Master): Update to reflect TSD changes.
1381 * libgnarl/s-tassta.ads: Reformat comments.
1382 (Create_Task): Update parameter profile.
1383 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
1384 profile to include secondary stack size. Remove secondary size
1385 parameter from Initialize_ATCB call and add it to Create_TSD call.
1386 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
1387 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
1388 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
1389 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
1390 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
1391 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
1393 (Default_Sec_Stack_Size): New routine.
1394 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
1396 * libgnat/s-soflin.adb: Removed unused with-clauses. With
1397 System.Soft_Links.Initialize to initialize non-tasking TSD.
1398 (Create_TSD): Update parameter profile. Initialize the TSD and
1399 unconditionally call SS_Init.
1400 (Destroy_TSD): Update SST.SS_Free call.
1401 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
1402 Set_Sec_Stack_Addr_Soft): Remove routines.
1403 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
1404 Set_Sec_Stack_Soft): Add routines.
1405 (NT_TSD): Move to private part of package specification.
1406 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
1407 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
1408 objects to *_Sec_Stack_*. TSD: removed warning suppression and
1409 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
1410 (Create_TSD): Update parameter profile.
1411 (NT_TSD): Move to private section from body.
1412 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
1413 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
1414 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
1416 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
1417 (Thread_Body_Enter): Update parameter profile and body to adapt to new
1418 System.Secondary_Stack.
1419 (Init_RTS): Update body for new System.Soft_Links names.
1420 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
1423 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1425 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
1426 operating on trees as wide_ints.
1428 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1430 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
1431 as a scoping construct when it is byproduct of exception handling.
1433 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1435 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
1436 semantic field Target of node N_Call_Marker.
1438 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1440 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
1441 attempts to copy a limited value, when the allocator is the expression
1442 in an expression function.
1444 2017-10-09 Joel Brobecker <brobecker@adacore.com>
1446 * doc/share/conf.py: Tell the style checker that this is a Python
1447 fragment, and therefore that pyflakes should not be run to validate
1450 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
1452 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
1453 (Is_Entity_Name): Likewise.
1454 (Is_String_Type): Likewise.
1455 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
1456 and remove useless comparisons on the base types.
1457 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
1458 on T2. Always test Is_Private_Type before Full_View_Covers.
1460 2017-10-09 Bob Duff <duff@adacore.com>
1462 * exp_ch4.adb: Minor refactoring.
1464 2017-10-09 Javier Miranda <miranda@adacore.com>
1466 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
1469 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1471 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
1472 are verified only in the static model.
1474 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1476 * sem_ch5.adb (Analyze_Iterator_Specification,
1477 Check_Reverse_Iteration): Check that the domain of iteration supports
1478 reverse iteration when it is a formal container. This requires the
1479 presence of a Previous primitive in the Iterable aspect.
1480 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
1481 primitives Last and Previous to support reverse iteration over formal
1483 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
1484 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
1485 for reverse iteration using primitives Last and Previous in generated
1488 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1490 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
1491 of the Defining_Program_Unit_Name, which is an identifier, in order to
1492 construct the string for the fully qualified name.
1494 2017-10-09 Justin Squirek <squirek@adacore.com>
1496 * sem_ch3.adb: Rename Uses_Unseen_Priv into
1497 Contains_Lib_Incomplete_Type.
1499 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1501 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
1502 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
1503 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
1504 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
1505 sem_ch10.adb, par-ch8.adb: Minor reformatting.
1507 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1509 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
1510 in the static model.
1511 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
1512 in the static model.
1513 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
1516 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1518 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
1519 expressions when the enclosing scope is a subprogram body and the next
1520 declaration is a body that freezes entities previously declared in the
1523 2017-10-09 Justin Squirek <squirek@adacore.com>
1525 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
1526 ghost packages and living packages in use clauses.
1527 (Use_One_Type, Note_Redundant_Use): Correct warning messages
1529 2017-10-09 Justin Squirek <squirek@adacore.com>
1531 * osint.ads: Document new parameter FD for Read_Source_File.
1533 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1535 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
1536 which the predicate check applies is tagged, convert the expression to
1537 that type. This is in most cases a no-op, but is relevant if the
1538 expression is clas-swide, because the predicate function being invoked
1539 is not a primitive of the type and cannot take a class-wide actual.
1541 2017-10-09 Gary Dismukes <dismukes@adacore.com>
1543 * exp_disp.adb: Minor reformatting.
1545 2017-10-09 Arnaud Charlet <charlet@adacore.com>
1547 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
1549 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1551 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
1553 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
1555 2017-10-09 Bob Duff <duff@adacore.com>
1557 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
1558 immediately if the call has already been processed (by a previous call
1559 to Make_Build_In_Place_Call_In_Anonymous_Context).
1560 * sem_elab.adb: Minor typo fixes.
1562 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1564 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
1565 predicate, do not replace an identifier that matches the type if the
1566 identifier is a selector in a selected component, because this
1567 indicates a reference to some homograph of the type itself, and not to
1568 the current occurence in the predicate.
1570 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
1572 * repinfo.adb (List_Record_Layout): Tweak formatting.
1573 (Write_Val): Remove superfluous spaces in back-end layout mode.
1575 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1577 * sem_res.adb (Property_Error): Remove.
1578 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
1579 current wording of the rule.
1581 2017-10-09 Justin Squirek <squirek@adacore.com>
1583 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
1584 before analyzing a given scope due to an expression function.
1585 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
1587 2017-10-09 Bob Duff <duff@adacore.com>
1589 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
1590 Defining_Identifier (Obj_Decl) in two places, because it might have
1592 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
1593 involving 'Input on (not visibly) derived types.
1595 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
1597 * atree.adb: Add new soft link Rewriting_Proc.
1598 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
1599 (Set_Rewriting_Proc): New routine.
1600 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
1601 (Set_Rewriting_Proc): New routine.
1602 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
1603 for *E*laboration flag to maintain consistency with other elaboration
1604 flag generating subprograms.
1605 * debug.adb: Document the new usage of flag -gnatdL.
1606 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
1607 as Protected_Subprogram. Flag148 is now used as
1608 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
1609 Is_Initial_Condition_Procedure.
1610 (Is_Elaboration_Checks_OK_Id): New routine.
1611 (Is_Initial_Condition_Procedure): New routine.
1612 (Protected_Subprogram): New routine.
1613 (Receiving_Entry): New routine.
1614 (SPARK_Pragma): Update assertion.
1615 (SPARK_Pragma_Inherited): Update assertion.
1616 (Suppress_Elaboration_Warnings): Removed.
1617 (Set_Is_Elaboration_Checks_OK_Id): New routine.
1618 (Set_Is_Initial_Condition_Procedure): New routine.
1619 (Set_Protected_Subprogram): New routine.
1620 (Set_Receiving_Entry): New routine.
1621 (Set_SPARK_Pragma): Update assertion.
1622 (Set_SPARK_Pragma_Inherited): Update assertion.
1623 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
1624 (Write_Field19_Name): Add output for Receiving_Entry.
1625 (Write_Field39_Name): Add output for Protected_Subprogram.
1626 (Write_Field40_Name): Update the output for SPARK_Pragma.
1627 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
1628 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
1629 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
1630 of various entities.
1631 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
1632 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
1633 (Protected_Subprogram): New routine along with pragma Inline.
1634 (Receiving_Entry): New routine along with pragma Inline.
1635 (Suppress_Elaboration_Warnings): Removed.
1636 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
1638 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
1640 (Set_Protected_Subprogram): New routine along with pragma Inline.
1641 (Set_Receiving_Entry): New routine along with pragma Inline.
1642 (Set_Suppress_Elaboration_Warnings): Removed.
1643 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
1644 consistency with other finalizer generating subprograms.
1645 (Default_Initialize_Object): Mark the block which wraps the call to
1646 finalize as being part of initialization.
1647 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
1649 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
1650 (Next_Suitable_Statement): Update the comment on usage. Skip over call
1651 markers generated by the ABE mechanism.
1652 * exp_ch9.adb (Activation_Call_Loc): New routine.
1653 (Add_Accept): Link the accept procedure to the original entry.
1654 (Build_Protected_Sub_Specification): Link the protected or unprotected
1655 version to the original subprogram.
1656 (Build_Task_Activation_Call): Code cleanup. Use a source location which
1657 is very close to the "begin" or "end" keywords when generating the
1659 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
1660 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
1662 (Expand_SPARK_N_Loop_Statement): New routine.
1663 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
1664 call to the Default_Initial_Condition procedure.
1665 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
1666 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
1668 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
1669 (Insert_Actions): Add processing for N_Call_Marker.
1670 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
1671 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
1672 * frontend.adb: Initialize Sem_Elab. Process all saved top level
1673 elaboration scenarios for ABE issues.
1674 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
1676 * lib.adb (Earlier_In_Extended_Unit): New variant.
1677 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
1678 (Preanalysis_Active): New routine.
1679 * sem.ads (Preanalysis_Active): New routine.
1680 * sem_attr.adb (Analyze_Access_Attribute): Save certain
1681 elaboration-related attributes. Save the scenario for ABE processing.
1682 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
1683 effect. Save certain elaboration-related attributes.
1684 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
1685 attributes. Save the scenario for ABE processing.
1686 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
1687 mode in effect. Save certain elaboration-related attributes.
1688 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
1689 locating the first real statement.
1690 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
1691 certain elaboration-related attributes.
1692 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
1693 elaboration warnings.
1694 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
1695 generated for purposes of wrapping an attribute used as a generic
1697 (Find_Direct_Name): Save certain elaboration-related attributes. Save
1698 the scenario for ABE processing.
1699 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
1700 the scenario for ABE processing.
1701 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
1702 elaboration-related attributes.
1703 (Analyze_Requeue): Save certain elaboration-related attributes. Save
1704 the scenario for ABE processing.
1705 (Analyze_Single_Task_Declaration): Save certain elaboration-related
1707 (Analyze_Task_Type_Declaration): Save certain elaboration-related
1709 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
1710 elaboration-related attributes.
1711 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
1712 effect. Save certain elaboration-related attributes.
1713 (Analyze_Package_Instantiation): Save certain elaboration-related
1714 attributes. Save the scenario for ABE processing. Create completing
1715 bodies in case the instantiation results in a guaranteed ABE.
1716 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
1717 attributes Save the scenario for ABE processing. Create a completing
1718 body in case the instantiation results in a guaranteed ABE.
1719 (Provide_Completing_Bodies): New routine.
1720 * sem_elab.ads: Brand new implementation.
1721 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
1722 Elaborate_Body): Do not suppress elaboration warnings.
1723 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
1725 (Resolve_Call): Save certain elaboration-related attributes. Save the
1726 scenario for ABE processing.
1727 (Resolve_Entity_Name): Do not perform any ABE processing here.
1728 (Resolve_Entry_Call): Inherit certain attributes from the original call.
1729 * sem_util.adb (Begin_Keyword_Location): New routine.
1730 (Defining_Entity): Update the parameter profile. Add processing for
1731 concurrent subunits that are rewritten as null statements.
1732 (End_Keyword_Location): New routine.
1733 (Find_Enclosing_Scope): New routine.
1734 (In_Instance_Visible_Part): Code cleanup.
1735 (In_Subtree): Update the parameter profile. Add new version.
1736 (Is_Preelaborable_Aggregate): New routine.
1737 (Is_Preelaborable_Construct): New routine.
1738 (Mark_Elaboration_Attributes): New routine.
1739 (Scope_Within): Update the parameter profile.
1740 (Scope_Within_Or_Same): Update the parameter profile.
1741 * sem_util.ads (Begin_Keyword_Location): New routine.
1742 (Defining_Entity): Update the parameter profile and the comment on
1744 (End_Keyword_Location): New routine.
1745 (Find_Enclosing_Scope): New routine.
1746 (In_Instance_Visible_Part): Update the parameter profile.
1747 (In_Subtree): Update the parameter profile. Add new version.
1748 (Is_Preelaborable_Aggregate): New routine.
1749 (Is_Preelaborable_Construct): New routine.
1750 (Mark_Elaboration_Attributes): New routine.
1751 (Scope_Within): Update the parameter profile and the comment on usage.
1752 (Scope_Within_Or_Same): Update the parameter profile and the comment on
1754 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
1755 to determine whether a loop has meaningful condition actions.
1756 (Has_Condition_Actions): New routine.
1757 * sinfo.adb (ABE_Is_Certain): Removed.
1758 (Is_Declaration_Level_Node): New routine.
1759 (Is_Dispatching_Call): New routine.
1760 (Is_Elaboration_Checks_OK_Node): New routine.
1761 (Is_Initialization_Block): New routine.
1762 (Is_Known_Guaranteed_ABE): New routine.
1763 (Is_Recorded_Scenario): New routine.
1764 (Is_Source_Call): New routine.
1765 (Is_SPARK_Mode_On_Node): New routine.
1766 (No_Elaboration_Check): Removed.
1767 (Target): New routine.
1768 (Was_Attribute_Reference): New routine.
1769 (Set_ABE_Is_Certain): Removed.
1770 (Set_Is_Declaration_Level_Node): New routine.
1771 (Set_Is_Dispatching_Call): New routine.
1772 (Set_Is_Elaboration_Checks_OK_Node): New routine.
1773 (Set_Is_Initialization_Block): New routine.
1774 (Set_Is_Known_Guaranteed_ABE): New routine.
1775 (Set_Is_Recorded_Scenario): New routine.
1776 (Set_Is_Source_Call): New routine.
1777 (Set_Is_SPARK_Mode_On_Node): New routine.
1778 (Set_No_Elaboration_Check): Removed.
1779 (Set_Target): New routine.
1780 (Set_Was_Attribute_Reference): New routine.
1781 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
1782 Do_Discriminant_Check now utilizes Flag3. Attribute
1783 No_Side_Effect_Removal now utilizes Flag17. Add new node
1784 N_Call_Marker. Update the structure of various nodes.
1785 (ABE_Is_Certain): Removed along with pragma Inline.
1786 (Is_Declaration_Level_Node): New routine along with pragma Inline.
1787 (Is_Dispatching_Call): New routine along with pragma Inline.
1788 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
1789 (Is_Initialization_Block): New routine along with pragma Inline.
1790 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1791 (Is_Recorded_Scenario): New routine along with pragma Inline.
1792 (Is_Source_Call): New routine along with pragma Inline.
1793 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1794 (No_Elaboration_Check): Removed along with pragma Inline.
1795 (Target): New routine along with pragma Inline.
1796 (Was_Attribute_Reference): New routine along with pragma Inline.
1797 (Set_ABE_Is_Certain): Removed along with pragma Inline.
1798 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
1799 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
1800 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
1802 (Set_Is_Initialization_Block): New routine along with pragma Inline.
1803 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
1804 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
1805 (Set_Is_Source_Call): New routine along with pragma Inline.
1806 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
1807 (Set_No_Elaboration_Check): Removed along with pragma Inline.
1808 (Set_Target): New routine along with pragma Inline.
1809 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
1810 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
1812 2017-10-09 Bob Duff <duff@adacore.com>
1814 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
1816 2017-10-09 Bob Duff <duff@adacore.com>
1818 * freeze.ads: Minor comment fixed.
1820 2017-10-09 Bob Duff <duff@adacore.com>
1822 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
1823 care of unchecked conversions in addition to regular conversions. This
1824 takes care of a case where a type is derived from a private untagged
1825 type that is completed by a tagged controlled type.
1827 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1829 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
1830 rewriting a class-wide condition, handle properly the case where the
1831 controlling argument of the operation to which the condition applies is
1832 an access to a tagged type, and the condition includes a dispatching
1833 call with an implicit dereference.
1835 2017-10-09 Bob Duff <duff@adacore.com>
1837 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
1838 the code at the end of this procedure that was setting the type of a
1839 class-wide object to the specific type returned by a function call.
1840 Treat this case as indefinite instead.
1842 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1844 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
1845 Suppress spurious ambiguity error when two traversals of the homonym
1846 chain (first directly, and then through an examination of relevant
1847 interfaces) retrieve the same operation, when other irrelevant homonyms
1848 of the operatioh are also present.
1850 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1852 * sem_util.adb (Object_Access_Level): If the object is the return
1853 statement of an expression function, return the level of the function.
1854 This is relevant when the object involves an implicit conversion
1855 between access types and the expression function is a completion, which
1856 forces the analysis of the expression before rewriting it as a body, so
1857 that freeze nodes can appear in the proper scope.
1859 2017-10-09 Bob Duff <duff@adacore.com>
1861 * atree.adb: Make nnd apply to everything "interesting", including
1862 Rewrite. Remove rrd.
1864 2017-10-09 Javier Miranda <miranda@adacore.com>
1866 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
1867 processing the declaration of the dummy object internally created by
1868 Make_DT to compute the offset to the top of components referencing
1869 secondary dispatch tables.
1870 (Initialize_Tag): Do not initialize the offset-to-top field if it has
1871 been initialized initialized.
1872 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
1873 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
1874 (Make_DT): Create a dummy constant object if we can statically build
1875 secondary dispatch tables.
1876 (Make_Secondary_DT): For statically allocated secondary dispatch tables
1877 use the dummy object to compute the offset-to-top field value by means
1878 of the attribute 'Position.
1880 2017-10-09 Bob Duff <duff@adacore.com>
1882 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
1883 code so if BIPAlloc is not passed in, it will likely raise
1884 Program_Error instead of cause miscellaneous chaos.
1885 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
1886 as for the other Is_B-I-P... functions.
1887 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
1888 aggregate whose ancestor part is a build-in-place call returning a
1889 nonlimited type, transform the assignment to the ancestor part to use a
1891 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
1892 creating an Itype for a library unit entity.
1893 (Check_Initialization): Avoid spurious error message on
1894 internally-generated call.
1895 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
1896 right-hand side is a build-in-place call. This didn't happen when b-i-p
1897 was only for limited types.
1898 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
1899 implies >= Ada 2005.
1900 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
1902 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
1904 2017-10-09 Arnaud Charlet <charlet@adacore.com>
1906 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
1908 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1910 * libgnarl/s-taprob.adb: Minor whitespace fix.
1912 2017-10-09 Bob Duff <duff@adacore.com>
1914 * namet.ads: Minor comment fix.
1916 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
1918 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
1919 just like other program units listed in Ada RM 10.1(1).
1921 2017-10-09 Justin Squirek <squirek@adacore.com>
1923 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
1925 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1927 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
1928 actual for a formal package is an instantiation of a child unit, create
1929 a freeze node for the instance of the parent if it appears in the same
1930 scope and is not frozen yet.
1932 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
1934 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
1935 in-source documentation for tagged types's Offset_To_Top.
1937 2017-10-09 Bob Duff <duff@adacore.com>
1939 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
1940 confusing. Same for N_Loc. Remove assumption that b-i-p implies
1941 limited. This is for the case of a function call that occurs as the
1942 default for a record component.
1943 (Expand_N_Object_Declaration): Deal with the case where expansion has
1944 created an object declaration initialized with something like
1946 * exp_ch3.adb: Minor reformatting.
1948 2017-10-09 Ed Schonberg <schonberg@adacore.com>
1950 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
1951 the attribute is an object, but it may appear within a conversion. The
1952 object itself must be retrieved when generating the range test that
1953 implements the validity check on a scalar type.
1955 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
1958 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
1959 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
1961 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
1962 Pierre-Marie de Rodat <derodat@adacore.com>
1965 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
1966 (time_t): Change from derived type to subtype.
1967 (timeval): Use suseconds_t for tv_usec.
1968 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
1970 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1972 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
1973 handling the form (plus/mult (convert @0) @1).
1975 2017-09-29 Bob Duff <duff@adacore.com>
1977 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
1979 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
1980 change. Set the Etype in the class-wide case. This fixes a regression
1981 in the libadalang test suite.
1983 2017-09-29 Joel Brobecker <brobecker@adacore.com>
1985 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1986 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
1988 * gnat_ugn.texi: Regenerate.
1990 2017-09-29 Justin Squirek <squirek@adacore.com>
1992 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
1993 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
1994 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
1995 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
1996 for checking source file status and error message and/or call to
1998 * libgnat/s-os_lib.ads: Add new potential value constant for
1999 uninitialized file descriptors.
2000 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2001 return result of IO to encompass a read access failure in addition to a
2002 file-not-found error.
2004 2017-09-29 Bob Duff <duff@adacore.com>
2006 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2007 functions returning nonlimited types. Allow for qualified expressions
2008 and type conversions.
2009 (Expand_N_Extended_Return_Statement): Correct the computation of
2010 Func_Bod to allow for child units.
2011 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2012 limited (initialization of In_Place_Expansion), and implies >= Ada
2014 (Is_Build_In_Place_Result_Type): New function to accompany
2015 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2016 sometimes we just have the type on our hands, not the function. For
2017 now, does the same thing as the old version, so build-in-place is
2018 disabled for nonlimited types, except that you can use -gnatd.9 to
2020 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2021 accompany Is_Build_In_Place_Function and
2022 Is_Build_In_Place_Function_Call, because sometimes we just have the
2023 type on our hands, not the function.
2024 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2026 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2027 questionable code at the end that was setting the Etype.
2028 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2029 determine whether "return (...agg...);" is returning from a
2030 build-in-place function.
2031 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2032 Remove assumption that b-i-p implies limited (initialization of
2033 In_Place_Expansion).
2034 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2035 an unchecked conversion. Add assertions.
2036 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2037 secondary stack here, just because the type needs finalization. That
2039 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2040 For "return (...agg...);" don't assume b-i-p implies limited.
2041 Needs_Finalization does not imply secondary stack.
2042 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2043 Component_OK_For_Backend -- more readability with fewer double
2045 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2046 b-i-p implies >= Ada 2005.
2047 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2048 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2049 object of an extended return statement in place.
2050 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2051 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2052 b-i-p implies >= Ada 2005.
2053 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2054 b-i-p implies >= Ada 2005.
2055 * exp_ch7.adb: Comment fix.
2056 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2057 assumptions that b-i-p implies >= Ada 2005.
2058 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2059 b-i-p implies >= Ada 2005.
2060 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2061 (Expr), in case Pool_Id is not set.
2062 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2063 qualified or converted.
2064 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2065 (Param)) = N_Identifier; that's all it could be.
2066 * sinfo.ads: Comment fixes.
2067 * snames.ads-tmpl: Comment fixes.
2068 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2070 2017-09-29 Justin Squirek <squirek@adacore.com>
2072 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2073 all cases related to marking entity identifiers.
2075 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2077 * adaint.c (win32_wait): Properly handle error and take into account
2078 the WIN32 limitation on the number of simultaneous wait objects.
2080 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2082 * cal.c: Minor proofreading.
2084 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2086 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2087 * gnat_ugn.texi: Regenerate.
2089 2017-09-29 Bob Duff <duff@adacore.com>
2091 * lib-xref.ads: Comment fix.
2093 2017-09-29 Bob Duff <duff@adacore.com>
2095 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2096 Discriminants can't need finalization.
2098 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2100 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2101 for types in expression if the function is within a generic unit.
2102 * sem_res.adb (Resolve): In a generic context do not freeze an
2103 expression, unless it is an entity. This exception is solely for the
2104 purpose of detecting illegal uses of deferred constants in generic
2106 * sem_res.adb: Minor reformatting.
2108 2017-09-29 Justin Squirek <squirek@adacore.com>
2110 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2113 2017-09-29 Yannick Moy <moy@adacore.com>
2115 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2117 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2119 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2120 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2121 Document the effect of pragma Optimize_Alignment (Space) on non-packed
2123 * gnat_rm.texi: Regenerate.
2125 2017-09-25 Justin Squirek <squirek@adacore.com>
2127 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2128 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2129 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2130 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2131 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2132 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2133 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2134 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2135 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2136 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2137 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2138 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2139 Removal of ineffective use-clauses.
2140 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2141 constant folded barriers.
2142 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2143 Subtype_Marks and Names list in use-clause nodes to their new singular
2144 counterparts (e.g. Subtype_Mark, Name).
2145 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2146 Prev_Ids and More_Ids in use-clause nodes.
2147 (P_Use_Clause): Modify to take a list as a parameter.
2148 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2149 subtype_marks within an aggregate use-clauses into individual clauses.
2150 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2151 P_Use_Clause to match its new behavior.
2152 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2153 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2155 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2156 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2157 the declarative region.
2158 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2159 after analysis (Analyze_Package_Specification): Update use clause chain
2160 when there is no body.
2161 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2162 parameter to determine weither the installation of scopes should also
2163 propagate on the use-clause "chain".
2164 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2165 what constitutes a valid "use" of a clause.
2166 (Update_Use_Clause_Chain): Created to aggregate common machinary used
2167 to clean up use-clause chains (and warn on ineffectiveness) at the end
2168 of declaritive regions.
2169 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2170 package name from a use-package clause.
2171 (Analyze_Package_Name_List): Created to perform analysis on a list of
2172 package names (similar to Analyze_Package_Name).
2173 (Find_Most_Prev): Created to traverse to the beginning of a given
2175 (Most_Decendant_Use_Clause): Create to identify which clause from a
2176 given set is highest in scope (not always the most prev).
2177 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2178 handle the new chaining algorithm, also many changes related to
2179 redundant clauses. A new parameter has also been added to force
2180 installation to handle certain cases.
2181 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2182 Analyze_Task_Body): Mark use clauses on relevant entities.
2183 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2184 Install_Parents): Add parameter to determine weither the installation
2185 of scopes should also propagate on the use-clause "chain".
2186 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2187 Install_Context to avoid redundant chaining of use-clauses.
2188 * sem_ch13.adb: Minor reformatting.
2189 * sem_res.adb (Resolve): Mark use clauses on operators.
2190 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2192 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2193 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2194 represent any given clause's usage/reference/necessity.
2195 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2196 nodes to allow loose chaining of redundant clauses.
2197 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2198 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2199 reorganization in node fields.
2200 * types.ads (Source_File_Index): Adjust index bounds.
2201 (No_Access_To_Source_File): New constant.
2203 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2205 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2206 the expression to be used in the generated attribute specification
2207 (rather than relocating it) to avoid resolving a potentially malformed
2208 tree when the expression is resolved through an ASIS-specific call to
2209 Resolve_Aspect_Expressions. This manifests itself as a crash on a
2210 function with parameter associations.
2212 2017-09-25 Yannick Moy <moy@adacore.com>
2214 * exp_spark.adb (Expand_SPARK_Indexed_Component,
2215 Expand_SPARK_Selected_Component): New procedures to insert explicit
2216 dereference if required.
2217 (Expand_SPARK): Call the new procedures.
2219 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
2221 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2222 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2223 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2224 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2225 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2227 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
2229 * adaint.c (win32_wait): Properly handle error and take into account
2230 the WIN32 limitation on the number of simultaneous wait objects.
2232 2017-09-25 Yannick Moy <moy@adacore.com>
2234 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2235 invariant procedure in GNATprove mode.
2236 * sem_ch5.adb (Analyze_Assignment): Likewise.
2238 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2240 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2241 "back-end" in comments.
2243 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2245 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2246 call that appears in a classwide precondition and that mentions an
2247 access formal of the subprogram, must use the accessibility level of
2248 the actual in the call. This is one case in which a reference to a
2249 formal parameter appears outside of the body of the subprogram.
2251 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2253 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
2255 (Resolve_Entry): Clean up predicate
2257 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2259 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
2260 than Program_Error because U_E is more in line with respect to the
2263 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2265 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
2266 Storage_Size does not freeze, and thus can include references to
2269 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2271 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
2272 reference when it appears within a pragma of no significance to SPARK.
2273 (In_Insignificant_Pragma): New routine.
2274 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
2276 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2278 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
2279 actual is a renaming, indicate that it is the renamed package that must
2280 be frozen before the instantiation.
2282 2017-09-25 Yannick Moy <moy@adacore.com>
2284 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
2285 of dimensionality system in GNAT UG.
2286 * gnat_ugn.texi: Regenerate.
2288 2017-09-25 Yannick Moy <moy@adacore.com>
2290 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
2291 GNATprove_Mode when switch -gnatdF used.
2293 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2295 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
2298 2017-09-25 Javier Miranda <miranda@adacore.com>
2300 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
2301 expansion of user-defined enumeration types when the generation of
2302 names for enumeration literals is suppressed.
2304 2017-09-25 Gary Dismukes <dismukes@adacore.com>
2306 * libgnarl/s-taprop__linux.adb: Minor reformatting.
2308 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2310 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
2311 that appear as selector names of parameter associations, as these are
2312 never resolved by visibility.
2314 2017-09-25 Justin Squirek <squirek@adacore.com>
2316 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
2318 2017-09-25 Doug Rupp <rupp@adacore.com>
2320 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
2322 2017-09-25 Javier Miranda <miranda@adacore.com>
2324 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
2325 (Expand_User_Defined_Enumeration_Image): New subprogram.
2326 (Expand_Image_Attribute): Enable speed-optimized expansion of
2327 user-defined enumeration types when we are compiling with optimizations
2330 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2332 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
2333 routine is already provided by Einfo.
2334 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
2335 Sem_Util, which had better comments and avoided double calls to
2338 2017-09-25 Bob Duff <duff@adacore.com>
2340 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
2342 2017-09-25 Doug Rupp <rupp@adacore.com>
2344 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
2345 (Compute_Base_Monotonic_Clock): New function.
2346 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
2347 (Timed_Delay): Likewise.
2348 (Monotonic_Clock): Likewise.
2349 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
2351 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2353 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
2356 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
2358 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
2361 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2363 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
2365 2017-09-18 Bob Duff <duff@adacore.com>
2367 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
2368 reference types in the access-to-access case.
2370 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2372 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
2373 of the "aliased" keyword on the prefix from here to...
2374 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
2375 to Check_No_Implicit_Aliasing.
2376 * sinfo.ads (Non_Aliased_Prefix): Delete.
2377 (Set_Non_Aliased_Prefix): Likewise.
2378 * sinfo.adb (Non_Aliased_Prefix): Delete.
2379 (Set_Non_Aliased_Prefix): Likewise.
2381 2017-09-18 Bob Duff <duff@adacore.com>
2383 * exp_ch5.adb (Build_Formal_Container_Iteration,
2384 Expand_Formal_Container_Element_Loop): Convert the container to the
2385 root type before passing it to the iteration operations, so it will be
2388 2017-09-18 Bob Duff <duff@adacore.com>
2390 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
2392 2017-09-18 Bob Duff <duff@adacore.com>
2394 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
2395 and it's a bit-packed array, pass False to the Consider_IS parameter of
2396 Needs_Simple_Initialization.
2398 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2400 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
2401 the preexisting body.
2402 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
2403 (Process_Inline): Verify the placement of pragma Inline_Always. The
2404 pragma must now appear on the initial declaration of the related
2407 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2409 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
2410 declarative list in a subprogram body, analyze aspext specifications to
2411 provide basic semantic information, because otherwise the aspect
2412 specifications might only be snalyzed during expansion, when related
2413 subprograms are generated.
2415 2017-09-18 Bob Duff <duff@adacore.com>
2417 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
2418 validity checks have rewritten the tree.
2420 2017-09-18 Bob Duff <duff@adacore.com>
2422 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
2424 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2426 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
2427 qualified exxpression for an aggregate in a generic unit, verify that
2428 the scope of the type is itself visible and not hidden, so that the
2429 qualified expression is correctly resolved in any instance.
2431 2017-09-18 Bob Duff <duff@adacore.com>
2433 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
2434 mark refers to the current instance. Set the type to Any_Type in that
2435 case, to avoid later crashes.
2437 2017-09-18 Ed Schonberg <schonberg@adacore.com>
2439 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
2440 subsidiary of Build_Assignment, used to handle the initialization code
2441 for a mutable record component whose default value is an aggregate that
2442 sets the values of the discriminants of the components.
2444 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
2446 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
2447 the entity as being volatile for an overlay that toggles the scalar
2450 2017-09-18 Fedor Rybin <frybin@adacore.com>
2452 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
2453 options -U main and --harness-only are not compatible.
2455 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
2457 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
2459 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
2461 * einfo.ads (Is_Imported): Update comment, as this
2462 routine also applies to constants.
2464 2017-09-18 Yannick Moy <moy@adacore.com>
2466 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
2469 2017-09-18 Justin Squirek <squirek@adacore.com>
2471 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
2472 constant indication for Pragma_Linker_Section.
2474 2017-09-18 Bob Duff <duff@adacore.com>
2476 Alternate fix for PR ada/71358
2477 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
2478 Instead, make a local copy of Config, and if it's null, allocate an
2479 empty Command_Line_Configuration_Record, so we won't crash on null
2480 pointer dereference.
2482 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
2484 * libgnarl/a-intnam__rtems.ads: Update copyright date.
2485 * libgnarl/s-interr__hwint.adb: Likewise.
2486 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
2487 * libgnarl/s-osinte__rtems.adb: Likewise.
2488 * libgnarl/s-osinte__rtems.ads: Likewise.
2490 2017-09-13 Nicolas Roche <roche@adacore.com>
2492 * Make-lang.in: In the fallback mechanim, parse the associated .ali
2493 file and try to guess the locations of dependencies.
2495 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
2497 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
2498 the suppression status of Alignment_Check on the current scope.
2499 (Alignment_Checks_Suppressed): New function to use the saved instead of
2500 the current suppression status of Alignment_Check.
2501 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
2502 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
2503 the table, call Register_Address_Clause_Check.
2504 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
2505 recorded address clause instead of its entity.
2507 2017-09-13 Jerome Guitton <guitton@adacore.com>
2509 * libgnarl/s-tpopsp__vxworks-tls.adb,
2510 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
2511 (Self): Register thread if task id is null.
2513 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2515 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
2517 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2519 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
2520 from an entity to only scope index, as a mapping from an entity to the
2521 same entity was useless.
2522 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
2524 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
2526 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
2527 variable, just use return statements.
2529 2017-09-13 Arnaud Charlet <charlet@adacore.com>
2531 * libgnarl/s-vxwext__kernel-smp.adb,
2532 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
2535 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
2537 * einfo.adb: Flag42 is now Is_Controlled_Active.
2538 (Is_Controlled): This attribute is now synthesized.
2539 (Is_Controlled_Active): This attribute is now an explicit flag rather
2540 than a synthesized attribute. (Set_Is_Controlled): Removed.
2541 (Set_Is_Controlled_Active): New routine.
2542 (Write_Entity_Flags): Update the output for Flag42.
2543 * einfo.ads: Update the documentation of the following attributes:
2544 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
2545 and Is_Controlled_Active have swapped their functionality.
2546 (Is_Controlled): Renamed to Is_Controlled_Active.
2547 (Is_Controlled_Active): Renamed to Is_Controlled.
2548 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
2549 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
2551 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
2552 (Needs_Finalization): Code clean up. Remove the tests for
2553 Disable_Controlled because a) they were incorrect as they would reject
2554 a type which is sublect to the aspect, but may contain controlled
2555 components, and b) they are no longer necessary.
2556 * exp_util.ads (Needs_Finalization): Update comment on documentation.
2557 * freeze.adb (Freeze_Array_Type): Restore the original use of
2559 (Freeze_Record_Type): Restore the original use of Is_Controlled.
2560 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
2562 (Array_Type_Declaration): Restore the original use of Is_Controlled.
2563 (Build_Derived_Private_Type): Restore the original use of
2565 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
2566 type derived from Ada.Finalization.[Limited_]Controlled.
2567 (Build_Derived_Type): Restore the original use of Is_Controlled.
2568 (Record_Type_Definition): Restore the original use of Is_Controlled.
2569 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
2571 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
2572 (Analyze_Aspect_Specifications): Use routine
2573 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
2575 2017-09-13 Vincent Celier <celier@adacore.com>
2577 * clean.adb (Gnatclean): Fix error when looking for target
2578 of <target>-gnatclean
2580 2017-09-13 Javier Miranda <miranda@adacore.com>
2581 Ed Schonberg <schonberg@adacore.com>
2583 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
2584 expanded name that designates the current instance of a child unit in
2585 its own body and appears as the prefix of a reference to an entity
2586 local to the child unit.
2588 2017-09-12 Bob Duff <duff@adacore.com>
2590 * sem_warn.adb: Minor comment.
2592 2017-09-12 Bob Duff <duff@adacore.com>
2594 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
2595 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
2596 be Default_Initialized_Item, and apply pragma Unmodified to it,
2597 to suppress the warning.
2599 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
2601 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
2604 2017-09-12 Yannick Moy <moy@adacore.com>
2606 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
2607 together with Global when ignoring one in CodePeer mode.
2609 2017-09-12 Javier Miranda <miranda@adacore.com>
2611 * sem_ch3.adb (Analyze_Declarations): In nested
2612 package declarations that have a private part enable missing check
2613 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
2614 resolved at the end of the immediately enclosing declaration list.
2616 2017-09-12 Bob Duff <duff@adacore.com>
2618 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
2621 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
2623 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
2624 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
2626 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
2627 in preparation for the evolution of the SPARK language that
2628 includes a pointer analysis for checking non-aliasing of access
2629 types. The Check_Safe_Pointers function is the entry point, and
2630 will traverse the AST and raise compile-time errors everytime
2631 it detects non-begign aliasing. Detailed comments are present
2632 in the sem_spark.ads file.
2633 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
2634 functions to iterate over the list of globals of a subprogram.
2635 * libgnat/system.ads: Add restriction No_Finalization.
2636 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
2637 dependency on g-dynhta.adb.
2639 2017-09-12 Bob Duff <duff@adacore.com>
2641 * sem_ch6.adb (Analyze_Expression_Function): Call
2642 Check_Dynamically_Tagged_Expression.
2643 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
2644 "and then Is_Tagged_Type (Typ)" because there is an earlier
2645 "Assert (Is_Tagged_Type (Typ))".
2647 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
2649 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
2651 2017-09-11 Arnaud Charlet <charlet@adacore.com>
2653 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
2654 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
2655 for no longer supported platforms.
2656 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
2657 description of the semantics for dimensionality analysis.
2658 * gnat_ugn.texi: Regenerated.
2660 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
2662 * freeze.adb (Has_Incomplete_Compoent): Delete.
2664 Do not inhibit the freezing of the profile of an expression
2666 (Freeze_Subprogram): Do not re-create extra formals.
2667 * sem_ch6.adb (Analyze_Expression_Function): Always
2668 pre-analyze the expression if the function is not a completion.
2669 (Analyze_Subprogram_Body_Helper): For the body generated
2670 from an expression function that is not a completion, do
2671 not freeze the profile and temporary mask the types declared
2672 outside the expression that are not yet frozen.
2673 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
2674 during the pre-analysis of an expression function.
2676 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
2678 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
2681 2017-09-11 Yannick Moy <moy@adacore.com>
2683 * lib-xref-spark_specific.adb: Minor rewrite.
2685 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
2687 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
2688 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
2689 renaming into account.
2691 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
2693 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
2694 * gcc-interface/Makefile.in: Take this renaming into account.
2696 2017-09-11 Arnaud Charlet <charlet@adacore.com>
2698 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
2701 2017-09-11 Yannick Moy <moy@adacore.com>
2703 * sem_util.adb (Check_Result_And_Post_State):
2704 Do not issue a warning about missing reference to an outcome if
2705 the subprogram is ghost and has no outputs.
2706 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
2709 2017-09-11 Yannick Moy <moy@adacore.com>
2711 * gnat1drv.adb (Adjust_Global_Switches): Set
2712 Check_Validity_Of_Parameters to False in GNATprove mode.
2713 * opt.ads (Check_Validity_Of_Parameters): Document switch to
2716 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
2718 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
2719 generate debug info for inner record types if -fgnat-encodings=minimal.
2720 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
2721 type as the debug type.
2723 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2725 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
2726 packed record types if pragma Optimize_Alignment (Space) is enabled.
2728 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2730 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
2731 limits for expression functions.
2732 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
2734 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2736 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
2737 layout of the record from the parent type only if both are or are not
2739 (is_stored_discriminant): Return false for an unchecked union.
2741 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2743 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
2746 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2748 * gcc-interface/decl.c (promote_object_alignment): New function taken
2750 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
2751 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
2752 create a padding type on success before doing the atomic check.
2754 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2756 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
2757 promotion to static memory earlier in the processing.
2759 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2761 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
2762 and TYPE_BY_REFERENCE_P flags on types after various promotions.
2763 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
2764 Consider all kinds of entities.
2766 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
2768 * gcc-interface/utils.c (convert): When converting to a padding type,
2769 reuse an existing CONSTRUCTOR if it has got the right size.
2771 2017-09-08 Nicolas Roche <roche@adacore.com>
2773 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
2775 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
2776 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
2777 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
2778 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
2779 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
2780 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
2781 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
2782 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
2783 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
2784 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
2785 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
2786 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
2787 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
2788 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
2789 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
2790 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
2791 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
2792 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
2793 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
2794 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
2795 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
2796 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
2797 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
2798 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
2799 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
2800 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
2801 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
2802 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
2803 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
2804 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
2805 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
2806 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
2807 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
2808 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
2809 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
2810 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
2811 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
2812 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
2813 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
2814 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
2815 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
2816 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
2817 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
2818 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
2819 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
2820 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
2821 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
2822 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
2823 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
2824 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
2825 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
2826 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
2827 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
2828 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
2829 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
2830 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
2831 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
2832 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
2833 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
2834 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
2835 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
2836 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
2837 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
2838 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
2839 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
2840 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
2841 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
2842 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
2843 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
2844 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
2845 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
2846 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
2847 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
2848 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
2849 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
2850 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
2851 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
2852 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
2853 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
2854 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
2855 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
2856 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
2857 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
2858 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
2859 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
2860 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
2861 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
2862 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
2863 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
2864 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
2865 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
2866 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
2867 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
2868 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
2869 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
2870 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
2871 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
2872 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
2873 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
2874 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
2875 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
2876 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
2877 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
2878 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
2879 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
2880 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
2881 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
2882 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
2883 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
2884 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
2885 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
2886 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
2887 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
2888 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
2889 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
2890 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
2891 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
2892 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
2893 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
2894 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
2895 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
2896 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
2897 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
2898 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
2899 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
2900 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
2901 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
2902 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
2903 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
2904 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
2905 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
2906 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
2907 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
2908 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
2909 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
2910 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
2911 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
2912 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
2913 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
2914 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
2915 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
2916 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
2917 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
2918 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
2919 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
2920 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
2921 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
2922 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
2923 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
2924 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
2925 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
2926 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
2927 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
2928 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
2929 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
2930 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
2931 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
2932 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
2933 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
2934 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
2935 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
2936 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
2937 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
2938 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
2939 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
2940 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
2941 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
2942 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
2943 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
2944 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
2945 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
2946 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
2947 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
2948 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
2949 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
2950 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
2951 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
2952 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
2953 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
2954 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
2955 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
2956 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
2957 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
2958 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
2959 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
2960 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
2961 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
2962 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
2963 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
2964 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
2965 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
2966 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
2967 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
2968 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
2969 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
2970 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
2971 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
2972 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
2973 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
2974 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
2975 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
2976 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
2977 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
2978 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
2979 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
2980 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
2981 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
2982 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
2983 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
2984 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
2985 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
2986 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
2987 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
2988 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
2989 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
2990 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
2991 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
2992 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
2993 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
2994 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
2995 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
2996 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
2997 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
2998 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
2999 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3000 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3001 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3002 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3003 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3004 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3005 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3006 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3007 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3008 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3009 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3010 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3011 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3012 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3013 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3014 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3015 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3016 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3017 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3018 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3019 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3020 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3021 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3022 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3023 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3024 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3025 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3026 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3027 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3028 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3029 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3030 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3031 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3032 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3033 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3034 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3035 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3036 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3037 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3038 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3039 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3040 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3041 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3042 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3043 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3044 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3045 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3046 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3047 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3048 to libgnat subdirectory.
3050 2017-09-08 Yannick Moy <moy@adacore.com>
3052 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3053 return the entity associated with the call.
3054 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3055 Replace the internal Get_Function_Id with the new
3056 Sem_Aux.Get_Called_Entity.
3057 (Iterate_Call_Parameters): New
3058 procedure to iterate on formals and actuals at the same time.
3059 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3060 Set SPARK_Mode from spec when set, for analysis
3061 of instance. Restore after analysis of instance.
3062 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3063 set, for analysis of body instance. Restored automatically at
3064 the end of the subprogram.
3065 * gnat1drv.adb (Adjust_Global_Switches): Set
3066 Check_Validity_Of_Parameters to False in GNATprove mode.
3067 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3070 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3072 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3073 (New_Copy_Tree): ...there. Reset the hash tables only if they
3074 were used in the previous invocation.
3075 * s-htable.adb: Fix typo.
3077 2017-09-08 Bob Duff <duff@adacore.com>
3079 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3081 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3083 * sem_aggr.adb: minor style fix.
3085 2017-09-08 Bob Duff <duff@adacore.com>
3087 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3088 no current source file.
3089 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3090 Print something helpful in case N is invalid.
3091 * sprint.ads: Minor comment fix.
3093 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3095 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3098 2017-09-08 Bob Duff <duff@adacore.com>
3100 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3101 Ada_2020, along the same lines as the other Ada version pragmas.
3103 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3105 * sem_ch12.adb: Minor typo fixes and reformatting.
3107 2017-09-08 Yannick Moy <moy@adacore.com>
3109 * sem_aggr.adb (Resolve_Record_Aggregate):
3110 Rewrite bounds of aggregate subexpressions which may depend on
3111 discriminants of the enclosing aggregate.
3113 2017-09-08 Yannick Moy <moy@adacore.com>
3115 * sem_ch5.adb: Prevent assertion failure on illegal code.
3117 2017-09-08 Yannick Moy <moy@adacore.com>
3119 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3120 calling Renamed_Entity on an entity which cannot be a renaming.
3122 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3124 * exp_aggr.adb: Add with & use clause for Urealp.
3125 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3126 elementary types instead of just discrete types.
3127 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3128 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3129 Be prepared for the FP zero value in the memset case. Add small
3132 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3134 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3137 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3139 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3140 of New_Copy because the latter leaves the syntactic structure of
3141 the tree inconsistent (a child is accessible through two parents)
3142 and prevents proper replication of itypes by subsequent calls
3144 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3145 New_Copy because the latter leaves the syntactic structure of the
3146 tree inconsistent (a child is accessible through two parents)
3147 and prevents proper replication of itypes by subsequent calls
3149 * sem_util.adb (In_Subtree): New routine.
3150 (New_Copy_Tree): Reimplemented.
3151 * sem_util.ads (In_Subtree): New routine.
3152 (New_Copy_Tree): Reimplemented.
3154 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3156 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3157 for aspect Default_Value is a static scalar value, but it does
3158 not freeze the type. Yhis allows for subsequent representation
3159 clauses for the type.
3161 2017-09-08 Javier Miranda <miranda@adacore.com>
3163 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3164 not add entries into the undefined reference table when we are
3165 compiling with errors ignored.
3167 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3169 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3170 check if the instance is within an enclosing instance body. The
3171 formal package was legal in the enclosing generic, and is
3172 legal in the enclosing instantiation. This optimisation may be
3173 applicable elsewhere, and it also removes spurious errors that
3174 may arise with on-the-fly processing of instantiations that
3175 contain Inline_Always subprograms.
3177 2017-09-08 Vincent Celier <celier@adacore.com>
3179 * gnatcmd.adb: Disregard empty argument of GNAT driver.
3181 2017-09-08 Justin Squirek <squirek@adacore.com>
3183 * checks.adb (Insert_Valid_Check): Manually decorate
3184 the generated temporary for range valdity checks.
3186 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3188 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3190 2017-09-08 Justin Squirek <squirek@adacore.com>
3192 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3193 case to handle underscore flags.
3194 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3195 new procedure to handle underscores.
3197 2017-09-08 Javier Miranda <miranda@adacore.com>
3199 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3200 divisions with fixed point results to avoid generating twice
3201 the runtime check on divide by zero.
3202 * checks.adb (Apply_Divide_Checks): Ensure that operands are
3203 not evaluated twice (once for their runtime checks and once for
3204 their regular computation).
3206 2017-09-08 Yannick Moy <moy@adacore.com>
3208 * sem_prag.adb (Analyze_Part_Of): Add missing
3209 return statements after issuing errors. Add detection of
3210 out-of-order item and single concurrent type.
3212 2017-09-08 Nicolas Roche <roche@adacore.com>
3214 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3215 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3216 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3217 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3218 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3219 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3220 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3221 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3222 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3223 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3224 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3225 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3226 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3227 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3228 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3229 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3230 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3231 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3232 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3233 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3234 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3235 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3236 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3237 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3238 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3239 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3240 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3241 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3242 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3243 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3244 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3245 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3246 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3247 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3248 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3249 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3250 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
3251 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
3252 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
3253 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
3254 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
3255 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
3256 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
3257 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
3258 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
3259 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
3260 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
3261 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
3262 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
3263 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
3264 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
3265 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
3266 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
3267 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
3269 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3271 * doc/share/conf.py, doc/share/latex_elements.py,
3272 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
3275 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3277 * gnat_rm.texi, gnat_ugn.texi,
3278 doc/gnat_ugn/the_gnat_compilation_model.rst,
3279 doc/gnat_ugn/getting_started_with_gnat.rst,
3280 doc/gnat_ugn/inline_assembler.rst,
3281 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
3282 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
3283 doc/gnat_ugn/about_this_guide.rst,
3284 doc/gnat_ugn/platform_specific_information.rst,
3285 doc/gnat_ugn/example_of_binder_output.rst,
3286 doc/gnat_ugn/gnat_and_program_execution.rst,
3287 doc/gnat_ugn/gnat_utility_programs.rst,
3288 doc/gnat_rm/implementation_of_specific_ada_features.rst,
3289 doc/gnat_rm/interfacing_to_other_languages.rst,
3290 doc/gnat_rm/implementation_defined_aspects.rst,
3291 doc/gnat_rm/intrinsic_subprograms.rst,
3292 doc/gnat_rm/implementation_defined_characteristics.rst,
3293 doc/gnat_rm/implementation_advice.rst,
3294 doc/gnat_rm/implementation_defined_attributes.rst,
3295 doc/gnat_rm/compatibility_and_porting_guide.rst,
3296 doc/gnat_rm/standard_library_routines.rst,
3297 doc/gnat_rm/the_gnat_library.rst,
3298 doc/gnat_rm/implementation_defined_pragmas.rst,
3299 doc/gnat_rm/representation_clauses_and_pragmas.rst,
3300 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
3301 doc/gnat_rm/obsolescent_features.rst,
3302 doc/gnat_rm/about_this_guide.rst,
3303 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
3304 doc/gnat_rm/implementation_of_ada_2012_features.rst,
3306 doc/gnat_rm.rst: Update documentation.
3308 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3310 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
3311 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
3312 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
3314 2017-09-08 Bob Duff <duff@adacore.com>
3316 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
3317 New routine to read the Tag robustly.
3318 * exp_attr.adb (Input): Change the expansion of 'Input,
3319 in the class-wide case, to call String_Input_Tag instead of
3320 String_Input_Blk_IO.
3322 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3324 * s-rident.ads (Restriction_Id): reorder enum
3325 literals, so that Pure_Barriers is no longer in range of the
3326 Cunit_Boolean_Restrictions subtype.
3328 2017-09-08 Nicolas Roche <roche@adacore.com>
3330 * a-taster.ads, a-taster.adb: Move to libgnarl
3331 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
3332 Add support for files in libgnarl.
3334 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3336 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
3337 accessibility check to an interface conversion, whose purpose
3338 is to perform a pointer adjustment in a dispatching call.
3339 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
3340 when the actual is a construct that involves a dereference of an
3341 expression that includes a formal of the enclosing subprogram,
3342 In such cases, the accessibility level of the actual is that of
3343 the corresponding formal, which is passed in as an additional
3344 actual in the outer call.
3346 2017-09-08 Bob Duff <duff@adacore.com>
3348 * exp_intr.adb (Add_Source_Info): Do not decode
3349 file names; they were not encoded in the first place.
3351 2017-09-08 Bob Duff <duff@adacore.com>
3353 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
3354 exceptions instead of crashes. Check for absurdly long strings
3355 and empty strings. Empty strings cause trouble because they can
3356 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
3357 be empty, which causes an array index out of bounds.
3358 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
3361 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3363 * sem_util.adb (Is_CCT_Instance): allow use in
3364 the context of protected types.
3366 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3368 * a-tigeli.adb: minor remove extra whitespace.
3370 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3372 * par-ch4.adb: Reformatting of an error message.
3374 2017-09-08 Javier Miranda <miranda@adacore.com>
3376 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
3377 identifiers to ensure their correct decoration of names on
3380 2017-09-08 Yannick Moy <moy@adacore.com>
3382 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
3383 not skip a loop coming from source which is rewritten into a loop.
3385 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3387 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
3388 wrapper has convention Ada, to prevent spurious warnings on
3389 unconstrained array parameters.
3391 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3393 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
3394 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
3396 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3398 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
3400 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3402 * exp_intr.adb (Append_Entity_Name): Move to ...
3403 * sem_util.ads, sem_util.adb: ... here to share it.
3404 (Subprogram_Name): New subprogram, to compute the name of the enclosing
3406 * errutil.adb (Error_Msg): Fill new field Node.
3407 * erroutc.ads (Subprogram_Name_Ptr): New.
3408 (Error_Msg_Object): New field Node.
3409 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
3410 * errout.adb (Error_Msg): New variant with node id parameter.
3411 Fill new parameter Node when emitting messages. Revert previous
3412 changes for Include_Subprogram_In_Messages.
3413 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
3414 generating warning message.
3416 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3418 * par-ch4.adb (P_Iterated_Component_Association): Place construct
3419 under -gnat2020 flag, given that it is a future feature of
3421 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
3422 defining identifier as referenced to prevent spurious warnings:
3423 corresponding loop is expanded into one or more loops whose
3424 variable has the same name, and the expression uses those names
3425 and not the original one.
3427 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3429 * sem_elab.adb (Check_A_Call): Do not consider
3430 references to internal variables for SPARK semantics.
3432 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3434 * inline.adb (In_Package_Spec): refine type of
3435 the parameter from Node_Id to Entity_Id.
3437 2017-09-08 Justin Squirek <squirek@adacore.com>
3439 * exp_ch5.adb (Expand_Formal_Container_Loop):
3440 Reset the scope of the loop parameter after it is reanalyzed.
3442 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3444 * sem_util.ads (Set_Rep_Info): New inline procedure.
3445 * sem_util.adb (Set_Rep_Info): Implement it.
3446 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
3447 always copy the representation aspects onto the subtype.
3449 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
3451 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
3452 Correction of the return type from access type to option type.
3453 (Simple_HTable): Moving the Instance_Data to ads file.
3455 2017-09-08 Yannick Moy <moy@adacore.com>
3457 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
3459 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3461 * opt.ads (Include_Subprogram_In_Messages): New variable.
3462 * errout.ads (Current_Subprogram_Ptr): New variable.
3463 * errout.adb (Error_Msg): Prepend current subprogram info
3464 in messages if Include_Subprogram_In_Messages is set.
3465 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
3467 * gnat1drv.adb (Adjust_Global_Switches): Set
3468 Include_Subprogram_In_Messages when -gnatdJ is set.
3469 * debug.adb: Document and reserve -gnatdJ.
3471 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
3473 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
3474 functions to iterate over simple hastables.
3475 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
3477 2017-09-08 Javier Miranda <miranda@adacore.com>
3479 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
3480 missing checks on the presence of Entity() before checking the
3483 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3485 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
3486 statements, use local variable and remove unnecessary processing.
3488 2017-09-08 Javier Miranda <miranda@adacore.com>
3490 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
3492 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
3493 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3495 (Unqual_BIP_Iface_Function_Call): New subprogram.
3496 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
3497 subprogram containing code that was previously inside
3498 Make_Build_In_Place_Call_In_Object_Declaration since it is also
3499 required for one of the new subprograms.
3501 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
3502 (Expand_N_Extended_Return_Statement): Extend the
3503 cases covered by an assertion on expected BIP object
3505 (Make_Build_In_Place_Call_In_Assignment):
3506 Removing unused code; found working on this ticket.
3507 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
3508 that replaces the internal name of the renaming declaration
3509 into the new subprogram Replace_Renaming_Declaration_Id.
3510 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
3511 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
3513 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
3515 (Unqual_BIP_Iface_Function_Call): New subprogram.
3516 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
3517 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
3518 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
3519 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3520 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
3521 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
3522 (Expand_N_Indexed_Component): Invoke the new subprogram
3523 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3524 (Expand_N_Selected_Component): Invoke the new subprogram
3525 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3526 (Expand_N_Slice): Invoke the new subprogram
3527 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3528 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
3529 Invoke the new subprogram
3530 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
3532 2017-09-08 Javier Miranda <miranda@adacore.com>
3534 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
3535 access to interface types. Remove also the accessibility check.
3537 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3539 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
3540 all the types that are referenced by the expression.
3541 (Analyze_Expression_Function): Call Freeze_Expr_Types for
3542 a completion instead of manually freezing the type of the
3544 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
3546 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3548 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
3549 New procedure, auxiliary to Expand_Pragma_Check, to handle
3550 references to the discriminants of a protected type within a
3551 precondition of a protected operation. This is needed because
3552 the original precondition has been analyzed in the context of
3553 the protected declaration, but in the body of the operation
3554 references to the discriminants have been replaved by references
3555 to the discriminants of the target object, and these references
3556 are only created when expanding the protected body.
3558 2017-09-08 Yannick Moy <moy@adacore.com>
3560 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
3563 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3565 * exp_attr.adb (Build_Record_VS_Func): If the record is an
3566 unchecked union, do not emit checks for its (non-existent)
3567 discriminants, or for variant parts that depend on them.
3569 2017-09-08 Justin Squirek <squirek@adacore.com>
3571 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
3572 Find_Comparison_Type.Try_One_Interp): Add check for generic
3575 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3577 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
3578 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
3579 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
3580 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
3581 remaining references to AAMP_On_Target.
3583 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3585 * style.adb: Fix typo.
3587 2017-09-08 Javier Miranda <miranda@adacore.com>
3589 * einfo.adb (Underlying_Type): Add missing support for class-wide
3590 types that come from the limited view.
3591 * exp_attr.adb (Attribute_Address): Check class-wide type
3592 interfaces using the underlying type to handle limited-withed
3594 (Attribute_Tag): Check class-wide type interfaces using
3595 the underlying type to handle limited-withed types.
3597 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3599 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
3600 over a subtype of a type with a static predicate, taking into
3601 account the predicate function of the parent type and the bounds
3602 given in the loop specification.
3603 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
3604 a loop specification that is a subtype indication whose type mark
3605 is a type with a static predicate, inherit predicate function,
3606 used to build case statement for rewritten loop.
3608 2017-09-08 Justin Squirek <squirek@adacore.com>
3610 * lib-load.adb: Modify printing of error message to exclude file
3613 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3615 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
3616 don't inline subprograms declared in both visible and private
3618 (In_Package_Spec): previously In_Package_Visible_Spec; now
3619 detects subprograms declared both in visible and private parts
3622 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3624 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
3625 the type is an anonymous array in an object declaration, whose
3626 component type has an invariant, use the object declaration
3627 as the insertion point for the invariant procedure, given that
3628 there is no explicit type declaration for an anonymous array type.
3630 2017-09-08 Bob Duff <duff@adacore.com>
3632 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
3634 2017-09-08 Bob Duff <duff@adacore.com>
3636 * a-strfix.adb (Trim): Compute Low and High only if needed.
3638 2017-09-08 Justin Squirek <squirek@adacore.com>
3640 * lib-load.adb (Load_Main_Source): Add error output in the case a
3641 source file is missing.
3643 2017-09-08 Bob Duff <duff@adacore.com>
3646 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
3647 Default_WCEM by default (i.e. if the encoding is not specified
3648 by the Form string).
3650 2017-09-08 Bob Duff <duff@adacore.com>
3652 * s-trasym.ads (Hexa_Traceback): If
3653 Suppress_Hex is True, print "..." instead of a hexadecimal
3655 * s-trasym.adb: Ignore No_Hex in this version.
3658 2017-09-08 Bob Duff <duff@adacore.com>
3660 * debug.adb: Minor reformatting.
3662 2017-09-08 Bob Duff <duff@adacore.com>
3664 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
3665 code so it doesn't trigger an "uninit var" warning.
3667 2017-09-08 Nicolas Roche <roche@adacore.com>
3669 * s-hibaen.ads: Remove obsolete file.
3671 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3673 * a-locale.ads: Add comment explaining the state of this package.
3675 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3677 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
3679 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
3680 allow calls in the context of package spec (for pragma
3681 Initializes) and bodies (for pragma Refined_State).
3683 2017-09-08 Bob Duff <duff@adacore.com>
3685 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
3688 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3690 * debug.adb (dA): Adjust comment.
3691 * gnat1drv.adb (Gnat1drv): Likewise.
3692 * opt.ads (List_Representation_Info_Extended): New variable.
3693 * repinfo.adb (List_Record_Info): Split implementation into...
3694 (Compute_Max_Length): ...this. Recurse on records if requested.
3695 (List_Record_Layout): Likewise.
3696 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
3697 statement, accept '0' and set List_Representation_Info_Extended
3699 * usage.adb (Usage): Document new -gnatRe variant.
3701 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3703 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
3704 Do not save the given entity in the global variable Default_Pool
3705 if the pragma appears within a generic unit.
3707 2017-09-08 Bob Duff <duff@adacore.com>
3709 * errout.adb (Delete_Warning): Do not
3710 decrement Warnings_Treated_As_Errors. This is called before
3711 Warnings_Treated_As_Errors has been incremented to account for
3712 this warning. Decrementing it here can lead to negative values
3713 of Warnings_Treated_As_Errors, raising Constraint_Error in
3714 checks-on builds, and causing the compiler to return an error
3715 code in checks-off builds.
3717 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3719 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
3720 entities of named concurrent types as Ref_Id and not of anonymous
3721 concurrent objects (because callers already know when a conversion
3722 is necessary and can easily do it); also, do not expect protected
3723 types or protected objects as Context_Id (because no flow-related
3724 SPARK pragmas are attached there); reflect these changes in a
3725 more precise comment.
3727 2017-09-08 Olivier Hainque <hainque@adacore.com>
3729 * g-altive.ads: Add documentation.
3731 2017-09-08 Bob Duff <duff@adacore.com>
3733 * sem_util.ads, debug.adb: Minor comment fix.
3734 * erroutc.ads: Comment fix.
3736 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3738 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
3739 for compatibility of component types of formal and actual in an
3740 instantiation of a child unit, when the component type of the
3741 formal is itself a formal of an enclosing generic.
3743 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3745 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
3746 sem_prag.adb to make it available for GNATprove; for concurrent
3747 types replace custom scope climbing with Scope_Same_Or_Within; for
3748 single concurrent objects add scope climbing (with Scope_Within),
3749 which was not there (that's the primary semantic change of this
3750 commit); also, when comparing a single concurrent object with
3751 its corresponding concurrent type rely on equality of types,
3752 not of objects (because that's simpler to code).
3753 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
3754 (Analyze_Global_Item): adjust special-casing of references to the
3755 current instance of a concurrent unit in the Global contracts
3756 of task types and single tasks objects; similar for references
3757 in the protected operations and entries of protected types and
3758 single protected objects (in all these cases the current instance
3759 behaves as an implicit parameter and must not be mentioned in
3760 the Global contract).
3762 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3764 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
3765 function calls returning a record within a subprogram call,
3768 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3770 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
3771 name that designates the current instance of a child unit in its
3772 own body and appears as the prefix of a reference to an entity
3773 local to the child unit.
3774 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
3777 2017-09-08 Yannick Moy <moy@adacore.com>
3779 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
3782 2017-09-08 Tristan Gingold <gingold@adacore.com>
3784 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
3785 warnings on internal units in configurable run time mode.
3787 2017-09-08 Bob Duff <duff@adacore.com>
3789 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
3790 representation items from interfaces that the derived type
3791 implements, not just from the parent type.
3792 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
3793 this to return an empty list when there are no interfaces.
3794 * einfo.ads, sem_ch13.adb: Minor comment fixes.
3795 * sem_attr.adb: Minor comment fix.
3797 2017-09-08 Doug Rupp <rupp@adacore.com>
3799 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
3802 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3804 * exp_ch4.adb (Expand_N_Allocator): Generate a
3805 call to Allocate_Any_Controlled when the allocation does not
3806 require any initialization.
3808 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3810 * sem_util.adb (Copy_Node_With_Replacement):
3811 Update the Renamed_Object field of a replicated object renaming
3814 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
3816 * exp_ch9.adb (Is_Pure_Barrier): Allow type
3817 conversions and components of objects. Simplified the detection
3818 of the Count attribute by identifying the corresponding run-time
3821 2017-09-08 Yannick Moy <moy@adacore.com>
3823 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
3824 sem_type.adb, sinfo.ads: Minor reformatting.
3826 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3828 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
3829 of Freeze_Profile, used to inhibit the freezing of the profile
3830 of an expression function declared within a nested package, when
3831 some type in the profile depends on a private type declared in
3832 an enclosing package.
3834 2017-09-08 Bob Duff <duff@adacore.com>
3836 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
3837 the subunit case. It's still OK to set it in the "missing subunits"
3838 case, because that won't cause the obsolete .ali files that cause
3841 2017-09-08 Bob Duff <duff@adacore.com>
3843 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
3844 unclear why this didn't cause a warning.
3845 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
3846 pragmas. It's unclear why this didn't cause an error.
3848 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3850 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
3852 (Expand_SPARK_Potential_Renaming): Code clean up.
3853 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
3854 the item does not have a proper entity.
3855 (Analyze_Input_Item): Add a guard in case the item does not have a
3857 (Collect_States_And_Objects): Include object renamings in the
3858 items being collected.
3859 (Resolve_State): Update the documentation of this routine.
3860 * sem_util.adb (Entity_Of): Add circuitry to handle
3861 renamings of function results.
3862 (Remove_Entity): New routine.
3863 (Remove_Overloaded_Entity): Take advantage of factorization.
3864 * sem_util.ads (Entity_Of): Update the documentation
3866 (Remove_Entity): New routine.
3867 (Remove_Overloaded_Entity): Update the documentation of this
3870 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3872 * repinfo.adb (List_Record_Info): During first loop,
3873 do not override the normalized position and first bit
3874 if they have already been set. Move fallback code
3875 for the packed case to the case where it belongs.
3876 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
3877 Also adjust the normalized position of components.
3878 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
3880 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3882 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
3883 the placement of a primitive operation O that renames an operation
3884 R declared in an inner package, and which is thus not a primitive
3885 of the dispatching type of O. In this case O is a new primitive
3886 and does not inherit its dispatch table position from R (which
3889 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3891 * sem_dim.adb (Analyze_Dimension_If_Expression,
3892 Analyze_Dimension_Case_Expression): new subprograms to verify
3893 the dimensional correctness of Ada2012 conditional expressions,
3894 and set properly the dimensions of the construct.
3895 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
3896 call Analyze_Dimension.
3898 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3900 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
3901 loop on an interface declared as a private extension of another
3902 synchronized interface.
3904 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3906 * sem_ch12.adb (Check_Generic_Parent): New procedure within
3907 Analyze_Associations, to handle actual packages that depend on
3908 previous instances. If a package IAP that is an instantiation is
3909 used as an actual in a subsequent instantiation SI in the same
3910 scope, and IAP has a body, IAP must be frozen before SI. If
3911 the generic parent of IAP is itself declared in a previous
3912 instantiation in the same scope, that instantiation must also
3913 be frozen before SI.
3914 (Install_Body): Prevent double insertion of freeze node for
3917 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3919 * sem_prag.adb (Resolve_State): Update the
3920 comment on documentation. Generate a reference to the state once
3921 resolution takes place.
3923 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3925 * sem_ch13.adb (Analyze_Aspect_Specifications, case
3926 Linker_Section): If the aspect applies to an object declaration
3927 with explicit initialization, do not delay the freezing of the
3928 object, to prevent access-before-elaboration in the generated
3929 initialization code.
3931 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3933 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
3934 (Integer_Value (Item)) when the size of the fixed decimal type
3935 is larger than Integer.
3937 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
3940 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
3941 in order of increasing position in more cases.
3943 2017-09-07 Yannick Moy <moy@adacore.com>
3945 * a-exetim-mingw.ads: Add contract Global=>null
3946 on all operations that are modeled as having no read or write
3947 of global variables in SPARK.
3949 2017-09-07 Raphael Amiard <amiard@adacore.com>
3951 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
3952 to Hmaps.Generic_Ops.
3953 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
3955 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
3957 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
3958 position in cursors.
3960 2017-09-07 Javier Miranda <miranda@adacore.com>
3962 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
3963 allow disabling the generation of implicit pragma Elaborate_All
3966 2017-09-07 Javier Miranda <miranda@adacore.com>
3968 * exp_disp.adb (Make_Tags): Avoid suffix counter
3969 in the external name of the elaboration flag. Required to fix
3970 the regressions introduced by the initial version of this patch.
3972 2017-09-07 Bob Duff <duff@adacore.com>
3974 * sem_ch6.adb (Analyze_Function_Return): Do not
3975 insert an explicit conversion to force the displacement of the
3976 "this" pointer to reference the secondary dispatch table in the
3977 case where the return statement is returning a raise expression,
3978 as in "return raise ...".
3980 2017-09-07 Arnaud Charlet <charlet@adacore.com>
3982 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
3983 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
3984 procedure from sem_disp.adb.
3985 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
3987 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
3988 return the instantiation node for subprograms. Update references
3989 to Get_Unit_Instantiation_Node.
3990 * sem_ch7.adb (Install_Parent_Private_Declarations): update
3991 reference to Get_Unit_Instantiation_Node.
3992 * exp_dist.adb (Build_Package_Stubs): update reference to
3993 Get_Unit_Instantiation_Node.
3994 * sem_ch9.adb: minor typo in comment.
3995 * lib-xref-spark_specific.adb
3996 (Traverse_Declaration_Or_Statement): traverse into task type
3999 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4001 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4002 to handle properly various cases of type conversions where the
4003 target type and/or the expression carry dimension information.
4004 (Dimension_System_Root); If a subtype carries dimension
4005 information, obtain the source parent type that carries the
4008 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4010 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4012 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4014 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4015 If the prefix is a reference to an object, rewrite it as an
4016 explicit dereference, as required by 3.7.2 (2) and as is done
4017 with most other attributes whose prefix is an access value.
4019 2017-09-07 Bob Duff <duff@adacore.com>
4021 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4022 Refined_Depends aspect.
4023 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4024 Refined_Depends pragma.
4025 * scans.ads: Fix documentation of Inside_Depends flag.
4026 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4028 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4030 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4031 Account for the case where the are no lists to insert, but the
4032 secondary stack still requires management.
4033 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4034 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4035 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4036 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4039 2017-09-07 Vincent Celier <celier@adacore.com>
4041 * clean.adb: Do not get the target parameters before calling
4044 2017-09-07 Nicolas Roche <roche@adacore.com>
4046 * s-osinte-solaris-posix.ads: Removed.
4048 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4050 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4051 single concurrent objects.
4053 2017-09-07 Javier Miranda <miranda@adacore.com>
4055 * s-regexp.ads: Fix documentation of the globbing grammar.
4057 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4059 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4061 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4063 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4064 in CodePeer mode, to support more legacy code automatically.
4066 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4068 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4069 and thus not a controlling argument, preserve its type after
4070 rewriting because it may appear in an nested call with a classwide
4073 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4075 * comperr.adb (Delete_SCIL_Files): Handle case of
4076 N_Package_Instantiation.
4078 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4080 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4081 clause for a unit U appears in a context that includes a regular
4082 with_clause on U, rewrite the redundant private clause into a null
4083 statement, rather than removing it altogether from the context,
4084 so that ASIS tools can reconstruct the original source.
4086 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4088 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4089 for aspect Small can be of any real type (not only a universal
4090 real literal) as long as it is a static constant.
4092 2017-09-07 Thomas Quinot <quinot@adacore.com>
4094 * par_sco.adb: Minor reformatting.
4096 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4098 * s-parame-ae653.ads: Removed.
4100 2017-09-07 Nicolas Roche <roche@adacore.com>
4102 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4103 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4104 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4105 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4106 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4107 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4109 2017-09-07 Yannick Moy <moy@adacore.com>
4111 * a-ngelfu.ads Add preconditions to all functions
4112 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4114 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4116 * lib-xref.adb (Generate_Reference): ignore
4117 references to entities which are Part_Of single concurrent
4120 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4122 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4125 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4127 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4128 Null_Task_Id is passed.
4130 2017-09-07 Javier Miranda <miranda@adacore.com>
4132 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4133 attribute. Defined for record types and subtypes.
4134 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4135 (Init_Tags_List) to facilitate generating separate code in the
4136 IP routine to initialize the object components and for completing
4137 the elaboration of dispatch tables.
4138 * exp_ch3.adb (Build_Init_Procedure): Improve the code
4139 generated in the IP routines by means of keeping separate
4140 the initialization of the object components from the
4141 initialization of its dispatch tables. (Init_Secondary_Tags):
4142 Adding new formal (Init_Tags_List) and adjusting calls to
4143 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4144 adjusting also calls to Ada.Tags.Register_Interface_Offset
4145 because the type of one of its formals has been changed.
4146 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4147 modified. Instead of receiving a pointer to an object this
4148 routine receives now a primary tag.
4149 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4150 additional formal: the tag of the primary dispatch table.
4151 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4152 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4153 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4154 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4155 formal in calls to Init_Secondary_Tags.
4157 2017-09-07 Javier Miranda <miranda@adacore.com>
4159 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4161 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4162 applied to generic subprograms.
4164 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4166 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4167 (because it refers to the anonymous concurrent object, not its type);
4168 fix condition for emitting error message about task/protected type,
4170 2017-09-07 Bob Duff <duff@adacore.com>
4172 * binde.adb (Debug_Flag_Old): If both -do and -dp
4173 are specified, behave as if just -do was specified, rather than
4176 2017-09-07 Nicolas Roche <roche@adacore.com>
4178 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4179 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4181 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4183 * sem_prag.adb (Find_Role): The Global_Seen flag
4184 is now consulted not only for abstract states and variables,
4185 but for all kinds of items.
4186 (Collect_Subprogram_Inputs_Outputs): Do not process formal
4187 generic parameters, because unlike ordinary formal parameters,
4188 generic formals only act as input/ outputs if they are explicitly
4189 mentioned in a Global contract.
4191 2017-09-07 Yannick Moy <moy@adacore.com>
4193 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4194 predicate procedure. Check predicate pragma/aspect with Ghost entity.
4195 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4198 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4200 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4202 * sem_ch3.adb (Build_Derived_Record_Type):i Call
4203 Copy_Dimensions_Of_Components after creating the copy of the
4205 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4206 derived recor type, copy the dikensions if any of each component
4207 of the parent record to the corresponding component declarations
4208 of the derived record. These expressions are used among other
4209 things as default values in aggregates with box associations.
4210 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4211 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4214 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4216 * sem_util.adb: Remove extra space after THEN.
4218 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4220 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4221 also mark the renamed subprogram as referenced.
4223 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4225 * par-ch6.adb (P_Subprogram): Improve error message on null
4226 procedure with misplaced aspect specification, which the parser
4227 first attempts to interpret as a malformed expression function.
4229 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4231 * sem_attr.adb (Analyze_Attribute_Old_Result):
4232 Allow attributes Result and Old in the case of an expression
4235 2017-09-07 Justin Squirek <squirek@adacore.com>
4237 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4238 Volatile to subcomponents.
4240 2017-09-07 Bob Duff <duff@adacore.com>
4242 * exp_ch7.adb (Find_Last_Init): Check for the
4243 case where a build-in-place function call has been replaced by a
4244 'Reference attribute reference.
4246 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4248 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4251 2017-09-07 Bob Duff <duff@adacore.com>
4253 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
4254 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
4255 secondary stack for all functions that return limited tagged
4256 types -- just do it for dispatching calls. Misc cleanup.
4257 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
4258 remove qualifications and type conversions. Fix various bugs
4259 where only a single level of qualification or conversion was
4260 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
4262 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
4265 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4267 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
4268 do not create actual subtypes that may generate further predicate
4270 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
4271 of body is a predicate function as well.
4272 (Resolve_Aspect_Expressions, Resolve_Name): For a component
4273 association, only the expression needs resolution, not the name.
4274 (Resolve_Aspect_Expressions, case Predicates): Construct and
4275 analyze the predicate function declaration in the scope of the
4276 type, before making the type and its discriminants visible.
4278 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4280 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
4281 only if the record type itself comes from source.
4283 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4285 * sem_ch5.adb: Minor reformatting and a typo fix
4287 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4289 * sinput-l.ads: minor remove extra period at the end of comment
4291 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4293 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
4295 (Find_Role): remove support for E_Discriminant.
4297 2017-09-06 Javier Miranda <miranda@adacore.com>
4299 * exp_ch6.adb (Expand_Simple_Function_Return):
4300 Add missing implicit type conversion to force displacement of the
4303 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4305 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
4307 2017-09-06 Yannick Moy <moy@adacore.com>
4309 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
4310 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
4312 2017-09-06 Bob Duff <duff@adacore.com>
4314 * sem_ch8.adb: Change Assert to be consistent with
4317 2017-09-06 Bob Duff <duff@adacore.com>
4319 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
4320 requested. Previously, the -do switch meant "run Elab_New and
4321 Elab_Old and use the order chosen by Elab_Old, possibly with
4322 debugging printouts comparing the two orders." Now it means
4323 "do not run Elab_New." This is of use if there are bugs that
4324 cause Elab_New to crash.
4325 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
4327 * ali.ads (Elab_Position): Change type to Nat, to avoid various
4330 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4332 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
4333 reference to SPARK RM.
4335 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4337 * layout.adb: Use SSU short hand consistently throughout the file.
4339 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4341 * freeze.adb (Freeze_Record_Type)
4342 <Sized_Component_Total_Round_RM_Size>: New local variable to
4343 accumulate the rounded RM_Size of components. Update it for
4344 every component whose RM_Size is statically known. Add missing
4345 guard to check that bit packing is really required before issuing
4346 the error about packing. Swap condition for clarity's sake.
4347 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
4349 2017-09-06 Fedor Rybin <frybin@adacore.com>
4351 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
4352 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
4353 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
4354 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
4355 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
4356 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
4357 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
4358 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
4359 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
4360 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
4361 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
4362 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
4363 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
4364 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
4365 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
4366 project manager sources.
4368 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4370 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
4371 entity of a mutable type and the right-hand side is a conditional
4372 expression, resolve the alternatives of the conditional using
4373 the base type of the target entity, because the alternatives
4374 may have distinct subtypes. This is particularly relevant if
4375 the alternatives are aggregates.
4377 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4379 * checks.adb (Apply_Predicate_Check): If the expression is an
4380 aggregate that is the RHS of an assignment, apply the check to
4381 the LHS after the assignment, rather than to the aggregate. This
4382 is more efficient than creating a temporary for the aggregate,
4383 and prevents back-end crashes when the aggregate includes a
4384 dynamic "others' association.
4386 2017-09-06 Yannick Moy <moy@adacore.com>
4388 * sem_ch12.adb (Analyze_Instance_And_Renamings):
4389 Set variable to ignore SPARK_Mode in instance before the analysis
4390 of the generated package declaration.
4392 2017-09-06 Yannick Moy <moy@adacore.com>
4394 * sem_res.adb (Resolve_Call): Do not issue a
4395 message for calls inside expression function, unless body was
4396 seen and is candidate for inlining.
4398 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4400 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
4401 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
4402 body. do not freeze the formals of the generic unit.
4404 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4406 * errout.adb (Error_Msg): Separate the
4407 treatment for warning vs. style messages in inlinings and
4408 instantiations. Prevents blowups on calls to Warn_Insertion for
4409 style messages, which should not be called in that case because
4410 Warning_Msg_Char is not set.
4412 2017-09-06 Justin Squirek <squirek@adacore.com>
4414 * sem_prag.adb (Check_VFA_Conflicts): Created
4415 to group all Volatile_Full_Access checks relating to other
4416 representation pragmas (Mark_Component_Or_Object): Created
4417 to centeralize the flagging of attributes for the record type
4418 component case, a pragma applied individually to a component, and
4420 (Process_Atomic_Independent_Shared_Volatile):
4421 Add propagation of certain pragmas to record components and move
4422 evaluation of VFA checks
4424 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4426 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
4427 Do not warn on conditions that are not obeyed for Inline_Always
4428 subprograms, when assertions are not enabled.
4430 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4432 * sem_util.adb (Unique_Entity): For abstract states return their
4435 2017-09-06 Bob Duff <duff@adacore.com>
4437 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
4438 that is a proper body corresponding to a stub, we defer the
4439 adjustment of the sloc until after the correct adjustment has
4440 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
4441 the adjustment, because it will be outside the range in (the old,
4442 incorrect) S_Adjustment.
4443 * inline.adb: Use named notation for readability and uniformity.
4444 * sinput-l.adb: Minor improvements to debugging output printed
4446 * sinput-l.ads (Create_Instantiation_Source): Minor comment
4449 2017-09-06 Vincent Celier <celier@adacore.com>
4451 * make.adb: Do not invoke gprbuild for -bargs -P.
4453 2017-09-06 Sylvain Dailler <dailler@adacore.com>
4455 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
4456 case when Op is of kind N_Qualified_Expression. In this case,
4457 the function is called recursively on the subexpression like in
4459 * make.adb: Minor reformatting
4461 2017-09-06 Justin Squirek <squirek@adacore.com>
4463 * einfo.adb (Set_Linker_Section_Pragma): Modify
4464 Set_Linker_Section_Pragma to be consistant with the "getter"
4465 Linker_Section_Pragma.
4466 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
4467 checking for container loops so that the index cursor is not
4468 directly changable by the user with the use of E_Loop_Parameter.
4469 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
4470 * sem_warn.adb (Check_References): Revert previous change.
4472 2017-09-06 Bob Duff <duff@adacore.com>
4474 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
4477 2017-09-06 Yannick Moy <moy@adacore.com>
4479 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
4480 declarations to only consider valid uses of Global/Depends those on
4481 single concurrent objects.
4483 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4485 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
4486 error as soon as one of the specified components overlaps the
4489 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4491 * sem_prag.ads: minor fix typo in comment.
4493 2017-09-06 Justin Squirek <squirek@adacore.com>
4495 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
4496 from source before checking source references.
4497 * sem_warn.adb (Check_References): Add check for internal block
4500 2017-09-06 Vincent Celier <celier@adacore.com>
4502 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
4503 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
4504 gnatname.adb: Remove the Project Manager from the GNAT tools.
4505 * gcc-interface/Makefile.in: ditto.
4507 2017-09-06 Bob Duff <duff@adacore.com>
4509 * sem_util.ads: Minor comment fix.
4511 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4513 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
4514 Generate a freeze node for the actual of a formal package, if
4515 the actual is declared in the same unit and has a corresponding
4516 body, to prevent the current instance from being frozen before
4519 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4521 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
4523 2017-09-06 Yannick Moy <moy@adacore.com>
4525 * sem_warn.adb: Minor refactoring.
4527 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4529 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
4530 to retrieve the inherited classwide precondition/postcondition
4532 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
4533 freezing a subprogram, to complete the generation of the
4534 corresponding checking code.
4536 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4538 * exp_util.adb (Is_Controlled_Indexing): New routine.
4539 (Is_Displace_Call): Use routine Strip to remove indirections.
4540 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
4541 missing case of controlled generalized indexing.
4542 (Is_Source_Object): Use routine Strip to remove indirections.
4543 (Strip): New routine.
4545 2017-09-06 Bob Duff <duff@adacore.com>
4547 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
4548 we include the proper header. Otherwise, we just declare the necessary
4549 things from the capabilities library. This is so we can build on
4550 machines without that library, while still enabling that library.
4551 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
4552 simply return 0 if the library is not present, or not included
4555 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
4557 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
4558 for renamings that involve function calls in prefix form.
4560 2017-09-06 Bob Duff <duff@adacore.com>
4562 * sem_ch3.adb (Analyze_Subtype_Declaration):
4563 Set Has_Delayed_Freeze on a subtype of an incomplete type.
4565 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
4567 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
4568 has no parameter specification and no entry index, use the entry name
4569 as the end of the generated SCO statement.
4571 2017-09-06 Steve Baird <baird@adacore.com>
4573 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
4574 uses of 'Image and related attributes as having side effects in
4575 order to avoid replicating such uses.
4576 * pprint.ads (Expression_Image) Add new generic formal flag
4577 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
4578 (eventually) override the default.
4579 * pprint.adb (Expression_Image) If the new flag is set, then
4580 suppress the ".all" suffix when displaying a dereference whose
4581 prefix is a use of a value-capturing compiler temp of the sort
4582 generated by Expr_Util.Remove_Side_Effects .
4583 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
4584 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
4586 * inline.adb: Minor wording change.
4588 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4590 * sem_ch7.adb: Update comment.
4592 2017-09-06 Yannick Moy <moy@adacore.com>
4594 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
4595 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
4596 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
4597 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
4598 so that applies to any entity.
4600 2017-09-06 Yannick Moy <moy@adacore.com>
4602 * sem_ch3.adb (Derived_Type_Declaration): Use
4603 Incomplete_Or_Partial_View rather than local Find_Partial_View.
4605 2017-09-06 Javier Miranda <miranda@adacore.com>
4607 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
4610 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4612 * sem_dim.adb (Analyze_Dimension): In an instance, a type
4613 conversion takes its dimensions from the expression, not from
4615 (Dimensions_Of_Operand): Ditto.
4617 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4619 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
4620 null procedures when GNAT coverage is used, so that their (empty)
4621 bodies are properly covered.
4623 2017-09-06 Bob Duff <duff@adacore.com>
4625 * sem_ch13.adb (Resolve_Aspect_Expressions): If
4626 the entity is a type with discriminants, make the discriminants
4627 directly visible in aspect clauses.
4629 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4631 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
4632 Universal_Real and the context is a floating-point type, resolve
4633 both operands to the target type.
4635 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4637 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
4638 sem_ch3.adb, sem_util.adb: Minor reformatting.
4640 2017-09-06 Yannick Moy <moy@adacore.com>
4642 * freeze.adb (Check_Inherited_Conditions): Rewriting
4643 of inherited preconditions and postconditions should only occur
4644 in GNATprove mode, that is, when GNATprove_Mode is True, not to
4645 be confused with SPARK_Mode being On.
4647 2017-09-06 Yannick Moy <moy@adacore.com>
4649 * sem_warn.adb (Check_References): Take into
4650 account possibility of attribute reference as original node.
4652 2017-09-06 Yannick Moy <moy@adacore.com>
4654 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
4657 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4659 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
4660 on the procedure created to encapsulate the body.
4661 * sem_ch7.adb: Add with clause for GNAT.HTable.
4662 (Entity_Table_Size): New constant.
4663 (Entity_Hash): New function.
4664 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
4665 (Is_Subprogram_Ref): Rename into...
4666 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
4667 the table instead of bailing out on them. Scan the value of constants
4668 if it is not known at compile time.
4669 (Contains_Subprograms_Refs): Rename into...
4670 (Scan_Subprogram_Refs): ...this.
4671 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
4672 Is_Public flag on subprograms if they are not actually referenced.
4673 (Hide_Public_Entities): Beef up comment on the algorithm.
4674 Reset the table of subprograms on entry.
4676 2017-09-06 Yannick Moy <moy@adacore.com>
4678 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
4680 2017-09-06 Javier Miranda <miranda@adacore.com>
4682 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
4683 cannot handle a type conversion of an array as an aggregate
4686 2017-09-06 Bob Duff <duff@adacore.com>
4688 * g-comlin.adb (Try_Help): Remove ".exe" so we
4689 get the same results on windows and unix.
4691 2017-09-06 Justin Squirek <squirek@adacore.com>
4693 * exp_imgv.adb (Expand_Image_Attribute),
4694 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
4695 Added case to handle new-style 'Image expansion
4696 (Rewrite_Object_Image): Moved from exp_attr.adb
4697 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4698 attribute cases so that the relevant subprograms in exp_imgv.adb
4699 handle all expansion.
4700 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
4701 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
4702 cases to call common function Analyze_Image_Attribute.
4703 (Analyze_Image_Attribute): Created as a common path for all
4704 image attributes (Check_Object_Reference_Image): Removed
4705 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4706 Removed and refactored into Is_Object_Image (Is_Object_Image):
4707 Created as a replacement for Is_Image_Applied_To_Object
4709 2017-09-06 Yannick Moy <moy@adacore.com>
4711 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
4712 message for missing input.
4714 2017-09-06 Yannick Moy <moy@adacore.com>
4716 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
4717 of protected subprograms and entries.
4718 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
4719 New function to detect when a subprogram of entry is defined
4720 inside a protected object.
4722 2017-09-06 Bob Duff <duff@adacore.com>
4724 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
4725 whether the current process has the CAP_SYS_NICE capability.
4726 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
4727 ceiling priorities if the current process has the CAP_SYS_NICE
4730 2017-09-06 Bob Duff <duff@adacore.com>
4732 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
4733 check back to the body, because SPARK is not yet ready for
4734 "or else raise Constraint_Error".
4736 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4738 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
4739 procedure by a single null statement, after evaluating the
4740 actuals that require it.
4742 2017-09-06 Javier Miranda <miranda@adacore.com>
4744 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
4745 Generating C code improve the code that checks the use of nested
4746 aggregates to initialize object declarations.
4748 2017-09-06 Yannick Moy <moy@adacore.com>
4750 * sem_ch3.adb (Derived_Type_Declaration): Detect
4751 violations of new rule SPARK RM 3.4(1). Also refactor existing
4752 check to use the new function Find_Partial_View.
4754 2017-09-06 Vincent Celier <celier@adacore.com>
4756 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
4757 from the Prj hierarchy has been removed from the GNAT driver.
4759 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4761 * sem_type.adb (Interface_Present_In_Ancestor): Within an
4762 expression function, or within a spec expression (default value,
4763 etc) a reference to an incomplete type is legal: legality of
4764 the operation will be checked when some related entity (type,
4765 object or subprogram) is frozen.
4767 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4769 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
4770 adjustments and a typo fix.
4772 2017-09-06 Yannick Moy <moy@adacore.com>
4774 * sem_res.adb (Resolve_Call): Do not issue info
4775 message about inlining of calls to functions in assertions,
4776 for functions whose body has not been seen yet.
4778 2017-09-06 Bob Duff <duff@adacore.com>
4780 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
4781 we can use modern Ada in this package.
4782 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
4783 Move Ada.Command_Line.Response_File to System.Response_File,
4784 and make Ada.Command_Line.Response_File into a rename of
4785 System.Response_File. This is to avoid having gnatbind depend
4786 Ada.Command_Line, which would damage the bootstrap process now
4787 that Ada.Command_Line contains modern Ada (the raise expression).
4788 * gnatbind.adb: Avoid dependence on
4789 Ada.Command_Line. Depend on System.Response_File instead
4790 of Ada.Command_Line.Response_File. Change one call to
4791 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
4792 to Ada.Command_Line.Argument_Count to use Arg_Count.
4793 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
4795 2017-09-06 Bob Duff <duff@adacore.com>
4797 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
4798 switch, because we've already read gnat.adc by default.
4800 2017-09-06 Bob Duff <duff@adacore.com>
4802 * exp_ch5.adb (Get_Default_Iterator): Replace
4803 "Assert(False)" with "return Iter", because if an iterable
4804 type is derived from a noniterable one, then we won't find an
4805 overriding or inherited default iterator.
4807 2017-09-06 Yannick Moy <moy@adacore.com>
4809 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
4810 literal index used to access a string is null or negative.
4812 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4814 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
4815 allowed on loop parameters.
4816 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
4818 (Write_Field15_Name): Update the output for
4819 Status_Flag_Or_Transient_Decl.
4820 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
4821 to loop parameters. Update the documentation of the attribute
4822 and the E_Loop_Parameter entity.
4823 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
4824 which assumes that cursors can never be controlled.
4825 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
4826 guard which assumes that cursors can never be controlled.
4828 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4830 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
4831 sem_warn.adb: Minor reformatting.
4833 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4835 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
4836 fix and preserve older GNAT warning on overlapping actuals that
4837 are not elementary types.
4839 2017-09-06 Justin Squirek <squirek@adacore.com>
4841 * sem_attr.adb: Comment correction.
4843 2017-09-06 Gary Dismukes <dismukes@adacore.com>
4845 * sem_util.adb: Minor reformatting.
4847 2017-09-06 Yannick Moy <moy@adacore.com>
4849 * a-comlin.ads (Argument): Add precondition for analysis.
4851 2017-09-06 Yannick Moy <moy@adacore.com>
4853 * sem_res.adb (Resolve): Update message for function call as statement.
4855 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4857 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
4858 generated bodies for renamings that are completions, when renamed
4859 procedure is No_Return.
4860 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
4861 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
4862 with No_Return, the renamed entity must be No_Return as well.
4864 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4866 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
4869 2017-09-06 Justin Squirek <squirek@adacore.com>
4871 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
4872 attribute cases (Rewrite_Object_Reference_Image): Created to
4873 aid the rewriting of new-style 'Image attributes.
4874 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
4875 (Check_Object_Reference_Image): Created to handle verification of
4876 'Image with object-references as prefixes.
4877 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
4878 Create predicate to identify cases where an 'Image attribute's
4879 prefix applies to an object reference.
4881 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4883 * freeze.adb (Freeze_Entity): Do not generate a freeze
4884 node for a generic unit, even if it includes delayed aspect
4885 specifications. Freeze nodes for generic entities must never
4886 appear in the tree that reaches the back-end of the compiler.
4888 2017-09-06 Yannick Moy <moy@adacore.com>
4890 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
4892 2017-09-06 Yannick Moy <moy@adacore.com>
4894 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
4895 to subprograms in other units as possibly inlined.
4897 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4899 * freeze.adb (Freeze_Entity): For a derived type that has no
4900 explicit delayed aspects but may inherit delayed aspects from its
4901 parent type, analyze aspect at freeze point for proper capture
4902 of an inherited aspect.
4904 2017-09-06 Arnaud Charlet <charlet@adacore.com>
4906 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
4907 renamings; also, avoid repeated calls to Renamed_Object when getting
4908 through object renamings.
4910 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4912 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
4913 array type declaration in a private part, when an index is a
4914 subtype indication of a discrete type with a private partial view.
4916 2017-09-06 Javier Miranda <miranda@adacore.com>
4918 * exp_ch4.adb (Expand_Modular_Op): Force generating
4919 temporary to improve the generated code.
4921 2017-09-06 Tristan Gingold <gingold@adacore.com>
4923 * s-fatgen.adb: Minor typo fix in comment.
4925 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4927 * exp_ch5.adb (Make_Field_Assign): If the type
4928 of the right-hand side has stored constraint, use its values
4929 (except for those that are renamings of parent discriminants)
4930 to produce additional assignments for the discriminants of the
4931 left-hand side, which are invisible in the righ-hand side and
4932 not retrievable as selected components.
4934 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4936 * sem_util.adb (Needs_One_Formal): The first formal of such a
4937 function must be a controlling formal, so that Obj.F (X, Y)
4938 can have the interpretation F(Obj)(X, Y).
4939 * sem_util.ads: Clarify documentation.
4941 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4943 * table.ads, table.adb: Restore original implementation.
4944 * namet.h (Names_Ptr): Adjust back.
4945 (Name_Chars_Ptr): Likewise.
4946 * uintp.h (Uints_Ptr): Likewise.
4947 (Udigits_Ptr): Likewise.
4948 * g-table.ads: Remove pragma Compiler_Unit_Warning.
4949 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
4950 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
4951 * spark_xrefs.ads: Likewise.
4952 * scos.h: Undo latest changes.
4954 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4956 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
4957 No_Return flag to instance if pragma applies to generic unit. This
4958 must be done explicitly because the pragma does not appear
4959 directly in the generic declaration (unlike the corresponding
4960 aspect specification).
4962 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
4964 * sem_ch7.adb (Has_Referencer): Move up and expand comment
4965 explaining the test used to detect inlining. Use same test
4966 in second occurrence.
4967 (Analyze_Package_Body_Helper): Minor formatting fixes.
4969 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4971 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
4972 derived type with a mixture of renamed and constrained parent
4973 discriminants, the constraint for the target must obtain the
4974 discriminant values from both the operand and from the stored
4975 constraint for it, given that the constrained discriminants are
4976 not visible in the object.
4977 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
4978 side may be derived from that of the left-hand side (as in the
4979 case of an assignment with a change of representation) so the
4980 discriminant to be used in the retrieval of the value of the
4981 component must be the entity in the type of the right-hand side.
4983 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
4985 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
4986 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4987 * exp_util.adb (Is_Source_Object): Account for
4988 the cases where the source object may appear as a dereference
4989 or within a type conversion.
4990 * exp_ch6.adb: Fix missing space in error message.
4992 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4994 * sem_prag.adb: Update description of Eliminate.
4996 2017-09-06 Ed Schonberg <schonberg@adacore.com>
4998 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
4999 properly an attribute reference 'Loop_Entry that appears in the
5000 list of indices of an indexed expression, to prevent an infinite
5001 loop in the compiler.
5003 2017-09-06 Bob Duff <duff@adacore.com>
5005 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5007 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5009 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5010 in a set membership is an overloaded enumeration literal, and
5011 the type of the alternative is resolved from a previous one,
5012 replace the entity of the alternative as well as the type,
5013 to prevent inconsistencies between the entity and the type.
5015 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5017 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5018 (No_Component_Reordering_Specified): New switch.
5019 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5020 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5021 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5023 (Check_Configuration_Consistency): Invoke it.
5024 * debug.adb (d.r): Toggle the effect of the switch.
5025 (d.v): Change to no-op.
5026 * einfo.ads (Has_Complex_Representation):
5027 Restrict to record types.
5028 (No_Reordering): New alias for Flag239.
5029 (OK_To_Reorder_Components): Delete.
5030 (No_Reordering): Declare.
5031 (Set_No_Reordering): Likewise.
5032 (OK_To_Reorder_Components): Delete.
5033 (Set_OK_To_Reorder_Components): Likewise.
5034 * einfo.adb (Has_Complex_Representation): Expect record types.
5035 (No_Reordering): New function.
5036 (OK_To_Reorder_Components): Delete.
5037 (Set_Has_Complex_Representation): Expect base record types.
5038 (Set_No_Reordering): New procedure.
5039 (Set_OK_To_Reorder_Components): Delete.
5040 (Write_Entity_Flags): Adjust to above change.
5041 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5042 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5043 OK_To_Reorder_Components on record types with convention Ada.
5044 * lib-writ.adb (Write_ALI): Deal with NC marker.
5045 * opt.ads (No_Component_Reordering): New flag.
5046 (No_Component_Reordering_Config): Likewise.
5047 (Config_Switches_Type): Add No_Component_Reordering component.
5048 * opt.adb (Register_Opt_Config_Switches): Copy
5049 No_Component_Reordering onto No_Component_Reordering_Config.
5050 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5051 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5052 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5053 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5054 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5055 No_Reordering flag from the default.
5056 (Build_Derived_Private_Type): Likewise.
5057 (Build_Derived_Record_Type): Likewise. Then inherit it
5058 for untagged types and clean up handling of similar flags.
5059 (Record_Type_Declaration): Likewise.
5060 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5061 remove redundant test on Is_Tagged_Type.
5062 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5063 (Sig_Flags): Likewise.
5064 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5065 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5066 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5067 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5068 Copy the layout of the parent type only if the No_Reordering
5070 (components_to_record): Reorder record types with
5071 convention Ada by default unless No_Reordering is set or -gnatd.r
5072 is specified and do not warn if No_Reordering is set in GNAT mode.
5074 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5076 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5077 new predicate to reject declarations that can be completions,
5078 when there is a visible prior homograph that is a null procedure.
5079 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5080 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5082 2017-09-06 Thomas Quinot <quinot@adacore.com>
5084 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5085 run of 253 characters or more.
5087 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5089 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5090 properly incomplete subtypes that may be created by explicit or
5091 implicit declarations.
5092 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5093 (Subtype_Kind): Ditto.
5094 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5095 Ekind of a subtype of a discriminated incomplete type.
5096 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5097 incomplete types, to preserve error reporting.
5098 (Process_Incomplete_Dependents): Do not create a subtype
5099 declaration for an incomplete subtype that is created internally.
5100 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5101 incomplete subtypes that do not require a completion, either
5102 because they are limited views, of they are generic actuals.
5104 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5106 * checks.adb (Insert_Valid_Check): Remove the
5107 suspicious manipulation of the Do_Range_Check flag as ths is
5108 no linger needed. Suppress validity check when analysing the
5109 validation variable.
5111 2017-09-06 Philippe Gil <gil@adacore.com>
5113 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5116 2017-09-06 Bob Duff <duff@adacore.com>
5118 * sem_elim.adb: Minor comment fix.
5120 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5122 * sem_util.adb (Is_Object_Reference): A function call is an
5123 object reference, and thus attribute references for attributes
5124 that are functions (such as Pred and Succ) as well as predefined
5125 operators are legal in contexts that require an object, such as
5126 the prefix of attribute Img and the Ada2020 version of 'Image.
5128 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5130 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5131 exp_ch3.adb, xoscons.adb: Minor reformatting.
5133 2017-09-06 Raphael Amiard <amiard@adacore.com>
5135 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5136 Position parameter. If supplied, use it to provide efficient iteration.
5137 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5138 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5141 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5143 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5144 designated type is class-wide and the expression is an unchecked
5145 conversion, preserve the conversion when checking the tag of the
5146 designated object, to prevent spurious semantic errors when the
5147 expression in the conversion has an untagged type (for example
5148 an address attribute).
5150 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5152 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5153 operation is subject to a pragma Eliminate.
5155 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5157 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5159 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5161 * fe.h (Eliminate_Error_Msg): Remove.
5163 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5165 * gcc-interface/utils.c (make_packable_type): Update call to
5168 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5170 * gcc-interface/utils2.c (build_load_modify_store):
5171 Use int_mode_for_size.
5173 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5176 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5177 for Itypes that are E_Record_Subtype with a cloned subtype.
5178 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5180 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5182 * gcc-interface/trans.c (convert_with_check): Use a custom base type
5183 if the base type of the expression has a different machine mode.
5184 Rename a couple of parameters and local variable.
5186 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5188 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5189 conversions around prefixes that are not references.
5191 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5193 * gcc-interface/utils.c (unchecked_convert): When the result type is a
5194 non-biased integral type with size 0, set the result to 0 directly.
5196 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5198 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5199 (renaming_from_instantiation_p): ...this.
5200 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5201 instead of explicit tests on kind of entities. Adjust for renaming.
5202 (gnat_to_gnu_profile_type): Likewise.
5203 (gnat_to_gnu_subprog_type): Likewise.
5204 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5205 (Case_Statement_to_gnu): Likewise.
5206 (gnat_to_gnu): Likewise.
5207 (process_freeze_entity): Likewise.
5208 (process_type): Likewise.
5209 (add_stmt_with_node): Adjust for renaming.
5210 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5211 (renaming_from_generic_instantiation_p): Rename to...
5212 (renaming_from_instantiation_p): ...this. Use inline predicate.
5213 (pad_type_hasher::keep_cache_entry): Fold.
5215 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5217 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5218 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5219 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5220 (N_Slice): Likewise.
5221 (N_Selected_Component): Likewise. Do not try again to translate it.
5222 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5224 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5226 * repinfo.ads: Document new treatment of dynamic values.
5227 (TCode): Bump upper bound to 29.
5228 (Dynamic_Val): New constant set to 29.
5229 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5230 (Rep_Value) <Dynamic_Val>: Likewise.
5231 * repinfo.h (Dynamic_Val): New macro.
5232 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5234 <INTEGER_CST>: Set TCODE instead of recursing.
5235 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5236 <VAR_DECL>: New case.
5237 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5238 <BIT_AND_EXPR>: Adjust.
5239 <CALL_EXPR>: Do not fall through.
5241 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5243 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5244 there is no target, do not create a temporary for the return value for
5245 an allocator either.
5247 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5249 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5250 unconstrained array type.
5252 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5253 Alan Hayward <alan.hayward@arm.com>
5254 David Sherwood <david.sherwood@arm.com>
5256 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
5257 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
5259 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5260 Alan Hayward <alan.hayward@arm.com>
5261 David Sherwood <david.sherwood@arm.com>
5263 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
5264 is_a <scalar_int_mode>.
5265 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
5266 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
5268 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5269 Alan Hayward <alan.hayward@arm.com>
5270 David Sherwood <david.sherwood@arm.com>
5272 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
5273 instead of mode_for_size.
5274 (gnat_to_gnu_subprog_type): Likewise.
5275 * gcc-interface/utils.c (make_type_from_size): Likewise.
5277 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5278 Alan Hayward <alan.hayward@arm.com>
5279 David Sherwood <david.sherwood@arm.com>
5281 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
5282 (fp_size_to_prec): Likewise.
5284 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5285 Alan Hayward <alan.hayward@arm.com>
5286 David Sherwood <david.sherwood@arm.com>
5288 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
5289 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
5291 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5292 Alan Hayward <alan.hayward@arm.com>
5293 David Sherwood <david.sherwood@arm.com>
5295 * gcc-interface/decl.c (validate_size): Update use of
5296 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
5298 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5299 Alan Hayward <alan.hayward@arm.com>
5300 David Sherwood <david.sherwood@arm.com>
5302 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
5303 (fp_size_to_prec): Likewise.
5305 2017-08-29 Martin Liska <mliska@suse.cz>
5308 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
5310 2017-08-08 Martin Liska <mliska@suse.cz>
5312 * gcc-interface/trans.c: Include header files.
5314 2017-07-29 Jakub Jelinek <jakub@redhat.com>
5316 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
5317 as new argument to the imported_module_or_decl debug hook.
5319 2017-07-25 Javier Miranda <miranda@adacore.com>
5321 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
5324 2017-07-19 Jakub Jelinek <jakub@redhat.com>
5326 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
5327 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
5328 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
5330 2017-07-18 Mike Frysinger <vapier@chromium.org>
5332 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
5333 (../../gnatlink$(exeext)): Likewise.
5335 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
5338 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
5339 (Backend_Overflow_Checks): Set to True.
5341 2017-06-23 Jakub Jelinek <jakub@redhat.com>
5343 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
5345 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
5347 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
5349 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
5351 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
5353 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
5354 imported subprograms for the current compilation unit as
5355 definitions. Disable debug info for references to variables.
5356 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
5357 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
5358 not built-in functions to their binding scope.
5359 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
5360 the function as a definition. Update all callers.
5361 (gnat_write_global_declarations): Emit debug info for imported
5362 functions. Filter out external variables for which debug info
5365 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
5368 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
5369 (i[3456]86-pc-gnu): Likewise.
5370 (x86_64 kfreebsd): Likewise.
5372 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5375 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
5377 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
5380 * s-interr-hwint.adb: Reinstate.
5381 * gcc-interface/Makefile.in (RTEMS): Use it again.
5383 2017-06-08 Olivier Hainque <hainque@adacore.com>
5385 * vx_crtbegin_auto.c: Update year in copyright notice.
5386 * vx_crtbegin.c: Likewise.
5387 * vx_crtbegin.inc: Likewise.
5388 * vx_crtend.c: Likewise.
5390 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
5392 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
5393 * s-tpopsp-rtems.adb: Delete.
5395 2017-06-02 Olivier Hainque <hainque@adacore.com>
5397 * vx_crtbegin_auto.c: New file.
5398 * vx_crtbegin.c: New file.
5399 * vx_crtbegin.inc: New file.
5400 * vx_crtend.c: New file.
5402 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
5404 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
5405 const qualifiers that cause -Wignored-qualifiers warnings.
5407 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5409 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5410 for Itypes that are E_Access_Subtype.
5411 <E_Access_Subtype>: Use the DECL of the base type directly.
5413 2017-05-22 Ed Schonberg <schonberg@adacore.com>
5414 Eric Botcazou <ebotcazou@adacore.com>
5416 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
5417 limited view may appear in the profile of a function, and a call to
5418 that function in another unit in which the full view is available must
5419 use this full view to spurious type errors at the point of call.
5420 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
5421 of parent body with a with clause for the main unit.
5422 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
5423 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
5424 types declared in external units like types from limited with clauses.
5425 Adjust final processing of defer_limited_with_list accordingly.
5426 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
5427 again to translate the prefix after the field if it is incomplete.
5429 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
5431 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
5432 alignment for simple volatile fields and remove associated errors.
5434 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5436 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
5437 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
5439 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
5441 * gcc-interface/utils.c (can_materialize_object_renaming_p):
5442 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
5443 process Original_Node instead of expanded names.
5445 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5447 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
5448 addressability check in the constrained case.
5450 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5452 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
5453 types not coming from a limited context.
5455 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5457 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
5458 the inlined list that are not public.
5459 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
5460 there is a pragma Inline_Always on the subprogram.
5462 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5464 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
5465 <N_Allocator>: Use properly typed constants.
5466 (extract_values): Move around.
5467 (pos_to_constructor): Minor tweaks.
5468 (Sloc_to_locus): Fix formatting.
5469 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
5470 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
5471 (Gigi_Equivalent_Type): Adjust head comment.
5472 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
5474 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
5476 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
5477 is a representation clause on an extension, propagate the alignment of
5478 the parent type only if the platform requires strict alignment.
5480 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
5482 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
5483 instead of Word_Size.
5486 2017-03-28 Andreas Schwab <schwab@suse.de>
5489 * system-linux-aarch64-ilp32.ads: New file.
5490 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
5491 from LIBGNAT_TARGET_PAIRS.
5492 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
5493 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
5494 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
5495 or -mabi=ilp32, resp.
5497 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
5500 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
5501 instead of Word_Size.
5503 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5505 * raise-gcc.c (exception_class_eq): Make ec parameter const.
5507 2017-05-02 Richard Biener <rguenther@suse.de>
5509 * gcc-interface/misc.c (gnat_post_options): Do not set
5512 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5514 * gcc-interface/trans.c (assoc_to_constructor): Make sure
5515 Corresponding_Discriminant is only called on discriminants.
5516 Skip the saving of the result only for them.
5517 (gnat_to_gnu) <N_Selected_Component>: Likewise.
5518 <N_Unchecked_Type_Conversion>: Translate the result type first.
5519 (gigi): Set TREE_NOTHROW on Begin_Handler.
5520 (stmt_list_cannot_raise_p): New predicate.
5521 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
5522 a cleanup if the statements of the handler cannot raise.
5523 (process_freeze_entity): Use Is_Record_Type.
5524 (process_type): Likewise.
5526 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5528 * einfo.ads (Corresponding_Record_Component): New alias
5529 for Node21 used for E_Component and E_Discriminant.
5530 * einfo.adb (Corresponding_Record_Component): New function.
5531 (Set_Corresponding_Record_Component): New procedure.
5532 (Write_Field21_Name): Handle Corresponding_Record_Component.
5533 * sem_ch3.adb (Inherit_Component): Set
5534 Corresponding_Record_Component for every component in
5535 the untagged case. Clear it afterwards for non-girder
5537 * gcc-interface/decl.c (gnat_to_gnu_entity)
5538 <E_Record_Type>: For a derived untagged type with discriminants
5539 and constraints, apply the constraints to the layout of the
5540 parent type to deduce the layout.
5541 (field_is_aliased): Delete.
5542 (components_to_record): Test DECL_ALIASED_P directly.
5543 (annotate_rep): Check that fields are present except for
5545 (create_field_decl_from): Add DEBUG_INFO_P
5546 parameter and pass it in recursive and other calls. Add guard
5547 for the manual CSE on the size.
5548 (is_stored_discriminant): New predicate.
5549 (copy_and_substitute_in_layout): Consider only
5550 stored discriminants and check that original fields are present
5551 in the old type. Deal with derived types. Adjust call to
5552 create_variant_part_from.
5554 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5556 * exp_ch6.adb (Expand_Call_Helper): When locating the
5557 accessibility entity created for an access parameter, handle
5558 properly a reference to a formal of an enclosing subprogram. if
5559 the reference appears in an inherited class-wide condition, it
5560 is the rewriting of the reference in the ancestor expression,
5561 but the accessibility entity must be that of the current formal.
5563 2017-05-02 Javier Miranda <miranda@adacore.com>
5565 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
5566 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
5567 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
5568 Call Expand_Non_Binary_Modular_Op.
5570 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5572 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
5573 has discriminants, do not override the Stored_Constraint list of
5574 the full view of the derived type with that of the derived type.
5576 2017-05-02 Bob Duff <duff@adacore.com>
5578 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
5580 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5582 * s-os_lib.ads: Minor typo fix.
5584 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5586 * gnatls.adb: Merge and refactor code from Prj.Env and remove
5587 this deprecated dependency.
5589 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5591 * exp_util.ads: minor comment addition.
5593 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5595 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
5596 pastos in part #3 of the head comment.
5598 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5600 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
5601 procedure body for a local (sub)type declaration within a
5602 predicate function. Invariant checks do not apply to these, and
5603 the expansion of the procedure will happen in the wrong scope,
5604 leading to misplaced freeze nodes.
5606 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5608 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
5609 to analyze generated actions. If the main unit is a body,
5610 the required scope is that of the corresponding unit declaration.
5612 2017-05-02 Arnaud Charlet <charlet@adacore.com>
5614 * einfo.adb (Declaration_Node): flip branches of
5615 an IF statement to avoid repeated negations in its condition;
5616 no change in semantics, only to improve readability.
5618 2017-05-02 Arnaud Charlet <charlet@adacore.com>
5620 * sem_case.adb: Remove extra spaces in parameter declarations.
5622 2017-05-02 Justin Squirek <squirek@adacore.com>
5624 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
5625 in usage line for new -gnatwE switch.
5627 2017-05-02 Claire Dross <dross@adacore.com>
5629 * a-cofuve.ads (Remove): Remove unnecessary
5630 conditions in precondition.
5632 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
5634 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
5635 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
5637 2017-05-02 Justin Squirek <squirek@adacore.com>
5639 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5640 alternative expression.
5641 * sem_res.adb (Resolve_Case_Expression): Ditto.
5643 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5645 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
5646 Refine predicate for the case where the primitive operation
5647 is a renaming of equality. An overriding operation that is
5648 a user-defined renaming of predefined equality inherits its
5649 slot from the overridden operation. Otherwise it is treated
5650 as a predefined op and occupies the same predefined slot as
5651 equality. A call to it is transformed into a call to its alias,
5652 which is the predefined equality. A dispatching call thus uses
5653 the proper slot if operation is further inherited and called
5654 with class-wide arguments.
5656 2017-05-02 Justin Squirek <squirek@adacore.com>
5658 * errout.adb (Set_Msg_Text): Add a case to switch the message
5659 type when the character '[' is detected signifying a warning
5660 about a run-time exception.
5661 * opt.ads Add a new Warning_Mode value for new switch
5662 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
5663 to handle new warning mode
5664 * usage.adb (Usage): Add usage entry for -gnatwE
5665 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
5667 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5669 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
5670 declaration that operates on some fixed point type.
5672 2017-05-02 Justin Squirek <squirek@adacore.com>
5674 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
5676 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5678 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
5680 2017-05-02 Justin Squirek <squirek@adacore.com>
5682 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
5683 expression (Analyze_If_Expression): Add check for valid condition
5684 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
5686 * sem_res.adb (Resolve_If_Expression): Add check for valid
5687 condition and then-expression.
5689 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5691 * exp_ch3.adb (Build_Initialization_Call): Generate a null
5692 statement if the initialization call is a null procedure, as
5693 can happen with a controlled type with no explicit Initialize
5694 procedure, or an array of such.
5695 * exp_ch7.adb (Process_Object_Declaration): For a type with
5696 controlled components that has a trivial Initialize procedure,
5697 insert declaration for finalization counter after object
5699 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
5700 finalization block and attendant declarations if component has
5701 a trivial Initialize procedure.
5702 (Make_Init_Call): Do not generate a call if controlled type has
5703 a trivial Initialize procedure.
5705 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5707 * g-forstr.ads (Data): Move Format component last.
5708 * g-forstr.adb ("+"): Adjust for above change.
5709 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
5710 * g-sechas.ads (Context): Move Key last.
5711 * g-socket.ads (Service_Entry_Type): Move Aliases last.
5712 * s-fileio.adb (Temp_File_Record): Move Name last.
5713 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
5714 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
5716 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
5718 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
5719 switch introduced recently. finally not needed.
5721 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5723 * sem_ch6.adb (Analyze_Null_Procedure): Set the
5724 Corresponding_Body link for a null procedure declaration.
5726 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5728 * atree.h (Flag290): Add missing terminating parenthesis.
5729 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
5730 (Set_Is_Class_Wide_Clone): Likewise.
5731 * einfo.ads (Is_Class_Wide_Clone): Likewise.
5733 2017-05-02 Gary Dismukes <dismukes@adacore.com>
5735 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
5736 parameter Array_Comp to indicate the case of an array object
5737 with null-excluding components.
5738 * checks.adb (Null_Exclusion_Static_Checks):
5739 Call Compile_Time_Constraint_Error instead of
5740 Apply_Compile_Time_Constraint_Error in the component case. Also
5741 call that when Array_Comp is True, with an appropriate warning for
5742 the array component case. Only create an explicit initialization
5743 by null in the case of an object of a null-excluding access type
5744 (and no longer do that in the component case).
5745 * sem_ch3.adb (Check_Component): Add a Boolean parameter
5746 Array_Comp defaulted to False. Pass Empty for the Comp
5747 actual when calling Null_Exclusion_Static_Checks in the case
5748 where Comp_Decl matches Object_Decl, because we don't have a
5749 component in that case. In the case of an object or component
5750 of an array type, pass True for Array_Comp on the recursive call
5753 2017-05-02 Bob Duff <duff@adacore.com>
5755 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
5756 compute the linux priority from the Ada priority. Call this everywhere
5757 required. In particular, the previous version was not doing this
5758 computation when setting the ceiling priority in various places. It
5759 was just converting to C.int, which results in a ceiling that is off
5762 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5764 * sem_ch3.adb: Comment predicate inheritance.
5766 2017-05-02 Tristan Gingold <gingold@adacore.com>
5768 * s-trasym.ads: Add comment.
5770 2017-05-02 Bob Duff <duff@adacore.com>
5772 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
5773 * sem_ch4.adb: Minor reformatting.
5774 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
5775 * s-taspri-posix-noaltstack.ads: Minor refactoring.
5776 * sinput.ads: Minor typo fix.
5778 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5780 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
5781 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
5782 here from exp_ch9, to recognize objects whose creation requires
5783 dynamic allocation, so that the proper warning can be emitted
5784 when restriction No_Implicit_Heap_Allocation is in effect.
5785 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
5786 to emit proper warning when an object that requires dynamic
5787 allocation is declared.
5789 2017-05-02 Tristan Gingold <gingold@adacore.com>
5791 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
5793 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5795 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
5796 visibility rules for equality operators that apply within an
5797 instantiation apply within an inlined body.
5798 * sem_type.adb (Add_One_Interp): ditto.
5800 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5802 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
5805 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5808 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
5809 Name_No_Tagged_Streams): Move to regular pragmas. Add
5810 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
5811 and Secondary_Stack_Size.
5812 (Pragma_Id): Move Pragma_Assume,
5813 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
5814 Pragma_No_Tagged_Streams to second part.
5816 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5818 * exp_attr.adb: Minor reformatting.
5820 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5822 * sem_ch4.adb (Analyze_Selected_Component): Improve error
5823 detection for illegal references to private components or
5824 operations of a protected type in the body of the type.
5826 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5828 * opt.ads: Add missing GNAT markers in comments.
5829 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
5830 settings of Optimize_Alignment at the end.
5832 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5834 * checks.adb (Apply_Constraint_Check): Do not apply
5835 a discriminant check when the associated type is a constrained
5836 subtype created for an unconstrained nominal type.
5837 * exp_attr.adb: Minor reformatting.
5839 2017-05-02 Bob Duff <duff@adacore.com>
5841 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
5842 the N_Raise_Expression case.
5843 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
5846 2017-05-02 Yannick Moy <moy@adacore.com>
5848 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
5849 optimize length comparison in GNATprove mode.
5850 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
5851 operator /= into negation of operator = when needed.
5852 (Expand_SPARK): Call new
5853 function to expand operator /=.
5855 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5857 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
5858 Simplify the expression for a fixed-fixed division to remove
5859 divisions by constants whenever possible, as an optimization
5860 for restricted targets.
5862 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
5864 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
5866 2017-05-02 Bob Duff <duff@adacore.com>
5868 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
5869 to find primitive ops, instead of using an Identifier that will
5870 later be looked up. This is necessary because these ops are not
5871 necessarily visible at all places where we need to call them.
5872 * exp_util.ads: Minor comment fix.
5874 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5876 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
5877 references are fully conformant if they are both expansions
5878 of the discriminant of a protected type, within one of the
5879 protected operations. One occurrence may be expanded into a
5880 constant declaration while the other is an input parameter to
5881 the corresponding generated subprogram.
5883 2017-05-02 Justin Squirek <squirek@adacore.com>
5885 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
5886 recursivly searching composite-types for null-excluding access
5887 types and verifying them.
5888 (Analyze_Object_Declaration): Add a
5889 call to Check_Null_Excluding_Components for static verification
5890 of non-initialized objects.
5891 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
5892 a parameter for a composite-type's component and an extra case
5893 for printing component information.
5895 2017-05-02 Yannick Moy <moy@adacore.com>
5897 * sem_ch10.adb (Analyze_Subunit): Take
5898 configuration pragma into account when restoring appropriate
5899 pragma for analysis of subunit.
5901 2017-05-02 Justin Squirek <squirek@adacore.com>
5903 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
5904 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
5905 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
5906 clauses from the runtime.
5908 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
5910 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
5911 array components specially.
5913 2017-05-02 Ed Schonberg <schonberg@adacore.com>
5915 * sem_ch8.adb (Premature_Usage): If the premature usage of
5916 an entity is as the expression in its own object decaration,
5917 rewrite the reference as Any_Id to prevent cascaded errors or
5918 compiler loops when such an entity is used in an address clause.
5920 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
5922 * gcc-interface/decl.c (components_to_record): Add missing guard.
5924 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
5926 * gcc-interface/decl.c (components_to_record): Add more comments.
5927 Put back pending fields onto the regular list if the misalignment
5928 happens to cancel itself.
5930 2017-04-28 Ed Schonberg <schonberg@adacore.com>
5932 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
5933 controlling actual in a prefixed call, preserve the original node
5934 information if the prefix itself has been rewritten, for ASIS use.
5936 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
5938 * exp_ch6.adb (Insert_Post_Call_Actions):
5939 Code clean up. Insert the post-call actions after an enclosing
5940 procedure call when N denotes a function call and appears as an
5941 actual parameter in the procedure call.
5943 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5945 * freeze.adb (Check_Component_Storage_Order): If there is a clause
5946 for the component, also reject the attribute if the component
5947 doesn't end on a byte boundary and its scalar storage order is
5948 different from that of the enclosing record type.
5950 2017-04-28 Javier Miranda <miranda@adacore.com>
5952 * atree.ads (Info_Messages): Removed.
5953 (Warning_Info_Messages): New counter.
5954 (Report_Info_Messages): New counter.
5955 * err_vars.ads Update documentation.
5956 * errout.adb (Delete_Warning_And_Continuations): Update
5957 Info_Message occurrences.
5958 (Error_Msg_Internal): Update Info_Message occurrences.
5959 (Delete_Warning): Update Info_Message occurrences.
5960 (Write_Error_Summary): Update Info_Message occurrences.
5961 (Output_Messages): Update Info_Message occurrences.
5962 (To_Be_Removed): Update Info_Message occurrences.
5963 (Reset_Warnings): Update Info_Message occurrences.
5964 * errutil.adb (Error_Msg): Update Info_Message occurrences.
5965 (Finalize): Update Info_Message occurrences.
5966 (Initialize): Update Info_Message occurrences.
5967 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
5968 (Compilation_Errors): Update Info_Message_Occurences.
5970 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
5972 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
5973 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
5974 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
5975 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
5976 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
5977 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
5979 * sem_eval.adb (Why_Not_Static): Initialize Typ.
5980 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
5982 2017-04-28 Bob Duff <duff@adacore.com>
5984 * sem_util.ads, sem_util.adb (Might_Raise): New function
5985 that replaces Is_Exception_Safe, but has the opposite
5986 sense. Is_Exception_Safe was missing various cases -- calls inside
5987 a pragma Debug, calls inside an 'if' or assignment statement,
5988 etc. Might_Raise now walks the entire subtree looking for things
5990 * exp_ch9.adb (Is_Exception_Safe): Remove.
5991 (Build_Protected_Subprogram_Body): Replace call to
5992 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
5993 constants where possible).
5994 * exp_ch7.adb: Rename Is_Protected_Body -->
5995 Is_Protected_Subp_Body. A protected_body is something different
5998 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6000 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6001 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6002 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6003 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6004 (P_Protected): Likewise.
6005 * sem_case.adb (Check_Duplicates):
6006 Add pragma Warnings on variable.
6007 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6008 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6009 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6010 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6011 (Analyze_Iterator_Specification): Initialize Bas variable.
6012 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6013 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6014 (Analyze_Accept_Statement): Initialize Task_Nam.
6016 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6018 * checks.adb (Install_Primitive_Elaboration_Check):
6019 Do not generate an elaboration check if all checks have been
6022 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6024 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6025 Interrupt_Handler and Attach_Handler): Generate reference
6026 to protected operation to prevent spurious warnings about
6027 unreferenced entities. Previous scheme failed with style checks
6030 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6032 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6033 that follows an expression function must not be relocated to
6034 the generated body, because it applies to the code that follows.
6036 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6038 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6039 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6040 code that might violate the more stringent checking for 'Access
6041 introduced in Ada 2005.
6043 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6045 * a-cforse.adb: minor style fix in comment.
6047 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6049 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6050 initialize Block_Decls variable.
6051 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6052 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6053 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6054 Formal_DDT and Actual_DDT variables.
6055 (Expand_Interface_Thunk): Initialize Iface_Formal.
6056 (Make_DT): Initialize Size_Comp.
6057 (Make_Select_Specific_Data_Table): Initialize Decls.
6058 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6059 Also initialize more RPC_Receiver_* variables.
6060 (Build_To_Any_Function): Initialize Cstr_Formal.
6061 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6063 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6065 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6066 node between access types, freeze the designated type as well,
6067 so that dispatch table pointers are created in the proper scope,
6068 and not in the constructed body of the expression function.
6070 2017-04-28 Bob Duff <duff@adacore.com>
6072 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6073 value makes large compilations faster, but small compilations slower.
6075 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6077 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6079 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6081 * erroutc.adb (Compilation_Errors): Do not consider info messages
6082 as suitable warnings when warnings must be treated as errors.
6083 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6084 internally-generated packages when outputting completion
6086 * errout.adb (Output_Messages): Do not consider info messages as
6087 suitable warnings when warnings must be treated as errors.
6088 * errutil.adb (Finalize): Do not consider info messages as
6089 suitable warnings when warnings must be treated as errors.
6091 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6093 * warnsw.ads: Minor fix for incorrect wording in comment.
6095 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6097 * sem_res.adb (In_Instance_Code): New predicate in
6098 Valid_Conversion, to determine whether a type conversion appears
6099 as (or within) an actual for a formal object. Type conversions
6100 in instances are not rechecked in Valid_Conversion because
6101 visibility changes between generic location andi instance may
6102 lead to spurious errors, but conversions within an actual must be
6103 fully checked, and they are not fully resolved when pre-analyzing
6106 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6108 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6109 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6110 of the relocated node will have mangled Parent pointers.
6111 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6112 tables used in conjunction with entity and itype replication.
6113 (Visit_Entity): Rewrite the restriction on which entities
6114 require duplication. The restriction now includes all types.
6116 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6118 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6119 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6120 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6123 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6125 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6126 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6128 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6130 * exp_util.adb: Minor reformatting.
6132 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6134 * sem_ch4.adb: Fix copy/pasto.
6136 2017-04-27 Tristan Gingold <gingold@adacore.com>
6138 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6139 raise-gcc.c. Fix include search path for raise-gcc.c
6141 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6143 * fe.h (Warn_On_Questionable_Layout): Declare.
6144 * warnsw.ads (Warn_On_Record_Holes): Move down.
6145 (Warn_On_Questionable_Layout): New boolean variable.
6146 (Warning_Record): Add Warn_On_Questionable_Layout field.
6147 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6148 (Restore_Warnings): Likewise.
6149 (Save_Warnings): Likewise.
6150 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6151 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6152 components_to_record.
6153 (gnu_field_to_gnat): New function.
6154 (warn_on_field_placement): Likewise.
6155 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6156 parameters. Rename local variables and adjust recursive call.
6157 Rework final scan of the field list and implement warnings on the
6158 problematic placement of specific sorts of fields.
6160 2017-04-27 Bob Duff <duff@adacore.com>
6162 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6163 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6164 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6165 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6166 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6167 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6168 For efficiency, cache results of Is_Internal_File_Name and
6169 Is_Predefined_File_Name in the Units table. This avoids a lot
6170 of repeated text processing.
6172 2017-04-27 Emmanuel Briot <briot@adacore.com>
6174 * g-comlin.adb (Sort_Sections): remove useless test.
6176 2017-04-27 Claire Dross <dross@adacore.com>
6178 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6179 allow the use of regular equality over elements in contracts.
6180 (Formal_Model): Ghost package containing model functions that are
6181 used in subprogram contracts.
6182 (Current_To_Last): Removed, model functions should be used instead.
6183 (First_To_Previous): Removed, model functions should be used instead.
6184 (Strict_Equal): Removed, model functions should be used instead.
6185 (No_Overlap): Removed, model functions should be used instead.
6186 (Equivalent_Keys): Functions over cursors are removed. They were
6187 awkward with explicit container parameters.
6188 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6189 allow the use of regular equality over elements in contracts.
6190 (Formal_Model): Ghost package containing model functions that
6191 are used in subprogram contracts.
6192 (Current_To_Last): Removed, model functions should be used instead.
6193 (First_To_Previous): Removed, model functions should be used instead.
6194 (Strict_Equal): Removed, model functions should be used instead.
6195 (No_Overlap): Removed, model functions should be used instead.
6197 2017-04-27 Yannick Moy <moy@adacore.com>
6199 * gnat1drv.adb: Code cleanup.
6201 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6203 * exp_util.adb (Replace_Entity): The prefix of a 'Result
6204 attribute reference in a post- condition is the subprogram to
6205 which the condition applies. If the condition is inherited
6206 by a type extension, the prefix becomes a reference to the
6207 inherited operation, but there is no need to create a wrapper
6208 for this operation, because 'Result is expanded independently
6209 when elaborating the postconditions.
6211 2017-04-27 Bob Duff <duff@adacore.com>
6213 * sinput.adb: Minor code cleanup.
6214 * namet.adb (Append): Create faster versions of
6215 Append(String) and Append(Name_Id) by using slice assignment
6217 * sem_util.adb (In_Instance): Speed this up by removing
6218 unnecessary tests; Is_Generic_Instance is defined for all
6220 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6221 Remove unused function.
6222 * alloc.ads (Nodes_Initial): Use a much larger value, because
6223 the compiler was spending a lot of time copying the nodes table
6224 when it grows. This number was chosen in 1996, so is rather out
6225 of date with current memory sizes. Anyway, it's virtual memory.
6226 Get rid of Orig_Nodes_...; use Node_... instead.
6227 * atree.adb (Lock): Do not release the Nodes tables; it's a
6229 Orig_Nodes_ ==> Nodes_
6230 * nlists.adb: Orig_Nodes_ ==> Nodes_
6231 * g-table.adb: Remove unused "with" clause.
6232 * g-table.ads, table.ads: Remove Big_Table_Type, which should
6233 not be used by clients.
6234 * g-dyntab.adb (Last_Allocated): New function
6235 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6237 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6239 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6241 (Subtypes_Statically_Match): Remove duplicate check.
6242 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6244 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6246 * exp_aggr.adb (Replace_Type): Remove the special processing
6247 for selected components.
6248 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6249 processing for attributes Fixed_Value and Integer_Value.
6250 * exp_util.adb (Side_Effect_Free): Merge the processing for
6251 qualified expressions, type conversions, and unchecked type
6253 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
6255 * par-ch3.adb (P_Declarative_Items): Merge the processing for
6256 tokens function, not, overriding, and procedure.
6257 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
6258 for qualified expressions, type conversions, and unchecked
6260 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
6261 processing for Ada 83 and instances.
6262 (Object_Access_Level): Merge the processing for indexed components
6263 and selected components.
6264 * uname.adb (Add_Node_Name): Merge the processing for stubs.
6266 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6268 * checks.adb (Install_Primitive_Elaboration_Check):
6269 Do not generate the check when restriction No_Elaboration_Code
6272 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6274 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
6275 of Expand_Dispatching_Call. If the denoted subprogram has a
6276 class-wide precondition, this is the only precondition that
6277 applies to the call, rather that the class-wide preconditions
6278 that may apply to the body that is executed. (This is specified
6281 2017-04-27 Yannick Moy <moy@adacore.com>
6283 * gnat1drv.adb (Adjust_Global_Switches): Issue
6284 a warning in GNATprove mode if the runtime library does not
6285 support IEEE-754 floats.
6287 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6289 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
6290 is itself inherited it does not carry any contract information,
6291 so examine its parent operation which is its Alias.
6293 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6295 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
6296 prefix can be an object reference in which case Obj'Image (X)
6297 can only be interpreted as an indexing of the parameterless
6298 version of the attribute.
6299 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
6300 an indexing or a slice operation if the attribute does not require
6301 parameters. In Ada2012 'Image also belongs in this category,
6302 and A'Image (lo .. hi) is legal and must be parsed as a slice.
6304 2017-04-27 Yannick Moy <moy@adacore.com>
6306 * exp_ch4.adb: Minor reformatting.
6307 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
6308 disable the CodePeer and C generation modes. Similar to the
6309 opposite actions done in CodePeer mode.
6311 2017-04-27 Yannick Moy <moy@adacore.com>
6313 * sem_res.adb: Remove duplicate code.
6314 * sem_attr.adb: Delete duplicate code.
6316 2017-04-27 Bob Duff <duff@adacore.com>
6318 * g-dyntab.adb: Reduce the amount of copying in
6319 Release. No need to copy items past Last.
6321 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6323 * checks.adb Add with and use clauses for Sem_Disp.
6324 (Install_Primitive_Elaboration_Check): New routine.
6325 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
6326 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
6327 processing of 'Elaborated.
6328 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
6331 2017-04-27 Bob Duff <duff@adacore.com>
6333 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
6334 If the table grows and then shrinks back to empty, we won't necessarily
6335 point back to the empty array. Code cleanups.
6336 * sinput.ads: Add 'Base to Size clause to match the declared
6339 2017-04-27 Claire Dross <dross@adacore.com>
6341 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
6342 allow the use of regular equality over elements in contracts.
6343 (Formal_Model): Ghost package containing model functions that
6344 are used in subprogram contracts.
6345 (Current_To_Last): Removed, model functions should be used instead.
6346 (First_To_Previous): Removed, model functions should be used instead.
6347 (Strict_Equal): Removed, model functions should be used instead.
6348 (No_Overlap): Removed, model functions should be used instead.
6349 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
6350 Boolean generic parameter to disable contracts for equivalence
6352 (Witness): Create a witness of a key that is used for handling of
6353 equivalence between keys.
6354 (Has_Witness): Check whether a witness is contained in a map.
6355 (W_Get): Get the element associated to a witness.
6356 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
6358 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
6359 Boolean generic parameter to disable contracts for equivalence
6361 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
6362 of equivalence on functional maps.
6363 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
6364 of equivalence on functional maps.
6366 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6368 * exp_ch9.adb (Expand_Entry_Barrier): Code
6369 cleanup. Do not perform the optimization which removes the
6370 declarations of the discriminant and component renamings when
6371 validity checks on operands and attributes are in effect.
6373 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6375 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
6376 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
6377 a-cfhama.ads, a-cofove.ads: Minor reformatting.
6379 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6381 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
6382 pointer dereference.
6383 * g-spipat.adb (Dump): Code clean up. Protect against a possible
6384 null pointer dereference.
6386 2017-04-27 Bob Duff <duff@adacore.com>
6388 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
6389 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
6390 Free renames Init, since they do the same thing.
6391 * g-table.ads: Default for Table_Low_Bound.
6392 * table.ads: Default for Table_Low_Bound, Table_Initial, and
6395 2017-04-27 Bob Duff <duff@adacore.com>
6397 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
6399 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
6400 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
6401 Reorder code so that above assertions do not fail.
6402 * table.ads: Remove obsolete comment on Locked.
6404 2017-04-27 Claire Dross <dross@adacore.com>
6406 * a-cfdlli.ads: Code cleanup.
6408 2017-04-27 Yannick Moy <moy@adacore.com>
6410 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
6411 when needed for proof. (Expand_SPARK): Call the new procedure.
6412 * exp_util.ads Fix typo.
6414 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6416 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
6419 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6421 * sem_elab.adb Add new type Visited_Element
6422 and update the contents of table Elab_Visited. Various code clean up.
6423 (Check_Elab_Call): Determine whether a prior call to
6424 the same subprogram was already examined within the same context.
6425 (Check_Internal_Call_Continue): Register the subprogram being
6426 called as examined within a particular context. Do not suppress
6427 elaboration warnings.
6429 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6431 * xoscons.adb, osint.ads: Minor reformatting.
6433 2017-04-27 Bob Duff <duff@adacore.com>
6435 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
6436 Table_Count_Type --> Table_Last_Type, because the name
6437 was confusing (a "count" usually starts at zero). Add
6438 functionality supported or needed by other tables packages
6439 (Move, Release_Threshold).
6440 * g-table.ads, g-table.adb: This is now just a thin wrapper
6441 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
6442 or needed by other tables packages (Save, Restore).
6443 * table.ads, table.adb: This is now just a thin wrapper around
6444 * g-table.ads/g-table.adb.
6445 * namet.h, scos.h, uintp.h: These files are reaching into the
6446 private data of some instances of g-table, whose names changed,
6447 so the above change requires some adjustment here. It now uses
6450 2017-04-27 Bob Duff <duff@adacore.com>
6452 * namet.adb, namet.ads: Minor: remove unused procedures.
6454 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6456 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
6457 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
6458 Add pragma Warnings on Rtype variable in nested block. *
6459 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
6460 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
6461 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
6462 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
6463 (Process_Component_List_For_Finalize): Initialize Counter_Id.
6464 (Build_Finalize_Statements): Initialize Bod_Stmts.
6465 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
6467 2017-04-27 Claire Dross <dross@adacore.com>
6469 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
6470 allow the use of regular equality over elements in contracts.
6471 (Formal_Model): Ghost package containing model functions that are
6472 used in subprogram contracts.
6473 (Current_To_Last): Removed, model
6474 functions should be used instead.
6475 (First_To_Previous): Removed, model functions should be used instead.
6476 (Strict_Equal): Removed, model functions should be used instead.
6477 (No_Overlap): Removed, model functions should be used instead.
6478 (Equivalent_Keys): Functions over cursors are removed. They were
6479 awkward with explicit container parameters.
6480 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
6481 (proof only) procedure to help GNATprove when equivalence over
6482 keys is not equality.
6484 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6486 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
6487 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
6488 Minor reformatting and code cleanups.
6490 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6492 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
6493 subsidiary of Check_Inherited_Conditions, to build pragmas for an
6494 operation whose ancestor has classwide pre/postconditions. This
6495 is used both to check the legality of the inheritance in Ada
6496 and in SPARK, and to determine whether a wrapper is needed for
6497 an inherited operation.
6498 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
6499 Improve placement of error message for inherited classwide
6500 conditions that become illegal on type derivation.
6502 2017-04-27 Yannick Moy <moy@adacore.com>
6504 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
6505 SPARK_Mode from context on generic package.
6506 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
6509 2017-04-27 Claire Dross <dross@adacore.com>
6511 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
6512 overflows in computations.
6513 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
6514 overflows in computations.
6515 (Insert): Rewrite precondition to avoid overflows in computations.
6516 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
6517 overflows in computations.
6518 (Insert): Rewrite precondition to avoid overflows in computations.
6520 2017-04-27 Steve Baird <baird@adacore.com>
6522 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
6523 flag when it is declared in order to avoid confusing CodePeer about
6524 the possibility of an uninitialized variable read.
6526 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6528 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
6529 no dimensionality error if the subtype of the expression is
6530 identical to the nominal subtype in the declaration, even though
6531 the expression itself may have been constant-folded and lack a
6533 * sem_dim.ads: Add comments on setting of dimension vectors and
6534 its interaction with node rewritings and side-effect removal.
6536 2017-04-27 Bob Duff <duff@adacore.com>
6538 * debug.adb: Minor comment correction.
6539 * sem_dim.ads: Minor reformatting and typo fixes.
6541 2017-04-27 Bob Duff <duff@adacore.com>
6543 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
6544 Last of the tables via function calls, rather than relying on layout
6547 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6549 * exp_util.adb: No wrapper in GNATprove mode.
6551 2017-04-27 Yannick Moy <moy@adacore.com>
6553 * sem_res.adb (Resolve_Comparison_Op): Always
6554 evaluate comparisons between values of universal types.
6556 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6558 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
6559 an elaboration counter nor a check when in GNATprove mode.
6560 * sem_util.adb (Build_Elaboration_Entity): Do not create an
6561 elaboration counter when in GNATprove mode.
6563 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6565 * freeze.adb: copy-paste typo.
6567 2017-04-27 Yannick Moy <moy@adacore.com>
6569 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
6570 Use correct test to detect call in GNATprove mode instead of
6573 2017-04-27 Claire Dross <dross@adacore.com>
6575 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
6576 New property function expressing that the element of a
6577 sequence are contained in the union of two sequences.
6578 (Formal_Model.M_Elements_Included): New property function
6579 expressing that the element of a sequence are another sequence.
6580 (Generic_Sorting): Use new property functions to state that
6581 elements are preserved by Sort and Merge.
6582 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
6583 allow the use of regular equality over elements in contracts.
6584 (Formal_Model): Ghost package containing model functions
6585 that are used in subprogram contracts. (Capacity):
6586 On unbounded containers, return the maximal capacity.
6587 (Current_To_Last): Removed, model functions should be used instead.
6588 (First_To_Previous): Removed, model functions should be used instead.
6589 (Append): Default parameter value replaced
6590 by new wrapper to allow more precise contracts.
6591 (Insert): Subprogram restored, it seems it was useful to users even if
6593 (Delete): Subprogram restored, it seems it was useful to users even if
6595 (Prepend): Subprogram restored, it seems it was useful to users even
6596 if it is inefficient.
6597 (Delete_First): Subprogram restored, it seems it
6598 was useful to users even if it is inefficient. (Delete_Last):
6599 Default parameter value replaced by new wrapper to allow more
6601 (Generic_Sorting.Merge): Subprogram restored.
6602 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
6603 allow the use of regular equality over elements in contracts.
6604 (Formal_Model): Ghost package containing model functions
6605 that are used in subprogram contracts. (Capacity):
6606 On unbounded containers, return the maximal capacity.
6607 (Current_To_Last): Removed, model functions should be used
6609 (First_To_Previous): Removed, model functions should be used instead.
6610 (Append): Default parameter value replaced
6611 by new wrapper to allow more precise contracts.
6612 (Insert): Subprogram restored, it seems it was useful to users even if
6614 (Delete): Subprogram restored, it seems it was useful to users even if
6616 (Prepend): Subprogram restored, it seems it was useful to users even
6617 if it is inefficient.
6618 (Delete_First): Subprogram restored, it seems it
6619 was useful to users even if it is inefficient. (Delete_Last):
6620 Default parameter value replaced by new wrapper to allow more
6622 (Generic_Sorting.Merge): Subprogram restored.
6623 (Vector): Do not reuse formal vectors, as it is no longer possible
6624 to supply them with an equality function over elements.
6626 2017-04-27 Bob Duff <duff@adacore.com>
6628 * g-dyntab.adb (Release): When allocating the new
6629 table, use the correct slice of the old table to initialize it.
6631 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6633 * einfo.ads: Minor fixes in comments.
6635 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6637 * sem_prag.adb: disable clones in SPARK_Mode.
6639 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6641 * sem_util.ads, contracts.adb: Minor reformatting.
6643 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6645 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
6646 Build body of subprogram that has a class-wide condition that
6647 contains calls to other primitives.
6648 (Build_Class_Wide_Clone_Call); Build a call to the common
6649 class-wide clone of a subprogram with classwide conditions. The
6650 body of the subprogram becomes a wrapper for a call to the
6651 clone. The inherited operation becomes a similar wrapper to which
6652 modified conditions apply, and the call to the clone includes
6653 the proper conversion in a call the parent operation.
6654 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
6655 subprogram that has a classwide condition that contains calls to
6656 other primitives, build an internal subprogram that is invoked
6657 through a type-specific wrapper for all inherited subprograms
6658 that may have a modified condition.
6659 * sem_prag.adb (Check_References): If subprogram has a classwide
6660 condition, create entity for corresponding clone, to be invoked
6661 through wrapper subprograns.
6662 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
6663 message about placement if pragma isi internally generated.
6664 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
6665 a classwide clone, build body of clone as copy of original body,
6666 and rewrite original body as a wrapper as a wrapper for a call to
6667 the clone, so that it incorporates the original pre/postconditions
6669 * freeze.adb (Check_Inherited_Conditions): For an inherited
6670 subprogram that inherits a classwide condition, build spec and
6671 body of corresponding wrapper so that call to inherited operation
6672 gets the modified conditions.
6673 * contracts.adb (Analyze_Contracts): If analysis of classwide
6674 condition has created a clone for a primitive operation, analyze
6675 declaration of clone.
6677 2017-04-27 Steve Baird <baird@adacore.com>
6679 * exp_util.adb (Build_Allocate_Deallocate_Proc):
6680 Add "Suppress => All_Checks" to avoid generating unnecessary
6683 2017-04-27 Yannick Moy <moy@adacore.com>
6685 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
6686 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
6687 inlining body in GNATprove mode when switch -gnatdm used.
6688 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
6689 in GNATprove mode when switch -gnatdm used.
6691 2017-04-27 Arnaud Charlet <charlet@adacore.com>
6693 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
6694 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
6695 clauses, so that we keep an indication of the address clause
6696 before removing it from the tree.
6698 2017-04-27 Yannick Moy <moy@adacore.com>
6700 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
6701 of expression being qualified, when not an object name, or else
6702 evaluate the underlying name.
6704 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
6706 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
6708 2017-04-27 Justin Squirek <squirek@adacore.com>
6710 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
6711 Process_Component_List_For_Finalization as a local variable.
6712 (Process_Component_For_Finalize): Add an extra parameter to avoid
6714 (Process_Component_List_For_Finalization): Correct calls to
6715 Process_Component_For_Finalize to take Num_Comps as a parameter.
6717 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6719 * sem_ch8.adb (Find_Direct_Name): Account for the case where
6720 a use-visible entity is defined within a nested scope of an
6721 instance when giving priority to entities which were visible in
6722 the original generic.
6723 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
6725 2017-04-27 Tristan Gingold <gingold@adacore.com>
6727 * raise-gcc.c: Don't use unwind.h while compiling
6728 for the frontend, but mimic host behavior.
6730 2017-04-27 Javier Miranda <miranda@adacore.com>
6732 * sem_ch3.adb (Build_Discriminated_Subtype):
6733 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
6735 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6737 * sem_prag.adb (Analyze_Global_Item):
6738 Do not consider discriminants because they are not "entire
6739 objects". Remove the discriminant-related checks because they are
6741 (Analyze_Input_Output): Do not consider discriminants
6742 because they are not "entire objects".
6744 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6746 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
6747 perform check if the current scope does not come from source,
6748 as is the case for a rewritten task body, because check has
6749 been performed already, and may not be doable because of changed
6752 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6754 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
6755 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
6758 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6760 * sem_ch4.adb (Analyze_Call): If the return type of a function
6761 is incomplete in an context in which the full view is available,
6762 replace the type of the call by the full view, to prevent spurious
6764 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
6765 abstract subprogram so that compiler does not reject a parameter
6766 of a primitive operation of a tagged type being frozen, when
6767 the untagged type of that parameter cannot be frozen.
6769 2017-04-27 Bob Duff <duff@adacore.com>
6771 * sem_attr.adb (Compute_Type_Key): Don't walk
6772 representation items for irrelevant types, which could be in a
6773 different source file.
6775 2017-04-27 Steve Baird <baird@adacore.com>
6777 * exp_attr.adb (Expand_N_Attribute_Reference):
6778 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
6781 2017-04-27 Yannick Moy <moy@adacore.com>
6783 * exp_unst.ads: Fix typos in comments.
6785 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6787 * sem_eval.adb (Choice_Matches): Handle properly a real literal
6788 whose type has a defined static predicate.
6790 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6792 * exp_ch4.adb (Insert_Dereference_Action):
6793 Do not adjust the address of a controlled object when the
6794 associated access type is subject to pragma No_Heap_Finalization.
6797 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
6799 * gcc-interface/utils.c (gnat_type_for_size): Set
6800 TYPE_ARTIFICIAL on created types.
6802 2017-04-27 Claire Dross <dross@adacore.com>
6804 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6805 modifications in functional containers.
6806 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6807 to improve readablity. Subprograms are separated between basic
6808 operations, constructors and properties. Universally quantified
6809 formulas in contracts are factorized in independant functions
6810 with a name and a comment. Names of parameters are improved.
6812 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6814 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6816 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6818 * sem_res.adb (Resolve_Type_Conversion): Do not
6819 install a predicate check here since this is already done during
6820 the expansion phase. Verify whether the operand satisfies the
6821 static predicate (if any) of the target type.
6822 * sem_ch3.adb (Analyze_Object_Declaration): Do
6823 not install a predicate check if the object is initialized by
6824 means of a type conversion because the conversion is subjected
6827 2017-04-27 Tristan Gingold <gingold@adacore.com>
6829 * raise.c (__gnat_builtin_longjmp): Remove.
6830 (__gnat_bracktrace):
6831 Add a dummy definition for the compiler (__gnat_eh_personality,
6832 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
6833 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
6834 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
6835 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
6836 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
6837 and a-except-2005.adb.
6838 * raise-gcc.c: Allow build in compiler, compiled as a C++
6840 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
6841 (db): Constify msg_format.
6842 (get_call_site_action_for): Don't use void arithmetic.
6843 * system.ads (Frontend_Exceptions): Set to False.
6844 (ZCX_By_Default): Set to True.
6845 (GCC_ZC_Support): Set to True.
6846 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
6848 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
6849 in gnat1 and gnatbind.
6850 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
6851 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
6852 * s-excmac.ads, s-excmac.adb: Copy of variants.
6853 * a-except.o: Adjust preequisites.
6854 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
6856 2017-04-27 Claire Dross <dross@adacore.com>
6858 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
6859 modifications in functional containers.
6860 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
6861 to improve readablity. Subprograms are separated between basic
6862 operations, constructors and properties. Universally quantified
6863 formulas in contracts are factorized in independant functions
6864 with a name and a comment. Names of parameters are improved.
6866 2017-04-27 Gary Dismukes <dismukes@adacore.com>
6868 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
6870 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6872 * sem_res.adb (Resolve_Type_Conversion): Do not
6873 install a predicate check here since this is already done during
6874 the expansion phase. Verify whether the operand satisfies the
6875 static predicate (if any) of the target type.
6876 * sem_ch3.adb (Analyze_Object_Declaration): Do
6877 not install a predicate check if the object is initialized by
6878 means of a type conversion because the conversion is subjected
6881 2017-04-27 Tristan Gingold <gingold@adacore.com>
6883 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
6884 replaced by their variants).
6886 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6888 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
6889 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
6890 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
6892 2017-04-27 Tristan Gingold <gingold@adacore.com>
6894 * s-excmac-gcc.ads, s-excmac-gcc.adb,
6895 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
6898 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6900 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
6901 the loop which detects potential enclosing transient scopes. The
6902 loop now terminates much earlier as transient scopes are bounded
6903 by packages and subprograms.
6905 2017-04-27 Claire Dross <dross@adacore.com>
6907 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
6908 allow the use of regular equality over elements in contracts.
6909 (Cursor): Type is now public so that it can be used in
6911 (Formal_Model): Ghost package containing
6912 model functions that are used in subprogram contracts.
6913 (Current_To_Last): Removed, model functions should be used
6915 (First_To_Previous): Removed, model functions should
6917 (Strict_Equal): Removed, model functions
6918 should be used instead.
6919 (Append): Default parameter value
6920 replaced by new wrapper to allow more precise contracts.
6921 (Insert): Default parameter value replaced by new wrapper to
6922 allow more precise contracts.
6923 (Delete): Default parameter
6924 value replaced by new wrapper to allow more precise contracts.
6925 (Prepend): Default parameter value replaced by new wrapper to
6926 allow more precise contracts.
6927 (Delete_First): Default parameter
6928 value replaced by new wrapper to allow more precise contracts.
6929 (Delete_Last): Default parameter value replaced by new wrapper
6930 to allow more precise contracts.
6932 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6934 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
6935 for object declarations.
6936 (Expand_SPARK_N_Object_Declaration): New routine.
6937 * sem_elab.adb (Check_A_Call): Include calls to the
6938 Default_Initial_Condition procedure of a type under the SPARK
6939 elaboration checks umbrella.
6941 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6943 * sem.adb (Analyze): Diagnose an illegal iterated component
6945 * sem_util.ads, sem_util.adb
6946 (Diagnose_Iterated_Component_Association): New routine.
6948 2017-04-27 Bob Duff <duff@adacore.com>
6950 * adaint.c (__gnat_get_current_dir): Return 0 in length if
6952 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
6953 exception if getcwd failed.
6955 2017-04-27 Yannick Moy <moy@adacore.com>
6957 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
6958 entities with special prefix.
6960 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6962 * debug.adb Change the documentation of switch -gnatd.s.
6963 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
6964 to manage the secondary stack when an enclosing scope already
6965 performs this functionality (aka relaxed management). Switch
6966 -gnatd.s may be used to force strict management in which case
6967 the block will manage the secondary stack unconditionally. Add
6968 a guard to stop the traversal when encountering a package or a
6971 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6973 * sem_res.adb (Resolve_Call): Refine further the handling of
6974 limited views of return types in function calls. If the function
6975 that returns a limited view appears in the current unit,
6976 we do not replace its type by the non-limited view because
6977 this transformation is performed int the back-end. However,
6978 the type of the call itself must be the non-limited view, to
6979 prevent spurious resolution errors.
6981 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6983 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
6984 Removed, proposed implementation using generics for class-wide
6985 preconditions proved impractical.
6986 (Class_Wide_Clone): New attribute of subprogram. Designates
6987 subprogram created for primitive operations with class-wide
6988 pre/postconditions that contain calls to other primitives. The
6989 clone holds the body of the original primitive, but the
6990 pre/postonditions do not apply to it. The original body is
6991 rewritten as a wrapper for a call to the clone.
6992 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
6993 the flag is set, no code for the corresponding pre/postconditions
6994 is inserted into its body.
6996 2017-04-27 Bob Duff <duff@adacore.com>
6998 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
6999 Scalar_Storage_Order if -gnatI is given.
7000 * sem_prag.adb (Analyze_Pragma): Ignore
7001 Default_Scalar_Storage_Order if -gnatI is given.
7003 2017-04-27 Claire Dross <dross@adacore.com>
7005 * a-cofuba.ads (Add): Take as an additional input parameter
7006 the position where the element should be inserted.
7007 (Remove): New function that removes an element from the container.
7008 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7009 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7010 (Remove): New function that removes an element from a set.
7011 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7012 (Remove): New function that removes an element from a sequence.
7013 (Insert): New function that adds anywhere in a sequence.
7015 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7017 * checks.adb (Generate_Range_Check): Revert previous change.
7019 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7021 * sem_util.adb: Minor reformatting/rewording.
7023 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7025 * lib-xref.adb (Generate_Reference): The use
7026 of attribute 'Result is not considered a violation of pragma
7029 2017-04-27 Justin Squirek <squirek@adacore.com>
7031 * cstand.adb (Create_Standard): Correctly set
7032 Directly_Designated_Type for Any_Access.
7033 * sem_type.adb (Covers): Minor grammar fixes.
7035 2017-04-27 Bob Duff <duff@adacore.com>
7037 * sem_attr.adb: Minor cleanup.
7039 2017-04-27 Claire Dross <dross@adacore.com>
7041 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7042 private child of Ada.Containers used to implement all functional
7044 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7045 child of Ada.Containers. It provides functional indefinite unbounded
7046 maps which can be used as high level models for specification
7048 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7049 child of Ada.Containers. It provides functional indefinite unbounded
7050 sets which can be used as high level models for specification
7052 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7053 child of Ada.Containers. It provides functional indefinite unbounded
7054 vectors which can be used as high level models for specification
7056 * Makefile.rtl: Add new packages.
7057 * impunit.adb: Add new packages.
7059 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7061 * sem_ch4.adb: Minor reformatting.
7063 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7065 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7066 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7067 point type actual that has user-defined arithmetic primitives,
7068 when there is a previous actual for a formal package that defines
7069 a fixed-point type with the parent user-defined operator.
7071 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7073 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7074 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7075 the component type allows range checks.
7077 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7079 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7080 corresponding declaration, because formal derived types are
7081 rewritten as private extensions.
7083 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7085 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7086 dimensions of operands if node has been analyzed already, because
7087 previous analysis and dimension checking will have removed the
7088 dimension information from the operands.
7090 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7092 * debug.adb: Document the use of switch -gnatd.s.
7093 * einfo.ads Update the documentation on attribute
7094 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7095 the uses of these attributes from certain entities.
7096 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7097 which determines whether the block should continue to manage
7098 the secondary stack.
7099 (Manages_Sec_Stack): New routine.
7101 2017-04-27 Bob Duff <duff@adacore.com>
7103 * atree.ads: Minor edit.
7105 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7107 * sinfo.ads: Update the section on Ghost mode. Add
7108 a section on SPARK mode. Update the placement of section on
7109 expression functions.
7111 2017-04-27 Bob Duff <duff@adacore.com>
7113 * sinput.adb (Get_Source_File_Index): Don't
7114 assert that S is in the right range in the case where this is
7115 a .dg file under construction.
7117 2017-04-27 Yannick Moy <moy@adacore.com>
7119 * sem_util.adb (Check_Result_And_Post_State):
7120 Handle more precisely each conjunct in expressions formed by
7121 and'ing sub-expressions.
7123 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7125 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7127 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7129 * gnat_rm.texi, gnat_ugn.texi,
7130 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7131 doc/gnat_ugn/platform_specific_information.rst,
7132 doc/gnat_ugn/gnat_and_program_execution.rst,
7133 doc/gnat_ugn/gnat_utility_programs.rst,
7134 doc/gnat_ugn/the_gnat_compilation_model.rst,
7135 doc/gnat_rm/implementation_defined_attributes.rst,
7136 doc/gnat_rm/the_gnat_library.rst,
7137 doc/gnat_rm/implementation_defined_pragmas.rst,
7138 doc/gnat_rm/representation_clauses_and_pragmas.rst,
7139 doc/gnat_rm/implementation_of_specific_ada_features.rst,
7140 doc/gnat_rm/implementation_defined_aspects.rst,
7141 doc/gnat_rm/implementation_defined_characteristics.rst: Update
7144 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7146 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7147 generating C code on complex case expressions.
7149 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7151 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7152 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7153 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7154 Ada_2012 instead of Ada_2005 to be compatible with the above
7156 * bindgen.adb: Silence new warning on pragma Ada_95.
7158 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7160 * checks.adb (Generate_Range_Check): Revert part of previous change.
7162 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7164 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7165 container indexing operation that appears as a an actual in a
7166 parameter association in a procedure call.
7168 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
7170 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7171 Fix spelling mistakes.
7173 2017-04-25 Bob Duff <duff@adacore.com>
7175 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7176 * sinput-p.adb: Use regular fat pointers, with bounds checking,
7177 for source buffers. Fix misc obscure bugs.
7178 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7179 checking, for source buffers. Modify representation clause for
7180 Source_File_Record as appropriate. Move Source_File_Index_Table
7181 from spec to body, because it is not used outside the body.
7182 Move Set_Source_File_Index_Table into the private part, because
7183 it is used only in the body and in children. Use trickery to
7184 modify the dope in the generic instantiation case. It's ugly,
7185 but not as ugly as the previous method. Fix documentation.
7186 Remove obsolete code.
7187 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7188 indexing in source buffers.
7189 * fmap.adb: Avoid conversions from one string type to another.
7190 Remove a use of global name buffer.
7191 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7194 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7196 * exp_util.adb, exp_ch4.adb: Minor reformatting.
7198 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7200 * checks.adb: Code clean up in various routines.
7201 (Generate_Range_Check): Do not generate a range check when the
7202 expander is not active or when index/range checks are suppressed
7204 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7205 Remove variants that include a Supress parameter. These routines
7206 are never used, and were introduced before the current scope-based
7207 check suppression method.
7209 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
7211 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7212 code and some subprogram calls that are now noop.
7214 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7216 * exp_ch4.adb (Expand_N_Case_Expression): Take
7217 Minimize_Expression_With_Actions into account when possible.
7219 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7221 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7222 (Known_Null): Moved to Sem_Util.
7223 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7224 (Known_Null): Moved to Sem_Util.
7225 * sem_util.adb Add new enumeration type Null_Status_Kind.
7226 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7227 this routine is now carried out by Null_Status.
7228 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7229 is now carried out by Null_Status.
7230 (Null_Status): New routine.
7231 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7232 (Known_Null): Moved from Exp_Util.
7234 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7236 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7237 error on the return type of an expression function that is a
7238 completion, if the type is derived from a generic formal type.
7240 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7242 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7243 conversion are those of the target type.
7245 2017-04-25 Bob Duff <duff@adacore.com>
7247 * a-clrefi.adb: Minor cleanup.
7249 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7251 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
7253 2017-04-25 Bob Duff <duff@adacore.com>
7255 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
7256 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
7257 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
7258 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
7259 the Internal_Source buffer. This removes the incorrect call to "="
7260 the customer noticed.
7261 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
7262 eventually need to eliminate them altogether. Or else get rid
7263 of zero-origin addressing.
7265 2017-04-25 Claire Dross <dross@adacore.com>
7267 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
7268 function used in GNATprove to know if an expression contains
7269 non-dispatching calls on primitives of a tagged type.
7271 2017-04-25 Bob Duff <duff@adacore.com>
7273 * rtsfind.adb (Initialize): Initialize
7274 First_Implicit_With. Building the compiler with Normalize_Scalars
7275 and validity checking finds this being used as an uninitialized
7278 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7280 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
7281 Add a warning about SPARK mode management. The routine now
7282 saves and restores both the mode and associated pragma.
7283 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
7284 SPARK mode management. The routine now saves and restores both
7285 the mode and associated pragma.
7286 (Analyze_Object_Contract):
7287 Add a warning about SPARK mode management. The routine
7288 now saves and restores both the mode and associated pragma.
7289 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
7290 management. The routine now saves and restores both the mode
7291 and associated pragma. (Analyze_Package_Contract): Add a warning
7292 about SPARK mode management. The routine now saves and restores
7293 both the mode and associated pragma.
7294 (Analyze_Task_Contract):
7295 Add a warning about SPARK mode management. The routine now saves
7296 and restores both the mode and associated pragma.
7297 * expander.adb (Expand): Change the way the Ghost mode is saved
7299 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
7301 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
7303 * exp_util.adb (Build_DIC_Procedure_Body):
7304 Change the way the Ghost mode is saved and restored.
7305 (Build_DIC_Procedure_Declaration): Change the way the Ghost
7306 mode is saved and restored.
7307 (Build_Invariant_Procedure_Body):
7308 Change the way the Ghost mode is saved and restored.
7309 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
7310 mode is saved and restored.
7311 (Make_Predicate_Call): Change the
7312 way the Ghost mode is saved and restored.
7313 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
7315 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7317 (Mark_And_Set_Ghost_Body): Remove parameter
7318 Mode and its assignment.
7319 (Mark_And_Set_Ghost_Completion):
7320 Remove parameter Mode and its assignment.
7321 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
7323 (Mark_And_Set_Ghost_Instantiation): Remove parameter
7324 Mode and its assignment.
7325 (Mark_And_Set_Ghost_Procedure_Call):
7326 Remove parameter Mode and its assignment.
7328 Remove parameter Mode and its assignment.
7329 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
7330 and update the comment on usage.
7331 (Mark_And_Set_Ghost_Body):
7332 Remove parameter Mode and update the comment on usage.
7333 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
7334 update the comment on usage.
7335 (Mark_And_Set_Ghost_Declaration):
7336 Remove parameter Mode and update the comment on usage.
7337 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
7338 update the comment on usage.
7339 (Mark_And_Set_Ghost_Procedure_Call):
7340 Remove parameter Mode and update the comment on usage.
7341 (Set_Ghost_Mode): Remove parameter Mode and update the comment
7343 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
7345 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
7346 of obsolete field SPARK_Mode_Pragma.
7347 (Load_Main_Source): Remove
7348 the assignment of obsolete field SPARK_Mode_Pragma.
7349 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
7350 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
7351 the assignment of obsolete field SPARK_Mode_Pragma.
7352 (Ensure_System_Dependency): Remove the assignment of obsolete
7353 field SPARK_Mode_Pragma.
7354 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
7355 mode management. Change the way Ghost and SPARK modes are saved
7357 * sem.adb (Analyze): Change the way the Ghost mode is saved
7359 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
7360 Ghost mode is saved and restored.
7361 (Process_Full_View): Change
7362 the way the Ghost mode is saved and restored.
7363 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
7364 mode is saved and restored.
7365 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
7366 mode is saved and restored.
7367 (Analyze_Subprogram_Body_Helper):
7368 Change the way the Ghost mode is saved and restored.
7369 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
7370 Ghost mode is saved and restored.
7371 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
7372 management. Save the SPARK mode-related data prior to any changes
7373 to the scope stack and contexts. The mode is then reinstalled
7374 before the subunit is analyzed in order to restore the original
7375 view of the subunit.
7376 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
7377 warning on region management. Change the way the Ghost and
7378 SPARK modes are saved and restored.
7379 (Inline_Instance_Body):
7380 Add a warning about SPARK mode management. Code clean up.
7381 (Analyze_Subprogram_Instantiation): Update the warning on region
7382 management. Change the way the Ghost and SPARK modes are saved
7384 (Instantiate_Package_Body): Update the warning
7385 on region management. Change the way the Ghost and SPARK modes
7386 are saved and restored.
7387 (Instantiate_Subprogram_Body): Update
7388 the warning on region management. Change the way the Ghost and
7389 SPARK modes are saved and restored.
7390 (Set_Instance_Env): Add a
7391 warning about SPARK mode management. Change the way SPARK mode
7392 is saved and restored.
7393 * sem_ch13.adb (Build_Predicate_Functions):
7394 Change the way the Ghost mode is saved and restored.
7395 (Build_Predicate_Function_Declaration): Change the way the Ghost
7396 mode is saved and restored.
7397 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
7398 mode management. Change the way SPARK mode is saved and restored.
7399 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
7400 Change the way the Ghost mode is saved and restored.
7401 (Analyze_Initial_Condition_In_Decl_Part): Change the way
7402 the Ghost mode is saved and restored.
7404 Change the way the Ghost mode is saved and restored.
7405 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
7406 Ghost mode is saved and restored.
7407 * sem_util.adb (Install_SPARK_Mode): New routine.
7408 (Restore_SPARK_Mode): New routine.
7409 (Save_SPARK_Mode_And_Set): Removed.
7410 (Set_SPARK_Mode): New routine.
7411 * sem_util.ads (Install_SPARK_Mode): New routine.
7412 (Restore_SPARK_Mode): New routine.
7413 (Save_SPARK_Mode_And_Set): Removed.
7414 (Set_SPARK_Mode): New routine.
7416 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7418 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
7419 to determine whether a type is declared in a local package that
7420 has not yet been frozen.
7421 * freeze.adb (Freeze_Before): Use new predicate to determine
7422 whether a local package must be installed on the scope stack
7423 in order to evaluate in the proper scope actions generated by
7424 aspect specifications, such as Predicate
7425 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
7426 using new predicate.
7428 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7430 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
7431 comparisons between non- scalar expressions expressions because
7432 their values cannot be invalidated.
7433 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
7436 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7438 * par_sco.adb: Minor reformatting.
7440 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7442 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
7443 is a type from an unfrozen local package, install package to
7444 complete the analysis of delayed aspects of the type.
7446 2017-04-25 Tristan Gingold <gingold@adacore.com>
7448 * bingen.adb (System_Version_Control_Used): New variable.
7449 (Resolve_Binder_Options): Set the above variable.
7450 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
7451 (Gen_Elab_Order): Emit blank line before.
7453 2017-04-25 Justin Squirek <squirek@adacore.com>
7455 * sem_cat.adb (Validate_RT_RAT_Component): Added
7456 an extra check to ignore incomplete types.
7458 2017-04-25 Thomas Quinot <quinot@adacore.com>
7460 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
7461 bogus circuitry for the case where Name is Predicate.
7463 2017-04-25 Thomas Quinot <quinot@adacore.com>
7465 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
7466 Create SCOs for Predicate aspects in disabled
7467 state initially, to be enabled later on by...
7468 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
7469 SCO for predicate as enabled.
7471 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7473 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
7474 pragmas Warnings Off / On.
7475 * namet.adb (Finalize): Remove now obsolete pair of pragmas
7477 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
7478 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
7479 consider comparisons between static expressions because their
7480 values cannot be invalidated.
7481 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
7483 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
7484 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
7486 2017-04-25 Bob Duff <duff@adacore.com>
7488 * sem_elab.adb (In_Task_Activation): Trace internal calls in
7491 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7493 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
7496 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7498 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
7499 On/Off to defend against a spurious warning in conditional
7501 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
7502 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
7503 defend against a spurious warning in conditional compilation.
7504 * output.adb Add a pair of pragma Warnings On/Off to defend
7505 against a spurious warning in conditional compilation.
7506 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
7507 (Fold_General_Op): New routine.
7508 (Fold_Static_Real_Op): New routine.
7509 (Test_Comparison): New routine.
7510 * sem_eval.ads (Test_Comparison): New routine.
7511 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
7512 (Warn_On_Constant_Valid_Condition): New routine.
7513 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
7514 to detect a specific case.
7515 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
7516 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
7517 to defend against a spurious warning in conditional compilation.
7518 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
7519 against a spurious warning in conditional compilation.
7520 * usage.adb Add a pair of pragma Warnings On/Off to defend
7521 against a spurious warning in conditional compilation.
7523 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7525 * sinfo.ads, sem_ch13.adb: Update comment.
7527 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7529 * sem_util.adb (Is_Post_State): A reference to a
7530 generic in out parameter is considered a change in the post-state
7533 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7535 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
7536 declaration of a subprogram instance within its wrapper package,
7537 skip over null statements that may result from the rewriting of
7540 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7542 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
7543 If the type is an unchecked_union, replace the attribute with
7544 a Raise_Program_Error (rather than inserting such before the
7545 attribute reference) to handle properly the case where we are
7546 processing a component of a larger record, and we need to prevent
7547 further expansion for the unchecked union.
7548 (Expand_Attribute_Reference, case 'Write): If the type is
7549 an unchecked_union, check whether enclosing scope is a Write
7550 subprogram. Replace attribute with a Raise_Program_Error if the
7551 discriminants of the unchecked_union type have not default values
7552 because such a use is erroneous..
7554 2017-04-25 Tristan Gingold <gingold@adacore.com>
7556 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
7557 Add relative_deadline to task record on edf profile.
7558 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
7559 (Make_Task_Create_Call): Pass relative_deadline value.
7560 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
7561 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
7562 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
7563 * sem_prag.adb (Set_Ravenscar_Profile): Handle
7564 GNAT_Ravenscar_EDF (set scheduling policy).
7565 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
7567 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
7568 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
7570 (Pragma_Deadline_Floor): New pragma.
7571 * targparm.adb (Get_Target_Parameters): Recognize
7572 GNAT_Ravenscar_EDF profile.
7574 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7576 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
7578 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7580 * sem_aux.adb (Nearest_Ancestor): Use original node of type
7581 declaration to locate nearest ancestor, because derived
7582 type declarations for record types are rewritten as record
7584 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
7585 properly derivations that are completions of private types.
7586 (Add_Predicates): If type is private, examine rep. items of full
7587 view, which may include inherited predicates.
7588 (Build_Predicate_Functions): Ditto.
7590 2017-04-25 Javier Miranda <miranda@adacore.com>
7592 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
7593 to generate new entities for subtype declarations located in
7594 Expression_With_Action nodes.
7596 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7598 * sem_elab.adb (Check_A_Call): Remove
7599 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
7600 need for Elaborate_All when SPARK elaboration checks are
7601 required. Update the checks for instances, variables, and calls
7602 to Default_Initial_Condition procedures.
7604 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7606 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
7607 into a boolean aspect, in analogy with the Ada aspect No_Return.
7609 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7611 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
7613 2017-04-25 Bob Duff <duff@adacore.com>
7615 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
7616 Is_True_Constant for an array variable that is passed to a
7617 foreign function as an 'in' parameter.
7618 * debug.adb: Document -gnatd.q.
7620 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7622 * sem_ch6.adb (Analyze_Expression_Function): If expression function
7623 is completion and return type is an access type do not freeze
7624 designated type: this will be done in the process of freezing
7625 the expression if needed.
7626 (Freeze_Expr_Types): Check whether type is complete before
7627 creating freeze node, to provide a better error message if
7628 reference is premature.
7629 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
7630 functions created by type derivations.
7632 2017-04-25 Pascal Obry <obry@adacore.com>
7634 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
7636 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7638 * sem_res.adb (Resolve_Type_Conversion):
7639 When resolving against any fixed type, set the type of the
7640 operand as universal real when the operand is a multiplication
7641 or a division where both operands are of any fixed type.
7642 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
7643 placement of an error message by pointing to the operand of a
7644 type conversion rather than the conversion itself.
7646 2017-04-25 Thomas Quinot <quinot@adacore.com>
7648 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
7649 Needs_Debug_Info when producing SCOs.
7651 2017-04-25 Thomas Quinot <quinot@adacore.com>
7653 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
7654 Always pass a null finalization master for a library level named access
7655 type to which a pragme No_Heap_Finalization applies.
7657 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7661 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
7662 set to A'First(2) and vice versa.
7664 2017-04-25 Yannick Moy <moy@adacore.com>
7666 * freeze.adb (Freeze_Record_Type): Remove obsolete
7667 rule on volatile tagged record restriction on SPARK code.
7669 2017-04-25 Yannick Moy <moy@adacore.com>
7671 * sem_prag.adb (minor) Fix SPARK RM reference.
7673 2017-04-25 Yannick Moy <moy@adacore.com>
7675 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
7676 comment to reflect which entity is chosen as unique entity.
7677 (Unique_Entity): Return full view instead of private spec for
7678 protected type or task type. Fix possible incorrect access when
7681 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7683 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
7684 array types only instead of all packed array types.
7686 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7688 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
7689 dimension system, verify that dimensions of both match.
7690 (Check_Conformance): Add error message in case of dimension
7692 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
7695 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
7697 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
7700 2017-04-25 Yannick Moy <moy@adacore.com>
7702 * sem_util.adb: Minor refactoring.
7703 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
7705 2017-04-25 Claire Dross <dross@adacore.com>
7707 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
7708 ultimate alias when accessing overridden operation. Indeed, if the
7709 overridden operation is itself inherited, it won't have any explicit
7712 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7714 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
7715 overlap if the two formals have different types, because formally
7716 the corresponding actuals cannot designate the same objects.
7718 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7720 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
7721 dimensions are present from context, use them. b) If operand is
7722 a static constant rewritten as a literal, obtain the dimensions
7723 from the original declaration, otherwise use dimensions of type
7724 established from context.
7726 2017-04-25 Yannick Moy <moy@adacore.com>
7728 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
7729 of array that is private.
7731 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7733 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
7736 2017-04-25 Yannick Moy <moy@adacore.com>
7738 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
7741 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7743 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
7744 the check that recognizes a call to a private overridding and
7745 replaces the called subprogram with its alias.
7747 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7749 * exp_util.adb: Minor reformatting.
7751 2017-04-25 Justin Squirek <squirek@adacore.com>
7753 * exp_ch3.adb (Freeze_Type): Add condition to always treat
7754 interface types as a partial view of a private type for the
7755 generation of invariant procedure bodies.
7756 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
7757 Add a condition to get the Corresponding_Record_Type for
7758 concurrent types, add condition to return in the absence of a
7759 class in the pragma, remove call to Replace_Type_References,
7760 and add call to Replace_References.
7761 (Add_Interface_Invariatns),
7762 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
7763 to including the working type T.
7764 (Add_Own_Invariants): Remove
7765 legacy condition for separate units, remove dispatching for ASIS
7766 and save a copy of the expression in the pragma expression.
7767 (Build_Invariant_Procedure_Body): Default initalize vars,
7768 remove return condition on interfaces, always use the
7769 private type for interfaces, and move the processing of types
7770 until after the processing of invariants for the full view.
7771 (Build_Invariant_Procedure_Declaration): Remove condition
7772 to return if an interface type is encountered and add
7773 condition to convert the formal parameter to its class-wide
7774 counterpart if Work_Typ is abstract.
7775 (Replace_Type): Add call to Remove_Controlling_Arguments.
7776 (Replace_Type_Ref): Remove class-wide dispatching for the current
7777 instance of the type.
7778 (Replace_Type_References): Remove parameter "Derived"
7779 (Remove_Controlling_Arguments): Created in order to removing
7780 the controlliong argument from calls to primitives in the case
7781 of the formal parameter being an class-wide abstract type.
7782 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
7783 to the change made to Freeze_Type in exp_ch3. Add a condition
7784 to treat interface types as a partial view.
7785 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
7786 to Build_Invariant_Procedure_Declaration to properly generate a
7787 "partial" invariant procedure when Typ is an interface.
7789 2017-04-25 Bob Duff <duff@adacore.com>
7791 * a-numeri.ads: Go back to using brackets encoding for the Greek
7794 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7796 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
7797 (10-15): if derived type T with progenitors is abstract,
7798 and primitive P of this type inherits non-trivial classwide
7799 preconditions from both a parent operation and from an interface
7800 operation, then the inherited operation is abstract if the parent
7801 operation is not null.
7802 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
7803 with Covered_Interface_Op to yield the actual interface operation
7804 that is implemented by a given inherited operation.
7806 2017-04-25 Javier Miranda <miranda@adacore.com>
7808 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
7809 and right operands after performing the validity checks. Required
7810 because validity checks may remove side effects from the operands.
7812 2017-04-25 Javier Miranda <miranda@adacore.com>
7814 * exp_attr.adb (Attribute_Unrestricted_Access):
7815 Do not disable implicit type conversion. Required to generate
7816 code that displaces the pointer to reference the secondary
7819 2017-04-25 Pascal Obry <obry@adacore.com>
7821 * prj-attr.adb, snames.ads-tmpl: Add package Install's
7822 Required_Artifacts attribute.
7824 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7826 * sem_util.adb (Same_Value): String literals are compile-time
7827 values, and comparing them must use Expr_Value_S.
7829 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7831 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
7832 dereference is introduced for the object, and the object is
7833 overloaded, do not check whether it is aliased, because it may
7834 include an implicit dereference.
7835 * sem_type.adb (Disambiguate): If two interpretations are access
7836 attribute types with the same designated type keep either of
7837 them and do not report an ambiguity. A true ambiguity will be
7840 2017-04-25 Bob Duff <duff@adacore.com>
7842 * a-numeri.ads: Change the encoding of Greek letter Pi from
7843 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
7844 to indicate the encoding. We considered using a byte order mark
7845 (BOM), but that causes various trouble (misc software eats the
7846 BOM, if you have a patch with a BOM, then it's not at the start
7847 of the patch, so it's not a BOM, the BOM affects with-ing files,
7849 * scng.adb, s-wchcnv.adb: Minor.
7851 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7853 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
7854 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7856 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
7857 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
7858 Improve error message on operations that inherit non-conforming
7859 classwide preconditions from ancestor and progenitor.
7860 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
7861 moved here from sem_ch3.
7862 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
7863 check given in RM 6.1.1 (17) concerning renamings of overriding
7864 operations that inherits class-wide preconditions from ancestor
7867 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7869 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
7870 (Build_Adjust_Statements): Code cleanup.
7871 (Build_Finalizer): Update the initialization of
7873 (Build_Finalize_Statements): Code cleanup.
7874 (Build_Initialize_Statements): Code cleanup.
7875 (Make_Deep_Array_Body): Update the initialization of
7877 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
7878 (Process_Object_Declaration): Generate a null exception handler only
7879 when exceptions are allowed.
7880 (Process_Transients_In_Scope): Update the initialization of
7882 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
7884 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
7885 restrictions when the handler is internally generated and the
7888 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7890 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
7891 enforce legality rule on classwide preconditions inherited from
7892 both an ancestor and a progenitor (RM 6.1.1 (10-13).
7893 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
7894 subprogram need not be dispatching if it appears in a precondition
7895 for an abstract or null subprogram.
7897 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7899 * sem_ch10.adb: Minor typo fix.
7901 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7903 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
7905 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
7907 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
7908 have a length which is a power of 2.
7909 (Is_Predefined_File_Name): Likewise. Adjust comment.
7911 2017-04-25 Bob Duff <duff@adacore.com>
7913 * exp_aggr.adb (Component_Count): Protect the
7914 arithmetic from attempting to convert a value >= 2**31 to Int,
7915 which would otherwise raise Constraint_Error.
7917 2017-04-25 Bob Duff <duff@adacore.com>
7919 * opt.ads (Locking_Policy): Fix incorrect documentation. The
7920 first character of the policy name is not unique.
7922 2017-04-25 Bob Duff <duff@adacore.com>
7924 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
7925 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
7926 about this flag not being used. It was already used, and it is
7929 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7931 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
7932 (Ignore_SPARK_Mode_Pragmas): New routine.
7933 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
7934 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
7935 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
7937 (Ignore_SPARK_Mode_Pragmas): New routine
7938 along with pragma Inline.
7939 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
7940 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
7941 Ignore_SPARK_Mode_Pragmas_In_Instance.
7942 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
7943 Save and restore the value of global flag
7944 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
7945 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
7946 the corresponding spec or the body must ignore all SPARK_Mode
7947 pragmas found within.
7948 (Analyze_Subprogram_Declaration): Mark
7949 the spec when it needs to ignore all SPARK_Mode pragmas found
7950 within to allow the body to infer this property in case it is
7951 instantiated or inlined later.
7952 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
7953 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
7954 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
7955 when the corresponding spec also ignored all SPARK_Mode pragmas
7957 (Analyze_Package_Declaration): Mark the spec when
7958 it needs to ignore all SPARK_Mode pragmas found within to allow
7959 the body to infer this property in case it is instantiated or
7961 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
7962 Save and restore the value of flag
7963 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
7964 formal spec when it needs to ignore all SPARK_Mode
7965 pragmas found within to allow the body to infer this
7966 property in case it is instantiated or inlined later.
7967 (Analyze_Package_Instantiation): Save and restore the value
7968 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
7969 the instance spec when it needs to ignore all SPARK_Mode
7970 pragmas found within to allow the body to infer this
7971 property in case it is instantiated or inlined later.
7972 (Analyze_Subprogram_Instantiation): Save and restore the value
7973 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
7974 instance spec and anonymous package when they need to ignore
7975 all SPARK_Mode pragmas found within to allow the body to infer
7976 this property in case it is instantiated or inlined later.
7977 (Instantiate_Package_Body): Save and restore the value of global
7978 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
7979 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
7980 corresponding instance spec also ignored all SPARK_Mode pragmas
7982 (Instantiate_Subprogram_Body): Save and restore the
7983 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
7984 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
7985 when the corresponding instance spec also ignored all SPARK_Mode
7986 pragmas found within.
7987 * sem_prag.adb (Analyze_Pragma): Update the reference to
7988 Ignore_Pragma_SPARK_Mode.
7989 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
7990 all SPARK_Mode pragmas defined within yields mode "off".
7992 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7994 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
7996 2017-04-25 Bob Duff <duff@adacore.com>
7998 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
7999 All_Checks" to avoid generating unnecessary checks.
8000 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8002 * sem.ads: Fix comment.
8003 * expander.ads: Fix comment.
8004 * exp_atag.ads: Fix comment: "Index = 0" should be
8007 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8009 * s-taprop-linux.adb: Minor editorial fixes.
8011 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8013 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8014 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8015 variable and set it to True whenever the main hash table is
8016 populated. Short- circuit the Assoc function if it is false
8017 and add associated guards.
8019 2017-04-25 Olivier Hainque <hainque@adacore.com>
8021 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8022 specs without elaboration code that have an elaboration counter
8023 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8024 * sem_ch10.adb (Analyze_Compilation_Unit):
8025 Set_Elaboration_Entity_Required when requested to preserve
8026 control flow, to ensure the unit elaboration is materialized at
8027 bind time, resulting in the inclusion of the unit object file
8028 in the executable closure at link time.
8030 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8032 * exp_dbug.adb: In Debug_Renaming_Declaration,
8033 when dealing with indexed component, accept to produce a renaming
8034 symbol when the index is an IN parameter or when it is a name
8035 defined in an outer scope.
8037 2017-04-25 Yannick Moy <moy@adacore.com>
8039 * errout.adb (Error_Msg): Adapt continuation
8040 message in instantiations and inlined bodies for info messages.
8042 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8044 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8045 Use direct 4-character slice comparisons.
8047 pragma Inline. (Has_Suffix): Delete.
8048 (Is_Internal_File_Name):
8049 Test Is_Predefined_File_Name first.
8050 (Is_Predefined_File_Name):
8051 Use direct slice comparisons as much as possible and limit all
8052 comparisons to at most 8 characters.
8054 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8056 * checks.adb (Insert_Valid_Check): Code cleanup.
8057 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8058 (Expand_Actuals): Generate proper copy-back for a validation
8059 variable when it acts as the argument of a type conversion.
8060 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8061 predicate to operate on type qualifications.
8063 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8065 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8068 2017-04-25 Bob Duff <duff@adacore.com>
8070 * sem_prag.adb (No_Return): Give an error if the pragma applies
8071 to a body. Specialize the error for the specless body case,
8072 as is done for (e.g.) pragma Convention.
8073 * debug.adb: Add switch -gnatd.J to disable the above legality
8074 checks. This is mainly for use in our test suite, to avoid
8075 rewriting a lot of illegal (but working) code. It might also
8076 be useful to customers. Under this switch, if a pragma No_Return
8077 applies to a body, and the procedure raises an exception (as it
8078 should), the pragma has no effect. If the procedure does return,
8079 execution is erroneous.
8081 2017-04-25 Bob Duff <duff@adacore.com>
8083 * exp_ch6.adb (Expand_Actuals): This is the
8084 root of the problem. It took N as an 'in out' parameter, and in
8085 some cases, rewrote N, but then set N to Original_Node(N). So
8086 the node returned in N had no Parent. The caller continued
8087 processing of this orphaned node. In some cases that caused a
8088 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8089 and trips over the Empty Parent). The solution is to make N an
8090 'in' parameter. Instead of rewriting it, return the list of
8091 post-call actions, so the caller can do the rewriting later,
8092 after N has been fully processed.
8093 (Expand_Call_Helper): Move most of Expand_Call here. It has
8094 too many premature 'return' statements, and we want to do the
8095 rewriting on return.
8096 (Insert_Post_Call_Actions): New procedure to insert the post-call
8097 actions in the appropriate place. In the problematic case,
8098 that involves rewriting N as an Expression_With_Actions.
8099 (Expand_Call): Call the new procedures Expand_Call_Helper and
8100 Insert_Post_Call_Actions.
8102 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8104 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8105 properly type derived from generic formal types, to handle
8106 properly modified version of ACATS 4.1B B611017.
8108 2017-04-25 Javier Miranda <miranda@adacore.com>
8110 * exp_unst.adb (Subp_Index): Adding missing
8111 support for renamings and functions that return a constrained
8112 array type (i.e. functions for which the frontend built a
8113 procedure with an extra out parameter).
8115 2017-04-25 Pascal Obry <obry@adacore.com>
8117 * s-string.adb: Minor code clean-up.
8119 2017-04-25 Bob Duff <duff@adacore.com>
8121 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8123 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8124 function for Non_Blocking_Wait_Process.
8126 2017-04-25 Bob Duff <duff@adacore.com>
8128 * prep.adb (Preprocess): Remove incorrect
8129 Assert. Current character can be ASCII.CR.
8131 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8133 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8134 convention Stdcall, which has a number of exceptions. Convention
8135 is legal on a component declaration whose type is an anonymous
8136 access to subprogram.
8138 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8140 * sem_ch4.adb: sem_ch4.adb Various reformattings.
8141 (Try_One_Prefix_Interpretation): Use the base type when dealing
8142 with a subtype created for purposes of constraining a private
8143 type with discriminants.
8145 2017-04-25 Javier Miranda <miranda@adacore.com>
8147 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8148 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8149 dispatching primitives (Restore_Warnings): Restore warning on
8150 late dispatching primitives (Save_Warnings): Save warning on late
8151 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8152 to enable/disable this warning.
8153 (WA_Warnings): Set warning on late dispatching primitives.
8154 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8155 that its parent type has a private extension.
8156 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8158 * usage.adb: Document -gnatw.j and -gnatw.J.
8160 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8162 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8165 2017-04-25 Bob Duff <duff@adacore.com>
8167 * binde.adb (Validate): Do not pass dynamic strings
8168 to pragma Assert, because older compilers do not support that.
8170 2017-04-25 Bob Duff <duff@adacore.com>
8172 * s-fileio.adb (Close): When a temp file is
8173 closed, delete it and clean up its Temp_File_Record immediately,
8174 rather than waiting until later.
8175 (Temp_File_Record): Add File
8176 component, so Close can know which Temp_File_Record corresponds
8177 to the file being closed.
8178 (Delete): Don't delete temp files,
8179 because they are deleted by Close.
8180 (Open): Set the File component
8181 of Temp_File_Record. This requires moving the creation of the
8182 Temp_File_Record to the end, after the AFCB has been created.
8184 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8186 * checks.adb (Insert_Valid_Check): Do not generate
8187 a validity check when inside a generic.
8189 2017-04-25 Yannick Moy <moy@adacore.com>
8191 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8193 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8195 * snames.ads-tmpl (Snames): More names for detecting predefined
8196 potentially blocking subprograms.
8198 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8200 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8201 concerning inheritance of class-wide preconditions do not apply
8204 2017-04-25 Bob Duff <duff@adacore.com>
8206 * s-ficobl.ads: Minor comment fix.
8208 2017-04-25 Yannick Moy <moy@adacore.com>
8210 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8211 conversions from float to integer in GNATprove mode.
8212 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8213 to call Apply_Type_Conversion_Checks, so that range checks
8214 are properly positioned when needed on conversions, including
8215 when converting from float to integer. (Determine_Range): In
8216 GNATprove mode, take into account the possibility of conversion
8217 from float to integer.
8218 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8219 check on conversions from fixed-point to integer, not anymore
8220 on conversions from floating-point to integer, when in GNATprove
8223 2017-04-25 Yannick Moy <moy@adacore.com>
8225 * checks.adb (Determine_Range_R): Special case type conversions
8226 from integer to float in order to get bounds in that case too.
8227 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8228 mode, for computations involved in interval checking.
8230 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8232 * checks.adb (Insert_Valid_Check): Partially reimplement validity
8234 * einfo.adb Node36 is now used as Validated_Object.
8235 (Validated_Object): New routine.
8236 (Set_Validated_Object): New routine.
8237 (Write_Field36_Name): Add an entry for Validated_Object.
8238 * einfo.ads Add new attribute Validated_Object along with
8240 (Validated_Object): New routine along with pragma Inline.
8241 (Set_Validated_Object): New routine along with pragma Inline.
8242 * exp_attr.adb (Make_Range_Test): Add processing for validation
8243 variables to avoid extra reads and copies of the prefix.
8244 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8245 variables in order to reflect any changes done in the variable
8246 back into the original object.
8247 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8248 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8250 2017-04-25 Steve Baird <baird@adacore.com>
8252 * exp_ch7.adb (Build_Array_Deep_Procs,
8253 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
8254 generate Finalize_Address routines for CodePeer.
8256 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8258 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
8259 Analyze_Pre_Post_Condition, to implement the legality checks
8260 mandated by AI12-0131: Pre'Class shall not be specified for an
8261 overriding primitive subprogram of a tagged type T unless the
8262 Pre'Class aspect is specified for the corresponding primitive
8263 subprogram of some ancestor of T.
8265 2017-04-25 Bob Duff <duff@adacore.com>
8267 * sem_ch8.adb (Use_One_Type): If a use_type_clause
8268 is redundant, set its Used_Operations to empty. This is only
8269 necessary for use clauses that appear in the parent of a generic
8270 child unit, because those use clauses get reanalyzed when we
8271 instantiate the generic, and we don't want the Used_Operations
8272 carried over from the original context (where it was probably
8275 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8277 * exp_ch6.adb: Minor reformatting.
8279 2017-04-25 Bob Duff <duff@adacore.com>
8281 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
8282 Use Source_Index (Current_Sem_Unit) to find the correct casing.
8283 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
8284 (Current_Sem_Unit) to find the correct casing.
8285 * par.adb (Par): Null out Current_Source_File, to ensure that
8286 the above bugs won't rear their ugly heads again.
8288 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8290 * sem_ch8.adb (Find_Type): For an attribute reference
8291 'Class, if prefix type is synchronized and previous errors
8292 have suppressed the creation of the corresponding record type,
8293 create a spurious class-wide for the synchonized type itself,
8294 to catch other misuses of the attribute
8296 2017-04-25 Steve Baird <baird@adacore.com>
8298 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
8299 is True, then don't generate the accessibility check for the
8300 tag of a tagged result.
8301 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
8302 if CodePeer_Mode is True, then don't generate the
8303 tag checks for the result of call to an instance of
8304 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
8305 descendant of" check and the accessibility check).
8307 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8309 * sem_ch13.adb: Code cleanups.
8310 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
8311 * sem_ch8.ads: Minor comment fix.
8313 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8315 * exp_ch4.adb (Library_Level_Target): New function.
8316 (Expand_Concatenate): When optimization is enabled, also expand
8317 the operation out-of-line if the concatenation is present within
8318 the expression of the declaration of a library-level object and
8319 not only if it is the expression of the declaration.
8321 2017-04-25 Bob Duff <duff@adacore.com>
8323 * freeze.adb (Freeze_Object_Declaration): Do
8324 not Remove_Side_Effects if there is a pragma Linker_Section,
8325 because in that case we want static initialization in the
8326 appropriate section.
8328 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8330 * exp_dbug.adb: Minor rewording and reformatting.
8332 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8334 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
8335 handle the proposed changes to rules concerning potentially
8336 unevaluated expressions, to include selected components that
8337 do not depend on discriminants, and indexed components with
8339 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
8340 predicate in quantified expression, and fix bugs in the handling
8341 of case expressions and membership test.
8342 (Analyze_Attribute_Old_Result): use new predicate.
8343 (Analyze_Attribute, case Loop_Entry): ditto.
8345 2017-04-25 Bob Duff <duff@adacore.com>
8347 * s-secsta.adb (SS_Info): Add a comment
8348 explaining why we don't need to walk all the chunks in order to
8349 compute the total size.
8351 2017-04-25 Bob Duff <duff@adacore.com>
8353 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
8354 of the global name buffer to 4*Max_Line_Length.
8356 2017-04-25 Javier Miranda <miranda@adacore.com>
8358 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
8359 renaming entity for debug information, mark the entity as needing debug
8360 info if it comes from sources.
8362 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8364 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
8365 restriction converning the use of 'Address where the prefix is
8366 of a controlled type.
8368 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8370 * exp_dbug.adb: In Debug_Renaming_Declaration,
8371 skip slices that are made redundant by an indexed component
8373 * atree.h: New definition for Original_Node.
8375 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8377 * sem_prag.adb, sem_prag.ads: Minor reformatting.
8379 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8381 * sem_ch3.adb (Check_Entry_Contract): Call
8382 Preanalyze_Spec_Expression so that resolution takes place as well.
8383 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
8384 internal calls that appear in preconditions of protected
8385 operations, in default values for same, and in contract guards
8386 for contract cases in SPARK.
8388 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8390 * a-numaux.ads: Fix description of a-numaux-darwin
8392 (Double): Define to Long_Float.
8393 * a-numaux-vxworks.ads (Double): Likewise.
8394 * a-numaux-darwin.ads
8396 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
8397 * a-numaux-x86.ads: Fix package description.
8398 * a-numaux-x86.adb (Is_Nan): Minor tweak.
8399 (Reduce): Adjust and complete description. Call Is_Nan instead of
8400 testing manually. Use an integer temporary to hold rounded value.
8401 * a-numaux-darwin.adb (Reduce): Likewise.
8402 (Is_Nan): New function.
8404 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8406 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
8407 on analysis of prefix whose type is a current instance of a
8408 synchronized type, but where the prefix itself is an entity that
8411 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8413 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
8414 the identity of callable entities therein, because they have been
8415 properly resolved, and prefixed calls may have been rewritten
8418 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
8420 * exp_ch3.adb (Build_Init_Statements): Convert
8421 the expression of the pragma/aspect Secondary_Stack_Size to
8422 internal type System.Parameters.Size_Type before assigning
8423 it to the Secondary_Stack_Size component of the task type's
8424 corresponding record.
8426 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8428 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
8429 (etc) optimizations when the type is modular and the offsets
8432 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8434 * s-osinte-freebsd.ads: Minor comment tweaks
8436 2017-04-25 Javier Miranda <miranda@adacore.com>
8438 * urealp.adb (UR_Write): Reverse previous patch
8439 adding documentation on why we generate multiplications instead
8440 of divisions (needed to avoid expressions whose computation with
8441 large numbers may cause division by 0).
8443 2017-04-25 Bob Duff <duff@adacore.com>
8445 * erroutc.adb (Set_Specific_Warning_Off,
8446 Set_Warnings_Mode_Off): Use the correct source file for
8447 Stop. Was using Current_Source_File, which is only valid during
8448 parsing. Current_Source_File will have a leftover value from
8449 whatever file happened to be parsed last, because of a with_clause
8452 2017-04-25 Bob Duff <duff@adacore.com>
8454 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
8455 to In_Predefined_Unit, but including GNAT units.
8456 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
8457 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
8458 because Should_Ignore_Pragma was not working reliably outside
8459 the parser, because Current_Source_File is not valid.
8460 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
8461 * par-prag.adb: Call Should_Ignore_Pragma_Par.
8463 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8465 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
8468 2017-04-25 Javier Miranda <miranda@adacore.com>
8470 * urealp.adb (UR_Write): Fix output of constants with a base other
8473 2017-04-25 Justin Squirek <squirek@adacore.com>
8475 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
8476 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
8477 Add extra parameter for Process_Interface_Name.
8478 (Process_Interface_Name): Add parameter for pragma to analyze
8479 corresponding aspect.
8480 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
8483 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8485 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
8488 2017-04-25 Yannick Moy <moy@adacore.com>
8490 * sem_res.adb (Resolve_Comparison_Op): Do not
8491 attempt evaluation of relational operations inside assertions.
8493 2017-04-25 Justin Squirek <squirek@adacore.com>
8495 * exp_util.adb (Add_Interface_Invariants):
8496 Restored, code moved back from Build_Invariant_Procedure_Body.
8497 (Add_Parent_Invariants): Restored, code moved back from
8498 Build_Invariant_Procedure_Body.
8499 (Build_Invariant_Procedure_Body):
8500 Remove refactored calls and integrated code from
8501 Add_Parent_Invariants and Add_Interface_Invariants.
8503 2017-04-25 Johannes Kanig <kanig@adacore.com>
8505 * errout.adb (Output_Messages): Adjust computation of total
8507 * erroutc.adb (Error_Msg): In statistics counts, deal
8508 correctly with informational messages that are not warnings.
8509 * errutil.adb (Finalize): adjust computation of total errors.
8511 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8513 * terminals.c (__gnat_terminate_pid): New.
8514 * g-exptty.ads (Terminate_Process): New. Update comments.
8516 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8518 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
8520 2017-04-25 Justin Squirek <squirek@adacore.com>
8522 * sem_ch3.adb (Analyze_Declarations): Minor
8523 correction to comments, move out large conditional and scope
8524 traversal into a predicate.
8525 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
8528 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8530 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
8531 of prefix whose type is a current instance of a synchronized
8532 type. If the prefix is an object this is an external call (or
8533 requeue) that can only access public operations of the object. The
8534 previous predicate was too restrictive, and did not allow public
8535 protected operations, only task entries.
8537 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8539 * sem_ch5.adb, fname.adb: Minor reformatting.
8541 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8543 * einfo.adb (Is_Anonymous_Access_Type): New routine.
8544 * einfo.ads Update the placement of
8545 E_Anonymous_Access_Subprogram_Type along with all subtypes that
8547 (Is_Anonymous_Access_Type): New routine.
8548 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
8549 master for an access type subject to pragma No_Heap_Finalization.
8550 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
8551 allocated or deallocated does not finalization actions if the
8552 associated access type is subject to pragma No_Heap_Finalization.
8553 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
8554 * par-prag.adb Pragma No_Heap_Finalization does not need special
8555 processing from the parser.
8556 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
8557 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
8558 * sem_prag.adb Add an entry in table Sig_Flags for pragma
8559 No_Heap_Finalization.
8560 (Analyze_Pragma): Add processing for
8561 pragma No_Heap_Finalization. Update various error messages to
8562 use Duplication_Error.
8563 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
8564 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
8565 and corresponding pragma id.
8567 2017-04-25 Bob Duff <duff@adacore.com>
8569 * freeze.adb (Freeze_Record_Type): Use the
8570 underlying type of the component type to determine whether it's
8571 elementary. For representation clause purposes, a private type
8572 should behave the same as its full type.
8573 * fname.ads, fname.adb (Is_Predefined_File_Name):
8574 Make sure things like "system.ali" are recognized as predefined.
8576 2017-04-25 Javier Miranda <miranda@adacore.com>
8578 * debug.adb: Update documentation of -gnatd.6.
8580 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8582 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
8583 element iterator when the name is an overloaded function call,
8584 one of whose interpretations yields an array.
8586 2017-04-25 Bob Duff <duff@adacore.com>
8588 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
8589 Is_Internal_Unit_Name): New functions for operating on unit
8590 names, as opposed to file names. There's some duplicated code
8591 with fname.adb, which is unfortunate, but it seems like we don't
8592 want to add dependencies here.
8593 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
8594 to Is_Predefined_Unit_Name; the former was wrong, because Uname
8595 is not a file name at all.
8596 * fname.ads, fname.adb: Document the fact that
8597 Is_Predefined_File_Name and Is_Internal_File_Name can be called
8598 for ALI files, and fix the code so it works properly for ALI
8599 files. E.g. these should return True for "system.ali".
8601 2017-04-25 Justin Squirek <squirek@adacore.com>
8603 * exp_util.adb (Add_Invariant): Removed,
8604 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
8605 and Add_Own_Invariant. (Add_Invariant_Check): Used
8606 for adding runtime checks from any kind of invariant.
8607 (Add_Inherited_Invariant): Generates invariant checks for
8608 class-wide invariants (Add_Interface_Invariants): Removed, code
8609 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
8610 Create a types own invariant procedure (Add_Parent_Invariants):
8611 Removed, code moved to Build_Invariant_Procedure_Body
8612 (Build_Invariant_Procedure_Body): Add refactored calls
8613 and integrated code from Add_Parent_Invariants and
8614 Add_Interface_Invariants.
8615 (Process_Type): Removed, the
8616 relavant code was inlined into both Add_Own_Invariant and
8617 Add_Inherited_Invariant.
8619 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8621 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
8622 scn.adb, osint.adb, fname.adb: Minor reformatting.
8624 2017-04-25 Pascal Obry <obry@adacore.com>
8626 * s-taprop-mingw.adb: Do not check for CloseHandle in
8629 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8631 * sem_util.adb (Check_Part_Of_Reference):
8632 Continue to examine the context if the reference appears within
8633 an expression function.
8635 2017-04-25 Justin Squirek <squirek@adacore.com>
8637 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
8638 and Build_Invariant_Procedure_Declaration.
8639 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
8640 and Build_Invariant_Procedure_Declaration from exp_ch7
8641 and break-out Is_Untagged_Private_Derivation from
8642 Build_Invariant_Procedure_Body.
8643 (Replace_Type_References):
8644 Append an extra parameter to allow for dispatching replacements
8645 and add the corrasponding logic.
8646 (Type_Invariant): Remove
8647 Replace_Typ_Refs and replace its references with calls to
8648 Replace_Type_References.
8649 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
8651 2017-04-25 Bob Duff <duff@adacore.com>
8653 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
8654 that returns True when appropriate.
8655 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
8656 when compiling predefined files.
8657 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
8658 "gnat.adc" should not be considered a predefined file name.
8659 That required (or at least encouraged) a lot of cleanup of global
8660 variable usage. We shouldn't be communicating information via
8661 the global name buffer.
8662 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
8663 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
8664 required by the above-mentioned cleanup.
8666 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8668 * osint.adb (Find_File): Handle properly a request for a
8669 configuration file whose name is a directory.
8671 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8673 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
8675 2017-04-25 Bob Duff <duff@adacore.com>
8677 * types.ads: Minor: Fix '???' comment.
8678 * sem_ch8.adb: Minor comment fix.
8680 2017-04-25 Bob Duff <duff@adacore.com>
8682 * sem_prag.adb: Remove suspicious uses of Name_Buf.
8683 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
8684 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
8685 Add String_To_Name with no side effects.
8687 2017-04-25 Justin Squirek <squirek@adacore.com>
8689 * sem_ch3.adb (Analyze_Declarations): Add
8690 additional condition for edge case.
8692 2017-04-25 Bob Duff <duff@adacore.com>
8694 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
8695 reserved words inside pragmas. This is necessary to allow the
8696 pragma name Interface to be used in pragma Ignore_Pragma.
8697 * par.adb: Minor comment fix.
8699 2017-04-25 Javier Miranda <miranda@adacore.com>
8701 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
8702 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
8703 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
8704 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
8705 occurrences of RE_Type_Is_Abstract
8707 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8709 * exp_util.adb (Build_Chain): Account for ancestor
8710 subtypes while traversing the derivation chain.
8712 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8714 * sem_attr.adb: minor reformatting.
8716 2017-04-25 Doug Rupp <rupp@adacore.com>
8718 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
8720 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8722 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
8723 the first pass over an assignment statement with target names,
8724 to prevent the generation of subtypes (such as discriminated
8725 record components)that may carry the target name outside of the
8726 tree for the assignment. The subtypes will be generated when
8727 the assignment is reanalyzed in full.
8728 (Analyze_Target_Name): Handle properly class-wide types.
8730 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8732 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
8733 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
8734 the purposes of freezing.
8735 * exp_util.adb Update the documentation and structure of the
8736 type map used in class-wide semantics of assertion expressions.
8737 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
8738 and resolve the triaged expression because all substitutions
8739 refer to the proper entities. Update the replacement of
8741 (Build_DIC_Procedure_Body): Add formal parameter
8742 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
8743 are now only processed when freezing occurs. Build a body only
8745 (Entity_Hash): Removed.
8746 (Map_Types): New routine.
8747 (Replace_Object_And_Primitive_References): Removed.
8748 (Replace_References): New routine.
8749 (Replace_Type_References): Moved to the library level of Exp_Util.
8750 (Type_Map_Hash): New routine.
8751 (Update_Primitives_Mapping): Update the mapping call.
8752 (Update_Primitives_Mapping_Of_Types): Removed.
8753 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
8754 parameter For_Freeze and update the comment on usage.
8755 (Map_Types): New routine.
8756 (Replace_References): New routine.
8757 (Replace_Type_References): Moved to the library level of Exp_Util.
8758 (Update_Primitives_Mapping_Of_Types): Removed.
8759 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
8760 properties of the private type to the full view in case the full
8761 view derives from a parent type and inherits a DIC pragma.
8762 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
8763 DIC pragma is placed at the top of a declarative region.
8765 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8767 * a-tasatt.adb: Complete previous change and use an unsigned
8768 int to avoid overflow checks.
8770 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8772 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
8773 the error message when the attribute reference is an actual in
8774 a call to a subprogram inherited from a generic formal type with
8775 unknown discriminants, which makes the subprogram and its formal
8776 parameters intrinsic (see RM 6.3.1 (8) and (13)).
8778 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8780 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
8781 sem_prag.adb: Minor reformatting.
8783 2017-04-25 Bob Duff <duff@adacore.com>
8785 * sem_attr.adb (Type_Key): Add code in the
8786 recursive Compute_Type_Key to protect against fetching the source
8787 code for Standard, in case a component of the type is declared
8788 in Standard. There was already code to do this for the original
8789 type, but not for its components.
8791 2017-04-25 Javier Miranda <miranda@adacore.com>
8793 * exp_ch3.adb (Build_Initialization_Call): Handle
8794 subtypes of private types when searching for the underlying full
8795 view of a private type.
8797 2017-04-25 Javier Miranda <miranda@adacore.com>
8799 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
8800 real conditional expression can appear in a fixed-type context
8801 and must be resolved with that context to facilitate the code
8802 generation to the backend.
8804 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8806 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
8807 to indicate whether during inline processing, when some unit U1
8808 appears in the context of a unit U2 compiled for instantiation
8809 or inlining purposes, the body of U1 needs to be compiled as well.
8810 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
8811 context is a package declaration.
8812 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
8813 Analyze_Generic_Package_Declaration): ditto.
8814 * inline.adb (Analyze_Inlined_Bodies): Check
8815 Body_Needed_For_Inlining.
8817 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8819 * par.adb (Current_Assign_Node): Global variable use to record
8820 the presence of a target_name in the right hand side of the
8821 assignment being parsed.
8822 * par-ch4.adb (P_Name): If the name is a target_name, mark the
8823 enclosing assignment node accordingly.
8824 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
8826 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
8827 analyzing RHS if the statement has target_names.
8828 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
8829 properly choices that are subtype marks.
8830 * exp_ch5.adb: Code cleanup.
8832 2017-04-25 Bob Duff <duff@adacore.com>
8834 * s-memory.adb: Add a comment regarding efficiency.
8835 * atree.adb: Fix the assertion, and combine 2 assertions into one,
8836 "the source has an extension if and only if the destination does."
8837 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
8839 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8841 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
8844 2017-04-25 Doug Rupp <rupp@adacore.com>
8846 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
8847 handling for ppc64-vx7.
8848 * sigtramp-vxworks-target.inc
8849 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
8851 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8853 * ada_get_targ.adb: New file.
8855 2017-04-25 Bob Duff <duff@adacore.com>
8857 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
8858 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
8859 (UI_GCD): Remove ??? comment involving possible efficiency
8860 improvements. This just isn't important after all these years.
8862 * uintp.ads: Minor cleanup.
8864 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8866 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
8867 Revert previous changes.
8868 * scng.adb: Minor reformatting.
8869 * s-stratt.ads: Fix unbalanced parens in comment.
8871 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8873 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
8876 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8878 * scng.adb (Scan): Handle '@' appropriately.
8879 * sem_ch5.adb: Code cleanup.
8881 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8883 * freeze.adb (Check_Expression_Function): Do not check for the
8884 use of deferred constants if the freezing of the expression
8885 function is triggered by its generated body, rather than a
8888 2017-04-25 Javier Miranda <miranda@adacore.com>
8890 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
8891 subtypes of private types when performing the view conversion.
8893 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8895 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
8896 the purposes of freezing.
8897 * exp_util.adb Update the documentation and structure of the
8898 type map used in class-wide semantics of assertion expressions.
8899 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
8900 and resolve the triaged expression because all substitutions
8901 refer to the proper entities. Update the replacement of
8903 (Build_DIC_Procedure_Body): Add formal parameter
8904 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
8905 are now only processed when freezing occurs. Build a body only
8907 (Entity_Hash): Removed.
8908 (Map_Types): New routine.
8909 (Replace_Object_And_Primitive_References): Removed.
8910 (Replace_References): New routine.
8911 (Replace_Type_References): Moved to the library level of Exp_Util.
8912 (Type_Map_Hash): New routine.
8913 (Update_Primitives_Mapping): Update the mapping call.
8914 (Update_Primitives_Mapping_Of_Types): Removed.
8915 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
8916 parameter For_Freeze and update the comment on usage.
8917 (Map_Types): New routine.
8918 (Replace_References): New routine.
8919 (Replace_Type_References): Moved to the library level of Exp_Util.
8920 (Update_Primitives_Mapping_Of_Types): Removed.
8921 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
8922 properties of the private type to the full view in case the full
8923 view derives from a parent type and inherits a DIC pragma.
8924 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
8925 DIC pragma is placed at the top of a declarative region.
8927 2017-04-25 Tristan Gingold <gingold@adacore.com>
8929 * s-mmap.ads (Data): Add pragma Inline.
8931 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8933 * checks.adb (Insert_Valid_Check): Do not use
8934 a renaming to alias a volatile name because this will lead to
8935 multiple evaluations of the volatile name. Use a constant to
8936 capture the value instead.
8938 2017-04-25 Doug Rupp <rupp@adacore.com>
8940 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
8942 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8944 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
8945 Add out parameter to indicate to caller that a wrapper must
8946 be constructed for an inherited primitive whose inherited
8947 pre/postcondition has called to overridden primitives.
8948 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
8949 for inherited primitive that requires it.
8950 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
8951 legal primitive operations and belong to the list of bodies
8952 generated after the freeze point of a type.
8953 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
8954 of Build_Class_Wide_Expression.
8955 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
8956 to construct the specification of the wrapper subprogram created
8957 for an inherited operation.
8959 2017-04-25 Bob Duff <duff@adacore.com>
8961 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
8962 pthread_mutexattr_setprioceiling): Add new interfaces for these
8964 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
8965 protocols as appropriate for Locking_Policy 'C' and 'I'.
8966 * s-taprop-posix.adb: Minor reformatting to make it more similar
8967 to s-taprop-linux.adb.
8969 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8971 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
8972 Handle properly a multi- level derivation involving both renamed
8973 and constrained parent discriminants, when the type to be
8974 constrained has fewer discriminants that the ultimate ancestor.
8976 2017-04-25 Bob Duff <duff@adacore.com>
8978 * sem_util.adb (Is_Object_Reference): In the
8979 case of N_Explicit_Dereference, return False if it came from a
8980 conditional expression.
8982 2017-04-25 Bob Duff <duff@adacore.com>
8984 * par-ch4.adb (P_Case_Expression): If a semicolon
8985 is followed by "when", assume that ";" was meant to be ",".
8987 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8989 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
8992 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8994 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
8995 loading of an entity.
8996 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
8997 previously repeated in the analysis.
8998 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
8999 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9000 use new procedure SPARK_Implicit_Load.
9001 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9002 SPARK_Implicit_Load.
9004 2017-04-25 Javier Miranda <miranda@adacore.com>
9006 * sem_util.adb (New_Copy_Tree): By default
9007 copying of defining identifiers is prohibited because
9008 this would introduce an entirely new entity into the
9009 tree. This patch introduces an exception to this general
9010 rule: the declaration of constants and variables located in
9011 Expression_With_Action nodes.
9012 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9013 (In_Map): New subprogram.
9014 (Visit_Entity): New subprogram.
9015 (Visit_Node): Handle EWA_Level,
9016 EWA_Inner_Scope_Level, and take care of defining entities defined
9017 in Expression_With_Action nodes.
9019 2017-04-25 Thomas Quinot <quinot@adacore.com>
9021 * exp_ch6.adb: minor comment edit.
9022 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9023 procedure specifications that come from source.
9024 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9025 Null_Statement attribute.
9026 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9027 procedure, generate statement SCO for the generated NULL statement.
9028 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9029 parser, if available.
9031 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9033 * system-linux-s390.ads: Use Long_Integer'Size to define
9036 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9038 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9040 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9042 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9043 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9044 * gnat_ugn.texi: Fix typo.
9045 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9046 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9047 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9048 * sem_util.adb (Mark_Coextensions): Likewise.
9049 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9051 2017-03-28 Andreas Schwab <schwab@suse.de>
9054 * system-linux-aarch64-ilp32.ads: New file.
9055 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9056 from LIBGNAT_TARGET_PAIRS.
9057 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9058 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9059 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9060 or -mabi=ilp32, resp.
9062 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9064 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9066 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9069 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9071 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9074 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9076 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9077 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9078 * system-linux-armeb.ads: Delete.
9079 * system-linux-mipsel.ads: Likewise.
9080 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9081 (ARM/Linux): Likewise.
9083 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9086 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9087 handle_generated_option GENERATED_P.
9089 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9091 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9092 around a justified modular type if it doesn't have the same scalar
9093 storage order as the enclosing record type.
9095 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9097 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9098 of boolean rvalues to function calls.
9100 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9102 * gcc-interface/utils.c (fold_bit_position): New function.
9103 (rest_of_record_type_compilation): Call it instead of bit_position to
9104 compute the field position and remove the call to remove_conversions.
9105 (compute_related_constant): Factor out the multiplication in both
9106 operands, if any, and streamline the final test.
9108 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9110 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9112 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9114 * gcc-interface/decl.c: Include demangle.h.
9115 (is_cplusplus_method): Return again true for a primitive operation
9116 only if it is dispatching. For a subprogram with an interface name,
9117 call the demangler to get the number of C++ parameters and compare it
9118 with the number of Ada parameters.
9120 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9122 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9123 there is no end label, put the location of the At_End procedure on
9124 the call to the procedure.
9126 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9128 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9129 value for array types with TYPE_INDEX_TYPE set on their domain type.
9130 * gcc-interface/utils.c (max_size): For operations and expressions, do
9131 not build a new node if the operands have not changed or are missing.
9133 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9135 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9136 argument when recursing on TRUTH_NOT_EXPR.
9138 2017-02-12 John Marino <gnugcc@marino.st>
9140 * system-freebsd-x86.ads: Rename into...
9141 * system-freebsd.ads: ...this.
9142 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9143 * gcc-interface/Makefile.in: Support aarch64-freebsd.
9144 (x86-64/FreeBSD): Adjust to above renaming.
9145 (i386/FreeBSD): Likewise.
9147 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
9149 * comperr.adb: Update FSF bug reporting URL.
9151 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
9152 Jakub Jelinek <jakub@redhat.com>
9155 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9157 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
9160 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9161 to build_translation_unit_decl.
9163 2017-01-23 Javier Miranda <miranda@adacore.com>
9165 * sem_util.adb (New_Copy_Tree): Code cleanup:
9166 removal of the internal map (ie. variable Actual_Map, its
9167 associated local variables, and all the code handling it).
9168 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9169 force loading of the System package when processing a task type.
9170 (Analyze_Protected_Type_Declaration): in GNATprove mode force
9171 loading of the System package when processing a protected type.
9172 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9173 force loading of the System package when processing compilation
9174 unit with a main-like subprogram.
9175 * frontend.adb (Frontend): remove forced loading of the System
9178 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9180 * sem_prag.adb (Default_Initial_Condition): If the desired type
9181 declaration is a derived type declaration with discriminants,
9182 it is rewritten as a private type declaration.
9183 * sem_ch13.adb (Replace_Type_References_Generic,
9184 Visible_Component): A discriminated private type with descriminnts
9185 has components that must be rewritten as selected components
9186 if they appear as identifiers in an aspect expression such as
9187 a Default_Initial_Condition.
9188 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9191 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9193 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9194 * gnat1drv.adb Generate an empty object file for an ignored
9195 Ghost compilation unit.
9196 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9198 2017-01-23 Yannick Moy <moy@adacore.com>
9200 * sem_ch4.adb (Analyze_Indexed_Component_Form):
9201 Adapt to inlined prefix with string literal subtype.
9202 * inline.adb (Expand_Inlined_Call): Keep unchecked
9203 conversion inside inlined call when formal type is constrained.
9205 2017-01-23 Javier Miranda <miranda@adacore.com>
9207 * sem_util.adb (New_Copy_Tree): Code cleanup:
9208 removal of global variables. All the global variables, global
9209 functions and tables of this subprogram are now declared locally.
9211 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9213 * exp_strm.ads: Minor reformatting and typo fixes.
9215 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9217 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9218 exp_aggr.adb: Minor reformatting.
9219 * g-diopit.adb: minor grammar/punctuation fix in comment.
9220 * g-byorma.ads: minor fix of unbalanced parens in comment.
9222 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9224 * par.adb: Update the documentation of component Labl.
9225 * par-ch6.adb (P_Return_Statement): Set the expected label of
9226 an extended return statement to Error.
9228 2017-01-23 Tristan Gingold <gingold@adacore.com>
9230 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9232 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9234 * expander.adb: Handle N_Delta_Aggregate.
9236 2017-01-23 Javier Miranda <miranda@adacore.com>
9238 * exp_ch6.adb (Expand_Call): Improve the code that
9239 checks if some formal of the called subprogram is a class-wide
9240 interface, to handle subtypes of class-wide interfaces.
9242 2017-01-23 Javier Miranda <miranda@adacore.com>
9244 * checks.adb (Apply_Parameter_Aliasing_Checks):
9245 Remove side effects of the actuals before generating the overlap
9248 2017-01-23 Justin Squirek <squirek@adacore.com>
9250 * exp_strm.ads, exp_strm.ads
9251 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
9252 as to avoid getting the underlying type by default.
9253 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
9254 underlying type in the Iiput and output attribute cases when
9255 building their respective functions.
9257 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9259 * scng.adb: Minor reformatting of error message.
9261 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9263 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
9264 to freeze the return type of an expression funxtion that is a
9265 completion, if the type is a limited view and the non-limited
9268 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9270 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
9271 aggregate construct.
9272 (P_Record_Or_Array_Component_Association): An array aggregate
9273 can start with an Iterated_Component_Association.
9274 * scng.adb: Modify error message on improper use of @ in earlier
9275 versions of the language.
9276 * sinfo.ads: New node kind N_Delta_Aggregate.
9277 * sinfo.adb: An N_Delta_Aggregate has component associations and
9279 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
9280 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
9281 Create a new index for each one of the choices in the association,
9282 to prevent spurious homonyms in the scope.
9283 (Resolve_Delta_Aggregate): New.
9284 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
9285 * exp_util.adb (Insert_Actions): Take into account
9287 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
9288 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
9289 and local procedures Expand_Delta_Array_Aggregate and
9290 expand_Delta_Record_Aggregate.
9291 * sprint.adb: Handle N_Delta_Aggregate.
9293 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9295 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
9296 empty name when the exception declaration is subject to pragma
9298 (Null_String): New routine.
9300 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9302 * par-ch9.adb (P_Protected_Definition): Parse
9303 any optional and potentially illegal pragmas which appear in
9304 a protected operation declaration list.
9305 (P_Task_Items): Parse
9306 any optional and potentially illegal pragmas which appear in a
9309 2017-01-23 Pascal Obry <obry@adacore.com>
9311 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
9312 is needed when a foreign thread call a Win32 API using a thread handle
9313 like GetThreadTimes() for example.
9315 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9317 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9318 allow an 'Address clause to be specified on a prefix of a
9321 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9323 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9324 attribute 'Valid is a renaming of the original expression when
9325 the expression denotes a name. For all other kinds of expression,
9326 use a constant to capture the value.
9327 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9328 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9330 2017-01-23 Justin Squirek <squirek@adacore.com>
9332 * sem_eval.adb (Eval_Integer_Literal): Add special
9333 case to avoid optimizing out check if the literal appears in
9336 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9338 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
9339 allow an 'Address clause to be specified on a prefix of a
9342 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9344 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
9345 attribute 'Valid is a renaming of the original expression when
9346 the expression denotes a name. For all other kinds of expression,
9347 use a constant to capture the value.
9348 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
9349 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
9351 2017-01-23 Justin Squirek <squirek@adacore.com>
9353 * sem_eval.adb (Eval_Integer_Literal): Add special
9354 case to avoid optimizing out check if the literal appears in
9357 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9359 * sem_ch4.adb (Try_Primitive_Operations,
9360 Is_Valid_First_Argument_Of): argument is valid if it is a derived
9361 type with unknown discriminants that matches its underlying
9363 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
9364 expression if its type is derived from a limited type with
9365 unknown discriminants, because the expansion (which is a call)
9366 must be expanded in the enclosing context to add the proper build-
9367 in-place parameters to the call.
9368 * lib.ads, exp_ch9.adb: Minor fixes in comments.
9370 2017-01-23 Yannick Moy <moy@adacore.com>
9372 * frontend.adb (Frontend): Do not load runtime
9373 unit for GNATprove when parsing failed.
9374 * exp_ch9.adb: minor removal of extra whitespace
9375 * exp_ch6.adb: minor typo in comment
9376 * sem_util.adb: Code cleanup.
9377 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
9378 * a-ngcefu.adb: minor style fix in whitespace
9380 2017-01-23 Thomas Quinot <quinot@adacore.com>
9382 * scos.ads: Document usage of 'd' as default SCO kind for
9384 * par_sco.adb (Traverse_Declarations_Or_Statements.
9385 Traverse_Degenerate_Subprogram): New supporting routine for expression
9386 functions and null procedures.
9387 (Traverse_Declarations_Or_Statements.Traverse_One): Add
9388 N_Expression_Function to the subprogram case; add required
9389 support for null procedures and expression functions.
9391 2017-01-23 Bob Duff <duff@adacore.com>
9393 * namet.ads (Bounded_String): Decrease the size of type
9394 Bounded_String to avoid running out of stack space.
9395 * namet.ads (Append): Don't ignore buffer overflow; raise
9396 Program_Error instead.
9398 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9400 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
9401 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
9403 * exp_ch9.adb: minor style fix in comment.
9405 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9407 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
9408 for a limited record extension with unknown discriminants whose
9409 full view has no discriminants.
9411 2017-01-23 Yannick Moy <moy@adacore.com>
9413 * exp_spark.adb: Alphabetize with clauses.
9415 2017-01-23 Yannick Moy <moy@adacore.com>
9417 * sem_util.adb (Has_Enabled_Property): Treat
9418 protected objects and variables differently from other variables.
9420 2017-01-23 Thomas Quinot <quinot@adacore.com>
9422 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
9423 Split original Ada 95 part off into new subprogram
9424 below. Call that subprogram (instead of proceeding with
9425 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
9426 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
9427 * debug.adb Document new switch -gnatd.p
9428 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
9429 record for reverse bit order if an error has already been posted
9430 on the record type. This avoids generating extraneous "info:"
9431 messages for illegal code.
9433 2017-01-23 Justin Squirek <squirek@adacore.com>
9435 * sem_ch3.adb (Analyze_Declarations): Correct comments
9436 * freeze.adb (Find_Constant): Add detection of deferred constants
9437 so they are not incorrectly flagged as premature.
9439 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9441 * scans.ads: New token At_Sign. Remove '@' from list of illegal
9442 characters for future version of the language. '@' is legal name.
9443 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
9444 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
9445 denotes a Target_Name.
9446 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
9447 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
9448 (Has_Target_Names): New flag on N_Assignment_Statement, to
9449 indicate that RHS has occurrences of N_Target_Name.
9450 * sem.adb: Call Analyze_Target_Name.
9451 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
9452 (urrent_LHS): Global variable that denotes LHS of assignment,
9453 used in the analysis of Target_Name nodes.
9454 * sem_res.adb (Resolve_Target_Name): New procedure.
9455 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
9456 N is an assignment statement whose RHS contains occurences of @
9457 that designate the value of the LHS of the assignment. If the
9458 LHS is side-effect free the target names can be replaced with
9459 a copy of the LHS; otherwise the semantics of the assignment
9460 is described in terms of a procedure with an in-out parameter,
9461 and expanded as such.
9462 (Expand_N_Assignment_Statement): Call
9463 Expand_Assign_With_Target_Names when needed.
9464 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
9465 * sprint.adb: Handle N_Target_Name.
9467 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
9469 * checks.adb: Minor fix in comment.
9471 2017-01-23 Philippe Gil <gil@adacore.com>
9473 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
9474 count in Sort = Memory_Usage or Allocations_Count
9476 2017-01-23 Justin Squirek <squirek@adacore.com>
9478 * sem_ch3.adb: Code cleanup.
9480 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9482 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
9483 variables to the local variable section. Update the profile
9484 of various nested routine that previously had visibility
9485 of those globals. One the matching phase has completed,
9486 remove certain classes of clauses which are considered noise.
9487 (Check_Dependency_Clause): Properly detect a match between two
9488 'Result attributes. Update the various post-match cases to use
9489 Is_Already_Matched as this routine now automatically recognizes
9490 a previously matched 'Result attribute.
9491 (Is_Already_Matched): New routine.
9492 (Remove_Extra_Clauses): New routine.
9493 (Report_Extra_Clauses): Remove the detection of ... => null
9494 clauses as this is now done in Remove_Extra_Clauses.
9496 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9498 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
9499 report on spurious overlaps between values involving a subtype
9500 with a static predicate, because the expansion of such a subtype
9501 into individual ranges in inhibited in ASIS mode.
9503 2017-01-23 Justin Squirek <squirek@adacore.com>
9505 * sem_ch3.adb (Analyze_Declarations): Add detection
9506 of an edge case and delay freezing if it is present.
9508 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9510 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
9511 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
9513 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9515 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
9516 access-to-subprogram types inherit the convention of the
9517 associated subprogram. (Set_Profile_Convention): New routine.
9518 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
9519 of the two entities directly, use Conventions_Match to account
9520 for anonymous access-to-subprogram and subprogram types.
9521 (Conventions_Match): New routine.
9523 2017-01-23 Claire Dross <dross@adacore.com>
9525 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
9526 which return Universal_Integer, force the overflow check flag for
9527 Length and Range_Length for types as big as Long_Long_Integer.
9529 2017-01-23 Claire Dross <dross@adacore.com>
9531 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
9532 attributes which return Universal_Integer, introduce a conversion
9533 to the expected type with the appropriate check flags set.
9534 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
9535 base type if the range is null. It may still be invalid if it
9536 is higher than the lower bound. This is checked later in the
9537 context in which the range appears.
9539 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
9541 * scos.ads: Introduce a constant to represent ignored
9542 dependencies in SCO_Unit_Table_Entry.
9544 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9546 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
9547 spaces from error messages.
9549 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9551 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
9552 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
9553 an object declaration for an array type with a modular index type
9554 with the size of Long_Long_Integer. Special processing is needed
9555 in this case to compute reliably the size of the object, and
9556 eventually to raise Storage_Error, when wrap-around arithmetic
9557 might compute a meangingless size for the object.
9559 2017-01-23 Justin Squirek <squirek@adacore.com>
9561 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
9562 sem_type.adb: Code cleanups.
9564 2017-01-23 Bob Duff <duff@adacore.com>
9566 * sem_res.adb (Resolve_Call): In the part of the code where
9567 it is deciding whether to turn the call into an indexed
9568 component, avoid doing so if the call is to an instance of
9569 Unchecked_Conversion. Otherwise, the compiler turns it into an
9570 indexed component, and resolution of that turns it back into a
9571 function call, and so on, resulting in infinite recursion.
9572 * sem_util.adb (Needs_One_Actual): If the first formal has a
9573 default, then return False.
9575 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
9577 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
9578 optimizations when the type is modular and the offsets are equal.
9580 2017-01-20 Thomas Quinot <quinot@adacore.com>
9582 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
9585 2017-01-20 Nicolas Roche <roche@adacore.com>
9587 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
9589 2017-01-20 Bob Duff <duff@adacore.com>
9591 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
9592 (etc) optimizations when the type is modular.
9594 2017-01-20 Yannick Moy <moy@adacore.com>
9596 * sem_ch6.adb (Move_Pragmas): move some pragmas,
9597 but copy the SPARK_Mode pragma instead of moving it.
9598 (Build_Subprogram_Declaration): Ensure that the generated spec
9599 and original body share the same SPARK_Pragma aspect/pragma.
9600 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
9601 procedure to copy SPARK_Mode aspect.
9603 2017-01-20 Bob Duff <duff@adacore.com>
9605 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
9607 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
9608 Empty even in ASIS mode.
9610 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9612 * exp_ch9.adb: minor style fixes in comments.
9613 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
9614 relative statement introduces an implicit dependency on
9615 Ada.Real_Time.Clock_Time.
9616 * sem_util.adb: Minor reformatting.
9618 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9620 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
9621 must be treated as delayed aspect even if the expression is
9622 a literal, because the aspect affects the freezing and the
9623 elaboration of the object to which it applies.
9625 2017-01-20 Tristan Gingold <gingold@adacore.com>
9627 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
9629 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9631 * lib-xref.adb (Generate_Reference): Do not warn about the
9632 presence of a pragma Unreferenced if the entity appears as the
9633 actual in a procedure call that does not come from source.
9635 2017-01-20 Pascal Obry <obry@adacore.com>
9637 * expect.c, terminals.c: Fix some warnings about unused variables.
9638 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
9641 2017-01-20 Bob Duff <duff@adacore.com>
9643 * exp_attr.adb (Constrained): Apply an access check (check that
9644 the prefix is not null) when the prefix denotes an object of an
9645 access type; that is, when there is an implicit dereference.
9647 2017-01-20 Gary Dismukes <dismukes@adacore.com>
9649 * s-rident.ads (constant Profile_Info): Remove
9650 No_Calendar from GNAT_Extended_Ravenscar restrictions.
9652 2017-01-20 Tristan Gingold <gingold@adacore.com>
9654 * s-maccod.ads: Add pragma No_Elaboration_Code_All
9656 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9658 * ghost.adb (Mark_Ghost_Clause): New routine.
9659 (Prune_Node): Do not prune compilation unit nodes.
9660 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
9661 This does not touch the node itself, but does prune all its fields.
9662 * ghost.ads (Mark_Ghost_Clause): New routine.
9663 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
9664 package clause mentions Ghost and non-Ghost packages. Mark a
9665 use package clause as Ghost when it mentions a Ghost package.
9666 (Analyze_Use_Type): Emit an error when a use type clause mentions
9667 Ghost and non-Ghost types. Mark a use type clause as Ghost when
9668 it mentions a Ghost type.
9669 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
9670 Ghost when it withs a Ghost unit.
9672 2017-01-20 Javier Miranda <miranda@adacore.com>
9674 * sem_res.adb (Resolve_Call): If a function call
9675 returns a limited view of a type and at the point of the call the
9676 function is not declared in the extended main unit then replace
9677 it with the non-limited view, which must be available. If the
9678 called function is in the extended main unit then no action is
9679 needed since the back-end handles this case.
9681 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
9683 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
9684 (Contains_Subprograms_Refs): ...this. Adjust comment
9685 for constants. (Is_Subp_Or_Const_Ref): Rename into...
9686 (Is_Subprogram_Ref): ...this.
9687 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
9688 Has_Non_Subprograms_Referencer and adjust comment. Remove
9689 incorrect shortcut for package declarations and bodies.
9691 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9693 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
9694 base type differs from that of the completion and the private
9695 subtype is an itype (created for a constraint on an access
9696 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
9699 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9701 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
9702 When inheriting the SPARK_Mode of a prior expression function,
9703 look at the properly resolved entity rather than the initial
9704 candidate which may denote a homonym.
9706 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9708 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
9709 Precondition or Postcondition, and the context is pragma
9710 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
9711 and suggest the standard names Assertion_Policy /Pre /Post
9714 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9716 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
9718 2017-01-20 Javier Miranda <miranda@adacore.com>
9720 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
9722 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
9723 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
9726 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9728 * sem_ch13.adb (Analyze_Aspect_Specification, case
9729 Dynamic_Predicate): If the entity E is a subtype that inherits
9730 a static predicate for its parent P,, the inherited and the
9731 new predicate combine in the generated predicate function,
9732 and E only has a dynamic predicate.
9734 2017-01-20 Tristan Gingold <gingold@adacore.com>
9736 * s-boustr.ads, s-boustr.adb: New package.
9737 * Makefile.rtl: Add s-boustr.
9739 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9741 * inline.adb (Process_Formals): Qualify the
9742 expression of a return statement when it yields a universal type.
9744 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9746 * freeze.adb (Freeze_All): Freeze the default
9747 expressions of all eligible formal parameters that appear in
9748 entries, entry families, and protected subprograms.
9750 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9752 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
9753 for illegal inherited Implicit_Dereference aspects with renamed
9756 2017-01-20 Javier Miranda <miranda@adacore.com>
9758 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
9759 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
9760 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
9761 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
9762 Set_Prev, Tree_Read): Adding assertion.
9763 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
9764 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
9765 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
9766 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
9767 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
9768 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
9769 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
9770 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
9771 Set_ListN_With_Parent): Adding assertion.
9773 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9775 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
9776 import that applies to several homograph subprograms. when one
9777 of them is declared by a subprogram body.
9779 2017-01-20 Justin Squirek <squirek@adacore.com>
9781 * exp_ch6.adb (Expand_Call): Remove optimization
9782 that nulls out calls to null procedures.
9784 2017-01-20 Yannick Moy <moy@adacore.com>
9786 * inline.adb (Expand_Inlined_Call): Keep more
9787 precise type of actual for inlining whenever possible. In
9788 particular, do not switch to the formal type in GNATprove mode in
9789 some case where the GNAT backend might require it for visibility.
9791 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9793 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
9794 aspect Implicit_Dereference can be inherited by a full view if
9795 the partial view has no discriminants, because there is no way
9796 to apply the aspect to the partial view.
9797 (Build_Derived_Record_Type): If derived type renames discriminants
9798 of the parent, the new discriminant inherits the aspect from
9800 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
9801 call through an access discriminant designating a subprogram.
9802 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
9803 properly a parameterless call through an access discriminant on
9804 the left-hand side of an assignment.
9805 * sem_res.adb (resolve): If an interpreation involves a
9806 discriminant with an implicit dereference and the expression is an
9807 entity, resolution takes place later in the appropriate routine.
9808 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
9809 access discriminants that designate a subprogram type.
9811 2017-01-20 Pascal Obry <obry@adacore.com>
9813 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
9815 2017-01-20 Yannick Moy <moy@adacore.com>
9817 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
9818 on implicitly with'ed units in GNATprove mode.
9819 * sinfo.ads (Implicit_With): Document use of flag for implicitly
9820 with'ed units in GNATprove mode.
9822 2017-01-20 Ed Schonberg <schonberg@adacore.com>
9824 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
9825 unit Do not report an error on a non-static entity that appears
9826 in the context of a spec expression, such as an aspect expression.
9828 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
9830 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
9831 (Is_Underlying_Full_View): New routine.
9832 (Set_Is_Underlying_Full_View): New routine.
9833 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
9834 * einfo.ads Add new attribute Is_Underlying_Full_View.
9835 (Is_Underlying_Full_View): New routine along with pragma Inline.
9836 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
9837 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
9838 class-wide types and underlying full views. The first subtype
9839 is used as the working type for all Itypes, not just array base types.
9840 (Build_DIC_Procedure_Declaration): Do not consider
9841 class-wide types and underlying full views. The first subtype
9842 is used as the working type for all Itypes, not just array
9844 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
9845 view or an underlying full view without clobbering the attributes
9846 of a previous freeze node.
9847 (Inherit_Freeze_Node): New routine.
9848 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
9850 (Build_Underlying_Full_View): Mark an underlying full view as such.
9851 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
9854 2017-01-20 Yannick Moy <moy@adacore.com>
9856 * sinfo.ads: Document lack of Do_Division_Check flag
9857 on float exponentiation.
9859 2017-01-19 Javier Miranda <miranda@adacore.com>
9861 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
9862 identifier attribute of a block-statement node. Required to avoid
9863 assertion failure when building the new containers library.
9865 2017-01-19 Bob Duff <duff@adacore.com>
9867 * exp_ch3.adb: Update comment.
9869 2017-01-19 Vincent Celier <celier@adacore.com>
9871 * gprep.adb (Gnatprep): Parse the definition file without
9872 "replace in comments" even when switch -C is used.
9874 2017-01-19 Justin Squirek <squirek@adacore.com>
9876 * exp_ch9.adb (Is_Pure_Barrier): Create function
9877 Is_Count_Attribute to identify an expansion of the 'Count
9880 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9882 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
9883 statements within an element iterator loop are only analyzed
9884 agter the loop is rewritten. Within a generic the analysis must
9885 be performed in any case to complete name capture.
9887 2017-01-19 Bob Duff <duff@adacore.com>
9889 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
9890 before checking for unrecognized pragmas.
9891 Initialize Pname on its declarations; that's always good style.
9893 2017-01-19 Claire Dross <dross@adacore.com>
9895 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
9896 body into the tree for GNATprove by setting its Parent field. The
9897 components invariants of composite types are not checked by
9898 the composite type's invariant procedure in GNATprove mode.
9899 (Build_Invariant_Procedure_Declaration): Semi-insert the
9900 declaration into the tree for GNATprove by setting its Parent
9902 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
9903 the component invariants to the array type invariant procedure
9904 so that the procedure can be used to check the array type
9906 (Freeze_Record_Type): In GNATprove mode, do
9907 not add the component invariants to the record type invariant
9908 procedure so that the procedure can be used to check the record
9909 type invariants if any.
9911 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9913 * lib-xref-spark_specific.adb: Minor reformatting.
9914 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
9916 2017-01-19 Javier Miranda <miranda@adacore.com>
9918 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
9919 Build_Back_End_Aggregate.
9920 (Generate_Aggregate_For_Derived_Type): Code cleanup.
9921 (Prepend_Stored_Values): Code cleanup.
9923 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9925 * sem_ch6.adb (Analyze_Expression_Function): Check for an
9926 incomplete return type after attempting to freeze it, so that
9927 other freeze actiona are generated in the proper order.
9929 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9931 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
9932 type, ie. a type whose component is a character type, and the
9933 aggregate is positional, do not convert into a string literal
9934 if the index type is not an integer type, because the original
9935 type may be required in an enclosing operation.
9937 2017-01-19 Bob Duff <duff@adacore.com>
9939 * binde.adb, debug.adb: Enable new elaboration order algorithm
9940 by default. -dp switch reverts to the old algorithm.
9942 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9944 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
9945 (Analyze_Declarations): Create the DIC and Invariant
9946 procedure bodies s after all freezing has taken place.
9947 (Build_Assertion_Bodies): New routine.
9948 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
9950 (Analyze_Package_Specification): Remove the
9951 generation of the DIC and Invariant procedure bodies. This is
9952 now done by Analyze_Declarations.
9953 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
9954 procedures are never treated as primitives.
9956 2017-01-19 Yannick Moy <moy@adacore.com>
9958 * frontend.adb: Analyze inlined bodies and check elaboration
9959 rules in GNATprove mode too.
9960 * sem_elab.adb (Delay_Element): Add Boolean component to save
9961 indication that call is in SPARK code. (Check_Elab_Calls):
9962 Check elaboration rules in GNATprove mode, and correctly set
9963 the current value of SPARK_Mode.
9964 * lib-xref-spark_specific.adb
9965 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
9967 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9969 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
9970 checks on the expression for the high bound of concatenation
9971 when checks are disabled, to suppress warnings about potential
9972 constraint errors in restricted runtimes.
9974 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
9976 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
9977 representation-to-position function as inlined.
9978 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
9979 the purity of an internally generated entity if it has been
9980 explicitly marked as pure for optimization purposes.
9981 * exp_aggr.adb: Minor reformatting.
9983 2017-01-19 Javier Miranda <miranda@adacore.com>
9985 * exp_ch6.adb (Expand_Call): Remove side effects on
9986 actuals that are allocators with qualified expression since the
9987 initialization of the object is performed by means of individual
9988 statements (and hence it must be done before the call).
9990 2017-01-19 Ed Schonberg <schonberg@adacore.com>
9992 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
9993 (Build_Derived_Enumeration_Type): If the derived type inherits a
9994 dynamic predicate from its parent, the bounds of the type must
9995 freeze because an explicit constraint is constructed for the
9996 type and the corresponding range is elaborated now.
9998 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10000 * sem_attr.ads: minor fix of inconsistent casing in comment
10001 * lib-writ.ads: minor align comments in columns
10002 * sem_ch3.adb: Minor reformatting.
10003 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10004 * table.ads: minor style fix in comment
10005 * lib-xref-spark_specific.adb
10006 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10007 * sem_ch12.adb: minor whitespace fix
10008 * freeze.adb: Add comment.
10009 * sem_util.adb (Unique_Name): for instances of
10010 generic subprograms ignore the name of the wrapper package.
10012 2017-01-19 Javier Miranda <miranda@adacore.com>
10014 * exp_aggr.adb (Resolve_Record_Aggregate):
10015 Factorize code needed for aggregates of limited and unlimited
10016 types in a new routine.
10017 (Pass_Aggregate_To_Back_End): New subprogram.
10019 2017-01-19 Yannick Moy <moy@adacore.com>
10021 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10023 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10025 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10026 public, for use elsewhere.
10027 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10028 an Inlined_body, recognize a call that uses object notation
10029 and has not been rewritten as a regular call because regular
10030 expansion has not taken place.
10032 2017-01-19 Bob Duff <duff@adacore.com>
10034 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10035 in case of generic formal discrete types, because it causes crashes in
10036 the compiler when built with assertions on.
10038 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10040 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10041 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10043 2017-01-19 Bob Duff <duff@adacore.com>
10045 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10046 Increment Warnings_Detected. It was decrementing, which is
10047 wrong since we just issued a warning message.
10048 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10049 these variables to be of subtype Nat instead of Int, because
10050 they should never be negative.
10052 2017-01-19 Javier Miranda <miranda@adacore.com>
10054 * contracts.adb (Build_Postconditions_Procedure): Replace
10055 Generate_C_Code by Modify_Tree_For_C.
10056 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10057 Replace Generate_C_Code by Modify_Tree_For_C.
10058 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10060 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10061 Generate_C_Code by Modify_Tree_For_C.
10062 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10063 Generate_C_Code by Modify_Tree_For_C.
10064 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10065 by Modify_Tree_For_C.
10066 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10067 Generate_C_Code by Modify_Tree_For_C.
10068 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10069 by Modify_Tree_For_C.
10070 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10072 2017-01-19 Javier Miranda <miranda@adacore.com>
10074 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10076 (Is_Inlinable_Expression_Function): New subprogram.
10077 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10079 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10081 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10083 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10084 selected component has a prefix that might be interpreted
10085 as a parameterless function call, but none of the candidate
10086 interpretations is parameterless, and there is a hidden homonym
10087 of the prefix that is a package.
10088 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10089 interpreted as a parameterless function call and its analysis
10090 fails, do not call Analyze_Selected_Component.
10092 2017-01-19 Steve Baird <baird@adacore.com>
10094 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10096 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10097 calls to a newly-defined Scalar_Range_Of_Right_View function.
10099 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10101 * gnat1drv.adb: minor fix of unbalanced parens in comment
10102 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10103 to visible part of the package to allow re-use in GNATprove.
10104 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10105 from repeated code of Traverse_Compilation_Unit.
10106 (Traverse_Declaration_Or_Statement): fixed detection of
10107 generic subprograms and packages; also, iteration over case
10108 statement alternatives rewritten to avoid testing if the first
10109 alternative is present (since it must be present due to Ada
10110 syntax restrictions).
10112 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10114 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10115 returning by reference not just for subprogram body stubs,
10116 but for all subprogram cases.
10117 * sem_util.adb: Code reformatting.
10118 (Requires_Transient_Scope): Update the call to Results_Differ.
10119 (Results_Differ): Update the parameter profile and the associated
10122 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10124 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10125 identifier nodes that do not come from source, to handle properly
10126 dimensionality check within an inlined body which inclddes both
10127 original operands and rewritten operands. This removes spurious
10128 dimensionality errors in the presence of front-end inlining,
10129 as well as in SPARK mode.
10131 2017-01-16 Jakub Jelinek <jakub@redhat.com>
10134 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10136 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10138 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10140 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10142 * doc/gnat_ugn/getting_started_with_gnat.rst,
10143 doc/gnat_ugn/inline_assembler.rst,
10144 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10145 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10146 doc/gnat_ugn/about_this_guide.rst,
10147 doc/gnat_ugn/platform_specific_information.rst,
10148 doc/gnat_ugn/example_of_binder_output.rst,
10149 doc/gnat_ugn/gnat_and_program_execution.rst,
10150 doc/gnat_ugn/gnat_utility_programs.rst,
10151 doc/gnat_ugn/the_gnat_compilation_model.rst,
10152 doc/gnat_rm/implementation_defined_attributes.rst,
10153 doc/gnat_rm/compatibility_and_porting_guide.rst,
10154 doc/gnat_rm/standard_library_routines.rst,
10155 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10156 doc/gnat_rm/implementation_defined_pragmas.rst,
10157 doc/gnat_rm/the_gnat_library.rst,
10158 doc/gnat_rm/obsolescent_features.rst,
10159 doc/gnat_rm/about_this_guide.rst,
10160 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10161 doc/gnat_rm/implementation_of_ada_2012_features.rst,
10162 doc/gnat_rm/interfacing_to_other_languages.rst,
10163 doc/gnat_rm/implementation_defined_aspects.rst,
10164 doc/gnat_rm.rst: Update documentation.
10165 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10167 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10169 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10170 * scil_ll.adb: Minor style fix in comment.
10171 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10172 even if entity is already set, because the node may be renalyzed
10173 after inlining transformations.
10175 2017-01-13 Javier Miranda <miranda@adacore.com>
10177 * sem_res.adb (Resolve_Call): Do not establish a transient scope
10178 for a call to inlinable expression function (since the call will
10179 be replaced by its returned object).
10180 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10181 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10182 (Expand_Call): For inlinable expression function call replace the
10183 call by its returned object.
10184 (Is_Inlinable_Expression_Function): New subprogram.
10186 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10188 * checks.adb: Minor typo fix and reformatting.
10190 2017-01-13 Javier Miranda <miranda@adacore.com>
10192 * contracts.adb (Contract_Only_Subprograms): Remove formal.
10193 (Copy_Original_Specification): Removed.
10194 (Skip_Contract_Only_Subprogram): Move here checks previously
10195 located in the caller of this routine (to leave the code more clean).
10196 (Build_Contract_Only_Subprogram): Code cleanup.
10197 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10198 (Get_Contract_Only_Missing_Body_Name): Removed.
10200 2017-01-13 Javier Miranda <miranda@adacore.com>
10202 * sem_ch6.adb (Cloned_Expression): New subprogram.
10203 (Freeze_Expr_Types): Complete previous patch since the expression
10204 of an expression-function may have iterators and loops with
10205 defining identifiers which, as part of the preanalysis of the
10206 expression, may be left decorated with itypes that will not be
10207 available in the tree passed to the backend.
10209 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10211 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10212 conversion to Integer of an expression that is an attribute
10213 reference 'Pos on an enumeration type.
10215 2017-01-13 Bob Duff <duff@adacore.com>
10217 * atree.ads: Minor comment fix.
10219 2017-01-13 Justin Squirek <squirek@adacore.com>
10221 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10222 calls in accessibility check on return statement.
10224 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10226 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10227 Ensure that the input body is a subprogram body before trying to
10228 determine whether it denoted an expression function. Note that
10229 subprogram body stubs cannot denote expression functions.
10231 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10233 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10236 2017-01-13 Javier Miranda <miranda@adacore.com>
10238 * einfo.ads (Component_Bit_Offset): Fix documentation.
10239 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10240 on record holes for components with unknown compile-time offsets.
10242 2017-01-13 Bob Duff <duff@adacore.com>
10244 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10245 * g-locfil.ads: Minor comment fix.
10247 2017-01-13 Bob Duff <duff@adacore.com>
10249 * binde.adb (Elab_New): New elaboration order algorithm
10250 that is expected to cause fewer ABE issues. This is a work in
10251 progress. The new algorithm is currently disabled, and can be
10252 enable by the -dp switch, or by modifying the Do_Old and Do_New
10253 etc. flags and rebuilding. Experimental code is included to
10254 compare the results of the old and new algorithms.
10255 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
10256 can have multiple of these tables, so the old and new algorithms
10258 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
10259 parameter of type array. This avoids the global variable, and
10260 allows bounds checking (which is normally defeated by the tables
10261 packages). It also ensures that the Elab_Order is read-only
10263 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
10264 subprograms that need it, as above.
10265 * debug.adb: Document new -dp switch. Modify doc of old -do
10267 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
10268 and Bindgen. Move writing of closure (-R and -Ra switches)
10269 to Binde; that's more convenient.
10271 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10273 * sem_ch6.adb (Analyze_Expression_Function): If the expression
10274 function is a completion, all entities referenced in the
10275 expression are frozen. As a consequence, a reference to an
10276 uncompleted private type from an enclosing scope is illegal.
10278 2017-01-13 Javier Miranda <miranda@adacore.com>
10280 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
10281 (Analyze_Subprogram_Body_Helper): At the occurrence of an
10282 expression function declaration that is a completion, its
10283 expression causes freezing (AI12-0103).
10285 2017-01-13 Vadim Godunko <godunko@adacore.com>
10287 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
10288 Reference functions of Ada.Containers.Indefinite_Holders.
10290 2017-01-13 Bob Duff <duff@adacore.com>
10292 * s-os_lib.ads: Minor comment fixes.
10294 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10296 * exp_ch3.adb (Default_Initialize_Object): Do not default
10297 initialize an object when it is of a task type and restriction
10298 No_Tasking is in effect because the initialization is obsolete.
10299 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
10300 restriction No_Tasking is in effect.
10301 (Build_Master_Renaming): Do not rename a master when restriction
10302 No_Tasking is in effect.
10304 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10306 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
10307 the legality of An others clause applies as well to a choice in
10308 an Iterated_component_ association.
10309 (Resolve_Iterated_Component_Association): An others choice
10311 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
10312 Iterated_Component_Association is not static.
10314 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10316 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
10317 control is passed to the expresion handler before the new mode
10319 * sem_ch12.adb (Analyze_Package_Instantiation,
10320 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
10321 in case control is passed to the expresion handler before the
10324 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10326 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
10327 exp_aggr.adb: Minor reformatting.
10329 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10331 * inline.adb: Minor reformatting and typo fix.
10333 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10335 * sem_util.ads, sem_util.adb (Choice_List): Move function here
10336 from sem_aggr.adb, for use elsewhere.
10337 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
10338 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
10339 Iterated_Component_Present.
10340 * exp_aggr.adb: Use Choice_List throughout, to handle
10341 Iterated_Component_Associations.
10342 (Gen_Loop): Generate proper loop for an
10343 Iterated_Component_Association: loop variable has the identifier
10344 of the original association. Generate a loop even for a single
10345 component choice, in order to make loop parameter visible in
10347 (Flatten): An Iterated_Component_Association is not static.
10349 2017-01-13 Yannick Moy <moy@adacore.com>
10351 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
10352 float exponentiation for statically known small negative values
10353 is the reciprocal of the exponentiation for the opposite value
10355 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
10356 Ensure that the value of float exponentiation for negative values
10357 is the reciprocal of the exponentiation for the opposite value
10359 * inline.adb (Expand_Inlined_Call): Fix the count
10360 for the number of generated gotos.
10362 2017-01-13 Yannick Moy <moy@adacore.com>
10364 * inline.adb: Code cleanup.
10365 * sem_util.adb (Is_OK_Volatile_Context): Add
10366 expression in delay statement as OK for volatile context.
10368 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10370 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
10371 mode a choice that is a subtype with a static predicate is
10372 replaced by the values it covers. This transformation must not
10373 be performed in ASIS mode, to preserve the source for analysis.
10375 2017-01-13 Justin Squirek <squirek@adacore.com>
10377 * nlists.ads: Correct minor typo.
10379 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10381 * sem_ch13.adb: Minor reformatting and typo fix.
10383 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10385 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
10386 Iterated_Component_Association is a named association in an
10388 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
10389 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
10390 and resolve the discrete choices and the expression of the
10392 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
10393 Loop_Actions and Box_Present are attributes of
10394 N_Iterated_Component_Association nodes. Box_Present is always
10395 False in this case.
10396 * sprint.adb (Sprint_Node): An Iterated_Component_Association
10397 has a Discrete_Choices list, as specified in the RM. A
10398 Component_Association for aggregate uses instead a Choices list.
10399 We have to live with this small inconsistency because the new
10400 construct also has a defining identifier, and there is no way
10401 to merge the two node structures.
10403 2017-01-13 Yannick Moy <moy@adacore.com>
10405 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
10406 list of pragmas to remove. Remove pragmas from the list of
10407 statements in the body to inline.
10408 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
10410 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10412 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
10413 Analyze_Declarations, to analyze and resolve the expressions of
10414 aspect specifications in the current declarative list, so that
10415 the expressions have proper entity and type info. This is needed
10416 for ASIS when there is no subsequent expansion to generate this
10417 semantic information.
10418 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
10419 original expression, to suppress cascaded errors when expression
10420 has been constant-folded.
10421 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
10422 ASIS mode, because there is no subsequent expansion to decorate
10425 2017-01-13 Yannick Moy <moy@adacore.com>
10427 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
10428 New function to detect when a call may be inlined or not in
10430 (Expand_Inlined_Call): Ensure that a temporary
10431 is always created in the cases where a type conversion may be
10432 needed on an input parameter in GNATprove mode, so that GNATprove
10433 sees the check to perform.
10434 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
10435 when not applicable due to actual requiring type conversion
10436 with possible check but no temporary value can be copied for
10437 GNATprove to see the check.
10439 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10441 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
10442 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
10443 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
10444 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
10445 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
10446 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
10447 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
10448 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
10449 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
10450 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
10451 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
10452 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
10453 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
10454 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
10455 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
10456 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
10457 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
10458 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
10459 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
10460 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
10461 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
10462 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
10463 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
10464 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
10465 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
10466 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
10467 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
10468 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
10469 statements to reflect the new style for case alternatives. Various
10470 code clean up and reformatting.
10472 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10474 * exp_util.adb: Minor reformatting.
10476 2017-01-13 Yannick Moy <moy@adacore.com>
10478 * exp_spark.adb: Code cleanup.
10479 * sem_ch9.adb (Analyze_Delay_Until): Resolve
10480 expression so that calls are identified as such inside delay
10483 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10485 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
10486 * par-ch3.adb (P_Discrete_Choice_List): An
10487 Iterated_Component_Association is an array aggregate component.
10488 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
10489 (Is_Quantified_Expression): New function that performs a lookahead
10490 to distinguish quantified expressions from iterated component
10492 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
10494 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
10495 * sem.adb (Analyze): Handle Iterated_Component_Association.
10496 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
10497 component associations.
10498 * sinfo.ads, sinfo.adb: Entries for for
10499 N_Iterated_Component_Association and its fields.
10500 * sprint.adb (Sprint_Node_Actual): Handle
10501 N_Iterated_Component_Association.
10503 2017-01-13 Justin Squirek <squirek@adacore.com>
10505 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
10506 of the style check until after preanalysis of acutals.
10508 2017-01-13 Yannick Moy <moy@adacore.com>
10510 * sem_ch13.adb: Minor reformatting.
10511 * par-ch11.adb: minor style fix in whitespace
10512 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
10513 reduced to Add_Artificial_ALI_File; style fix in declaration of
10514 Text; grammar fix in comment.
10515 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
10516 * freeze.adb: Cleanup to pass pragma instead of
10517 expression to call.
10518 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
10519 replace System'To_Address by equivalent call.
10521 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10523 * bindusg.adb: Improve usage output for -f switch.
10525 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10527 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
10528 Minor reformatting.
10530 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10532 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
10533 treat comparisons on strings as legal in a Static_Predicate.
10534 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
10535 a function call that is the expansion of a string comparison.The
10536 function call is built when compiling the corresponding predicate
10537 function, but the expression has been found legal as a static
10538 predicate during earlier analysis.
10539 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
10540 properly a function call that is the expansion of a string
10541 comparison operation, in order to recover the Static_Predicate
10542 expression and apply it to a static argument when needed.
10544 2017-01-13 Tristan Gingold <gingold@adacore.com>
10546 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
10547 (Open_Read): Re-implement using Open_Read_No_Exception.
10548 (Open_Write): Raise exception in case of error.
10549 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
10550 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
10552 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
10554 2017-01-13 Yannick Moy <moy@adacore.com>
10556 * checks.adb: Code cleanup.
10558 2017-01-13 Yannick Moy <moy@adacore.com>
10560 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
10561 expression instead of unanalyzed aspect expression for checking
10562 the validity of inheriting an operation. Also copy the expression
10563 being passing it to Build_Class_Wide_Expression, as this call
10564 modifies its argument.
10565 * sem_util.ads Fix comment to reference correct function name
10568 2017-01-13 Javier Miranda <miranda@adacore.com>
10570 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
10571 when we propagate information about the indexes back to the original
10572 indexing mode and the prefix of the index is a function call, do not
10573 remove any parameter from such call.
10575 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10577 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
10578 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
10579 a build-in-place function whose result type is tagged.
10581 2017-01-13 Yannick Moy <moy@adacore.com>
10583 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10584 Do not generate a wrapper when the only candidate is a class-wide
10586 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
10587 inside a generic context.
10589 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10591 * exp_util.adb (Add_Inherited_Tagged_DIC):
10592 Pass the object parameters of both the parent and the derived
10593 type DIC procedure to the reference replacement circuitry.
10594 (Find_DIC_Type): Modify the circuitry to present the partial
10595 view of a private type in case the private type defines its own
10597 (Replace_Object_And_Primitive_References): Add two
10598 optional formal parameters. Update the comment on usage. Update
10599 the replacement of references to object parameters.
10601 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10603 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
10605 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10607 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
10608 an out parameter that is a type conversion, independently of th
10609 range check that may apply to the expression of the conversion,
10610 for use in GNATProve.
10612 2017-01-13 Yannick Moy <moy@adacore.com>
10614 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
10615 GNATprove_Mode here to Frontend.
10616 * frontend.adb (Frontend): Move the implicit with for System
10617 in GNATprove_Mode here as it ismore correct this way; the old
10618 place only worked by chance, since there were no overloaded names.
10619 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
10620 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
10621 four attributes identified in SRM 9(18), add an implicit with
10622 to Ada.Task_Identification.
10623 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
10624 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
10626 * checks.adb (Apply_Discriminant_Check,
10627 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
10628 In GNATprove mode, we do not apply the checks, but we still
10629 analyze the expression to possibly issue errors on SPARK
10630 code when a run-time error can be detected at compile time.
10631 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
10634 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10636 * expander.adb (Expand): Add a warning about using return
10637 statements in Ghost management code.
10638 * exp_ch3.adb (Freeze_Type): Add a warning about using return
10639 statements in Ghost management code.
10640 * exp_ch7.adb (Build_Invariant_Procedure_Body,
10641 Build_Invariant_Procedure_Declaration): Add a warning about
10642 using return statements in Ghost management code.
10643 * exp_disp.adb (Make_DT): Add a warning about using return
10644 statements in Ghost management code.
10645 * exp_util.adb (Build_DIC_Procedure_Body,
10646 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
10647 warning about using return statements in Ghost management code.
10648 * freeze.adb (Freeze_Entity): Add a warning about using return
10649 statements in Ghost management code.
10650 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
10651 statements in Ghost management code.
10652 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
10653 a warning about using return statements in Ghost management code.
10654 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
10655 return statements in Ghost management code.
10656 * sem_ch6.adb (Analyze_Procedure_Call,
10657 Analyze_Subprogram_Body_Helper): Add a warning about using return
10658 statements in Ghost management code.
10659 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
10660 using return statements in Ghost management code.
10661 * sem_ch12.adb (Analyze_Package_Instantiation,
10662 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
10663 Instantiate_Subprogram_Body): Add a warning about using return
10664 statements in Ghost management code.
10665 * sem_ch13.adb (Build_Predicate_Functions,
10666 Build_Predicate_Function_Declarations): Add a warning about
10667 using return statements in Ghost management code.
10668 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
10669 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
10670 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
10671 using return statements in Ghost management code.
10673 2017-01-13 Tristan Gingold <gingold@adacore.com>
10675 * s-mmosin-mingw.adb: Fix pragma import.
10677 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10679 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
10682 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10684 * atree.adb (Allocate_Initialize_Node): A newly created node is
10685 no longer marked as Ghost at this level.
10686 (Mark_New_Ghost_Node): New routine.
10687 (New_Copy): Mark the copy as Ghost.
10688 (New_Entity): Mark the entity as Ghost.
10689 (New_Node): Mark the node as Ghost.
10690 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
10691 apply to unanalyzed entities.
10692 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
10694 (Set_Is_Checked_Ghost_Entity): This attribute now
10695 applies to all entities as well as unanalyzed entities.
10696 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
10697 all entities as well as unanalyzed entities.
10698 * expander.adb Add with and use clauses for Ghost.
10699 (Expand): Install and revert the Ghost region associated with the node
10701 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
10702 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
10703 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
10704 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
10705 (Freeze_Type): Install and revert the Ghost region associated
10706 with the type being frozen.
10707 * exp_ch5.adb Remove with and use clauses for Ghost.
10708 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
10709 * exp_ch6.adb Remove with and use clauses for Ghost.
10710 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
10711 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
10712 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
10713 Ghost region of the working type.
10714 (Build_Invariant_Procedure_Declaration): Install and revert
10715 the Ghost region of the working type.
10716 (Expand_N_Package_Body): Remove all Ghost-related code.
10717 * exp_ch8.adb Remove with and use clauses for Ghost.
10718 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
10720 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
10721 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
10722 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
10724 * exp_ch13.adb Remove with and use clauses for Ghost.
10725 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
10726 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
10727 the tagged type. Move the generation of various entities within
10728 the Ghost region of the type.
10729 * exp_prag.adb Remove with and use clauses for Ghost.
10730 (Expand_Pragma_Check): Remove all Ghost-related code.
10731 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
10732 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
10733 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
10734 * exp_util.adb (Build_DIC_Procedure_Body): Install
10735 and revert the Ghost region of the working types.
10736 (Build_DIC_Procedure_Declaration): Install and revert the
10737 Ghost region of the working type.
10738 (Make_Invariant_Call): Install and revert the Ghost region of the
10740 (Make_Predicate_Call): Reimplemented. Install and revert the
10741 Ghost region of the associated type.
10742 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
10743 of the entity being frozen.
10744 (New_Freeze_Node): Removed.
10745 * ghost.adb Remove with and use clauses for Opt.
10746 (Check_Ghost_Completion): Update the parameter profile
10747 and all references to formal parameters.
10748 (Ghost_Entity): Update the comment on usage.
10749 (Install_Ghost_Mode): New routines.
10750 (Is_Ghost_Assignment): New routine.
10751 (Is_Ghost_Declaration): New routine.
10752 (Is_Ghost_Pragma): New routine.
10753 (Is_Ghost_Procedure_Call): New routine.
10754 (Is_Ghost_Renaming): Removed.
10755 (Is_OK_Declaration): Reimplemented.
10756 (Is_OK_Pragma): Reimplemented.
10757 (Is_OK_Statement): Reimplemented.
10758 (Is_Subject_To_Ghost): Update the comment on usage.
10759 (Mark_And_Set_Ghost_Assignment): New routine.
10760 (Mark_And_Set_Ghost_Body): New routine.
10761 (Mark_And_Set_Ghost_Completion): New routine.
10762 (Mark_And_Set_Ghost_Declaration): New routine.
10763 (Mark_And_Set_Ghost_Instantiation): New routine.
10764 (Mark_And_Set_Ghost_Procedure_Call): New routine.
10765 (Mark_Full_View_As_Ghost): Removed.
10766 (Mark_Ghost_Declaration_Or_Body): New routine.
10767 (Mark_Ghost_Pragma): New routine.
10768 (Mark_Ghost_Renaming): New routine.
10769 (Mark_Pragma_As_Ghost): Removed.
10770 (Mark_Renaming_As_Ghost): Removed.
10771 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
10772 (Prune_Node): Freeze nodes no longer need special pruning, they
10773 are processed by the general ignored Ghost code mechanism.
10774 (Restore_Ghost_Mode): New routine.
10775 (Set_Ghost_Mode): Reimplemented.
10776 (Set_Ghost_Mode_From_Entity): Removed.
10777 * ghost.ads Add with and use clauses for Ghost.
10778 (Check_Ghost_Completion): Update the parameter profile
10779 along with the comment on usage.
10780 (Install_Ghost_Mode): New routine.
10781 (Is_Ghost_Assignment): New routine.
10782 (Is_Ghost_Declaration): New routine.
10783 (Is_Ghost_Pragma): New routine.
10784 (Is_Ghost_Procedure_Call): New routine.
10785 (Mark_And_Set_Ghost_Assignment): New routine.
10786 (Mark_And_Set_Ghost_Body): New routine.
10787 (Mark_And_Set_Ghost_Completion): New routine.
10788 (Mark_And_Set_Ghost_Declaration): New routine.
10789 (Mark_And_Set_Ghost_Instantiation): New routine.
10790 (Mark_And_Set_Ghost_Procedure_Call): New routine.
10791 (Mark_Full_View_As_Ghost): Removed.
10792 (Mark_Ghost_Pragma): New routine.
10793 (Mark_Ghost_Renaming): New routine.
10794 (Mark_Pragma_As_Ghost): Removed.
10795 (Mark_Renaming_As_Ghost): Removed.
10796 (Restore_Ghost_Mode): New routine.
10797 (Set_Ghost_Mode): Redefined.
10798 (Set_Ghost_Mode_From_Entity): Removed.
10799 * sem.adb (Analyze): Install and revert the Ghost region of the
10800 node being analyzed.
10801 (Do_Analyze): Change the way a clean Ghost
10802 region is installed and reverted.
10803 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
10804 all Ghost-related code.
10805 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
10806 (Analyze_Number_Declaration): Remove all Ghost-related code.
10807 (Analyze_Object_Declaration): Install and revert the Ghost region of
10808 a deferred object declaration's completion.
10809 (Array_Type_Declaration): Remove all Ghost-related code.
10810 (Build_Derived_Type): Update the comment on
10811 the propagation of Ghost attributes from a parent to a derived type.
10812 (Derive_Subprogram): Remove all Ghost-related code.
10813 (Make_Class_Wide_Type): Remove all Ghost-related code.
10814 (Make_Implicit_Base): Remove all Ghost-related code.
10815 (Process_Full_View): Install and revert the Ghost region of
10816 the partial view. There is no longer need to check the Ghost
10818 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
10819 region of the left hand side.
10820 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
10821 all Ghost-related code.
10822 (Analyze_Expression_Function): Remove all Ghost-related code.
10823 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
10824 (Analyze_Procedure_Call): Install and revert the Ghost region of
10825 the procedure being called.
10826 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
10827 region of the spec or body.
10828 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
10829 (Build_Subprogram_Declaration): Remove all Ghost-related code.
10830 (Find_Corresponding_Spec): Remove all Ghost-related code.
10831 (Process_Formals): Remove all Ghost-related code.
10832 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
10833 the Ghost region of the spec.
10834 (Analyze_Package_Declaration): Remove all Ghost-related code.
10835 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
10836 Ghost when it aliases a Ghost entity.
10837 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
10839 (Analyze_Object_Renaming): Mark a renaming as Ghost when
10840 it aliases a Ghost entity.
10841 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
10843 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
10844 aliases a Ghost entity.
10845 * sem_ch11.adb Remove with and use clauses for Ghost.
10846 (Analyze_Exception_Declaration): Remove all Ghost-related code.
10847 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
10848 Ghost-related code.
10849 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
10851 (Analyze_Package_Instantiation): Install and revert the Ghost region
10852 of the package instantiation.
10853 (Analyze_Subprogram_Instantiation): Install
10854 and revert the Ghost region of the subprogram instantiation.
10855 (Instantiate_Package_Body): Code clean up. Install and revert the
10856 Ghost region of the package body.
10857 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
10858 Ghost region of the subprogram body.
10859 * sem_ch13.adb (Build_Predicate_Functions): Install
10860 and revert the Ghost region of the related type.
10861 (Build_Predicate_Function_Declaration): Code clean up. Install
10862 and rever the Ghost region of the related type.
10863 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
10864 Install and revert the Ghost region of the pragma.
10865 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
10866 Ghost region of the pragma.
10867 (Analyze_Pragma): Install and revert the Ghost region of various
10868 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
10869 or encloses a Ghost entity.
10870 (Analyze_Pre_Post_Condition): Install and revert the Ghost
10871 region of the pragma.
10872 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
10873 Ghost region of the pragma.
10874 * sem_res.adb (Resolve): Remove all Ghost-related code.
10875 * sem_util.adb (Is_Declaration): Reimplemented.
10876 (Is_Declaration_Other_Than_Renaming): New routine.
10877 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
10878 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
10879 (Is_Ghost_Pragma): Removed.
10880 (Is_Ignored_Ghost_Pragma): New routine.
10881 (Set_Is_Checked_Ghost_Pragma): New routine.
10882 (Set_Is_Ghost_Pragma): Removed.
10883 (Set_Is_Ignored_Ghost_Pragma): New routine.
10884 * sinfo.ads: Update the documentation on Ghost mode and
10885 Ghost regions. New attributes Is_Checked_Ghost_Pragma
10886 and Is_Ignored_Ghost_Pragma along with usages in nodes.
10887 Remove attribute Is_Ghost_Pragma along with usages in nodes.
10888 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
10889 (Is_Ghost_Pragma): Removed along with pragma Inline.
10890 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
10891 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
10892 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
10893 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
10895 2017-01-12 Tristan Gingold <gingold@adacore.com>
10897 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
10898 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
10900 2017-01-12 Yannick Moy <moy@adacore.com>
10902 * errout.adb, errout.ads (Initialize): Factor common treatment
10904 (Reset_Warnings): New procedure to reset counts related to warnings.
10905 (Record_Compilation_Errors): New variable to store the presence of an
10906 error, used in gnat2why to allow changing the Warning_Mode.
10907 (Compilation_Errors): Use new variable Record_Compilation_Errors to
10908 store the presence of an error.
10910 2017-01-12 Javier Miranda <miranda@adacore.com>
10912 * sem_ch13.adb (Analyze_Aspect_Specifications):
10913 For Interrupt_Handler and Attach_ Handler aspects, decorate the
10914 internally built reference to the protected procedure as coming
10915 from sources and force its analysis.
10917 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10919 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
10920 inherit predicates if any from the first_subtype of the parent,
10921 not from the anonymous parent type.
10922 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
10923 predicate is not a static subtype.
10925 2017-01-12 Gary Dismukes <dismukes@adacore.com>
10927 * freeze.adb (Check_Suspicious_Convention): New procedure
10928 performing a warning check on discriminated record types with
10929 convention C or C++. Factored out of procedure Freeze_Record_Type,
10930 and changed to only apply to base types (to avoid spurious
10931 warnings on subtypes). Minor improvement of warning messages
10932 to refer to discriminated rather than variant record types.
10933 (Freeze_Record_Type): Remove code for performing a suspicious
10935 (Freeze_Entity): Only call Freeze_Record_Type
10936 on types that aren't declared within any enclosing generic units
10937 (rather than just excluding the type when the innermost scope
10938 is generic). Call Check_Suspicious_Convention whether or not
10939 the type is declared within a generic unit.
10940 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
10941 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
10944 2017-01-12 Tristan Gingold <gingold@adacore.com>
10946 * sysdep.c, adaint.c, rtinit.c, ming32.h:
10947 (__gnat_current_codepage): Renamed from CurrentCodePage
10948 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
10950 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10952 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
10953 quantified expressions, following AI12-050: the loop parameters
10954 of two quantified expressions are conformant if they have the
10957 2017-01-12 Arnaud Charlet <charlet@adacore.com>
10959 * gcc-interface/Makefile.in: Clean up VxWorks targets.
10961 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10963 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
10964 Hnadle properly the attribute reference when it appears as part
10965 of an expression in another loop aspect.
10967 2017-01-12 Ed Schonberg <schonberg@adacore.com>
10969 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
10970 subsidiary of Build_Initialization_Call, to complete generation
10971 of predicate checks on discriminants whose (sub)types have
10972 predicates, and to add checks on variants that do not have an
10974 * sem_util.adb (Gather_Components): A missing Others alternative is
10975 not an error when the type of the discriminant is a static predicate
10976 (and coverage has been checked when analyzing the case statement). A
10977 runtime check is generated to verify that a given discriminant
10978 satisfies the predicate (RM 3.8.1. (21.1/2)).
10980 2017-01-12 Yannick Moy <moy@adacore.com>
10982 * gnat1drv.adb (Adjust_Global_Switches): Only
10983 perform checking of exception mechanism when generating code.
10985 2017-01-12 Justin Squirek <squirek@adacore.com>
10987 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
10988 Remove handling of access component with invariant.
10989 (Build_Invariant_Procedure_Declaration): Remove return on class
10991 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
10992 conditional exception for component or array so Has_Own_Invariants
10993 flag is not falsly set.
10994 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
10995 wide type to have no invariant flags.
10997 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
10999 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11000 sem_ch13.adb: Minor reformatting.
11002 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11004 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11005 adjustment primitive when the ancestor type was not properly frozen.
11006 (Gen_Assign): Guard against a missing initialization
11007 primitive when the component type was not properly frozen.
11008 (Initialize_Array_Component): Guard against a missing adjustment
11009 primitive when the component type was not properly frozen.
11010 (Initialize_Record_Component): Guard against a missing adjustment
11011 primitive when the component type was not properly frozen.
11012 (Process_Transient_Component_Completion): The transient object may
11013 not be finalized when its associated type was not properly frozen.
11014 * exp_ch3.adb (Build_Assignment): Guard against a missing
11015 adjustment primitive when the component type was not properly frozen.
11016 (Build_Initialization_Call): Guard against a missing
11017 initialization primitive when the associated type was not properly
11019 (Expand_N_Object_Declaration): Guard against a missing
11020 adjustment primitive when the base type was not properly frozen.
11021 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11022 body when there is no adjustment primitive available. Create an
11023 empty Deep_Finalize body when there is no finalization primitive
11025 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11026 missing finalization primitive when the designated type was
11027 not properly frozen.
11028 (Expand_N_Allocator): Guard against a missing initialization primitive
11029 when the designated type was not properly frozen.
11030 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11031 only when the corresponding adjustment primitive is available.
11032 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11033 adjustment/finalization statements only when there is an available
11034 primitive to carry out the action.
11035 (Build_Initialize_Statements): Generate the initialization/finalization
11036 statements only when there is an available primitive to carry out the
11038 (Make_Adjust_Call): Do not generate a call when the underlying
11039 type is not present due to a possible missing full view.
11040 (Make_Final_Call): Do not generate a call when the underlying
11041 type is not present due to a possible missing full view.
11042 (Make_Finalize_Address_Stmts): Generate an empty body when the
11043 designated type lacks a finalization primitive.
11044 (Make_Init_Call): Do not generate a call when the underlying type is
11045 not present due to a possible missing full view.
11046 (Process_Component_For_Adjust): Add the adjustment call only when the
11047 corresponding adjustment primitive is available.
11048 (Process_Component_For_Finalize): Add the finalization call only when
11049 the corresponding finalization primitive is available.
11050 (Process_Object_Declaration): Use a null statement to emulate a
11051 missing call to the finalization primitive of the object type.
11052 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11053 (Make_Final_Call): Update the comment on usage.
11054 (Make_Init_Call): Update the comment on usage.
11055 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11057 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11059 * einfo.ads: Update documentation of Address_Taken.
11060 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11061 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11062 for subprograms when setting Address_Taken flag.
11064 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11066 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11067 Configurable_Run_Time_Mode off when analysing with'ed predefined
11070 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11072 * sem_prag.adb: Minor reformatting.
11073 * sem_util.adb (Unique_Entity): fix result for
11074 bodies of entry families.
11076 2017-01-12 Justin Squirek <squirek@adacore.com>
11078 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11079 Resolve_Suppressible in the pragma Assertion_Policy case.
11080 (Resolve_Suppressible): Created this function to factor out
11081 common code used to resolve Suppress to either Ignore or Check
11082 * snames.ads-tmpl: Add name for Suppressible.
11084 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11086 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11088 * debug.adb: Minor comment fixes.
11090 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11092 * sem_util.adb (Unique_Entity): For concurrent
11093 bodies that are defined with stubs and complete a declaration
11094 of a single concurrent object return the entity of an implicit
11095 concurrent type, not the entity of the anonymous concurrent
11097 * debug.adb: -gnatd.J is no longer used.
11098 * make.adb (Globalize): Removed, no longer used.
11099 * sem_ch9.adb: minor typo in comment for entry index
11101 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11103 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11104 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11105 the value record of a task, set its _Secondary_Stack_Size field
11107 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11108 a _Secondary_Stack_Size field in the value record of
11109 the task if a Secondary_Stack_Size rep item is present.
11110 (Make_Task_Create_Call): Include secondary stack size
11111 parameter. If No_Secondary_Stack restriction is in place, passes
11113 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11114 Secondary_Stack_Size.
11115 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11116 function to define the overhead of the secondary stack.
11117 * s-tarest.adb (Create_Restricted_Task,
11118 Create_Restricted_Task_Sequential): Functions now include
11119 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11120 * s-tarest.adb (Create_Restricted_Task,
11121 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11122 include Secondary_Stack_Size parameter.
11123 (Task_Wrapper): Secondary stack now allocated to the size specified by
11124 the Secondary_Stack_Size parameter in the task's ATCB.
11125 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11126 Secondary_Stack_Size component.
11127 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11128 Create_Restricted_Task_Sequential): Function now include
11129 Secondary_Stack_Size parameter.
11130 (Task_Wrapper): Secondary stack now allocated to the size
11131 specified by the Secondary_Stack_Size parameter in the task's
11133 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11134 to include Secondary_Stack_Size parameter.
11135 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11136 Secondary_Stack_Size aspect, turning the aspect into its corresponding
11137 internal attribute.
11138 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11139 * snames.adb-tmpl, snames.ads-tmpl: Added names
11140 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11141 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11143 2017-01-12 Yannick Moy <moy@adacore.com>
11145 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11148 2017-01-12 Justin Squirek <squirek@adacore.com>
11150 * exp_attr.adb (Expand_N_Attribute_Reference):
11151 Fix Finalization_Size case by properly resolving the type after
11152 rewritting the node.
11154 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11156 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11158 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11159 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11160 exp_sel.ads: Minor reformatting.
11162 2017-01-12 Justin Squirek <squirek@adacore.com>
11164 * exp_ch6.adb (Expand_Call): Add guard to prevent
11165 invariant checks from being created for internally generated
11168 2017-01-12 Bob Duff <duff@adacore.com>
11170 * lib-writ.ads: Remove incorrect comment.
11172 2017-01-12 Javier Miranda <miranda@adacore.com>
11174 * debug.adb (-gnatd.K): Enable generation of contract-only
11175 procedures in CodePeer mode.
11176 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11178 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11180 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11182 (Get_Contract_Only_Missing_Body_Name): New subprogram.
11183 (Get_Contract_Only_Body): New subprogram.
11184 (Set_Contract_Only_Body): New subprogram.
11185 (Is_Contract_Only_Body): New subprogram.
11186 (Set_Is_Contract_Only_Body): New subprogram.
11187 (SCIL_Nodes): Replace table by hash-table.
11189 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11191 * exp_ch6.adb: Minor reformatting.
11192 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11194 2017-01-12 Bob Duff <duff@adacore.com>
11196 * binde.adb (Forced): New reason for a dependence.
11197 (Force_Elab_Order): Implementation of the new switch.
11198 * binde.ads: Minor comment fixes.
11199 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11200 long ago that is no longer supported; removed comment about that.
11201 * opt.ads (Force_Elab_Order_File): Name of file specified for
11203 * switch-b.adb: Parse -f switch.
11205 2017-01-12 Justin Squirek <squirek@adacore.com>
11207 * exp_ch6.adb (Check_View_Conversion): Created this function
11208 to properly chain calls to check type invariants that may be
11209 present in a subprogram call after the subprogram.
11210 (Expand_Call): Add a conditional to identify when a view conversion
11211 needs to be checked.
11212 * nlists.adb, nlists.ads (Prepend_New): New routine.
11213 (Prepend_New_To): New routine.
11215 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11217 * sinfo.ads: Minor reformatting.
11219 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11221 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11224 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11226 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11227 variable Definite. Create a local object and pass its 'Access to the
11228 BIP function when the result type is either definite or it does not
11229 require any finalization or secondary stack management.
11231 2017-01-12 Bob Duff <duff@adacore.com>
11233 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11234 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11235 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11236 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11237 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11238 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11239 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11240 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11241 Change name to Pragma_Name_Unmapped.
11242 (Pragma_Name_Mapped): Change name to Pragma_Name.
11243 This is because the "mapped" version should be the usual case.
11245 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
11247 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11248 Is_Default_Init_Cond_Procedure, and
11249 Has_Inherited_Default_Init_Cond. Add uses of flags
11250 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
11251 (Default_Init_Cond_Procedure): Removed.
11252 (DIC_Procedure): New routine.
11253 (Has_Default_Init_Cond): Removed.
11254 (Has_DIC): New routine.
11255 (Has_Inheritable_Invariants): The attribute applies to the base type.
11256 (Has_Inherited_Default_Init_Cond): Removed.
11257 (Has_Inherited_DIC): New routine.
11258 (Has_Inherited_Invariants): The attribute applies to the base type.
11259 (Has_Own_DIC): New routine.
11260 (Has_Own_Invariants): The attribute applies to the base type.
11261 (Is_Default_Init_Cond_Procedure): Removed.
11262 (Is_DIC_Procedure): New routine.
11263 (Set_Default_Init_Cond_Procedure): Removed.
11264 (Set_DIC_Procedure): New routine.
11265 (Set_Has_Default_Init_Cond): Removed.
11266 (Set_Has_Inheritable_Invariants): The attribute applies
11268 (Set_Has_Inherited_Default_Init_Cond): Removed.
11269 (Set_Has_Inherited_DIC): New routine.
11270 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
11271 (Set_Has_Own_DIC): New routine.
11272 (Set_Has_Own_Invariants): The attribute applies to the base type.
11273 (Set_Is_Default_Init_Cond_Procedure): Removed.
11274 (Set_Is_DIC_Procedure): New routine.
11275 (Write_Entity_Flags): Update the output of all flags related to
11276 default initial condition.
11277 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
11278 of the call to the DIC procedure.
11279 (Freeze_Type): Generate the body of the DIC procedure.
11280 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
11281 all occurrences of Create_Append with Append_New_To. Do
11282 not generate an invariant procedure for a class-wide type.
11283 The generated body acts as a freeze action of the working type.
11284 (Build_Invariant_Procedure_Declaration): Do not generate an
11285 invariant procedure for a class-wide type.
11286 (Create_Append): Removed.
11287 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
11288 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
11289 class-wide pre/postcondition description and data structures from
11291 (Build_Class_Wide_Expression): Moved from Sem_Prag.
11292 (Build_DIC_Call): New routine.
11293 (Build_DIC_Procedure_Body): New routine.
11294 (Build_DIC_Procedure_Declaration): New routine.
11295 (Entity_Hash): Moved from Sem_Prag.
11296 (Find_DIC_Type): New routine.
11297 (Update_Primitives_Mapping): Reimplemented.
11298 (Update_Primitives_Mapping_Of_Types): New routine.
11299 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
11300 (Build_DIC_Call): New routine.
11301 (Build_DIC_Procedure_Body): New routine.
11302 (Build_DIC_Procedure_Declaration): New routine.
11303 (Update_Primitives_Mapping): Moved from Sem_Prag.
11304 (Update_Primitives_Mapping_Of_Types): New routine.
11305 * nlists.adb (Append_New): New routine.
11306 (Append_New_To): New routine.
11307 * nlists.ads (Append_New): New routine.
11308 (Append_New_To): New routine.
11309 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
11310 of DIC procedures here. This is now done at the end of the
11311 visible declarations, private declarations, and at the freeze
11313 (Analyze_Private_Extension_Declaration):
11314 A private extension inherits the DIC pragma of a parent type.
11315 (Analyze_Subtype_Declaration): No need to propagate invariant
11316 attributes to a subtype as those apply to the base type.
11317 (Build_Derived_Record_Type): No need to inherit invariants here
11318 as this is now done in Build_Derived_Type.
11319 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
11321 (Process_Full_View): Update the propagation of DIC attributes.
11322 (Propagate_Default_Init_Cond_Attributes): Removed.
11323 * sem_ch7.adb Add with and use clauses for Exp_Util.
11324 (Analyze_Package_Specification): Create the body of the DIC
11325 procedure at the end of the visible and private declarations.
11326 (Preserve_Full_Attributes): Propagate DIC attributes.
11327 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
11329 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
11330 * sem_elab.adb (Check_A_Call): Update the call to
11331 Is_Nontrivial_Default_Init_Cond_Procedure.
11332 * sem_prag.adb Remove the with and use clauses for
11333 GNAT.HTable. Move the handling of class- wide pre/postcondition
11334 description and data structures to Exp_Util.
11335 (Analyze_Pragma): Create the declaration of the DIC procedure. There
11336 is no need to propagate invariant-related attributes at this point
11337 as this is done in Build_Invariant_Procedure_Declaration.
11338 (Build_Class_Wide_Expression): Moved to Exp_Util.
11339 (Entity_Hash): Moved to Exp_Util.
11340 (Update_Primitives_Mapping): Moved to Exp_Util.
11341 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
11342 (Update_Primitives_Mapping): Moved to Exp_Util.
11343 * sem_util.adb: Remove with and use clauses for Ghost
11345 (Build_Default_Init_Cond_Call): Removed.
11346 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11347 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11348 (Get_Views): Reimplemented.
11349 (Has_Full_Default_Initialization): Reimplement the section on DIC.
11350 (Inherit_Default_Init_Cond_Procedure): Removed.
11351 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11352 (Is_Nontrivial_DIC_Procedure): New routine.
11353 (Is_Verifiable_DIC_Pragma): New routine.
11354 (Propagate_DIC_Attributes): New routine.
11355 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
11356 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
11357 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
11358 (Inherit_Default_Init_Cond_Procedure): Removed.
11359 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
11360 (Is_Nontrivial_DIC_Procedure): New routine.
11361 (Is_Verifiable_DIC_Pragma): New routine.
11362 (Propagate_DIC_Attributes): New routine.
11363 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
11365 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
11367 (Expression_Copy): New routine along with pragma Inline.
11368 (Set_Expression_Copy): New routine along with pragma Inline.
11370 2017-01-06 Bob Duff <duff@adacore.com>
11372 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
11373 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
11374 we won't generate the call to s_stalib_adafinal when the main
11375 is not written in Ada.
11377 2017-01-06 Bob Duff <duff@adacore.com>
11379 * sem_prag.adb: Minor: remove pragma Warnings.
11381 2017-01-06 Tristan Gingold <gingold@adacore.com>
11383 * Makefile.rtl: Do not compile s-stchop by default.
11385 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11387 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
11388 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
11389 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
11390 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
11391 Reverted previous change for now.
11393 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11395 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
11396 check to default discriminant value if checks are enabled.
11397 (Build_Assignment): If type of component has static predicate,
11398 apply check to its default value, if any.
11400 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
11402 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11403 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11404 the value record of a task, set its _Secondary_Stack_Size field
11406 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11407 a _Secondary_Stack_Size field in the value record of
11408 the task if a Secondary_Stack_Size rep item is present.
11409 (Make_Task_Create_Call): Include secondary stack size
11410 parameter. If No_Secondary_Stack restriction is in place, passes
11412 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11413 Secondary_Stack_Size.
11414 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11415 function to define the overhead of the secondary stack.
11416 * s-tarest.adb (Create_Restricted_Task,
11417 Create_Restricted_Task_Sequential): Functions now include
11418 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11419 * s-tarest.adb (Create_Restricted_Task,
11420 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
11421 now include Secondary_Stack_Size parameter.
11423 Secondary stack now allocated to the size specified by the
11424 Secondary_Stack_Size parameter in the task's ATCB.
11425 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
11426 Secondary_Stack_Size component.
11427 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11428 Create_Restricted_Task_Sequential): Function now include
11429 Secondary_Stack_Size parameter.
11430 (Task_Wrapper): Secondary stack
11431 now allocated to the size specified by the Secondary_Stack_Size
11432 parameter in the task's ATCB.
11433 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
11434 for Secondary_Stack_Size aspect, turning the aspect into its
11435 corresponding internal attribute.
11436 (Analyze_Attribute_Definition):
11437 Process Secondary_Stack_Size attribute.
11438 * snames.adb-tmpl, snames.ads-tmpl: Added names
11439 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11440 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11442 2017-01-06 Pascal Obry <obry@adacore.com>
11444 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
11445 Sequential_IO and Direct_IO.
11447 2017-01-06 Bob Duff <duff@adacore.com>
11449 * snames.ads-tmpl (Renamed): New name for the pragma argument.
11450 * par-ch2.adb: Allow the new pragma (with analysis deferred
11452 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
11453 Keep a mapping from new pragma names to old names.
11454 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
11455 implement it by calling Map_Pragma_Name.
11456 * checks.adb, contracts.adb, einfo.adb, errout.adb,
11457 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
11458 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
11459 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
11460 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
11461 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11462 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
11465 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11467 * exp_ch9.adb: Minor reformatting.
11469 2017-01-06 Tristan Gingold <gingold@adacore.com>
11471 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
11472 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
11473 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
11475 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
11476 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
11477 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
11478 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
11480 2017-01-06 Bob Duff <duff@adacore.com>
11482 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
11483 dummy implementation of Map_Pragma_Name.
11485 2017-01-06 Tristan Gingold <gingold@adacore.com>
11487 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
11488 entry_body variable constant.
11489 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
11490 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
11492 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
11493 now access to constant.
11495 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11497 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
11498 reformatting and typo fixes.
11500 2017-01-06 Bob Duff <duff@adacore.com>
11502 * snames.ads-tmpl: New names for pragma renaming.
11503 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
11504 * par-prag.adb: Add new pragma name to case statement.
11505 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
11507 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
11508 Dummy implementation of Pragma_Name_Mapped.
11510 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11512 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
11513 better detect call within an entry_wrapper.
11514 * sem_res.adb (Resolve_Call): A protected call within an
11515 entity_wrapper is analyzed in the context of the protected
11516 object but corresponds to a pre-analysis and is not an access
11517 before elaboration.
11518 * sem_attr.adb: Minor reformatting.
11520 2017-01-06 Justin Squirek <squirek@adacore.com>
11522 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
11523 Finalization_Size to allow a prefix of any non-class-wide type.
11524 * sem_attr.ads Modify comment for Finalization_Size to include
11525 definite type use case.
11527 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11529 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
11530 on procedures that are wrappers created for entries that have
11532 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
11533 body is an entry_wrapper, compile it in the context of the
11534 synchronized type, because a precondition may refer to funtions
11536 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
11538 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
11539 within an Entry_Wrapper this is an external call whose target
11540 is the synchronized object that is the actual in the call to
11543 2017-01-06 Yannick Moy <moy@adacore.com>
11545 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
11546 in tree, which means not analyzing the previous prefix if the node has
11547 been rewritten into its prefix.
11549 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11551 * s-tpobop.adb: Minor reformatting.
11553 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11555 * checks.adb (Ensure_Valid): Do not generate a validity check
11556 within a generated predicate function, validity checks will have
11557 been applied earlier when required.
11559 2017-01-06 Tristan Gingold <gingold@adacore.com>
11561 * s-tpoben.ads (Protection_Entries): Add comment and reorder
11562 components for performances.
11563 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
11566 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11568 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
11569 If expression is compile-time known and obeys a static predicate
11570 it must be labelled as static, to prevent spurious warnings and
11571 run-time errors, e.g. in case statements. This is relevant when
11572 the expression is the result of constant-folding a type conversion
11573 whose expression is a variable with a known static value.
11575 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11577 * exp_attr.adb, sem_attr.ads: Minor reformatting.
11579 2017-01-06 Justin Squirek <squirek@adacore.com>
11581 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
11582 expansion of Finalization_Size attribute.
11583 * sem_attr.adb (Analyze_Attribute): Add entry to check the
11584 semantics of Finalization_Size.
11585 (Eval_Attribute): Add null entry for Finalization_Size.
11586 * sem_attr.ads: Add Finalization_Size to the implementation
11587 dependent attribute list.
11588 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
11590 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11592 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
11593 iterator specification with a serious syntactic error, transform
11594 construct into an infinite loop in order to continue analysis
11595 and prevent a compiler abort.
11597 2017-01-06 Tristan Gingold <gingold@adacore.com>
11599 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
11600 max_queue_lengths_array if unused.
11602 2017-01-06 Bob Duff <duff@adacore.com>
11604 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
11605 array access, in case "\" is at the end of Text.
11606 * stylesw.adb (Set_Style_Check_Options): Don't include input
11607 characters in the error message template, because they could
11608 be control characters such as "\", which Errout will try to
11611 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11613 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
11614 For a private type examine the visible declarations that follow
11615 the partial view, not just the private declarations that follow
11618 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11620 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
11623 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11625 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
11626 alias of the inherited op is the parent iterator, no need to
11627 examine dispatch table positions which might not be established
11628 yet if type is not frozen.
11629 * sem_disp.adb (Check_Controlling_Formals): The formal of a
11630 predicate function may be a subtype of a tagged type.
11631 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
11632 of representation items for the completion of a type extension
11633 where a predicate applies to the partial view.
11634 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
11635 parameter that designates function whose actual receives a
11636 predicate check, to improve warning message when the check will
11637 lead to infinite recursion.
11638 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
11639 Apply_Predicate_Check.
11641 2017-01-06 Tristan Gingold <gingold@adacore.com>
11643 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
11644 Gnat_Extended_Ravenscar.
11645 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
11647 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11649 * sem_util.ads: Minor typo fix and reformatting.
11651 2017-01-06 Yannick Moy <moy@adacore.com>
11653 * ghost.adb Minor fixing of references to SPARK RM.
11654 (Check_Ghost_Context): Check whether reference is to a lvalue
11655 before issuing an error about violation of SPARK RM 6.9(13)
11656 when declaration has Ghost policy Check and reference has Ghost
11658 * sem_util.adb Minor indentation.
11659 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
11660 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
11661 * sem_util.ads (Unique_Defining_Entity): Document the result
11662 for package body stubs.
11664 2017-01-06 Tristan Gingold <gingold@adacore.com>
11666 * raise-gcc.c (abort): Macro to call Abort_Propagation.
11667 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
11669 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11670 Do not generate the Entry_Max_Queue_Lengths_Array if all default
11672 * exp_util.adb (Corresponding_Runtime_Package): Consider
11673 Max_Queue_Length pragma.
11675 2017-01-06 Justin Squirek <squirek@adacore.com>
11677 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
11678 Remove declaration generation in the case of
11679 System_Tasking_Protected_Objects_Single_Entry being used,
11680 and add a warning message when this is detected to occur.
11681 (Make_Initialize_Protection): Remove reference pass in the case
11682 of System_Tasking_Protected_Objects_Single_Entry.
11683 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
11684 * s-tposen.adb (Initialize_Protection_Entry): Remove
11685 Entry_Queue_Max parameter.
11686 * s-tposen.ads: Remove the types use to store the entry queue
11688 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
11690 2017-01-06 Yannick Moy <moy@adacore.com>
11692 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
11693 behavior of function, to also accept out of range positions
11694 and raise Constraint_Error in such case, and to copy sloc from
11695 literal if No_Location passed as location.
11696 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
11697 of functions to raise Constraint_Error in case of value not in
11700 2017-01-06 Tristan Gingold <gingold@adacore.com>
11702 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
11703 Invalidate_Stack_Cache.
11705 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
11707 * s-os_lib.adb: Minor fix to the signature of Readlink.
11709 2017-01-06 Javier Miranda <miranda@adacore.com>
11711 * sem_ch6.adb (Conforming_Types): Handle another
11712 confusion between views in a nested instance with an actual
11713 private type whose full view is not in scope.
11715 2017-01-06 Arnaud Charlet <charlet@adacore.com>
11717 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
11718 mark a rewritten if statement as explicit (Comes_From_Source).
11720 2017-01-06 Gary Dismukes <dismukes@adacore.com>
11722 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
11724 2017-01-06 Tristan Gingold <gingold@adacore.com>
11726 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
11728 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11730 * sem_case.adb: Minor reformatting.
11732 2017-01-06 Thomas Quinot <quinot@adacore.com>
11734 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
11736 2017-01-06 Justin Squirek <squirek@adacore.com>
11738 * aspects.adb: Register aspect in Canonical_Aspect.
11739 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
11740 into respective tables.
11741 * einfo.ads, einfo.adb: Add a new attribute for
11742 handling the parameters for Pragma_Max_Entry_Queue
11743 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
11744 for accessing and setting were added as well.
11745 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
11746 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
11747 declaration for pramga arguments and store them in the protected
11749 (Make_Initialize_Protection): Pass a reference to
11750 the Entry_Max_Queue_Lengths_Array in the protected type node to
11752 * rtsfind.adb: Minor grammar fix.
11753 * rtsfind.ads: Register new types taken from the
11754 runtime libraries RE_Protected_Entry_Queue_Max and
11755 RE_Protected_Entry_Queue_Max_Array
11756 * s-tposen.adb, s-tpoben.adb
11757 (Initialize_Protection_Entry/Initialize_Protection_Entries):
11758 Add extra parameter and add assignment to local object.
11759 * s-tposen.ads, s-tpoben.ads: Add new types to
11760 store entry queue maximums and a field to the entry object record.
11761 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
11762 for Aspect_Max_Queue_Length.
11763 (Check_Aspect_At_Freeze_Point):
11764 Add aspect to list of aspects that don't require delayed analysis.
11765 * sem_prag.adb (Analyze_Pragma): Add case statement for
11766 Pragma_Max_Queue_Length, check semantics, and register arugments
11767 in the respective entry nodes.
11768 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
11769 and Has_Max_Queue_Length
11770 * snames.ads-tmpl: Add constant for the new aspect-name
11771 Name_Max_Queue_Length and corrasponding pragma.
11773 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11775 * exp_util.adb (Is_Controlled_Function_Call):
11776 Reimplemented. Consider any node which has an entity as the
11777 function call may appear in various ways.
11779 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11781 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
11782 an unchecked type conversion when performing a view conversion
11783 to/from a private type. In all other cases use a regular type
11784 conversion to ensure that any relevant checks are properly
11787 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
11789 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
11791 2017-01-06 Ed Schonberg <schonberg@adacore.com>
11793 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
11794 error on case expression that is an entity, when coverage is
11795 incomplete and entity has a static value obtained by local
11797 (Handle_Static_Predicate): New procedure, subsidiary of
11798 Check_Choices, to handle case alternatives that are either
11799 subtype names or subtype indications involving subtypes that
11800 have static predicates.
11802 2017-01-06 Thomas Quinot <quinot@adacore.com>
11804 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
11805 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
11807 2017-01-06 Bob Duff <duff@adacore.com>
11809 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
11810 Elaborate_All(P) to P itself. That could happen in obscure cases,
11811 and always introduced a cycle (P body must be elaborated before
11813 * lib-writ.ads: Comment clarification.
11814 * ali-util.ads: Minor comment fix.
11815 * ali.adb: Minor reformatting.
11817 2017-01-06 Tristan Gingold <gingold@adacore.com>
11819 * a-exexpr-gcc.adb: Improve comment.
11821 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
11823 * s-linux-mips.ads: Use correct signal and errno constants.
11824 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
11826 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
11828 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
11829 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
11832 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
11834 * gnatvsn.ads: Bump copyright year.
11836 2017-01-01 Jakub Jelinek <jakub@redhat.com>
11838 * gnat_ugn.texi: Bump @copying's copyright year.
11839 * gnat_rm.texi: Likewise.
11841 Copyright (C) 2017 Free Software Foundation, Inc.
11843 Copying and distribution of this file, with or without modification,
11844 are permitted in any medium without royalty provided the copyright
11845 notice and this notice are preserved.