read-rtl.c (parse_reg_note_name): Replace Yoda conditions with typical order conditions.
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2
3 * gcc-interface/trans.c (Loop_Statement_to_gnu): Replace Yoda
4 conditions with typical order conditions.
5 * gcc-interface/misc.c (gnat_get_array_descr_info,
6 default_pass_by_ref): Likewise.
7 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
8 * adaint.c (__gnat_tmp_name): Likewise.
9
10 2017-12-19 Arnaud Charlet <charlet@adacore.com>
11
12 PR ada/66205
13 * bindgen.adb (Gen_AdaFinal): Revert previous change.
14
15 2017-12-15 Jakub Jelinek <jakub@redhat.com>
16
17 * gcc-interface/utils.c (gnat_internal_attribute_table): Swap
18 affects_type_identity and handler fields, adjust comments.
19
20 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
21
22 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of
23 the innermost array instead of Esize of its component type to exclude
24 inappropriate array types, including packed array types.
25
26 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
27
28 * sem_prag.adb (Analyze_Input_Item): Allow concurrent types to appear
29 within the input list of Initializes. Remove the uses of Input_OK.
30
31 2017-12-15 Ed Schonberg <schonberg@adacore.com>
32
33 * exp_ch4.adb (Expand_N_In): Do not replace a membership test on a
34 scalar type with a validity test when the membership appears in a
35 predicate expression, to prevent a spurious error when predicate is
36 specified static.
37 * sem_ch13.adb (Build_Predicate_Functions): Add warning if a static
38 predicate, after constant-folding, reduces to True and is this
39 redundant.
40 * par-ch4.adb: Typo fixes and minor reformattings.
41
42 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
43
44 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Mark the generated
45 with clause as being implicit for an instantiation in order to
46 circumvent an issue with 'W' and 'Z' line encodings in ALI files.
47
48 2017-12-15 Ed Schonberg <schonberg@adacore.com>
49
50 * sem_util.adb (Is_Potentially_Unevaluated): Detect further cases of
51 misuse of 'Old that appear within an expression that is potentially
52 unevaluated, when the prefix of the attribute does not statically
53 designate an object (e.g. a function call).
54
55 2017-12-15 Ed Schonberg <schonberg@adacore.com>
56
57 * sem_ch6.adb (Conformking_Types): Two incomplete types are conforming
58 when one of them is used as a generic actual, but only within an
59 instantiation.
60 * einfo.ads: Clarify use of flag Used_As_Generic_Actual.
61
62 2017-12-15 Justin Squirek <squirek@adacore.com>
63
64 * sem_attr.adb (Resolve_Attribute): Modify check for aliased view on
65 prefix to use the prefix's original node to avoid looking at expanded
66 conversions for certain array types.
67
68 2017-12-15 Ed Schonberg <schonberg@adacore.com>
69
70 * sem_res.adb (Resolve_Membership_Op): Add warning on a membership
71 operation on a scalar type for which there is a user-defined equality
72 operator.
73
74 2017-12-15 Yannick Moy <moy@adacore.com>
75
76 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Ghost assertion
77 policy.
78
79 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
80
81 * sem_prag.adb (Analyze_Initialization_Item): Remove the specialized
82 processing for a null initialization item. Such an item is always
83 illegal.
84
85 2017-12-15 Bob Duff <duff@adacore.com>
86
87 * types.ads, types.h, libgnat/a-except.adb, exp_ch11.adb
88 (PE_Build_In_Place_Mismatch): New reason code for raising when the
89 BIPalloc formal parameter is incorrect. This can happen if a compiler
90 bug causes a mismatch of build-in-place between caller and callee.
91 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
92 PE_Build_In_Place_Mismatch.
93
94 2017-12-15 Ed Schonberg <schonberg@adacore.com>
95
96 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reduction_Expression): New
97 procedure.
98 * exp_util.adb (Insert_Actions): Handle N_Reduction_Expression.
99 * expander.adb (Expand): Call Expand_N_Reduction_Expression
100 * par-ch4.adb (P_Reduction_Expression): New procedure.
101 (P_Iterated_Component_Assoc_Or_Reduction): New precedure, extension of
102 P_Iterated_Component_Association.
103 (OK_Reduction_Expression_Parameter): New procedure.
104 (P_Aggregate_Or_Paren_Expr): Improve error message for malformed delta
105 aggregate.
106 * sem.adb (Analyze): Call Analyze_Reduction_Expression and
107 Analyze_Reduction_Expression_Parameter
108 * sinfo.ads, sinfo.adb: New node kinds N_Reduction_Expression and
109 N_Reduction_Expression_Parameter.
110 * sem_ch4.ads, sem_ch4.adb (Analyze_Reduction_Expression,
111 Analyze_Reduction_Expression_Parameter): New procedures.
112 * sem_res.adb (Resolve): Handle Reduction_Expression and
113 Reduction_Expression_Parameter
114 * sem_spark.adb: Dummy entries for Reduction_Expression and
115 Reduction_Expression_Parameter
116 * sprint.adb (Sprint_Node_Actual): Print Reduction_Expression,
117 Reduction_Expression_Parameter
118
119 2017-12-15 Bob Duff <duff@adacore.com>
120
121 * einfo.ads: Comment fix.
122
123 2017-12-15 Piotr Trojanek <trojanek@adacore.com>
124
125 * s-vercon.adb: Minor style fixes.
126
127 2017-12-15 Ed Schonberg <schonberg@adacore.com>
128
129 * sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
130 itype that is the type of a discriminant-dependent component.
131
132 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
133
134 * sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
135 analysis is now directed to several specialized routines.
136 (Check_Part_Of_Abstract_State): New routine.
137 (Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
138 involving the item, the single concurrent type, and their respective
139 contexts.
140 * sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
141 concurrent type are now recorded regardless of the SPARK mode.
142 * sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
143 individual predicates. A Part_Of reference is legal when it appears
144 within the statement list of the object's immediately enclosing
145 package.
146 (Is_Enclosing_Package_Body): New routine.
147 (Is_Internal_Declaration_Or_Body): New routine.
148 (Is_Single_Declaration_Or_Body): New routine.
149 (Is_Single_Task_Pragma): New routine.
150
151 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
152
153 * gnat_ugn.texi: Regenerate.
154
155 2017-12-15 Bob Duff <duff@adacore.com>
156
157 * gnatvsn.ads: Minor comment fixes.
158
159 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
160
161 * doc/gnat_ugn/gnat_and_program_execution.rst: Update section "Dynamic
162 Stack Usage Analysis" to include more details about GNAT_STACK_LIMIT.
163
164 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
165
166 * exp_util.adb (Add_Own_DIC): Ensure that the expression of the pragma
167 is available (Is_Verifiable_DIC_Pragma): Moved from Sem_Util.
168 * sem_util.adb (Has_Full_Default_Initialization):
169 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
170 whether a type has full default initialization due to pragma
171 Default_Initial_Condition.
172 (Has_Fully_Default_Initializing_DIC_Pragma): New routine.
173 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
174 * sem_util.ads (Has_Fully_Default_Initializing_DIC_Pragma): New
175 routine.
176 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
177 * sem_warn.adb (Is_OK_Fully_Initialized):
178 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
179 whether a type has full default initialization due to pragma
180 Default_Initial_Condition.
181
182 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
183
184 * sem_prag.adb (Match_Constituent): Do not quietly accept constants as
185 suitable constituents.
186 * exp_util.adb: Minor reformatting.
187
188 2017-12-15 Ed Schonberg <schonberg@adacore.com>
189
190 * exp_aggr.adb (In_Place_Assign_OK): Extend the predicate to recognize
191 an array aggregate in an allocator, when the designated type is
192 unconstrained and the upper bound of the aggregate belongs to the base
193 type of the index.
194
195 2017-12-15 Bob Duff <duff@adacore.com>
196
197 * exp_ch6.adb (Expand_N_Extended_Return_Statement,
198 Expand_Simple_Function_Return): Assert that the b-i-p-ness of the
199 caller and callee match. Otherwise, we would need some substantial
200 changes to allow b-i-p calls non-b-i-p, and vice versa.
201
202 2017-12-15 Ed Schonberg <schonberg@adacore.com>
203
204 * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
205 a generic package body. Unnesting is only an issue when generating
206 code, and if the main unit is generic then nested instance bodies have
207 not been created and analyzed, and unnesting will crash in the absence
208 of those bodies,
209
210 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
211
212 * inline.adb (Add_Inlined_Body): Do not add a function which is
213 completed by an expression function defined in the same context as the
214 initial declaration because the completing body is not in a package
215 body.
216 (Is_Non_Loading_Expression_Function): New routine.
217
218 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
219
220 * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
221 the behavior of -gnatdL from before revision 255412.
222 * sem_elab.adb: Update the section of compiler switches.
223 (Build_Call_Marker): Do not create a marker for a call which originates
224 from an expanded spec or body of an instantiated gener, does not invoke
225 a generic formal subprogram, the target is external to the instance,
226 and -gnatdL is in effect.
227 (In_External_Context): New routine.
228 (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
229 and associated flag.
230 (Process_Conditional_ABE_Call): Update the uses of -gnatdL and
231 associated flag.
232 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
233 -gnatd_i.
234 * exp_unst.adb: Minor typo fixes and edits.
235
236 2017-12-15 Ed Schonberg <schonberg@adacore.com>
237
238 * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
239 subprogram instantiation, now that the enclosing wrapper package
240 carries an explicit freeze node. THis prevents freeze nodes for the
241 subprogram for appearing in the wrong scope. This is relevant when the
242 generic subprogram has a private or incomplete formal type and the
243 instance appears within a package that declares the actual type for the
244 instantiation, and that type has itself a delayed freeze.
245
246 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
247
248 * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
249 the environment variable GNAT_STACK_LIMIT from the Stack Overflow
250 Checking section as it is no longer used by any of our supported
251 targets.
252
253 2017-12-15 Bob Duff <duff@adacore.com>
254
255 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
256 Init_Assignment is rewritten, we need to set Assignment_OK on the new
257 node. Otherwise, we will get spurious errors when initializing via
258 assignment statement.
259
260 2017-12-15 Arnaud Charlet <charlet@adacore.com>
261
262 * exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
263 relevant nodes.
264 (Has_Non_Null_Statements): Moved to sem_util for later reuse.
265
266 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
267
268 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
269 * libgnat/s-fatgen.adb (Model): Use Machine attribute.
270 (Truncation): Likewise.
271
272 2017-12-15 Bob Duff <duff@adacore.com>
273
274 * exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
275 statement sequence generated for certain extended return statements
276 have a Sloc that is not No_Location. Otherwise, the back end doesn't
277 set any location and ends up reading uninitialized variables.
278
279 2017-12-15 Bob Duff <duff@adacore.com>
280
281 * types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
282 r255414, committed by mistake.
283
284 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
285
286 * gcc-interface/Makefile.in: Generalize support for symbolic traces.
287
288 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
289
290 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
291
292 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
293
294 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
295 to 0 on the callee if the call is recursive.
296
297 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
298
299 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
300 of the enclosing record type if it is not already set.
301
302 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
303
304 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
305 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
306 a padding type for the alignment before validating the size.
307 Flip conditional construct and add a comment.
308 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
309 apply the exception for padded objects to the type of the object.
310 * gcc-interface/utils.c (hash_pad_type): New static function.
311 (lookup_and_insert_pad_type): Rename into...
312 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
313 lookup with insertion and always return the canonical type.
314 (maybe_pad_type): Adjust to above changes. Set debug type later.
315 (pad_type_has_rm_size): New predicate.
316 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
317
318 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
319
320 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
321
322 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
323
324 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
325 package without body.
326
327 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
328
329 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
330 descendant of System.Address.
331 (gnat_to_gnu_subprog_type): Likewise.
332
333 2017-12-08 Jakub Jelinek <jakub@redhat.com>
334
335 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
336 exclusions to the comment.
337
338 2017-12-07 Martin Sebor <msebor@redhat.com>
339
340 PR c/81544
341 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
342 new member of struct attribute_spec.
343
344 2017-12-06 Simon Wright <simon@pushface.org>
345
346 PR ada/66205
347 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
348 set, generate a null body.
349
350 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
351
352 * sem_util.adb (Contains_Refined_State): Remove.
353
354 2017-12-05 Ed Schonberg <schonberg@adacore.com>
355
356 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
357 predicate cannot apply to a formal type.
358
359 2017-12-05 Arnaud Charlet <charlet@adacore.com>
360
361 * exp_unst.ads: Fix typos.
362
363 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
364
365 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
366 QNX. At startup, the first mutex created has a non-zero ceiling
367 priority whatever its actual policy. This makes some tests fail
368 (c940013 for example).
369
370 2017-12-05 Bob Duff <duff@adacore.com>
371
372 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
373 Expand_Cleanup_Actions for N_Extended_Return_Statement.
374 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
375 N_Extended_Return_Statement by transforming the statements into a
376 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
377 It's too hard for Expand_Cleanup_Actions to operate directly on the
378 N_Extended_Return_Statement, because it has a different structure than
379 the other node kinds that Expand_Cleanup_Actions.
380 * exp_util.adb (Requires_Cleanup_Actions): Add support for
381 N_Extended_Return_Statement. Change "when others => return False;" to
382 "when others => raise ...;" so it's clear what nodes this function
383 handles. Use named notation where appropriate.
384 * exp_util.ads: Mark incorrect comment with ???.
385
386 2017-12-05 Javier Miranda <miranda@adacore.com>
387
388 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
389 Debug_Info_Needed decoration of internally generated discriminal
390 renaming declaration.
391
392 2017-12-05 Arnaud Charlet <charlet@adacore.com>
393
394 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
395 nested subprograms.
396
397 2017-12-05 Sergey Rybin <rybin@adacore.com>
398
399 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
400 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
401
402 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
403
404 * sem_util.adb (Contains_Refined_State): Remove.
405
406 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
407
408 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
409 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
410 Ada.Calendar.Clock_Time).
411
412 2017-12-05 Ed Schonberg <schonberg@adacore.com>
413
414 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
415 subprogram is overloaded, scan the list of homonyms in the same
416 scope, to find the inherited operation that may be overridden
417 by the candidate.
418 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
419
420 2017-12-05 Bob Duff <duff@adacore.com>
421
422 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
423 Init_Assignment is rewritten, we need to set Assignment_OK on the new
424 node. Otherwise, we will get spurious errors when initializing via
425 assignment statement.
426
427 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
428
429 * sem_elab.adb: Update the terminology and switch sections.
430 (Check_SPARK_Model_In_Effect): New routine.
431 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
432 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
433 SPARK.
434 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
435 effect for SPARK.
436 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
437 in effect for SPARK.
438
439 2017-12-05 Nicolas Setton <setton@adacore.com>
440
441 * terminals.c (__gnat_setup_child_communication): As documented,
442 __gnat_setup_child_communication should not terminate - it is intended
443 to be used as the child process of a call to fork(). However, execvp
444 might actually return in some cases, for instance when attempting to
445 run a 32-bit binary on a 64-bit Linux distribution when the
446 compatibility packages are not installed. In these cases, exit the
447 program to conform to the documentation.
448
449 2017-12-05 Olivier Hainque <hainque@adacore.com>
450
451 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
452 update.
453
454 2017-12-05 Gary Dismukes <dismukes@adacore.com>
455
456 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
457 and reformatting.
458 * gnat_ugn.texi: Regenerate.
459
460 2017-12-05 Olivier Hainque <hainque@adacore.com>
461
462 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
463 on access to subprogram types with foreign convention.
464
465 2017-12-05 Yannick Moy <moy@adacore.com>
466
467 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
468 Guide description of default settings of warnings.
469
470 2017-12-05 Olivier Hainque <hainque@adacore.com>
471
472 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
473 of section. Add comments explaining the rationale of the computation.
474
475 2017-12-05 Bob Duff <duff@adacore.com>
476
477 * exp_ch11.adb: Minor refactoring.
478
479 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
480
481 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
482 documentation.
483 (Set_Underscored_Debug_Flag): New routine.
484 * debug.ads: Add the flags for all underscore switches.
485 (Set_Underscored_Debug_Flag): New routine.
486 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
487 (Suppress_Elaboration_Warnings): New routine.
488 (Set_Suppress_Elaboration_Warnings): New routine.
489 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
490 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
491 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
492 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
493 Inline.
494 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
495 legacy elaboration model.
496 (Default_Initialize_Object): Restore the behavior of the legacy
497 elaboration model.
498 * exp_ch9.adb: Add with and use clause for Sem_Elab.
499 (Build_Task_Activation_Call): Restore the behavior of the legacy
500 elaboration model.
501 * frontend.adb (Frontend): Restore the behavior of the legacy
502 elaboration model.
503 * opt.ads: Add new flags Legacy_Elaboration_Checks and
504 Relaxed_Elaboration_Checks, along with documentation.
505 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
506 legacy elaboration model.
507 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
508 elaboration model.
509 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
510 the legacy elaboration model.
511 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
512 elaboration model.
513 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
514 of the legacy elaboration model.
515 (Analyze_Package_Instantiation): Restore the behavior of the legacy
516 elaboration model.
517 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
518 elaboration model.
519 * sem_elab.adb: Update the documentation of the Processing phase.
520 Update the documentation on elaboration-related compilation
521 switches. Update the documentation on adding a new target. Add
522 Processing_Attributes which represent the state of the Processing
523 phase. Resurrect the previous elaboration model as "legacy elaboration
524 model".
525 (Build_Call_Marker): This routine does not function when the legacy
526 elaboration model is in effect. Do not consider entry calls and requeue
527 statements when debug flag d_e is in effect. Do not consider calls to
528 subprograms which verify the runtime semantics of certain assertion
529 pragmas when debug flag d_p is in effect.
530 (Build_Variable_Reference_Marker): This routine does not function when
531 the legacy elaboration model is in effect.
532 (Check_Elaboration_Scenarios): This routine does not function when the
533 legacy elaboration model is in effect.
534 (Ensure_Prior_Elaboration): The various flags have now been replaced
535 with a state. Do not generate implicit Elaborate[_All] pragmas when
536 their creation has been suppressed.
537 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
538 the requested pragma, not on the nature of the scenario.
539 (In_External_Context): Removed.
540 (Is_Assertion_Pragma_Target): New routine.
541 (Is_Potential_Scenario): Stop the traversal of a task body when
542 reaching an accept or select statement, and debug switch d_a is in
543 effect.
544 (Kill_Elaboration_Scenario): This routine does not function when the
545 legacy elaboration model is in effect.
546 (Process_Activation_Generic): The various flags have now been replaced
547 with a state.
548 (Process_Conditional_ABE): The various flags have now been replaced
549 with a state.
550 (Process_Conditional_ABE_Access): The various flags have now been
551 replaced with a state.
552 (Process_Conditional_ABE_Activation_Impl): The various flags have now
553 been replaced with a state. Do not process an activation call which
554 activates a task whose type is defined in an external instance, and
555 debug switch dL is in effect. Suppress the generation of implicit
556 Elaborate[_All] pragmas once a conditional ABE check has been
557 installed.
558 (Process_Conditional_ABE_Call): The various flags have now been
559 replaced with a state. Do not process a call which invokes a subprogram
560 defined in an external instance, and debug switch dL is in effect.
561 (Process_Conditional_ABE_Call_Ada): The various flags have now been
562 replaced with a state. Suppress the generation of implicit
563 Elaborate[_All] pragmas once a conditional ABE check has been
564 installed.
565 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
566 replaced with a state.
567 (Process_Conditional_ABE_Instantiation): The various flags have now
568 been replaced with a state.
569 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
570 been replaced with a state. Suppress the generation of implicit
571 Elaborate[_All] pragmas once a conditional ABE check has been
572 installed.
573 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
574 now been replaced with a state.
575 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
576 been replaced with a state.
577 (Process_Single_Activation): The various flags have now been replaced
578 with a state.
579 (Record_Elaboration_Scenario): This routine does not function when the
580 legacy elaboration model is in effect.
581 (Traverse_Body): The various flags have now been replaced with a state.
582 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
583 elaboration model".
584 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
585 elaboration model.
586 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
587 elaboration model.
588 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
589 model.
590 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
591 function when the legacy elaboration model is in effect.
592 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
593 (No_Elaboration_Check): New routine.
594 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
595 (Set_No_Elaboration_Check): New routine.
596 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
597 along with occurrences in nodes. Add new flag No_Elaboration_Check
598 along with occurrences in nodes.
599 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
600 switches with underscores. Add processing for switches -gnatH and
601 -gnatJ.
602 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
603 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
604 documentation to include the legacy and relaxed elaboration models.
605 * gnat_ugn.texi: Regenerate.
606
607 2017-12-05 Arnaud Charlet <charlet@adacore.com>
608
609 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
610 Improve doc on required packages for linux 32bits.
611
612 2017-12-05 Doug Rupp <rupp@adacore.com>
613
614 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
615
616 2017-12-05 Javier Miranda <miranda@adacore.com>
617
618 * checks.adb (Generate_Range_Check): Force evaluation of the node in
619 more cases. This patch was written to improve the code generated by
620 the CCG compiler but it is enabled for all targets since double
621 evaluation is always a potential source of inefficiency.
622
623 2017-12-05 Gary Dismukes <dismukes@adacore.com>
624
625 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
626 -fdump-xref switch.
627
628 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
629
630 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
631 iteration scheme throughout, except for the new loop statement(s).
632
633 2017-12-05 Ed Schonberg <schonberg@adacore.com>
634
635 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
636 assignment if it is part of an Iterated_Component_Association: the
637 analysis needs to take place once the loop structure is analyzed and
638 the loop parameter made visible, because references to it typically
639 appear in the corresponding expression. This is necessary if the
640 expression is an aggregate, because previous pre-analysis of the
641 expression does not handle nested aggregates properly.
642
643 2017-12-05 Bob Duff <duff@adacore.com>
644
645 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
646 allocator that is the expansion of a build-in-place function call.
647
648 2017-12-05 Olivier Hainque <hainque@adacore.com>
649
650 libgnat/
651 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
652 possibly adjusting the lookup address by a load address, expect
653 a extra argument through which the load address can be conveyed
654 separately.
655 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
656 retrieved load address to Init_Module.
657 * s-tsmona__linux.adb (Get): Honor the new interface.
658 * s-tsmona__mingw.adb (Get): Likewise.
659 * s-dwalin.ads: Adjust comments to be explicit about which
660 addresses are from module info and which are run-time addresses,
661 offsetted by the module load address.
662 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
663 Do not alter the module Low and High (relative) addresses.
664 (Is_Inside): Improve documentation regarding the kinds of addresses
665 at hand and correct the test.
666 (Symbolic_Traceback): Use separate variables with explicit names
667 for the address in traceback (run-time value) and the address to
668 lookup within the shared object (module-relative). Adjust the
669 computation of address passed to Symbolic_Address for symbolization.
670
671 2017-12-05 Arnaud Charlet <charlet@adacore.com>
672
673 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
674 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
675 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
676 other back-ends can also benefit from the front-end expansion. Remove
677 test for Modify_Tree_For_C in all callers to better share code.
678 * gnat1drv.adb (Adjust_Global_Switches): Set
679 Expand_Nonbinary_Modular_Ops when generating C code.
680
681 2017-12-05 Ed Schonberg <schonberg@adacore.com>
682
683 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
684 parameter becomes invisible after analyzing the loop, which has been
685 rewritten as a while-loop.
686
687 2017-12-05 Doug Rupp <rupp@adacore.com>
688
689 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
690 and update for 64bit ports.
691
692 2017-12-05 Bob Duff <duff@adacore.com>
693
694 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
695 instead of the full name.
696 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
697 in the case of an instance of a generic.
698
699 2017-12-05 Arnaud Charlet <charlet@adacore.com>
700
701 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
702 pragma Annotate.
703
704 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
705
706 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
707
708 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
709
710 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
711 * libgnat/s-osprim__rtems.adb: New file.
712 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
713 (pthread_mutexattr_t): Likewise.
714 (pthread_rwlockattr_t): Likewise.
715 (pthread_rwlock_t): Likewise.
716 (time_t): Use 64-bit integer.
717
718 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
719
720 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
721 alignment.
722 (pthread_mutex_t): Likewise.
723 (pthread_rwlock_t): Likewise.
724
725 2017-11-28 Jakub Jelinek <jakub@redhat.com>
726
727 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
728 using build2 instead of build3.
729
730 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
731
732 PR ada/83091
733 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
734 type for the implementation type of a packed array.
735
736 2017-11-23 Mike Stump <mikestump@comcast.net>
737 Eric Botcazou <ebotcazou@adacore.com>
738
739 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
740 operand to ANNOTATE_EXPR and also pass unrolling hints.
741
742 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
743
744 PR ada/83016
745 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
746 (Usage): Adjust.
747 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
748 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
749 the invocations of $(GNATLINK).
750 (../../gnatdll$(exeext)): Likewise.
751 (../../vxaddr2line$(exeext)): Likewise.
752 (gnatmake-re): Likewise.
753 (gnatlink-re): Likewise.
754
755 2017-11-16 Doug Rupp <rupp@adacore.com>
756
757 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
758
759 2017-11-16 Steve Baird <baird@adacore.com>
760
761 * debug.adb: Update another comment to indicate gnat2scil's use of the
762 -gnatd.7 switch.
763
764 2017-11-16 Bob Duff <duff@adacore.com>
765
766 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
767 the case of nested build-in-place calls.
768
769 2017-11-16 Joel Brobecker <brobecker@adacore.com>
770
771 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
772 available in gnatsymbolize.
773
774 2017-11-16 Steve Baird <baird@adacore.com>
775
776 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
777 switch.
778
779 2017-11-16 Gary Dismukes <dismukes@adacore.com>
780
781 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
782 sem_elab.adb: Minor editorial corrections.
783 * gnat_ugn.texi: Regenerate.
784
785 2017-11-16 Joel Brobecker <brobecker@adacore.com>
786
787 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
788 gnatsymbolize documentation.
789 * gnat_ugn.texi: Regenerate.
790
791 2017-11-16 Steve Baird <baird@adacore.com>
792
793 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
794 "Scope (Parent_Type)" with "Scope (Parent_Base)".
795
796 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
797
798 * opt.ads: Elaboration warnings are now on by default. Add a comment
799 explaining why this is needed.
800 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
801 warnings.
802 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
803 elaboration warnings.
804 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
805 warnings.
806 * sem_elab.adb: Update the structure of Call_Attributes and
807 Instantiation_Attributes.
808 (Build_Call_Marker): Propagate the status of elaboration warnings from
809 the call to the marker.
810 (Extract_Call_Attributes): Extract the status of elaboration warnings.
811 (Extract_Instantiation_Attributes): Extract the status of elaboration
812 warnings.
813 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
814 now dependent on the status of elaboration warnings.
815 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
816 dependent on the status of elaboration warnings.
817 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
818 are now dependent on the status of elaboration warnings.
819 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
820 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
821 status of elaboration warnings.
822 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
823 dependent on the status of elaboration warnings.
824 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
825 dependent on the status of elaboration warnings.
826 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
827 concerning pragma Elaborate.
828 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
829 warnings.
830 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
831 from the procedure call to the entry call.
832 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
833 Warnings.
834 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
835 warnings
836 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
837 Warnings. Update the comment on usage.
838 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
839 (Is_Elaboration_Warnings_OK_Node): New routine.
840 (Set_Is_Dispatching_Call): Update to use Flag6.
841 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
842 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
843 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
844 in nodes.
845 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
846 Inline.
847 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
848 Inline.
849 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
850 sections to indicate how to suppress elaboration warnings. Document
851 switches -gnatwl and -gnatwL.
852 * gnat_ugn.texi: Regenerate.
853
854 2017-11-16 Sylvain Dailler <dailler@adacore.com>
855
856 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
857 lower than 0.
858
859 2017-11-16 Bob Duff <duff@adacore.com>
860
861 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
862 System'To_Address.
863
864 2017-11-16 Yannick Moy <moy@adacore.com>
865
866 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
867
868 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
869
870 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
871 Context_Id denotes a record type.
872
873 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
874
875 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
876 instantiations.
877
878 2017-11-16 Doug Rupp <rupp@adacore.com>
879
880 Initial gnat port to aarch64-wrs-vxworks7
881 * libgnarl/s-vxwork__aarch64.ads,
882 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
883 libgnat/system-vxworks7-aarch64.ads: New files
884 * sigtramp-vxworks-target.inc (aarch64): New section.
885 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
886
887 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
888
889 * sem_elab.adb (Include): Including a node which is also a compilation
890 unit terminates the search because there are no more lists to examine.
891
892 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
893
894 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
895 declaration does not define a primitive operation of a tagged type for
896 SPARK.
897 (Check_SPARK_Primitive_Operation): New routine.
898
899 2017-11-16 Arnaud Charlet <charlet@adacore.com>
900
901 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
902 message when using -E binder switch.
903
904 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
905
906 * errout.ads: Fix minor typo in comment.
907
908 2017-11-16 Ed Schonberg <schonberg@adacore.com>
909
910 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
911 syntactically denote a type, return Any_Type to prevent subsequent
912 compiler crashes or infinite loops.
913
914 2017-11-16 Steve Baird <baird@adacore.com>
915
916 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
917 cases when writing out a .ali file when a Rename_Pragma pragma is in
918 effect.
919 * lib-writ.adb (Write_Unit_Information): Replace call to
920 Pragma_Name_Unmapped with call to Pragma_Name.
921
922 2017-11-16 Gary Dismukes <dismukes@adacore.com>
923
924 * sem_elab.adb: Minor typo fixes.
925
926 2017-11-16 Justin Squirek <squirek@adacore.com>
927
928 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
929 them more explicit.
930
931 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
932
933 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
934 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
935 the elaboration flag as elaboration code.
936 * einfo.adb (Contract): Update the comments.
937 (Ignore_SPARK_Mode_Pragmas): Update the comments.
938 (SPARK_Aux_Pragma): Update the comments.
939 (SPARK_Aux_Pragma_Inherited): Update the comments.
940 (SPARK_Pragma): Update the comments. The attribute now applies
941 to all types and abstract states.
942 (SPARK_Pragma_Inherited): Update the comments. The attribute now
943 applies to all types and abstract states.
944 (Set_Contract): Update the comments.
945 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
946 (Set_SPARK_Aux_Pragma): Update the comments.
947 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
948 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
949 all types and abstract states.
950 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
951 applies to all types and abstract states.
952 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
953 type and abstract states.
954 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
955 SPARK_Pragma_Inherited. Both of them now apply to all types and
956 abstract states.
957 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
958 elaboration flag as elaboration code.
959 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
960 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
961 a derived type for later processing by the ABE mechanism.
962 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
963 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
964 type.
965 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
966 the type.
967 * sem_elab.adb: Define the term "early call region". Update the
968 terminology for "scenario" and "target". Update the architecture of
969 the ABE mechanism. Update the steps which must be taken when adding a
970 new scenario. Update the section on debugging ABE issues. Add new
971 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
972 table SPARK_Scenarios. Hash table Elaboration_Context is now
973 Elaboration_Statuses. The majority of Process_xxx routines have been
974 updated to better reflect their role.
975 (Add_Unit): Reimplemented.
976 (Check_Elaboration_Constituent): New routine.
977 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
978 conditional ABE issues. Verify previously recorded SPARK scenarios.
979 (Check_SPARK_Derived_Type): New routine.
980 (Check_SPARK_Instantiation): New routine.
981 (Check_SPARK_Scenario): New routine.
982 (Check_SPARK_Refined_State_Pragma): New routine.
983 (Early_Call_Region): New routine.
984 (Elaboration_Status): New routine.
985 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
986 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
987 (Find_Early_Call_Region): New routine.
988 (Info_Scenario): Add output for refinement constituents.
989 (Is_Recorded_SPARK_Scenario): New routine.
990 (Is_Suitable_SPARK_Derived_Type): New routine.
991 (Is_Suitable_SPARK_Instantiation): New routine.
992 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
993 (Is_Visited_Body): New routine.
994 (Kill_Elaboration_Scenario): Reimplemented.
995 (Output_Active_Scenarios): Add output for pragma Refined_State.
996 (Output_SPARK_Refined_State_Pragma): New routine.
997 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
998 is now achieved by different means.
999 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
1000 the subprogram body appears within the early call region of the body.
1001 Either ensure the prior elaboration of external subprograms or verify
1002 that the context meets the suitable elaboration requirement.
1003 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
1004 (Record_Elaboration_Scenario): Reimplement the portion which enforces
1005 the level restrictions of the static model. Add support for SPARK
1006 scenarios.
1007 (Record_SPARK_Elaboration_Scenario): New routine.
1008 (Reset_Visited_Bodies): New routine.
1009 (Set_Early_Call_Region): New routine.
1010 (Set_Elaboration_Status): New routine.
1011 (Set_Is_Recorded_SPARK_Scenario): New routine.
1012 (Update_Elaboration_Scenario): Reimplemented.
1013 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
1014 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
1015 for examination by the ABE Processing phase.
1016 (Create_Abstract_State): Save the SPARK_Mode from the context.
1017 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
1018 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
1019 * sinfo.adb (Is_Elaboration_Code): New routine.
1020 (Set_Is_Elaboration_Code): New routine.
1021 (Nkind_In): Add 10 and 11 parameter versions.
1022 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
1023 occurrences in nodes.
1024 (Is_Elaboration_Code): New routine along with pragma Inline.
1025 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
1026 (Nkind_In): Add 10 and 11 parameter versions.
1027
1028 2017-11-16 Justin Squirek <squirek@adacore.com>
1029
1030 * sem.adb (Analyze): Remove requirement that the original node of N be
1031 an operator in the case that analysis on the node yields the relevant
1032 operator - so prefer it instead.
1033
1034 2017-11-16 Bob Duff <duff@adacore.com>
1035
1036 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
1037 formal must not have a designated type that is the full view coming
1038 from a limited-with'ed package.
1039 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
1040 function called from sem_ch6.
1041 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
1042 specially for b-i-p cases.
1043
1044 2017-11-10 Martin Sebor <msebor@redhat.com>
1045
1046 PR c/81117
1047 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
1048 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
1049
1050 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
1051
1052 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
1053 not fall through to the next case.
1054 <ARRAY_TYPE>: Deal specially with a dereference from another array
1055 type with the same element type.
1056
1057 2017-11-09 Gary Dismukes <dismukes@adacore.com>
1058
1059 * exp_util.adb, freeze.adb: Minor reformatting.
1060
1061 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1062
1063 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
1064
1065 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1066
1067 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
1068 N_Variable_Reference_Marker nodes.
1069
1070 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1071
1072 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
1073 the pragma Compile_Time_Error when it appears in a generic package
1074 declaration and uses an expanded name to denote the current unit.
1075
1076 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1077
1078 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
1079 * tracebak.c: Add support for tracebacks in QNX.
1080
1081 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1082
1083 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
1084
1085 2017-11-09 Yannick Moy <moy@adacore.com>
1086
1087 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
1088 justification.
1089
1090 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1091
1092 * doc/gnat_ugn/platform_specific_information.rst: Document packages
1093 needed on GNU/Linux by GNAT.
1094 * gnat_ugn.texi: Regenerate.
1095
1096 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1097
1098 * contracts.adb (Analyze_Contracts): Remove the three parameter
1099 version. This routine now only analyzes contracts and does not perform
1100 any freezing actions.
1101 (Analyze_Previous_Contracts): Removed.
1102 (Freeze_Previous_Contracts): New routine.
1103 * contracts.ads (Analyze_Previous_Contracts): Removed.
1104 (Freeze_Previous_Contracts): New routine.
1105 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1106 enclosing package spec regardless of whether the list denotes the
1107 visible or private declarations. Fix the removal of partial state
1108 refinements when the context is a package spec.
1109 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
1110 contracts.
1111 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
1112 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
1113 (Analyze_Protected_Body): Freeze previous contracts.
1114 (Analyze_Task_Body): Freeze previous contracts.
1115 * sem_prag.adb: Comment reformatting.
1116
1117 2017-11-09 Bob Duff <duff@adacore.com>
1118
1119 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
1120 Export this so users can use it without importing
1121 System.Tasking.Utilities.
1122 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
1123 that fails when Make_Independent is called on a user task.
1124 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
1125 capitalization style ((style) bad casing of "Master_of_Task").
1126
1127 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1128
1129 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
1130 uninitialized variable uncovered by Codepeer.
1131
1132 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1133
1134 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
1135
1136 2017-11-09 Javier Miranda <miranda@adacore.com>
1137
1138 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1139 (Static_Dispatch_Tables): Minor rewording.
1140 * gnat_rm.texi: Regenerate.
1141
1142 2017-11-09 Justin Squirek <squirek@adacore.com>
1143
1144 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
1145 use_clauses within instances.
1146 (Use_One_Package): Add condition to check for "hidden" open scopes to
1147 avoid skipping over packages that have not been properly installed even
1148 though they are visible.
1149
1150 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1151
1152 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
1153 private operation of a protected type, when the type has no visible
1154 operations.
1155
1156 2017-11-09 Javier Miranda <miranda@adacore.com>
1157
1158 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
1159 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
1160 if available.
1161
1162 2017-11-09 Bob Duff <duff@adacore.com>
1163
1164 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
1165 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
1166 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
1167 variables.
1168
1169 2017-11-09 Yannick Moy <moy@adacore.com>
1170
1171 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
1172 Ifaces_Comp_List.
1173
1174 2017-11-09 Pascal Obry <obry@adacore.com>
1175
1176 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
1177 only for foreign threads. We initialize the thread handle only if not
1178 yet initialized. This happens in Enter_Task for foreign threads only.
1179 But for native threads (Ada tasking) we do want to keep the real
1180 handle (from Create_Task) to be able to free the corresponding
1181 resources in Finalize_TCB (CloseHandle).
1182
1183 2017-11-09 Yannick Moy <moy@adacore.com>
1184
1185 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
1186 P_Base_Type.
1187 (Error_Attr_P): Fix name in pragma No_Return.
1188 (Unexpected_Argument): Add pragma No_Return.
1189 (Placement_Error): Add pragma No_Return.
1190
1191 2017-11-09 Javier Miranda <miranda@adacore.com>
1192
1193 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
1194 dispatch table is statically built.
1195 (Make_DT): Declare constant the Interface_Table object associated with
1196 an statically built dispatch table. For this purpose the Offset_To_Top
1197 value of each interface is computed using the dummy object.
1198 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
1199 the Offset_To_Top field of secondary dispatch tables when the dispatch
1200 table is statically built.
1201 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
1202 when the dispatch table is statically built.
1203 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1204 Document the new GNAT restriction Static_Dispatch_Tables.
1205 * gnat_rm.texi: Regenerate.
1206
1207 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1208
1209 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
1210 to avoid a dormant bug.
1211
1212 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1213
1214 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
1215 as such capability is not available on the OS.
1216 * link.c: Make sure linker options for QNX are correct.
1217 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
1218 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
1219 in particular a workaround with locks priority ceiling where a higher
1220 priority task is allowed to lock a lower ceiling priority lock. This
1221 also fixes the scheduling of FIFO tasks when the priority of a task is
1222 lowered.
1223 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
1224
1225 2017-11-09 Yannick Moy <moy@adacore.com>
1226
1227 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
1228 message.
1229 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
1230 condition.
1231 * namet.adb (Copy_One_Character): Add assumption for static analysis,
1232 as knowledge that Hex(2) is in the range 0..255 is too complex for
1233 CodePeer.
1234 (Finalize): Add assumption for static analysis, as the fact that there
1235 are symbols in the table depends on a global invariant at this point in
1236 the program.
1237 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
1238 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
1239 true.
1240
1241 2017-11-09 Javier Miranda <miranda@adacore.com>
1242
1243 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
1244 * exp_disp.adb (Building_Static_DT): Check restriction.
1245 (Building_Static_Secondary_DT): Check restriction.
1246 (Make_DT): Initialize the HT_Link to No_Tag.
1247 * opt.ads (Static_Dispatch_Tables): Rename flag...
1248 (Building_Static_Dispatch_Tables): ... into this. This will avoid
1249 conflict with the restriction name.
1250 * gnat1drv.adb: Update.
1251 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
1252 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
1253
1254 2017-11-09 Pascal Obry <obry@adacore.com>
1255
1256 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
1257 named number.
1258
1259 2017-11-09 Yannick Moy <moy@adacore.com>
1260
1261 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
1262 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
1263 use. Default initialize Hi, Lo.
1264 (Selected_Range_Checks): Retype Num_Checks more precisely.
1265 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
1266 Lo_Right.
1267 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
1268 Unmodified.
1269 (Process_Postconditions): Mark parameter Stmts as Unmodified.
1270 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
1271 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
1272 (Expand_Concatenate): Default initialize High_Bound.
1273 (Optimize_Length_Comparison): Default initialize Ent, Index.
1274 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
1275 L_Lo.
1276 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
1277 Return_Stmt.
1278 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
1279 remove pragma Warnings(Off).
1280 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
1281 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
1282 * freeze.adb (Check_Component_Storage_Order): Default initialize
1283 Comp_Byte_Aligned rather than silencing messages with pragma
1284 Warnings(Off), which does not work for CodePeer initialization
1285 messages, and given that here the possible read of an unitialized value
1286 depends on a proper use of parameters by the caller.
1287 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1288 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1289 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1290 Implicit_Base.
1291 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1292 pragma Warnings(Off).
1293 (Analyze_Case_Expression): Rescope checking block within branch where
1294 Others_Present is set by the call to Check_Choices.
1295 * sem_ch5.adb (Analyze_Assignment): Default initialize
1296 Save_Full_Analysis.
1297 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1298 and restructure code to defend against previous errors, so that, in
1299 that case, control does not flow to the elsif condition which read an
1300 uninitialized Obj_Decl.
1301 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1302 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1303 which seem to be left uninitialized and possibly read in some cases.
1304 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1305 precisely. This requires to exchange the test for exiting in case of
1306 too many positions and the increment to Position, inside the loop.
1307 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1308 which cannot be read uninitialized, but the reasons for that are quite
1309 subtle.
1310 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1311 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1312 Spec_Id.
1313 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1314 and test for presence of non-null Opnd_Type before testing its scope,
1315 in a test which would read its value uninitialized, and is very rarely
1316 exercized (it depends on the presence of an extension of System).
1317 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1318 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1319 Test_Result.
1320 * set_targ.adb (FailN): Mark procedure with No_Return.
1321 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1322 initialize all array Options to white space, as there is already code
1323 doing the same for the remaining positions in Options at the end of the
1324 procedure.
1325
1326 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1327
1328 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1329 generic instantiations either.
1330
1331 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1332
1333 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1334 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1335 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1336 mode.
1337
1338 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1339
1340 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1341 a limited view of a type T declared in unit U1, when the function is
1342 declared in another unit U2 and the call appears in a procedure within
1343 another unit.
1344
1345 2017-11-09 Justin Squirek <squirek@adacore.com>
1346
1347 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1348 when processing generic instances.
1349
1350 2017-11-09 Bob Duff <duff@adacore.com>
1351
1352 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1353 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1354 objects can have those special values. Valid_Name_Id could usefully be
1355 used all over the compiler front end, but that's too much trouble for
1356 now. If we did that, we might want to rename:
1357 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1358 For parameters of type Valid_Name_Id, remove some redundant tests,
1359 including the ones found by CodePeer. Use Is_Valid_Name instead of
1360 membership test when appropriate.
1361 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1362 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1363 "in Error_Name_Or_No_Name".
1364 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1365 Error_Name_Or_No_Name".
1366
1367 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1368
1369 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1370 mode here unless -gnateC is specified.
1371 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1372 -gnatC here.
1373
1374 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1375
1376 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1377 part of the ALI writing; they are now processed directly from memory
1378 when requested by the backend.
1379 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1380 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1381 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1382 (Add_SPARK_File): Remove.
1383 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1384 that are trivially uninteresting to the SPARK backend.
1385 * spark_xrefs.ads: Remove code that is no longer needed.
1386 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1387
1388 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1389
1390 * sem_elab.adb: Update the documentation on adding a new elaboration
1391 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1392 (Is_Check_Emitting_Scenario): Removed.
1393 (Is_Recorded_Top_Level_Scenario): New routine.
1394 (Kill_Elaboration_Scenario): Reimplemented.
1395 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1396 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1397 (Update_Elaboration_Scenario): Reimplemented.
1398 * sinfo.adb (Is_Recorded_Scenario): Removed.
1399 (Set_Is_Recorded_Scenario): Removed.
1400 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1401 occurrences in nodes.
1402 (Is_Recorded_Scenario): Removed along with pragma Inline.
1403 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1404
1405 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1406
1407 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1408 error message.
1409
1410 2017-11-09 Justin Squirek <squirek@adacore.com>
1411
1412 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1413 to the allocation of an anonymous access-to-controlled object.
1414
1415 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1416
1417 * sigtramp-qnx.c: Fix obvious typo.
1418
1419 2017-11-09 Doug Rupp <rupp@adacore.com>
1420
1421 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1422
1423 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1424
1425 * sem_res.adb (Resolve): If expression is an entity whose type has
1426 implicit dereference, generate reference to it, because no reference is
1427 generated for an overloaded entity during analysis, given that its
1428 identity may not be known.
1429
1430 2017-11-09 Javier Miranda <miranda@adacore.com>
1431
1432 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1433 offset-to-top field by addition.
1434 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1435 offset.
1436 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1437 return a negative offset-to-top value.
1438 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1439 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1440 initialize also the offset-to-top field with a negative offset.
1441 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1442 an addition since the offset-to-top field is now a negative value.
1443 (Displace): Displace the pointer to the object means of a substraction
1444 since it is now a negative value.
1445 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1446 means of a substraction since it is now a negative value.
1447
1448 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1449
1450 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1451 before Errout.Output_Messages also in the case of compilation errors.
1452
1453 2017-11-09 Javier Miranda <miranda@adacore.com>
1454
1455 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1456 the Class Level): Fix error interfacing with C strings.
1457 * gnat_ugn.texi: Regenerate.
1458
1459 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1460
1461 * system-qnx-aarch64.ads: Fix the priority constants.
1462 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1463 and scheduling.
1464 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1465 corresponds to an idle priority on QNX.
1466
1467 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1468
1469 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1470 comments.
1471
1472 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1473
1474 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1475 in expression funtions that are expanded into variables.
1476
1477 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1478
1479 * sem_util.adb: Minor whitespace cleanup.
1480
1481 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1482
1483 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1484 s-taprop version rather than a custom one.
1485 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1486
1487 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1488
1489 * lib-xref.ads, lib-xref-spark_specific.adb
1490 (Traverse_Compilation_Unit): Move declaration to package body.
1491
1492 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1493
1494 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1495 the type of the renaming from its defining entity, rather then the
1496 subtype mark as there may not be a subtype mark.
1497
1498 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1499
1500 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1501 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1502 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1503 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1504 terminals.c: Initial port of GNAT for aarch64-qnx
1505
1506 2017-11-08 Elisa Barboni <barboni@adacore.com>
1507
1508 * exp_util.adb (Find_DIC_Type): Move...
1509 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1510
1511 2017-11-08 Justin Squirek <squirek@adacore.com>
1512
1513 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1514 the owner and corresponding coextension.
1515
1516 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1517
1518 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1519 following separate procedures.
1520 (Resolve_Delta_Array_Aggregate): Previous code form
1521 Resolve_Delta_Aggregate.
1522 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1523 ARG decisions on the legality rules for delta aggregates for records:
1524 in the case of a variant record, components from different variants
1525 cannot be specified in the delta aggregate, and this must be checked
1526 statically.
1527
1528 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1529
1530 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1531 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1532 removed component.
1533
1534 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1535
1536 * sem_ch4.adb: Minor typo fix.
1537
1538 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1539
1540 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1541 Spec_Scope_Num components.
1542 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1543 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1544 removed components.
1545 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1546 components.
1547
1548 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1549
1550 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1551 name is a discriminant in check for unconditional accessibility
1552 violation within instances.
1553
1554 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1555
1556 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1557 for constants (with variable input).
1558 (Is_Constant_Object_Without_Variable_Input): Remove.
1559
1560 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1561
1562 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1563
1564 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1565
1566 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1567 cross-references.
1568 (dspark): Remove hardcoded table bound.
1569
1570 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1571
1572 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1573 the type of the base of the construct to determine the type (or
1574 candidate interpretations) of the delta aggregate. This allows the
1575 construct to appear in a context that expects a private extension.
1576 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1577 overloaded base.
1578
1579 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1580
1581 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1582 with Entity_Id of the reference.
1583 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1584 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1585 reference, not the file and scope indices.
1586
1587 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1588
1589 * errout.ads (Current_Node): New.
1590 * errout.adb (Error_Msg): Use Current_Node.
1591 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1592 when relevant.
1593 * style.adb: Call Error_Msg_N when possible.
1594
1595 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1596
1597 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1598 Entity.
1599 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1600 the Scope_Id record component.
1601
1602 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1603
1604 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1605 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1606 SPARK_File_Record components.
1607 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1608 representation of files/units.
1609
1610 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1611
1612 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1613 Remove Inside_Stubs parameter.
1614
1615 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1616
1617 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1618 represented by Entity_Id.
1619 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1620 represented by Entity_Id; this information is not repeated as
1621 Scope_Entity.
1622 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1623 Name_Of_Heap_Variable.
1624 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1625 data types.
1626 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1627 scope and xrefs tables to above changes in data types.
1628
1629 2017-11-08 Justin Squirek <squirek@adacore.com>
1630
1631 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1632 primitives of generic actuals.
1633 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1634 base type clauses as per ARM 8.4 (8.2/3).
1635
1636 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1637
1638 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1639 categorization dependency of the body, as is done for non-generic
1640 units.
1641 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1642 through declarations (Simple optimization, no behavior change).
1643
1644 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1645
1646 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1647 (SPARK_Scope_Record): Remove inessential components.
1648 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1649 components.
1650 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1651 removed record components.
1652 (Add_SPARK_Xrefs): Remove setting of removed record components.
1653
1654 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1655
1656 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1657 empty entities.
1658
1659 2017-11-08 Javier Miranda <miranda@adacore.com>
1660
1661 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1662 functionality of this routine to handle multiple levels of derivations.
1663
1664 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1665
1666 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1667 (Nested_Scenarios): New routine.
1668 (Set_Nested_Scenarios): New routine.
1669 (Write_Field36_Name): New routine.
1670 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1671 in entities.
1672 (Nested_Scenarios): New routine along with pragma Inline.
1673 (Set_Nested_Scenarios): New routine along with pragma Inline.
1674 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1675 (Process_Nested_Scenarios): New routine.
1676 (Traverse_Body): When a subprogram body is traversed for the first
1677 time, find, save, and process all suitable scenarios found within.
1678 Subsequent traversals of the same subprogram body utilize the saved
1679 scenarios.
1680
1681 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1682
1683 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1684 protected operations.
1685 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1686 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1687 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1688 reading and testing SPARK cross-references stored in the ALI files.
1689 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1690 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1691 ALI file.
1692 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1693 with description of the SPARK xrefs ALI format.
1694 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1695 and put_spark_refs.o.
1696
1697 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1698
1699 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1700 when the associated access type is subject to pragma
1701 No_Heap_Finalization.
1702 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1703 designated type in case it comes from a limited withed unit.
1704
1705 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1706
1707 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1708 SPARK-related flags. Add ??? comment.
1709 * exp_util.adb (Insert_Actions): Add an entry for node
1710 N_Variable_Reference_Marker.
1711 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1712 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1713 and record a variable reference marker for the current name.
1714 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1715 a variable reference marker for the current name.
1716 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1717 (Extract_Variable_Reference_Attributes): Reimplemented.
1718 (Info_Scenario): Add output for variable references and remove output
1719 for variable reads.
1720 (Info_Variable_Read): Removed.
1721 (Info_Variable_Reference): New routine.
1722 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1723 while variable reads are not.
1724 (Output_Active_Scenarios): Add output for variable references and
1725 remove output for variable reads.
1726 (Output_Variable_Read): Removed.
1727 (Output_Variable_Reference): New routine.
1728 (Process_Variable_Read): Removed.
1729 (Process_Variable_Reference): New routine.
1730 (Process_Variable_Reference_Read): New routine.
1731 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1732 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1733 marker for the current actual.
1734 * sem_spark.adb (Check_Node): Add an entry for node
1735 N_Variable_Reference_Marker.
1736 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1737 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1738 * sinfo.adb (Is_Read): New routine.
1739 (Is_Write): New routine.
1740 (Target): Updated to handle variable reference markers.
1741 (Set_Is_Read): New routine.
1742 (Set_Is_Write): New routine.
1743 (Set_Target): Updated to handle variable reference markers.
1744 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1745 occurrences in nodes. Update attribute Target. Add new node
1746 kind N_Variable_Reference_Marker.
1747 (Is_Read): New routine along with pragma Inline.
1748 (Is_Write): New routine along with pragma Inline.
1749 (Set_Is_Read): New routine along with pragma Inline.
1750 (Set_Is_Write): New routine along with pragma Inline.
1751 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1752 N_Variable_Reference_Marker.
1753
1754 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1755
1756 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1757 subprograms.
1758
1759 2017-11-08 Yannick Moy <moy@adacore.com>
1760
1761 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1762 about unused use-type or use-package clauses inside inlined bodies.
1763
1764 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1765
1766 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1767 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1768 prior elaboration of a unit when the need came from a partial
1769 finalization context.
1770 (In_Initialization_Context): Relocated to Process_Call.
1771 (Is_Partial_Finalization_Proc): New routine.
1772 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1773 on its usage.
1774 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1775 a comment on its usage.
1776 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1777 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1778 diagnostics when the activation occurs in a partial finalization
1779 context.
1780 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1781 In_Partial_Fin along with a comment on its usage.
1782 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1783 on its usage. A call is within a partial finalization context when it
1784 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1785 in initialization actions. Pass this information down to the recursive
1786 steps of the Processing phase.
1787 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1788 comment on its usage. Remove the guard which suppresses the generation
1789 of implicit Elaborate[_All] pragmas. This is now done in
1790 Ensure_Prior_Elaboration.
1791 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1792 with a comment on its usage. Do not emit any ABE diagnostics when the
1793 call occurs in a partial finalization context.
1794 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1795 comment on its usage.
1796 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1797 comment on its usage.
1798 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1799 with a comment on its usage.
1800 (Process_Instantiation_Conditional_ABE): Add new parameter
1801 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1802 diagnostics when the instantiation occurs in a partial finalization
1803 context.
1804 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1805 with a comment on its usage.
1806 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1807 comment on its usage.
1808 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1809 with a comment on its usage.
1810 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1811 on its usage.
1812
1813 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1814
1815 * sem_ch13.adb: Add optional parameter to Error_Msg.
1816
1817 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1818
1819 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1820 for the Interfaces.* hierarchy as longer unit names are now allowed.
1821
1822 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1823
1824 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1825 subprogram as well. Support more cases of entities.
1826 (Append_Entity_Name): Add some defensive code.
1827
1828 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1829
1830 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1831
1832 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1833
1834 PR ada/82785
1835 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1836
1837 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1838
1839 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1840
1841 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1842
1843 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1844 (convert): Do not use an unchecked conversion for converting from a
1845 type to another type padding it.
1846
1847 2017-10-20 Doug Rupp <rupp@adacore.com>
1848
1849 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1850 needed for using monotonic clock.
1851 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1852 changes.
1853 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1854 out monotonic clock related functions body.
1855 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1856 Compute_Deadline): Move to...
1857 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1858
1859 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1860
1861 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1862 case where the controlling formal is an anonymous access to interface
1863 type.
1864 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1865 access type, handle properly the the constructed dereference that
1866 designates the object used in the rewritten synchronized call.
1867 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1868 generated declaration in the parameter block does not need an
1869 initialization even if the type is a null-excluding access type,
1870 because it will be initialized with the value of the actual later on.
1871 (Parameter_Block_Pack): Do not add controlling actual to parameter
1872 block when its type is by-copy.
1873
1874 2017-10-20 Justin Squirek <squirek@adacore.com>
1875
1876 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1877 scope stack traversal into the context clause.
1878
1879 2017-10-20 Bob Duff <duff@adacore.com>
1880
1881 * sinfo.ads: Fix a comment typo.
1882
1883 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1884
1885 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1886 warning against usage in conjunction with -gnatn.
1887 (-fdump-xref): Delete entry.
1888 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1889 -fdump-xref switch.
1890 * gnat_ugn.texi: Regenerate.
1891
1892 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1893
1894 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1895 Minor reformatting.
1896
1897 2017-10-20 Yannick Moy <moy@adacore.com>
1898
1899 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1900 compare a dimensioned expression with a literal.
1901 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1902 special value zero.
1903 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1904 dimensionality system in GNAT.
1905 * gnat_ugn.texi: Regenerate.
1906
1907 2017-10-20 Yannick Moy <moy@adacore.com>
1908
1909 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1910 inadequate silencing of errors.
1911 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1912 checking the subprogram body generated from an expression function,
1913 when this is done as part of the preanalysis done on expression
1914 functions, as the subprogram body may not yet be attached in the AST.
1915 The error if any will be issued later during the analysis of the body.
1916 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1917
1918 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1919
1920 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1921 warning on ineffective use clause.
1922
1923 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1924
1925 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1926 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1927 to issue the warning on the absence of local raise.
1928 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1929 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1930 absence of local raise.
1931 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1932 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1933 where a scenario could give rise to raising Program_Error.
1934 * sem_elab.adb: Typo fixes.
1935 * fe.h (Warn_If_No_Local_Raise): Declare.
1936 * gcc-interface/gigi.h (get_exception_label): Change return type.
1937 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1938 simple vector of Entity_Id.
1939 (gnu_storage_error_label_stack): Likewise.
1940 (gnu_program_error_label_stack): Likewise.
1941 (gigi): Adjust to above changes.
1942 (Raise_Error_to_gnu): Likewise.
1943 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1944 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1945 (N_Push_Storage_Error_Label): Likewise.
1946 (N_Push_Program_Error_Label): Likewise.
1947 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1948 a warning on the absence of local raise.
1949 (N_Pop_Storage_Error_Label): Likewise.
1950 (N_Pop_Program_Error_Label): Likewise.
1951 (push_exception_label_stack): Delete.
1952 (get_exception_label): Change return type to Entity_Id and adjust.
1953 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1954 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1955 (build_call_raise): Adjust calls to get_exception_label and also
1956 build_goto_raise.
1957 (build_call_raise_column): Likewise.
1958 (build_call_raise_range): Likewise.
1959 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1960 Document actual default behavior.
1961
1962 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1963
1964 * einfo.ads: Minor consistent punctuation in comment. All numbered
1965 items in the comment of Is_Internal are now terminated with a period.
1966
1967 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1968
1969 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1970 internal.
1971
1972 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1973
1974 * sem_type.adb (In_Generic_Actual): Simplified.
1975
1976 2017-10-20 Justin Squirek <squirek@adacore.com>
1977
1978 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1979 verify a renaming exists for a generic formal before comparing it to
1980 the actual as defaulted formals will not have a renamed_object.
1981
1982 2017-10-20 Javier Miranda <miranda@adacore.com>
1983
1984 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1985 N_Block_Statement nodes.
1986
1987 2017-10-20 Bob Duff <duff@adacore.com>
1988
1989 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1990 component of an array aggregate if it is initialized by a
1991 build-in-place function call.
1992 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1993 bip for nonlimited types.
1994 * debug.adb: Document -gnatd.9.
1995
1996 2017-10-20 Bob Duff <duff@adacore.com>
1997
1998 * sem_ch12.adb: Remove redundant setting of Parent.
1999
2000 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
2003 of the operands is a string literal.
2004
2005 2017-10-20 Bob Duff <duff@adacore.com>
2006
2007 * einfo.ads: Comment fix.
2008
2009 2017-10-20 Clement Fumex <fumex@adacore.com>
2010
2011 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
2012
2013 2017-10-20 Ed Schonberg <schonberg@adacore.com>
2014
2015 * sem_dim.adb (Extract_Power): Accept dimension values that are not
2016 non-negative integers when the dimensioned base type is an Integer
2017 type.
2018
2019 2017-10-20 Bob Duff <duff@adacore.com>
2020
2021 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
2022 that an allocator came from a b-i-p return statement.
2023 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
2024 object of a nonlimited build-in-place function call.
2025 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
2026 Alloc_For_BIP_Return flag on generated allocators.
2027 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
2028 If the N_Assignment_Statement has been transformed into something else,
2029 then Should_Transform_BIP_Assignment won't work.
2030 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
2031 "Remove Adjust if we're building the return object of an extended
2032 return statement in place." Back out that part of the change, because
2033 the Alloc_For_BIP_Return flag is now used for that.
2034
2035 2017-10-19 Bob Duff <duff@adacore.com>
2036
2037 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
2038 should be "T". Handle case of a subtype of a class-wide type.
2039
2040 2017-10-19 Bob Duff <duff@adacore.com>
2041
2042 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
2043 which node kinds can legitimately be ignored, and raise Program_Error
2044 for others.
2045
2046 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
2047
2048 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
2049 instantiation that acts as a compilation unit.
2050 (Find_Code_Unit): Reimplemented.
2051 (Find_Top_Unit): Reimplemented.
2052 (Find_Unit_Entity): New routine.
2053 (Process_Instantiation_SPARK): Correct the elaboration requirement a
2054 package instantiation imposes on a unit.
2055
2056 2017-10-19 Bob Duff <duff@adacore.com>
2057
2058 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
2059 for a narrow set of controlled types.
2060
2061 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2062
2063 * sinput.ads (Line_Start): Add pragma Inline.
2064 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
2065
2066 2017-10-19 Bob Duff <duff@adacore.com>
2067
2068 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
2069 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
2070 build-in-place function call so that the temp is declared in the right
2071 place.
2072
2073 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
2074
2075 * gcc-interface/misc.c (gnat_tree_size): Move around.
2076
2077 * gcc-interface/utils.c (max_size): Deal with SSA names.
2078
2079 2017-10-17 Jakub Jelinek <jakub@redhat.com>
2080
2081 * gcc-interface/misc.c (gnat_tree_size): New function.
2082 (LANG_HOOKS_TREE_SIZE): Redefine.
2083
2084 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2085
2086 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
2087 Remote_Call_Interface is not a suitable preelaboratd context when the
2088 call appears in the package body.
2089
2090 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
2093 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
2094 alignment for consistency. If Align is non-zero, use the minimum of
2095 Align and M for the alignment.
2096 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
2097 setting the alignment directly.
2098
2099 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2100
2101 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
2102 optional string in an Assert pragma until the expansion of the pragma
2103 has rewritten it as a conditional statement, so that the string
2104 argument is only evaluaed if the assertion fails. This is mandated by
2105 RM 11.4.2.
2106
2107 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2108
2109 * debug.adb: Switch -gnatd.v and associated flag are now used to
2110 enforce the SPARK rules for elaboration in SPARK code.
2111 * sem_elab.adb: Describe switch -gnatd.v.
2112 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
2113 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
2114 in effect.
2115 (Process_Variable_Assignment): Clarify why variable assignments are
2116 processed reglardless of whether -gnatd.v is in effect.
2117 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
2118 sections on elaboration code and compilation switches.
2119 * gnat_ugn.texi: Regenerate.
2120
2121 2017-10-14 Gary Dismukes <dismukes@adacore.com>
2122
2123 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
2124 sem_warn.adb: Minor reformattings.
2125
2126 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2127
2128 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
2129 for reverse iteration over formal containers.
2130 * gnat_rm.texi: Regenerate.
2131
2132 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2133
2134 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
2135 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
2136 (Ensure_Static_Prior_Elaboration): Renamed to
2137 Ensure_Prior_Elaboration_Static for consistency reasons.
2138 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
2139 reflect its new purpose.
2140 (Is_Initialized): New routine.
2141 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
2142 in order to reflect its new purpose.
2143 (Is_Variable_Read): New routine.
2144 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
2145 to reflect its new purpose.
2146 (Process_Variable_Assignment): This routine now acts as a top level
2147 dispatcher for variable assignments.
2148 (Process_Variable_Assignment_Ada): New routine.
2149 (Process_Variable_Assignment_SPARK): New routine.
2150 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
2151 to reflects its new purpose. A reference to a variable is now suitable
2152 for ABE processing only when it is a read. The logic in the routine now
2153 reflects the latest SPARK elaboration rules.
2154
2155 2017-10-14 Justin Squirek <squirek@adacore.com>
2156
2157 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
2158 triggers marking on formal subprograms.
2159
2160 2017-10-14 Javier Miranda <miranda@adacore.com>
2161
2162 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
2163 renamings of objects that come from the sources.
2164
2165 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2166
2167 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
2168 parameter and set the alignment of the type to Align.
2169 (Copy_Float_Type): Adjust call to Build_Float_Type.
2170 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
2171 call to Build_Float_Type and do not set RM_Size and Alignment.
2172
2173 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2174
2175 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
2176 GNATRTL_NONTASKING_OBJ.
2177
2178 2017-10-14 Bob Duff <duff@adacore.com>
2179
2180 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
2181 enabling b-i-p for nonlimited controlled types (but disabled).
2182
2183 2017-10-14 Justin Squirek <squirek@adacore.com>
2184
2185 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
2186 Has_Warnings_Off with Warnings_Off.
2187
2188 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
2189
2190 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2191
2192 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2193
2194 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
2195 enclosing package at the end of the visible declarations.
2196 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
2197 an initialization item which is undefined due to some illegality.
2198
2199 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2200
2201 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
2202 within each unit that require a default-sized primary and secondary
2203 stack to be generated by the binder.
2204 (Scan_ALI): Scan new 'T' lines.
2205 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
2206 * bindgen.adb (Gen_Output_File): Count the number of default-sized
2207 stacks within the closure that are to be created by the binder.
2208 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
2209 stacks and record these in System.Secodnary_Stack.
2210 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
2211 closure of the program being bound.
2212 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
2213 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
2214 (Expand_N_Object_Declaration): Count the number of default-sized stacks
2215 used by task objects contained within the object whose declaration is
2216 being expanded. Only performed when either the restrictions
2217 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
2218 effect.
2219 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
2220 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
2221 the expansion of a task type if the size of the stack is known at
2222 run-time and the restrictions No_Implicit_Heap_Allocations or
2223 No_Implicit_Task_Allocations are in effect.
2224 (Make_Task_Create_Call): If using a restricted profile provide
2225 secondary stack parameter: either the statically created stack or null.
2226 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
2227 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
2228 Unit_Record initialization expressions.
2229 * lib-writ.adb (Add_Preprocessing_Dependency,
2230 Ensure_System_Dependency): Include Primary_Stack_Count and
2231 Sec_Stack_Count in Unit_Record initialization expression.
2232 (Write_ALI): Write T lines.
2233 (Write_Unit_Information): Do not output 'T' lines if there are no
2234 stacks for the binder to generate.
2235 * lib-writ.ads: Updated library information documentation to include
2236 new T line entry.
2237 * lib.adb (Increment_Primary_Stack_Count): New routine.
2238 (Increment_Sec_Stack_Count): New routine.
2239 (Primary_Stack_Count): New routine.
2240 (Sec_Stack_Count): New routine.
2241 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
2242 Unit_Record and updated documentation.
2243 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
2244 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
2245 (Primary_Stack_Count): New routine along with pragma Inline.
2246 (Sec_Stack_Count): New routine along with pragma Inline.
2247 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
2248 redefined. New flag Default_Sec_Stack_Size and
2249 Quantity_Of_Default_Size_Sec_Stacks.
2250 * rtfinal.c Fixed erroneous comment.
2251 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
2252 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
2253 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
2254 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
2255 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
2256 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
2257 (Set_Sec_Stack_Addr): Removed routine.
2258 (Get_Sec_Stack): New routine.
2259 (Set_Sec_Stack): New routine.
2260 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
2261 reflect new procedure and global names.
2262 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
2263 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
2264 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
2265 parameter profile to allow the secondary stack size to be specified.
2266 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
2267 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
2268 call to remove Secondary_Stack_Size reference. Add secondary stack
2269 address and size to SSL.Create_TSD call.
2270 (Task_Wrapper): Remove secondary stack creation.
2271 * libgnarl/s-tarest.ads (Create_Restricted_Task,
2272 Create_Restricted_Task_Sequential): Update parameter profile to include
2273 Sec_Stack_Address and clarify the Size parameter.
2274 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
2275 from profile and body.
2276 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
2277 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
2278 Common_ATCB.
2279 (Initialize_ATCB): Update the parameter profile to remove
2280 Secondary_Stack_Size.
2281 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
2282 call to Initialize_ATCB. Add secondary stack address and size to
2283 SSL.Create_TSD call, and catch any storage exception from the call.
2284 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2285 new subprogram and component names.
2286 (Task_Wrapper): Remove secondary stack creation.
2287 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2288 * libgnarl/s-tassta.ads: Reformat comments.
2289 (Create_Task): Update parameter profile.
2290 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2291 profile to include secondary stack size. Remove secondary size
2292 parameter from Initialize_ATCB call and add it to Create_TSD call.
2293 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2294 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2295 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2296 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2297 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2298 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2299 Sec_Stack_Dynamic.
2300 (Default_Sec_Stack_Size): New routine.
2301 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2302 now Preelaborate.
2303 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2304 System.Soft_Links.Initialize to initialize non-tasking TSD.
2305 (Create_TSD): Update parameter profile. Initialize the TSD and
2306 unconditionally call SS_Init.
2307 (Destroy_TSD): Update SST.SS_Free call.
2308 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2309 Set_Sec_Stack_Addr_Soft): Remove routines.
2310 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2311 Set_Sec_Stack_Soft): Add routines.
2312 (NT_TSD): Move to private part of package specification.
2313 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2314 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2315 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2316 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2317 (Create_TSD): Update parameter profile.
2318 (NT_TSD): Move to private section from body.
2319 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2320 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2321 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2322 Remove routine.
2323 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2324 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2325 System.Secondary_Stack.
2326 (Init_RTS): Update body for new System.Soft_Links names.
2327 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2328 s-soliin.o.
2329
2330 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2331
2332 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2333 operating on trees as wide_ints.
2334
2335 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2336
2337 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2338 as a scoping construct when it is byproduct of exception handling.
2339
2340 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2341
2342 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2343 semantic field Target of node N_Call_Marker.
2344
2345 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2346
2347 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2348 attempts to copy a limited value, when the allocator is the expression
2349 in an expression function.
2350
2351 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2352
2353 * doc/share/conf.py: Tell the style checker that this is a Python
2354 fragment, and therefore that pyflakes should not be run to validate
2355 this file.
2356
2357 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2358
2359 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2360 (Is_Entity_Name): Likewise.
2361 (Is_String_Type): Likewise.
2362 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2363 and remove useless comparisons on the base types.
2364 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2365 on T2. Always test Is_Private_Type before Full_View_Covers.
2366
2367 2017-10-09 Bob Duff <duff@adacore.com>
2368
2369 * exp_ch4.adb: Minor refactoring.
2370
2371 2017-10-09 Javier Miranda <miranda@adacore.com>
2372
2373 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2374 not components.
2375
2376 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2377
2378 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2379 are verified only in the static model.
2380
2381 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2382
2383 * sem_ch5.adb (Analyze_Iterator_Specification,
2384 Check_Reverse_Iteration): Check that the domain of iteration supports
2385 reverse iteration when it is a formal container. This requires the
2386 presence of a Previous primitive in the Iterable aspect.
2387 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2388 primitives Last and Previous to support reverse iteration over formal
2389 containers.
2390 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2391 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2392 for reverse iteration using primitives Last and Previous in generated
2393 loop.
2394
2395 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2396
2397 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2398 of the Defining_Program_Unit_Name, which is an identifier, in order to
2399 construct the string for the fully qualified name.
2400
2401 2017-10-09 Justin Squirek <squirek@adacore.com>
2402
2403 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2404 Contains_Lib_Incomplete_Type.
2405
2406 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2407
2408 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2409 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2410 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2411 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2412 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2413
2414 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2415
2416 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2417 in the static model.
2418 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2419 in the static model.
2420 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2421 the static model.
2422
2423 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2424
2425 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2426 expressions when the enclosing scope is a subprogram body and the next
2427 declaration is a body that freezes entities previously declared in the
2428 scope.
2429
2430 2017-10-09 Justin Squirek <squirek@adacore.com>
2431
2432 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2433 ghost packages and living packages in use clauses.
2434 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2435
2436 2017-10-09 Justin Squirek <squirek@adacore.com>
2437
2438 * osint.ads: Document new parameter FD for Read_Source_File.
2439
2440 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2441
2442 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2443 which the predicate check applies is tagged, convert the expression to
2444 that type. This is in most cases a no-op, but is relevant if the
2445 expression is clas-swide, because the predicate function being invoked
2446 is not a primitive of the type and cannot take a class-wide actual.
2447
2448 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2449
2450 * exp_disp.adb: Minor reformatting.
2451
2452 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2453
2454 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2455
2456 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2457
2458 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2459 GNATprove.
2460 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2461
2462 2017-10-09 Bob Duff <duff@adacore.com>
2463
2464 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2465 immediately if the call has already been processed (by a previous call
2466 to Make_Build_In_Place_Call_In_Anonymous_Context).
2467 * sem_elab.adb: Minor typo fixes.
2468
2469 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2470
2471 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2472 predicate, do not replace an identifier that matches the type if the
2473 identifier is a selector in a selected component, because this
2474 indicates a reference to some homograph of the type itself, and not to
2475 the current occurence in the predicate.
2476
2477 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2478
2479 * repinfo.adb (List_Record_Layout): Tweak formatting.
2480 (Write_Val): Remove superfluous spaces in back-end layout mode.
2481
2482 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2483
2484 * sem_res.adb (Property_Error): Remove.
2485 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2486 current wording of the rule.
2487
2488 2017-10-09 Justin Squirek <squirek@adacore.com>
2489
2490 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2491 before analyzing a given scope due to an expression function.
2492 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2493
2494 2017-10-09 Bob Duff <duff@adacore.com>
2495
2496 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2497 Defining_Identifier (Obj_Decl) in two places, because it might have
2498 changed.
2499 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2500 involving 'Input on (not visibly) derived types.
2501
2502 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2503
2504 * atree.adb: Add new soft link Rewriting_Proc.
2505 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2506 (Set_Rewriting_Proc): New routine.
2507 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2508 (Set_Rewriting_Proc): New routine.
2509 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2510 for *E*laboration flag to maintain consistency with other elaboration
2511 flag generating subprograms.
2512 * debug.adb: Document the new usage of flag -gnatdL.
2513 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2514 as Protected_Subprogram. Flag148 is now used as
2515 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2516 Is_Initial_Condition_Procedure.
2517 (Is_Elaboration_Checks_OK_Id): New routine.
2518 (Is_Initial_Condition_Procedure): New routine.
2519 (Protected_Subprogram): New routine.
2520 (Receiving_Entry): New routine.
2521 (SPARK_Pragma): Update assertion.
2522 (SPARK_Pragma_Inherited): Update assertion.
2523 (Suppress_Elaboration_Warnings): Removed.
2524 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2525 (Set_Is_Initial_Condition_Procedure): New routine.
2526 (Set_Protected_Subprogram): New routine.
2527 (Set_Receiving_Entry): New routine.
2528 (Set_SPARK_Pragma): Update assertion.
2529 (Set_SPARK_Pragma_Inherited): Update assertion.
2530 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2531 (Write_Field19_Name): Add output for Receiving_Entry.
2532 (Write_Field39_Name): Add output for Protected_Subprogram.
2533 (Write_Field40_Name): Update the output for SPARK_Pragma.
2534 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2535 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2536 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2537 of various entities.
2538 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2539 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2540 (Protected_Subprogram): New routine along with pragma Inline.
2541 (Receiving_Entry): New routine along with pragma Inline.
2542 (Suppress_Elaboration_Warnings): Removed.
2543 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2544 Inline.
2545 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2546 Inline.
2547 (Set_Protected_Subprogram): New routine along with pragma Inline.
2548 (Set_Receiving_Entry): New routine along with pragma Inline.
2549 (Set_Suppress_Elaboration_Warnings): Removed.
2550 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2551 consistency with other finalizer generating subprograms.
2552 (Default_Initialize_Object): Mark the block which wraps the call to
2553 finalize as being part of initialization.
2554 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2555 Initial_Condition.
2556 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2557 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2558 markers generated by the ABE mechanism.
2559 * exp_ch9.adb (Activation_Call_Loc): New routine.
2560 (Add_Accept): Link the accept procedure to the original entry.
2561 (Build_Protected_Sub_Specification): Link the protected or unprotected
2562 version to the original subprogram.
2563 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2564 is very close to the "begin" or "end" keywords when generating the
2565 activation call.
2566 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2567 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2568 process loops.
2569 (Expand_SPARK_N_Loop_Statement): New routine.
2570 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2571 call to the Default_Initial_Condition procedure.
2572 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2573 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2574 effect.
2575 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2576 (Insert_Actions): Add processing for N_Call_Marker.
2577 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2578 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2579 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2580 elaboration scenarios for ABE issues.
2581 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2582 nodes.
2583 * lib.adb (Earlier_In_Extended_Unit): New variant.
2584 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2585 (Preanalysis_Active): New routine.
2586 * sem.ads (Preanalysis_Active): New routine.
2587 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2588 elaboration-related attributes. Save the scenario for ABE processing.
2589 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2590 effect. Save certain elaboration-related attributes.
2591 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2592 attributes. Save the scenario for ABE processing.
2593 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2594 mode in effect. Save certain elaboration-related attributes.
2595 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2596 locating the first real statement.
2597 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2598 certain elaboration-related attributes.
2599 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2600 elaboration warnings.
2601 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2602 generated for purposes of wrapping an attribute used as a generic
2603 actual.
2604 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2605 the scenario for ABE processing.
2606 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2607 the scenario for ABE processing.
2608 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2609 elaboration-related attributes.
2610 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2611 the scenario for ABE processing.
2612 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2613 attributes.
2614 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2615 attributes.
2616 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2617 elaboration-related attributes.
2618 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2619 effect. Save certain elaboration-related attributes.
2620 (Analyze_Package_Instantiation): Save certain elaboration-related
2621 attributes. Save the scenario for ABE processing. Create completing
2622 bodies in case the instantiation results in a guaranteed ABE.
2623 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2624 attributes Save the scenario for ABE processing. Create a completing
2625 body in case the instantiation results in a guaranteed ABE.
2626 (Provide_Completing_Bodies): New routine.
2627 * sem_elab.ads: Brand new implementation.
2628 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2629 Elaborate_Body): Do not suppress elaboration warnings.
2630 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2631 operator.
2632 (Resolve_Call): Save certain elaboration-related attributes. Save the
2633 scenario for ABE processing.
2634 (Resolve_Entity_Name): Do not perform any ABE processing here.
2635 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2636 * sem_util.adb (Begin_Keyword_Location): New routine.
2637 (Defining_Entity): Update the parameter profile. Add processing for
2638 concurrent subunits that are rewritten as null statements.
2639 (End_Keyword_Location): New routine.
2640 (Find_Enclosing_Scope): New routine.
2641 (In_Instance_Visible_Part): Code cleanup.
2642 (In_Subtree): Update the parameter profile. Add new version.
2643 (Is_Preelaborable_Aggregate): New routine.
2644 (Is_Preelaborable_Construct): New routine.
2645 (Mark_Elaboration_Attributes): New routine.
2646 (Scope_Within): Update the parameter profile.
2647 (Scope_Within_Or_Same): Update the parameter profile.
2648 * sem_util.ads (Begin_Keyword_Location): New routine.
2649 (Defining_Entity): Update the parameter profile and the comment on
2650 usage.
2651 (End_Keyword_Location): New routine.
2652 (Find_Enclosing_Scope): New routine.
2653 (In_Instance_Visible_Part): Update the parameter profile.
2654 (In_Subtree): Update the parameter profile. Add new version.
2655 (Is_Preelaborable_Aggregate): New routine.
2656 (Is_Preelaborable_Construct): New routine.
2657 (Mark_Elaboration_Attributes): New routine.
2658 (Scope_Within): Update the parameter profile and the comment on usage.
2659 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2660 usage.
2661 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2662 to determine whether a loop has meaningful condition actions.
2663 (Has_Condition_Actions): New routine.
2664 * sinfo.adb (ABE_Is_Certain): Removed.
2665 (Is_Declaration_Level_Node): New routine.
2666 (Is_Dispatching_Call): New routine.
2667 (Is_Elaboration_Checks_OK_Node): New routine.
2668 (Is_Initialization_Block): New routine.
2669 (Is_Known_Guaranteed_ABE): New routine.
2670 (Is_Recorded_Scenario): New routine.
2671 (Is_Source_Call): New routine.
2672 (Is_SPARK_Mode_On_Node): New routine.
2673 (No_Elaboration_Check): Removed.
2674 (Target): New routine.
2675 (Was_Attribute_Reference): New routine.
2676 (Set_ABE_Is_Certain): Removed.
2677 (Set_Is_Declaration_Level_Node): New routine.
2678 (Set_Is_Dispatching_Call): New routine.
2679 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2680 (Set_Is_Initialization_Block): New routine.
2681 (Set_Is_Known_Guaranteed_ABE): New routine.
2682 (Set_Is_Recorded_Scenario): New routine.
2683 (Set_Is_Source_Call): New routine.
2684 (Set_Is_SPARK_Mode_On_Node): New routine.
2685 (Set_No_Elaboration_Check): Removed.
2686 (Set_Target): New routine.
2687 (Set_Was_Attribute_Reference): New routine.
2688 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2689 Do_Discriminant_Check now utilizes Flag3. Attribute
2690 No_Side_Effect_Removal now utilizes Flag17. Add new node
2691 N_Call_Marker. Update the structure of various nodes.
2692 (ABE_Is_Certain): Removed along with pragma Inline.
2693 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2694 (Is_Dispatching_Call): New routine along with pragma Inline.
2695 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2696 (Is_Initialization_Block): New routine along with pragma Inline.
2697 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2698 (Is_Recorded_Scenario): New routine along with pragma Inline.
2699 (Is_Source_Call): New routine along with pragma Inline.
2700 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2701 (No_Elaboration_Check): Removed along with pragma Inline.
2702 (Target): New routine along with pragma Inline.
2703 (Was_Attribute_Reference): New routine along with pragma Inline.
2704 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2705 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2706 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2707 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2708 Inline.
2709 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2710 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2711 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2712 (Set_Is_Source_Call): New routine along with pragma Inline.
2713 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2714 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2715 (Set_Target): New routine along with pragma Inline.
2716 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2717 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2718
2719 2017-10-09 Bob Duff <duff@adacore.com>
2720
2721 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2722
2723 2017-10-09 Bob Duff <duff@adacore.com>
2724
2725 * freeze.ads: Minor comment fixed.
2726
2727 2017-10-09 Bob Duff <duff@adacore.com>
2728
2729 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2730 care of unchecked conversions in addition to regular conversions. This
2731 takes care of a case where a type is derived from a private untagged
2732 type that is completed by a tagged controlled type.
2733
2734 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2735
2736 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2737 rewriting a class-wide condition, handle properly the case where the
2738 controlling argument of the operation to which the condition applies is
2739 an access to a tagged type, and the condition includes a dispatching
2740 call with an implicit dereference.
2741
2742 2017-10-09 Bob Duff <duff@adacore.com>
2743
2744 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2745 the code at the end of this procedure that was setting the type of a
2746 class-wide object to the specific type returned by a function call.
2747 Treat this case as indefinite instead.
2748
2749 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2750
2751 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2752 Suppress spurious ambiguity error when two traversals of the homonym
2753 chain (first directly, and then through an examination of relevant
2754 interfaces) retrieve the same operation, when other irrelevant homonyms
2755 of the operatioh are also present.
2756
2757 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2758
2759 * sem_util.adb (Object_Access_Level): If the object is the return
2760 statement of an expression function, return the level of the function.
2761 This is relevant when the object involves an implicit conversion
2762 between access types and the expression function is a completion, which
2763 forces the analysis of the expression before rewriting it as a body, so
2764 that freeze nodes can appear in the proper scope.
2765
2766 2017-10-09 Bob Duff <duff@adacore.com>
2767
2768 * atree.adb: Make nnd apply to everything "interesting", including
2769 Rewrite. Remove rrd.
2770
2771 2017-10-09 Javier Miranda <miranda@adacore.com>
2772
2773 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2774 processing the declaration of the dummy object internally created by
2775 Make_DT to compute the offset to the top of components referencing
2776 secondary dispatch tables.
2777 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2778 been initialized initialized.
2779 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2780 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2781 (Make_DT): Create a dummy constant object if we can statically build
2782 secondary dispatch tables.
2783 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2784 use the dummy object to compute the offset-to-top field value by means
2785 of the attribute 'Position.
2786
2787 2017-10-09 Bob Duff <duff@adacore.com>
2788
2789 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2790 code so if BIPAlloc is not passed in, it will likely raise
2791 Program_Error instead of cause miscellaneous chaos.
2792 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2793 as for the other Is_B-I-P... functions.
2794 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2795 aggregate whose ancestor part is a build-in-place call returning a
2796 nonlimited type, transform the assignment to the ancestor part to use a
2797 temp.
2798 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2799 creating an Itype for a library unit entity.
2800 (Check_Initialization): Avoid spurious error message on
2801 internally-generated call.
2802 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2803 right-hand side is a build-in-place call. This didn't happen when b-i-p
2804 was only for limited types.
2805 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2806 implies >= Ada 2005.
2807 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2808 repeatedly.
2809 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2810
2811 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2812
2813 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2814
2815 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2816
2817 * libgnarl/s-taprob.adb: Minor whitespace fix.
2818
2819 2017-10-09 Bob Duff <duff@adacore.com>
2820
2821 * namet.ads: Minor comment fix.
2822
2823 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2824
2825 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2826 just like other program units listed in Ada RM 10.1(1).
2827
2828 2017-10-09 Justin Squirek <squirek@adacore.com>
2829
2830 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2831
2832 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2833
2834 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2835 actual for a formal package is an instantiation of a child unit, create
2836 a freeze node for the instance of the parent if it appears in the same
2837 scope and is not frozen yet.
2838
2839 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2840
2841 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2842 in-source documentation for tagged types's Offset_To_Top.
2843
2844 2017-10-09 Bob Duff <duff@adacore.com>
2845
2846 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2847 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2848 limited. This is for the case of a function call that occurs as the
2849 default for a record component.
2850 (Expand_N_Object_Declaration): Deal with the case where expansion has
2851 created an object declaration initialized with something like
2852 F(...)'Reference.
2853 * exp_ch3.adb: Minor reformatting.
2854
2855 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2856
2857 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2858 the attribute is an object, but it may appear within a conversion. The
2859 object itself must be retrieved when generating the range test that
2860 implements the validity check on a scalar type.
2861
2862 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2863
2864 PR ada/82393
2865 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2866 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2867
2868 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2869 Pierre-Marie de Rodat <derodat@adacore.com>
2870
2871 PR ada/82384
2872 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2873 (time_t): Change from derived type to subtype.
2874 (timeval): Use suseconds_t for tv_usec.
2875 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2876
2877 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2878
2879 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2880 handling the form (plus/mult (convert @0) @1).
2881
2882 2017-09-29 Bob Duff <duff@adacore.com>
2883
2884 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2885 what we had before.
2886 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2887 change. Set the Etype in the class-wide case. This fixes a regression
2888 in the libadalang test suite.
2889
2890 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2891
2892 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2893 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2894 in comment markup.
2895 * gnat_ugn.texi: Regenerate.
2896
2897 2017-09-29 Justin Squirek <squirek@adacore.com>
2898
2899 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2900 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2901 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2902 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2903 for checking source file status and error message and/or call to
2904 Read_Source_File.
2905 * libgnat/s-os_lib.ads: Add new potential value constant for
2906 uninitialized file descriptors.
2907 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2908 return result of IO to encompass a read access failure in addition to a
2909 file-not-found error.
2910
2911 2017-09-29 Bob Duff <duff@adacore.com>
2912
2913 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2914 functions returning nonlimited types. Allow for qualified expressions
2915 and type conversions.
2916 (Expand_N_Extended_Return_Statement): Correct the computation of
2917 Func_Bod to allow for child units.
2918 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2919 limited (initialization of In_Place_Expansion), and implies >= Ada
2920 2005.
2921 (Is_Build_In_Place_Result_Type): New function to accompany
2922 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2923 sometimes we just have the type on our hands, not the function. For
2924 now, does the same thing as the old version, so build-in-place is
2925 disabled for nonlimited types, except that you can use -gnatd.9 to
2926 enable it.
2927 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2928 accompany Is_Build_In_Place_Function and
2929 Is_Build_In_Place_Function_Call, because sometimes we just have the
2930 type on our hands, not the function.
2931 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2932 cases.
2933 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2934 questionable code at the end that was setting the Etype.
2935 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2936 determine whether "return (...agg...);" is returning from a
2937 build-in-place function.
2938 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2939 Remove assumption that b-i-p implies limited (initialization of
2940 In_Place_Expansion).
2941 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2942 an unchecked conversion. Add assertions.
2943 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2944 secondary stack here, just because the type needs finalization. That
2945 code is obsolete.
2946 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2947 For "return (...agg...);" don't assume b-i-p implies limited.
2948 Needs_Finalization does not imply secondary stack.
2949 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2950 Component_OK_For_Backend -- more readability with fewer double
2951 negatives.
2952 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2953 b-i-p implies >= Ada 2005.
2954 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2955 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2956 object of an extended return statement in place.
2957 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2958 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2959 b-i-p implies >= Ada 2005.
2960 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2961 b-i-p implies >= Ada 2005.
2962 * exp_ch7.adb: Comment fix.
2963 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2964 assumptions that b-i-p implies >= Ada 2005.
2965 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2966 b-i-p implies >= Ada 2005.
2967 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2968 (Expr), in case Pool_Id is not set.
2969 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2970 qualified or converted.
2971 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2972 (Param)) = N_Identifier; that's all it could be.
2973 * sinfo.ads: Comment fixes.
2974 * snames.ads-tmpl: Comment fixes.
2975 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2976
2977 2017-09-29 Justin Squirek <squirek@adacore.com>
2978
2979 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2980 all cases related to marking entity identifiers.
2981
2982 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2983
2984 * adaint.c (win32_wait): Properly handle error and take into account
2985 the WIN32 limitation on the number of simultaneous wait objects.
2986
2987 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2988
2989 * cal.c: Minor proofreading.
2990
2991 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2992
2993 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2994 * gnat_ugn.texi: Regenerate.
2995
2996 2017-09-29 Bob Duff <duff@adacore.com>
2997
2998 * lib-xref.ads: Comment fix.
2999
3000 2017-09-29 Bob Duff <duff@adacore.com>
3001
3002 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
3003 Discriminants can't need finalization.
3004
3005 2017-09-29 Ed Schonberg <schonberg@adacore.com>
3006
3007 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
3008 for types in expression if the function is within a generic unit.
3009 * sem_res.adb (Resolve): In a generic context do not freeze an
3010 expression, unless it is an entity. This exception is solely for the
3011 purpose of detecting illegal uses of deferred constants in generic
3012 units.
3013 * sem_res.adb: Minor reformatting.
3014
3015 2017-09-29 Justin Squirek <squirek@adacore.com>
3016
3017 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
3018 redundant warnings.
3019
3020 2017-09-29 Yannick Moy <moy@adacore.com>
3021
3022 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
3023
3024 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3025
3026 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
3027 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
3028 Document the effect of pragma Optimize_Alignment (Space) on non-packed
3029 record types.
3030 * gnat_rm.texi: Regenerate.
3031
3032 2017-09-25 Justin Squirek <squirek@adacore.com>
3033
3034 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
3035 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
3036 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
3037 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
3038 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
3039 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
3040 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
3041 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
3042 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
3043 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
3044 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
3045 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
3046 Removal of ineffective use-clauses.
3047 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
3048 constant folded barriers.
3049 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
3050 Subtype_Marks and Names list in use-clause nodes to their new singular
3051 counterparts (e.g. Subtype_Mark, Name).
3052 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
3053 Prev_Ids and More_Ids in use-clause nodes.
3054 (P_Use_Clause): Modify to take a list as a parameter.
3055 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
3056 subtype_marks within an aggregate use-clauses into individual clauses.
3057 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
3058 P_Use_Clause to match its new behavior.
3059 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
3060 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
3061 errors.
3062 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
3063 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
3064 the declarative region.
3065 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
3066 after analysis (Analyze_Package_Specification): Update use clause chain
3067 when there is no body.
3068 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
3069 parameter to determine weither the installation of scopes should also
3070 propagate on the use-clause "chain".
3071 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
3072 what constitutes a valid "use" of a clause.
3073 (Update_Use_Clause_Chain): Created to aggregate common machinary used
3074 to clean up use-clause chains (and warn on ineffectiveness) at the end
3075 of declaritive regions.
3076 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
3077 package name from a use-package clause.
3078 (Analyze_Package_Name_List): Created to perform analysis on a list of
3079 package names (similar to Analyze_Package_Name).
3080 (Find_Most_Prev): Created to traverse to the beginning of a given
3081 use-clause chain.
3082 (Most_Decendant_Use_Clause): Create to identify which clause from a
3083 given set is highest in scope (not always the most prev).
3084 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
3085 handle the new chaining algorithm, also many changes related to
3086 redundant clauses. A new parameter has also been added to force
3087 installation to handle certain cases.
3088 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
3089 Analyze_Task_Body): Mark use clauses on relevant entities.
3090 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
3091 Install_Parents): Add parameter to determine weither the installation
3092 of scopes should also propagate on the use-clause "chain".
3093 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
3094 Install_Context to avoid redundant chaining of use-clauses.
3095 * sem_ch13.adb: Minor reformatting.
3096 * sem_res.adb (Resolve): Mark use clauses on operators.
3097 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
3098 entities.
3099 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
3100 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
3101 represent any given clause's usage/reference/necessity.
3102 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
3103 nodes to allow loose chaining of redundant clauses.
3104 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
3105 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
3106 reorganization in node fields.
3107 * types.ads (Source_File_Index): Adjust index bounds.
3108 (No_Access_To_Source_File): New constant.
3109
3110 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3111
3112 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
3113 the expression to be used in the generated attribute specification
3114 (rather than relocating it) to avoid resolving a potentially malformed
3115 tree when the expression is resolved through an ASIS-specific call to
3116 Resolve_Aspect_Expressions. This manifests itself as a crash on a
3117 function with parameter associations.
3118
3119 2017-09-25 Yannick Moy <moy@adacore.com>
3120
3121 * exp_spark.adb (Expand_SPARK_Indexed_Component,
3122 Expand_SPARK_Selected_Component): New procedures to insert explicit
3123 dereference if required.
3124 (Expand_SPARK): Call the new procedures.
3125
3126 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
3127
3128 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
3129 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
3130 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
3131 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
3132 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
3133
3134 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
3135
3136 * adaint.c (win32_wait): Properly handle error and take into account
3137 the WIN32 limitation on the number of simultaneous wait objects.
3138
3139 2017-09-25 Yannick Moy <moy@adacore.com>
3140
3141 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
3142 invariant procedure in GNATprove mode.
3143 * sem_ch5.adb (Analyze_Assignment): Likewise.
3144
3145 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3146
3147 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
3148 "back-end" in comments.
3149
3150 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3151
3152 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
3153 call that appears in a classwide precondition and that mentions an
3154 access formal of the subprogram, must use the accessibility level of
3155 the actual in the call. This is one case in which a reference to a
3156 formal parameter appears outside of the body of the subprogram.
3157
3158 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3159
3160 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
3161 for GNATprove.
3162 (Resolve_Entry): Clean up predicate
3163
3164 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3165
3166 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
3167 than Program_Error because U_E is more in line with respect to the
3168 intended behavior.
3169
3170 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3171
3172 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
3173 Storage_Size does not freeze, and thus can include references to
3174 deferred constants.
3175
3176 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3177
3178 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
3179 reference when it appears within a pragma of no significance to SPARK.
3180 (In_Insignificant_Pragma): New routine.
3181 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
3182
3183 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3184
3185 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
3186 actual is a renaming, indicate that it is the renamed package that must
3187 be frozen before the instantiation.
3188
3189 2017-09-25 Yannick Moy <moy@adacore.com>
3190
3191 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
3192 of dimensionality system in GNAT UG.
3193 * gnat_ugn.texi: Regenerate.
3194
3195 2017-09-25 Yannick Moy <moy@adacore.com>
3196
3197 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
3198 GNATprove_Mode when switch -gnatdF used.
3199
3200 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3201
3202 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
3203 the backend.
3204
3205 2017-09-25 Javier Miranda <miranda@adacore.com>
3206
3207 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
3208 expansion of user-defined enumeration types when the generation of
3209 names for enumeration literals is suppressed.
3210
3211 2017-09-25 Gary Dismukes <dismukes@adacore.com>
3212
3213 * libgnarl/s-taprop__linux.adb: Minor reformatting.
3214
3215 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3216
3217 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
3218 that appear as selector names of parameter associations, as these are
3219 never resolved by visibility.
3220
3221 2017-09-25 Justin Squirek <squirek@adacore.com>
3222
3223 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
3224
3225 2017-09-25 Doug Rupp <rupp@adacore.com>
3226
3227 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
3228
3229 2017-09-25 Javier Miranda <miranda@adacore.com>
3230
3231 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
3232 (Expand_User_Defined_Enumeration_Image): New subprogram.
3233 (Expand_Image_Attribute): Enable speed-optimized expansion of
3234 user-defined enumeration types when we are compiling with optimizations
3235 enabled.
3236
3237 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3238
3239 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
3240 routine is already provided by Einfo.
3241 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
3242 Sem_Util, which had better comments and avoided double calls to
3243 Abstract_State.
3244
3245 2017-09-25 Bob Duff <duff@adacore.com>
3246
3247 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
3248
3249 2017-09-25 Doug Rupp <rupp@adacore.com>
3250
3251 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
3252 (Compute_Base_Monotonic_Clock): New function.
3253 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
3254 (Timed_Delay): Likewise.
3255 (Monotonic_Clock): Likewise.
3256 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
3257
3258 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3259
3260 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
3261 previous change.
3262
3263 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3264
3265 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
3266 Minor reformatting.
3267
3268 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3269
3270 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
3271
3272 2017-09-18 Bob Duff <duff@adacore.com>
3273
3274 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
3275 reference types in the access-to-access case.
3276
3277 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3278
3279 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
3280 of the "aliased" keyword on the prefix from here to...
3281 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
3282 to Check_No_Implicit_Aliasing.
3283 * sinfo.ads (Non_Aliased_Prefix): Delete.
3284 (Set_Non_Aliased_Prefix): Likewise.
3285 * sinfo.adb (Non_Aliased_Prefix): Delete.
3286 (Set_Non_Aliased_Prefix): Likewise.
3287
3288 2017-09-18 Bob Duff <duff@adacore.com>
3289
3290 * exp_ch5.adb (Build_Formal_Container_Iteration,
3291 Expand_Formal_Container_Element_Loop): Convert the container to the
3292 root type before passing it to the iteration operations, so it will be
3293 of the right type.
3294
3295 2017-09-18 Bob Duff <duff@adacore.com>
3296
3297 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3298
3299 2017-09-18 Bob Duff <duff@adacore.com>
3300
3301 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3302 and it's a bit-packed array, pass False to the Consider_IS parameter of
3303 Needs_Simple_Initialization.
3304
3305 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3306
3307 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3308 the preexisting body.
3309 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3310 (Process_Inline): Verify the placement of pragma Inline_Always. The
3311 pragma must now appear on the initial declaration of the related
3312 subprogram.
3313
3314 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3315
3316 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3317 declarative list in a subprogram body, analyze aspext specifications to
3318 provide basic semantic information, because otherwise the aspect
3319 specifications might only be snalyzed during expansion, when related
3320 subprograms are generated.
3321
3322 2017-09-18 Bob Duff <duff@adacore.com>
3323
3324 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3325 validity checks have rewritten the tree.
3326
3327 2017-09-18 Bob Duff <duff@adacore.com>
3328
3329 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3330
3331 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3332
3333 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3334 qualified exxpression for an aggregate in a generic unit, verify that
3335 the scope of the type is itself visible and not hidden, so that the
3336 qualified expression is correctly resolved in any instance.
3337
3338 2017-09-18 Bob Duff <duff@adacore.com>
3339
3340 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3341 mark refers to the current instance. Set the type to Any_Type in that
3342 case, to avoid later crashes.
3343
3344 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3345
3346 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3347 subsidiary of Build_Assignment, used to handle the initialization code
3348 for a mutable record component whose default value is an aggregate that
3349 sets the values of the discriminants of the components.
3350
3351 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3352
3353 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3354 the entity as being volatile for an overlay that toggles the scalar
3355 storage order.
3356
3357 2017-09-18 Fedor Rybin <frybin@adacore.com>
3358
3359 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3360 options -U main and --harness-only are not compatible.
3361
3362 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3363
3364 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3365
3366 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3367
3368 * einfo.ads (Is_Imported): Update comment, as this
3369 routine also applies to constants.
3370
3371 2017-09-18 Yannick Moy <moy@adacore.com>
3372
3373 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3374 holding state.
3375
3376 2017-09-18 Justin Squirek <squirek@adacore.com>
3377
3378 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3379 constant indication for Pragma_Linker_Section.
3380
3381 2017-09-18 Bob Duff <duff@adacore.com>
3382
3383 Alternate fix for PR ada/71358
3384 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3385 Instead, make a local copy of Config, and if it's null, allocate an
3386 empty Command_Line_Configuration_Record, so we won't crash on null
3387 pointer dereference.
3388
3389 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3390
3391 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3392 * libgnarl/s-interr__hwint.adb: Likewise.
3393 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3394 * libgnarl/s-osinte__rtems.adb: Likewise.
3395 * libgnarl/s-osinte__rtems.ads: Likewise.
3396
3397 2017-09-13 Nicolas Roche <roche@adacore.com>
3398
3399 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3400 file and try to guess the locations of dependencies.
3401
3402 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3403
3404 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3405 the suppression status of Alignment_Check on the current scope.
3406 (Alignment_Checks_Suppressed): New function to use the saved instead of
3407 the current suppression status of Alignment_Check.
3408 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3409 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3410 the table, call Register_Address_Clause_Check.
3411 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3412 recorded address clause instead of its entity.
3413
3414 2017-09-13 Jerome Guitton <guitton@adacore.com>
3415
3416 * libgnarl/s-tpopsp__vxworks-tls.adb,
3417 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3418 (Self): Register thread if task id is null.
3419
3420 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3421
3422 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3423
3424 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3425
3426 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3427 from an entity to only scope index, as a mapping from an entity to the
3428 same entity was useless.
3429 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3430 to E.
3431 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3432 to E.
3433 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3434 variable, just use return statements.
3435
3436 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3437
3438 * libgnarl/s-vxwext__kernel-smp.adb,
3439 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3440 New file.
3441
3442 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3443
3444 * einfo.adb: Flag42 is now Is_Controlled_Active.
3445 (Is_Controlled): This attribute is now synthesized.
3446 (Is_Controlled_Active): This attribute is now an explicit flag rather
3447 than a synthesized attribute. (Set_Is_Controlled): Removed.
3448 (Set_Is_Controlled_Active): New routine.
3449 (Write_Entity_Flags): Update the output for Flag42.
3450 * einfo.ads: Update the documentation of the following attributes:
3451 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3452 and Is_Controlled_Active have swapped their functionality.
3453 (Is_Controlled): Renamed to Is_Controlled_Active.
3454 (Is_Controlled_Active): Renamed to Is_Controlled.
3455 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3456 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3457 Is_Controlled.
3458 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3459 (Needs_Finalization): Code clean up. Remove the tests for
3460 Disable_Controlled because a) they were incorrect as they would reject
3461 a type which is sublect to the aspect, but may contain controlled
3462 components, and b) they are no longer necessary.
3463 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3464 * freeze.adb (Freeze_Array_Type): Restore the original use of
3465 Is_Controlled.
3466 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3467 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3468 Is_Controlled.
3469 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3470 (Build_Derived_Private_Type): Restore the original use of
3471 Is_Controlled.
3472 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3473 type derived from Ada.Finalization.[Limited_]Controlled.
3474 (Build_Derived_Type): Restore the original use of Is_Controlled.
3475 (Record_Type_Definition): Restore the original use of Is_Controlled.
3476 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3477 Is_Controlled.
3478 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3479 (Analyze_Aspect_Specifications): Use routine
3480 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3481
3482 2017-09-13 Vincent Celier <celier@adacore.com>
3483
3484 * clean.adb (Gnatclean): Fix error when looking for target
3485 of <target>-gnatclean
3486
3487 2017-09-13 Javier Miranda <miranda@adacore.com>
3488 Ed Schonberg <schonberg@adacore.com>
3489
3490 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3491 expanded name that designates the current instance of a child unit in
3492 its own body and appears as the prefix of a reference to an entity
3493 local to the child unit.
3494
3495 2017-09-12 Bob Duff <duff@adacore.com>
3496
3497 * sem_warn.adb: Minor comment.
3498
3499 2017-09-12 Bob Duff <duff@adacore.com>
3500
3501 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3502 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3503 be Default_Initialized_Item, and apply pragma Unmodified to it,
3504 to suppress the warning.
3505
3506 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3507
3508 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3509 for access types.
3510
3511 2017-09-12 Yannick Moy <moy@adacore.com>
3512
3513 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3514 together with Global when ignoring one in CodePeer mode.
3515
3516 2017-09-12 Javier Miranda <miranda@adacore.com>
3517
3518 * sem_ch3.adb (Analyze_Declarations): In nested
3519 package declarations that have a private part enable missing check
3520 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3521 resolved at the end of the immediately enclosing declaration list.
3522
3523 2017-09-12 Bob Duff <duff@adacore.com>
3524
3525 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3526 Empty.
3527
3528 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3529
3530 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3531 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3532 dF flag.
3533 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3534 in preparation for the evolution of the SPARK language that
3535 includes a pointer analysis for checking non-aliasing of access
3536 types. The Check_Safe_Pointers function is the entry point, and
3537 will traverse the AST and raise compile-time errors everytime
3538 it detects non-begign aliasing. Detailed comments are present
3539 in the sem_spark.ads file.
3540 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3541 functions to iterate over the list of globals of a subprogram.
3542 * libgnat/system.ads: Add restriction No_Finalization.
3543 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3544 dependency on g-dynhta.adb.
3545
3546 2017-09-12 Bob Duff <duff@adacore.com>
3547
3548 * sem_ch6.adb (Analyze_Expression_Function): Call
3549 Check_Dynamically_Tagged_Expression.
3550 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3551 "and then Is_Tagged_Type (Typ)" because there is an earlier
3552 "Assert (Is_Tagged_Type (Typ))".
3553
3554 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3555
3556 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3557
3558 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3559
3560 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3561 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3562 for no longer supported platforms.
3563 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3564 description of the semantics for dimensionality analysis.
3565 * gnat_ugn.texi: Regenerated.
3566
3567 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3568
3569 * freeze.adb (Has_Incomplete_Compoent): Delete.
3570 (Freeze_Profile):
3571 Do not inhibit the freezing of the profile of an expression
3572 function here.
3573 (Freeze_Subprogram): Do not re-create extra formals.
3574 * sem_ch6.adb (Analyze_Expression_Function): Always
3575 pre-analyze the expression if the function is not a completion.
3576 (Analyze_Subprogram_Body_Helper): For the body generated
3577 from an expression function that is not a completion, do
3578 not freeze the profile and temporary mask the types declared
3579 outside the expression that are not yet frozen.
3580 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3581 during the pre-analysis of an expression function.
3582
3583 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3584
3585 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3586 (gigi): Likewise.
3587
3588 2017-09-11 Yannick Moy <moy@adacore.com>
3589
3590 * lib-xref-spark_specific.adb: Minor rewrite.
3591
3592 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3593
3594 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3595 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3596 renaming into account.
3597
3598 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3599
3600 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3601 * gcc-interface/Makefile.in: Take this renaming into account.
3602
3603 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3604
3605 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3606 longer used.
3607
3608 2017-09-11 Yannick Moy <moy@adacore.com>
3609
3610 * sem_util.adb (Check_Result_And_Post_State):
3611 Do not issue a warning about missing reference to an outcome if
3612 the subprogram is ghost and has no outputs.
3613 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3614 reformatting.
3615
3616 2017-09-11 Yannick Moy <moy@adacore.com>
3617
3618 * gnat1drv.adb (Adjust_Global_Switches): Set
3619 Check_Validity_Of_Parameters to False in GNATprove mode.
3620 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3621 set option.
3622
3623 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3624
3625 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3626 generate debug info for inner record types if -fgnat-encodings=minimal.
3627 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3628 type as the debug type.
3629
3630 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3631
3632 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3633 packed record types if pragma Optimize_Alignment (Space) is enabled.
3634
3635 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3636
3637 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3638 limits for expression functions.
3639 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3640
3641 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3642
3643 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3644 layout of the record from the parent type only if both are or are not
3645 unchecked unions.
3646 (is_stored_discriminant): Return false for an unchecked union.
3647
3648 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3649
3650 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3651 return NULL_EXPR.
3652
3653 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3654
3655 * gcc-interface/decl.c (promote_object_alignment): New function taken
3656 from...
3657 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3658 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3659 create a padding type on success before doing the atomic check.
3660
3661 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3662
3663 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3664 promotion to static memory earlier in the processing.
3665
3666 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3667
3668 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3669 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3670 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3671 Consider all kinds of entities.
3672
3673 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3674
3675 * gcc-interface/utils.c (convert): When converting to a padding type,
3676 reuse an existing CONSTRUCTOR if it has got the right size.
3677
3678 2017-09-08 Nicolas Roche <roche@adacore.com>
3679
3680 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3681 source in libgnat/
3682 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3683 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3684 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3685 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3686 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3687 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3688 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3689 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3690 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3691 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3692 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3693 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3694 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3695 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3696 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3697 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3698 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3699 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3700 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3701 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3702 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3703 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3704 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3705 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3706 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3707 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3708 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3709 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3710 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3711 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3712 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3713 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3714 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3715 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3716 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3717 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3718 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3719 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3720 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3721 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3722 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3723 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3724 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3725 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3726 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3727 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3728 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3729 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3730 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3731 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3732 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3733 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3734 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3735 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3736 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3737 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3738 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3739 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3740 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3741 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3742 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3743 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3744 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3745 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3746 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3747 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3748 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3749 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3750 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3751 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3752 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3753 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3754 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3755 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3756 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3757 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3758 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3759 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3760 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3761 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3762 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3763 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3764 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3765 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3766 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3767 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3768 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3769 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3770 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3771 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3772 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3773 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3774 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3775 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3776 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3777 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3778 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3779 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3780 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3781 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3782 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3783 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3784 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3785 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3786 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3787 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3788 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3789 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3790 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3791 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3792 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3793 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3794 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3795 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3796 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3797 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3798 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3799 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3800 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3801 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3802 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3803 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3804 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3805 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3806 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3807 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3808 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3809 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3810 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3811 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3812 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3813 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3814 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3815 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3816 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3817 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3818 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3819 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3820 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3821 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3822 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3823 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3824 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3825 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3826 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3827 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3828 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3829 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3830 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3831 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3832 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3833 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3834 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3835 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3836 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3837 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3838 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3839 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3840 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3841 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3842 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3843 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3844 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3845 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3846 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3847 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3848 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3849 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3850 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3851 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3852 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3853 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3854 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3855 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3856 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3857 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3858 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3859 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3860 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3861 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3862 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3863 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3864 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3865 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3866 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3867 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3868 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3869 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3870 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3871 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3872 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3873 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3874 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3875 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3876 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3877 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3878 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3879 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3880 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3881 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3882 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3883 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3884 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3885 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3886 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3887 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3888 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3889 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3890 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3891 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3892 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3893 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3894 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3895 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3896 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3897 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3898 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3899 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3900 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3901 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3902 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3903 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3904 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3905 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3906 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3907 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3908 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3909 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3910 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3911 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3912 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3913 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3914 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3915 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3916 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3917 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3918 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3919 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3920 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3921 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3922 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3923 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3924 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3925 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3926 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3927 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3928 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3929 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3930 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3931 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3932 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3933 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3934 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3935 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3936 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3937 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3938 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3939 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3940 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3941 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3942 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3943 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3944 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3945 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3946 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3947 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3948 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3949 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3950 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3951 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3952 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3953 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3954 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3955 to libgnat subdirectory.
3956
3957 2017-09-08 Yannick Moy <moy@adacore.com>
3958
3959 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3960 return the entity associated with the call.
3961 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3962 Replace the internal Get_Function_Id with the new
3963 Sem_Aux.Get_Called_Entity.
3964 (Iterate_Call_Parameters): New
3965 procedure to iterate on formals and actuals at the same time.
3966 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3967 Set SPARK_Mode from spec when set, for analysis
3968 of instance. Restore after analysis of instance.
3969 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3970 set, for analysis of body instance. Restored automatically at
3971 the end of the subprogram.
3972 * gnat1drv.adb (Adjust_Global_Switches): Set
3973 Check_Validity_Of_Parameters to False in GNATprove mode.
3974 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3975 set option.
3976
3977 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3978
3979 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3980 (New_Copy_Tree): ...there. Reset the hash tables only if they
3981 were used in the previous invocation.
3982 * s-htable.adb: Fix typo.
3983
3984 2017-09-08 Bob Duff <duff@adacore.com>
3985
3986 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3987
3988 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3989
3990 * sem_aggr.adb: minor style fix.
3991
3992 2017-09-08 Bob Duff <duff@adacore.com>
3993
3994 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3995 no current source file.
3996 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3997 Print something helpful in case N is invalid.
3998 * sprint.ads: Minor comment fix.
3999
4000 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4001
4002 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
4003 access types.
4004
4005 2017-09-08 Bob Duff <duff@adacore.com>
4006
4007 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
4008 Ada_2020, along the same lines as the other Ada version pragmas.
4009
4010 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4011
4012 * sem_ch12.adb: Minor typo fixes and reformatting.
4013
4014 2017-09-08 Yannick Moy <moy@adacore.com>
4015
4016 * sem_aggr.adb (Resolve_Record_Aggregate):
4017 Rewrite bounds of aggregate subexpressions which may depend on
4018 discriminants of the enclosing aggregate.
4019
4020 2017-09-08 Yannick Moy <moy@adacore.com>
4021
4022 * sem_ch5.adb: Prevent assertion failure on illegal code.
4023
4024 2017-09-08 Yannick Moy <moy@adacore.com>
4025
4026 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
4027 calling Renamed_Entity on an entity which cannot be a renaming.
4028
4029 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4030
4031 * exp_aggr.adb: Add with & use clause for Urealp.
4032 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
4033 elementary types instead of just discrete types.
4034 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
4035 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
4036 Be prepared for the FP zero value in the memset case. Add small
4037 guard.
4038
4039 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4040
4041 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
4042 of loop.
4043
4044 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4045
4046 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
4047 of New_Copy because the latter leaves the syntactic structure of
4048 the tree inconsistent (a child is accessible through two parents)
4049 and prevents proper replication of itypes by subsequent calls
4050 to New_Copy_Tree.
4051 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
4052 New_Copy because the latter leaves the syntactic structure of the
4053 tree inconsistent (a child is accessible through two parents)
4054 and prevents proper replication of itypes by subsequent calls
4055 to New_Copy_Tree.
4056 * sem_util.adb (In_Subtree): New routine.
4057 (New_Copy_Tree): Reimplemented.
4058 * sem_util.ads (In_Subtree): New routine.
4059 (New_Copy_Tree): Reimplemented.
4060
4061 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4062
4063 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
4064 for aspect Default_Value is a static scalar value, but it does
4065 not freeze the type. Yhis allows for subsequent representation
4066 clauses for the type.
4067
4068 2017-09-08 Javier Miranda <miranda@adacore.com>
4069
4070 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
4071 not add entries into the undefined reference table when we are
4072 compiling with errors ignored.
4073
4074 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4075
4076 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
4077 check if the instance is within an enclosing instance body. The
4078 formal package was legal in the enclosing generic, and is
4079 legal in the enclosing instantiation. This optimisation may be
4080 applicable elsewhere, and it also removes spurious errors that
4081 may arise with on-the-fly processing of instantiations that
4082 contain Inline_Always subprograms.
4083
4084 2017-09-08 Vincent Celier <celier@adacore.com>
4085
4086 * gnatcmd.adb: Disregard empty argument of GNAT driver.
4087
4088 2017-09-08 Justin Squirek <squirek@adacore.com>
4089
4090 * checks.adb (Insert_Valid_Check): Manually decorate
4091 the generated temporary for range valdity checks.
4092
4093 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4094
4095 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
4096
4097 2017-09-08 Justin Squirek <squirek@adacore.com>
4098
4099 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
4100 case to handle underscore flags.
4101 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
4102 new procedure to handle underscores.
4103
4104 2017-09-08 Javier Miranda <miranda@adacore.com>
4105
4106 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
4107 divisions with fixed point results to avoid generating twice
4108 the runtime check on divide by zero.
4109 * checks.adb (Apply_Divide_Checks): Ensure that operands are
4110 not evaluated twice (once for their runtime checks and once for
4111 their regular computation).
4112
4113 2017-09-08 Yannick Moy <moy@adacore.com>
4114
4115 * sem_prag.adb (Analyze_Part_Of): Add missing
4116 return statements after issuing errors. Add detection of
4117 out-of-order item and single concurrent type.
4118
4119 2017-09-08 Nicolas Roche <roche@adacore.com>
4120
4121 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
4122 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
4123 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
4124 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
4125 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
4126 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
4127 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
4128 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
4129 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
4130 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
4131 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
4132 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
4133 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
4134 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
4135 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
4136 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
4137 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
4138 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
4139 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
4140 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
4141 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
4142 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
4143 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
4144 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
4145 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
4146 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
4147 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
4148 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
4149 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
4150 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
4151 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
4152 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
4153 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
4154 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
4155 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
4156 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
4157 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
4158 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
4159 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
4160 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
4161 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
4162 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
4163 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
4164 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
4165 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
4166 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
4167 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
4168 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
4169 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
4170 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
4171 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
4172 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
4173 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
4174 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
4175
4176 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4177
4178 * doc/share/conf.py, doc/share/latex_elements.py,
4179 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
4180 highlighting.
4181
4182 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4183
4184 * gnat_rm.texi, gnat_ugn.texi,
4185 doc/gnat_ugn/the_gnat_compilation_model.rst,
4186 doc/gnat_ugn/getting_started_with_gnat.rst,
4187 doc/gnat_ugn/inline_assembler.rst,
4188 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4189 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
4190 doc/gnat_ugn/about_this_guide.rst,
4191 doc/gnat_ugn/platform_specific_information.rst,
4192 doc/gnat_ugn/example_of_binder_output.rst,
4193 doc/gnat_ugn/gnat_and_program_execution.rst,
4194 doc/gnat_ugn/gnat_utility_programs.rst,
4195 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4196 doc/gnat_rm/interfacing_to_other_languages.rst,
4197 doc/gnat_rm/implementation_defined_aspects.rst,
4198 doc/gnat_rm/intrinsic_subprograms.rst,
4199 doc/gnat_rm/implementation_defined_characteristics.rst,
4200 doc/gnat_rm/implementation_advice.rst,
4201 doc/gnat_rm/implementation_defined_attributes.rst,
4202 doc/gnat_rm/compatibility_and_porting_guide.rst,
4203 doc/gnat_rm/standard_library_routines.rst,
4204 doc/gnat_rm/the_gnat_library.rst,
4205 doc/gnat_rm/implementation_defined_pragmas.rst,
4206 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4207 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4208 doc/gnat_rm/obsolescent_features.rst,
4209 doc/gnat_rm/about_this_guide.rst,
4210 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4211 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4212 doc/gnat_ugn.rst,
4213 doc/gnat_rm.rst: Update documentation.
4214
4215 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4216
4217 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
4218 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
4219 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
4220
4221 2017-09-08 Bob Duff <duff@adacore.com>
4222
4223 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
4224 New routine to read the Tag robustly.
4225 * exp_attr.adb (Input): Change the expansion of 'Input,
4226 in the class-wide case, to call String_Input_Tag instead of
4227 String_Input_Blk_IO.
4228
4229 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4230
4231 * s-rident.ads (Restriction_Id): reorder enum
4232 literals, so that Pure_Barriers is no longer in range of the
4233 Cunit_Boolean_Restrictions subtype.
4234
4235 2017-09-08 Nicolas Roche <roche@adacore.com>
4236
4237 * a-taster.ads, a-taster.adb: Move to libgnarl
4238 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
4239 Add support for files in libgnarl.
4240
4241 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4242
4243 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
4244 accessibility check to an interface conversion, whose purpose
4245 is to perform a pointer adjustment in a dispatching call.
4246 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
4247 when the actual is a construct that involves a dereference of an
4248 expression that includes a formal of the enclosing subprogram,
4249 In such cases, the accessibility level of the actual is that of
4250 the corresponding formal, which is passed in as an additional
4251 actual in the outer call.
4252
4253 2017-09-08 Bob Duff <duff@adacore.com>
4254
4255 * exp_intr.adb (Add_Source_Info): Do not decode
4256 file names; they were not encoded in the first place.
4257
4258 2017-09-08 Bob Duff <duff@adacore.com>
4259
4260 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
4261 exceptions instead of crashes. Check for absurdly long strings
4262 and empty strings. Empty strings cause trouble because they can
4263 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
4264 be empty, which causes an array index out of bounds.
4265 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
4266 instead of crashes.
4267
4268 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4269
4270 * sem_util.adb (Is_CCT_Instance): allow use in
4271 the context of protected types.
4272
4273 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4274
4275 * a-tigeli.adb: minor remove extra whitespace.
4276
4277 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4278
4279 * par-ch4.adb: Reformatting of an error message.
4280
4281 2017-09-08 Javier Miranda <miranda@adacore.com>
4282
4283 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4284 identifiers to ensure their correct decoration of names on
4285 aspect expressions.
4286
4287 2017-09-08 Yannick Moy <moy@adacore.com>
4288
4289 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4290 not skip a loop coming from source which is rewritten into a loop.
4291
4292 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4293
4294 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4295 wrapper has convention Ada, to prevent spurious warnings on
4296 unconstrained array parameters.
4297
4298 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4299
4300 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4301 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4302
4303 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4304
4305 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4306
4307 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4308
4309 * exp_intr.adb (Append_Entity_Name): Move to ...
4310 * sem_util.ads, sem_util.adb: ... here to share it.
4311 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4312 subprogram/entity.
4313 * errutil.adb (Error_Msg): Fill new field Node.
4314 * erroutc.ads (Subprogram_Name_Ptr): New.
4315 (Error_Msg_Object): New field Node.
4316 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4317 * errout.adb (Error_Msg): New variant with node id parameter.
4318 Fill new parameter Node when emitting messages. Revert previous
4319 changes for Include_Subprogram_In_Messages.
4320 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4321 generating warning message.
4322
4323 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4324
4325 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4326 under -gnat2020 flag, given that it is a future feature of
4327 the language.
4328 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4329 defining identifier as referenced to prevent spurious warnings:
4330 corresponding loop is expanded into one or more loops whose
4331 variable has the same name, and the expression uses those names
4332 and not the original one.
4333
4334 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4335
4336 * sem_elab.adb (Check_A_Call): Do not consider
4337 references to internal variables for SPARK semantics.
4338
4339 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4340
4341 * inline.adb (In_Package_Spec): refine type of
4342 the parameter from Node_Id to Entity_Id.
4343
4344 2017-09-08 Justin Squirek <squirek@adacore.com>
4345
4346 * exp_ch5.adb (Expand_Formal_Container_Loop):
4347 Reset the scope of the loop parameter after it is reanalyzed.
4348
4349 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4350
4351 * sem_util.ads (Set_Rep_Info): New inline procedure.
4352 * sem_util.adb (Set_Rep_Info): Implement it.
4353 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4354 always copy the representation aspects onto the subtype.
4355
4356 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4357
4358 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4359 Correction of the return type from access type to option type.
4360 (Simple_HTable): Moving the Instance_Data to ads file.
4361
4362 2017-09-08 Yannick Moy <moy@adacore.com>
4363
4364 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4365
4366 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4367
4368 * opt.ads (Include_Subprogram_In_Messages): New variable.
4369 * errout.ads (Current_Subprogram_Ptr): New variable.
4370 * errout.adb (Error_Msg): Prepend current subprogram info
4371 in messages if Include_Subprogram_In_Messages is set.
4372 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4373 Current_Subprogram.
4374 * gnat1drv.adb (Adjust_Global_Switches): Set
4375 Include_Subprogram_In_Messages when -gnatdJ is set.
4376 * debug.adb: Document and reserve -gnatdJ.
4377
4378 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4379
4380 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4381 functions to iterate over simple hastables.
4382 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4383
4384 2017-09-08 Javier Miranda <miranda@adacore.com>
4385
4386 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4387 missing checks on the presence of Entity() before checking the
4388 entity attributes.
4389
4390 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4391
4392 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4393 statements, use local variable and remove unnecessary processing.
4394
4395 2017-09-08 Javier Miranda <miranda@adacore.com>
4396
4397 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4398 subprogram.
4399 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4400 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4401 subprogram.
4402 (Unqual_BIP_Iface_Function_Call): New subprogram.
4403 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4404 subprogram containing code that was previously inside
4405 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4406 required for one of the new subprograms.
4407 (Expand_Actuals):
4408 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4409 (Expand_N_Extended_Return_Statement): Extend the
4410 cases covered by an assertion on expected BIP object
4411 declarations.
4412 (Make_Build_In_Place_Call_In_Assignment):
4413 Removing unused code; found working on this ticket.
4414 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4415 that replaces the internal name of the renaming declaration
4416 into the new subprogram Replace_Renaming_Declaration_Id.
4417 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4418 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4419 New subprogram.
4420 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4421 subprogram.
4422 (Unqual_BIP_Iface_Function_Call): New subprogram.
4423 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4424 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4425 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4426 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4427 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4428 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4429 (Expand_N_Indexed_Component): Invoke the new subprogram
4430 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4431 (Expand_N_Selected_Component): Invoke the new subprogram
4432 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4433 (Expand_N_Slice): Invoke the new subprogram
4434 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4435 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4436 Invoke the new subprogram
4437 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4438
4439 2017-09-08 Javier Miranda <miranda@adacore.com>
4440
4441 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4442 access to interface types. Remove also the accessibility check.
4443
4444 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4445
4446 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4447 all the types that are referenced by the expression.
4448 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4449 a completion instead of manually freezing the type of the
4450 expression.
4451 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4452
4453 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4454
4455 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4456 New procedure, auxiliary to Expand_Pragma_Check, to handle
4457 references to the discriminants of a protected type within a
4458 precondition of a protected operation. This is needed because
4459 the original precondition has been analyzed in the context of
4460 the protected declaration, but in the body of the operation
4461 references to the discriminants have been replaved by references
4462 to the discriminants of the target object, and these references
4463 are only created when expanding the protected body.
4464
4465 2017-09-08 Yannick Moy <moy@adacore.com>
4466
4467 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4468 Loop_Variant.
4469
4470 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4471
4472 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4473 unchecked union, do not emit checks for its (non-existent)
4474 discriminants, or for variant parts that depend on them.
4475
4476 2017-09-08 Justin Squirek <squirek@adacore.com>
4477
4478 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4479 Find_Comparison_Type.Try_One_Interp): Add check for generic
4480 instances.
4481
4482 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4483
4484 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4485 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4486 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4487 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4488 remaining references to AAMP_On_Target.
4489
4490 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4491
4492 * style.adb: Fix typo.
4493
4494 2017-09-08 Javier Miranda <miranda@adacore.com>
4495
4496 * einfo.adb (Underlying_Type): Add missing support for class-wide
4497 types that come from the limited view.
4498 * exp_attr.adb (Attribute_Address): Check class-wide type
4499 interfaces using the underlying type to handle limited-withed
4500 types.
4501 (Attribute_Tag): Check class-wide type interfaces using
4502 the underlying type to handle limited-withed types.
4503
4504 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4505
4506 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4507 over a subtype of a type with a static predicate, taking into
4508 account the predicate function of the parent type and the bounds
4509 given in the loop specification.
4510 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4511 a loop specification that is a subtype indication whose type mark
4512 is a type with a static predicate, inherit predicate function,
4513 used to build case statement for rewritten loop.
4514
4515 2017-09-08 Justin Squirek <squirek@adacore.com>
4516
4517 * lib-load.adb: Modify printing of error message to exclude file
4518 line number.
4519
4520 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4521
4522 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4523 don't inline subprograms declared in both visible and private
4524 parts of a package.
4525 (In_Package_Spec): previously In_Package_Visible_Spec; now
4526 detects subprograms declared both in visible and private parts
4527 of a package spec.
4528
4529 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4530
4531 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4532 the type is an anonymous array in an object declaration, whose
4533 component type has an invariant, use the object declaration
4534 as the insertion point for the invariant procedure, given that
4535 there is no explicit type declaration for an anonymous array type.
4536
4537 2017-09-08 Bob Duff <duff@adacore.com>
4538
4539 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4540
4541 2017-09-08 Bob Duff <duff@adacore.com>
4542
4543 * a-strfix.adb (Trim): Compute Low and High only if needed.
4544
4545 2017-09-08 Justin Squirek <squirek@adacore.com>
4546
4547 * lib-load.adb (Load_Main_Source): Add error output in the case a
4548 source file is missing.
4549
4550 2017-09-08 Bob Duff <duff@adacore.com>
4551
4552 PR ada/80888
4553 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4554 Default_WCEM by default (i.e. if the encoding is not specified
4555 by the Form string).
4556
4557 2017-09-08 Bob Duff <duff@adacore.com>
4558
4559 * s-trasym.ads (Hexa_Traceback): If
4560 Suppress_Hex is True, print "..." instead of a hexadecimal
4561 address.
4562 * s-trasym.adb: Ignore No_Hex in this version.
4563 Misc cleanup.
4564
4565 2017-09-08 Bob Duff <duff@adacore.com>
4566
4567 * debug.adb: Minor reformatting.
4568
4569 2017-09-08 Bob Duff <duff@adacore.com>
4570
4571 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4572 code so it doesn't trigger an "uninit var" warning.
4573
4574 2017-09-08 Nicolas Roche <roche@adacore.com>
4575
4576 * s-hibaen.ads: Remove obsolete file.
4577
4578 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4579
4580 * a-locale.ads: Add comment explaining the state of this package.
4581
4582 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4583
4584 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4585 of packages.
4586 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4587 allow calls in the context of package spec (for pragma
4588 Initializes) and bodies (for pragma Refined_State).
4589
4590 2017-09-08 Bob Duff <duff@adacore.com>
4591
4592 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4593 new Exp.
4594
4595 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4596
4597 * debug.adb (dA): Adjust comment.
4598 * gnat1drv.adb (Gnat1drv): Likewise.
4599 * opt.ads (List_Representation_Info_Extended): New variable.
4600 * repinfo.adb (List_Record_Info): Split implementation into...
4601 (Compute_Max_Length): ...this. Recurse on records if requested.
4602 (List_Record_Layout): Likewise.
4603 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4604 statement, accept '0' and set List_Representation_Info_Extended
4605 on 'e'.
4606 * usage.adb (Usage): Document new -gnatRe variant.
4607
4608 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4609
4610 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4611 Do not save the given entity in the global variable Default_Pool
4612 if the pragma appears within a generic unit.
4613
4614 2017-09-08 Bob Duff <duff@adacore.com>
4615
4616 * errout.adb (Delete_Warning): Do not
4617 decrement Warnings_Treated_As_Errors. This is called before
4618 Warnings_Treated_As_Errors has been incremented to account for
4619 this warning. Decrementing it here can lead to negative values
4620 of Warnings_Treated_As_Errors, raising Constraint_Error in
4621 checks-on builds, and causing the compiler to return an error
4622 code in checks-off builds.
4623
4624 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4625
4626 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4627 entities of named concurrent types as Ref_Id and not of anonymous
4628 concurrent objects (because callers already know when a conversion
4629 is necessary and can easily do it); also, do not expect protected
4630 types or protected objects as Context_Id (because no flow-related
4631 SPARK pragmas are attached there); reflect these changes in a
4632 more precise comment.
4633
4634 2017-09-08 Olivier Hainque <hainque@adacore.com>
4635
4636 * g-altive.ads: Add documentation.
4637
4638 2017-09-08 Bob Duff <duff@adacore.com>
4639
4640 * sem_util.ads, debug.adb: Minor comment fix.
4641 * erroutc.ads: Comment fix.
4642
4643 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4644
4645 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4646 for compatibility of component types of formal and actual in an
4647 instantiation of a child unit, when the component type of the
4648 formal is itself a formal of an enclosing generic.
4649
4650 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4651
4652 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4653 sem_prag.adb to make it available for GNATprove; for concurrent
4654 types replace custom scope climbing with Scope_Same_Or_Within; for
4655 single concurrent objects add scope climbing (with Scope_Within),
4656 which was not there (that's the primary semantic change of this
4657 commit); also, when comparing a single concurrent object with
4658 its corresponding concurrent type rely on equality of types,
4659 not of objects (because that's simpler to code).
4660 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4661 (Analyze_Global_Item): adjust special-casing of references to the
4662 current instance of a concurrent unit in the Global contracts
4663 of task types and single tasks objects; similar for references
4664 in the protected operations and entries of protected types and
4665 single protected objects (in all these cases the current instance
4666 behaves as an implicit parameter and must not be mentioned in
4667 the Global contract).
4668
4669 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4670
4671 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4672 function calls returning a record within a subprogram call,
4673 for C generation.
4674
4675 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4676
4677 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4678 name that designates the current instance of a child unit in its
4679 own body and appears as the prefix of a reference to an entity
4680 local to the child unit.
4681 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4682 Minor reformatting.
4683
4684 2017-09-08 Yannick Moy <moy@adacore.com>
4685
4686 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4687 may be intentional.
4688
4689 2017-09-08 Tristan Gingold <gingold@adacore.com>
4690
4691 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4692 warnings on internal units in configurable run time mode.
4693
4694 2017-09-08 Bob Duff <duff@adacore.com>
4695
4696 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4697 representation items from interfaces that the derived type
4698 implements, not just from the parent type.
4699 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4700 this to return an empty list when there are no interfaces.
4701 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4702 * sem_attr.adb: Minor comment fix.
4703
4704 2017-09-08 Doug Rupp <rupp@adacore.com>
4705
4706 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4707 x86-vx7.
4708
4709 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4710
4711 * exp_ch4.adb (Expand_N_Allocator): Generate a
4712 call to Allocate_Any_Controlled when the allocation does not
4713 require any initialization.
4714
4715 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4716
4717 * sem_util.adb (Copy_Node_With_Replacement):
4718 Update the Renamed_Object field of a replicated object renaming
4719 declaration.
4720
4721 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4722
4723 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4724 conversions and components of objects. Simplified the detection
4725 of the Count attribute by identifying the corresponding run-time
4726 calls.
4727
4728 2017-09-08 Yannick Moy <moy@adacore.com>
4729
4730 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4731 sem_type.adb, sinfo.ads: Minor reformatting.
4732
4733 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4734
4735 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4736 of Freeze_Profile, used to inhibit the freezing of the profile
4737 of an expression function declared within a nested package, when
4738 some type in the profile depends on a private type declared in
4739 an enclosing package.
4740
4741 2017-09-08 Bob Duff <duff@adacore.com>
4742
4743 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4744 the subunit case. It's still OK to set it in the "missing subunits"
4745 case, because that won't cause the obsolete .ali files that cause
4746 confusion.
4747
4748 2017-09-08 Bob Duff <duff@adacore.com>
4749
4750 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4751 unclear why this didn't cause a warning.
4752 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4753 pragmas. It's unclear why this didn't cause an error.
4754
4755 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4756
4757 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4758 Reimplemented.
4759 (Expand_SPARK_Potential_Renaming): Code clean up.
4760 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4761 the item does not have a proper entity.
4762 (Analyze_Input_Item): Add a guard in case the item does not have a
4763 proper entity.
4764 (Collect_States_And_Objects): Include object renamings in the
4765 items being collected.
4766 (Resolve_State): Update the documentation of this routine.
4767 * sem_util.adb (Entity_Of): Add circuitry to handle
4768 renamings of function results.
4769 (Remove_Entity): New routine.
4770 (Remove_Overloaded_Entity): Take advantage of factorization.
4771 * sem_util.ads (Entity_Of): Update the documentation
4772 of this routine.
4773 (Remove_Entity): New routine.
4774 (Remove_Overloaded_Entity): Update the documentation of this
4775 routine.
4776
4777 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4778
4779 * repinfo.adb (List_Record_Info): During first loop,
4780 do not override the normalized position and first bit
4781 if they have already been set. Move fallback code
4782 for the packed case to the case where it belongs.
4783 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4784 Also adjust the normalized position of components.
4785 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4786
4787 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4788
4789 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4790 the placement of a primitive operation O that renames an operation
4791 R declared in an inner package, and which is thus not a primitive
4792 of the dispatching type of O. In this case O is a new primitive
4793 and does not inherit its dispatch table position from R (which
4794 has none).
4795
4796 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4797
4798 * sem_dim.adb (Analyze_Dimension_If_Expression,
4799 Analyze_Dimension_Case_Expression): new subprograms to verify
4800 the dimensional correctness of Ada2012 conditional expressions,
4801 and set properly the dimensions of the construct.
4802 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4803 call Analyze_Dimension.
4804
4805 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4806
4807 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4808 loop on an interface declared as a private extension of another
4809 synchronized interface.
4810
4811 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4812
4813 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4814 Analyze_Associations, to handle actual packages that depend on
4815 previous instances. If a package IAP that is an instantiation is
4816 used as an actual in a subsequent instantiation SI in the same
4817 scope, and IAP has a body, IAP must be frozen before SI. If
4818 the generic parent of IAP is itself declared in a previous
4819 instantiation in the same scope, that instantiation must also
4820 be frozen before SI.
4821 (Install_Body): Prevent double insertion of freeze node for
4822 instance.
4823
4824 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4825
4826 * sem_prag.adb (Resolve_State): Update the
4827 comment on documentation. Generate a reference to the state once
4828 resolution takes place.
4829
4830 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4831
4832 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4833 Linker_Section): If the aspect applies to an object declaration
4834 with explicit initialization, do not delay the freezing of the
4835 object, to prevent access-before-elaboration in the generated
4836 initialization code.
4837
4838 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4839
4840 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4841 (Integer_Value (Item)) when the size of the fixed decimal type
4842 is larger than Integer.
4843
4844 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4845
4846 PR ada/82127
4847 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4848 in order of increasing position in more cases.
4849
4850 2017-09-07 Yannick Moy <moy@adacore.com>
4851
4852 * a-exetim-mingw.ads: Add contract Global=>null
4853 on all operations that are modeled as having no read or write
4854 of global variables in SPARK.
4855
4856 2017-09-07 Raphael Amiard <amiard@adacore.com>
4857
4858 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4859 to Hmaps.Generic_Ops.
4860 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4861 cursors.
4862 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4863 cursors.
4864 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4865 position in cursors.
4866
4867 2017-09-07 Javier Miranda <miranda@adacore.com>
4868
4869 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4870 allow disabling the generation of implicit pragma Elaborate_All
4871 on task bodies.
4872
4873 2017-09-07 Javier Miranda <miranda@adacore.com>
4874
4875 * exp_disp.adb (Make_Tags): Avoid suffix counter
4876 in the external name of the elaboration flag. Required to fix
4877 the regressions introduced by the initial version of this patch.
4878
4879 2017-09-07 Bob Duff <duff@adacore.com>
4880
4881 * sem_ch6.adb (Analyze_Function_Return): Do not
4882 insert an explicit conversion to force the displacement of the
4883 "this" pointer to reference the secondary dispatch table in the
4884 case where the return statement is returning a raise expression,
4885 as in "return raise ...".
4886
4887 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4888
4889 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4890 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4891 procedure from sem_disp.adb.
4892 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4893 with Unit.
4894 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4895 return the instantiation node for subprograms. Update references
4896 to Get_Unit_Instantiation_Node.
4897 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4898 reference to Get_Unit_Instantiation_Node.
4899 * exp_dist.adb (Build_Package_Stubs): update reference to
4900 Get_Unit_Instantiation_Node.
4901 * sem_ch9.adb: minor typo in comment.
4902 * lib-xref-spark_specific.adb
4903 (Traverse_Declaration_Or_Statement): traverse into task type
4904 definition.
4905
4906 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4907
4908 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4909 to handle properly various cases of type conversions where the
4910 target type and/or the expression carry dimension information.
4911 (Dimension_System_Root); If a subtype carries dimension
4912 information, obtain the source parent type that carries the
4913 Dimension aspect.
4914
4915 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4916
4917 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4918
4919 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4920
4921 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4922 If the prefix is a reference to an object, rewrite it as an
4923 explicit dereference, as required by 3.7.2 (2) and as is done
4924 with most other attributes whose prefix is an access value.
4925
4926 2017-09-07 Bob Duff <duff@adacore.com>
4927
4928 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4929 Refined_Depends aspect.
4930 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4931 Refined_Depends pragma.
4932 * scans.ads: Fix documentation of Inside_Depends flag.
4933 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4934
4935 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4936
4937 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4938 Account for the case where the are no lists to insert, but the
4939 secondary stack still requires management.
4940 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4941 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4942 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4943 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4944 Minor reformatting.
4945
4946 2017-09-07 Vincent Celier <celier@adacore.com>
4947
4948 * clean.adb: Do not get the target parameters before calling
4949 gprclean.
4950
4951 2017-09-07 Nicolas Roche <roche@adacore.com>
4952
4953 * s-osinte-solaris-posix.ads: Removed.
4954
4955 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4956
4957 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4958 single concurrent objects.
4959
4960 2017-09-07 Javier Miranda <miranda@adacore.com>
4961
4962 * s-regexp.ads: Fix documentation of the globbing grammar.
4963
4964 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4965
4966 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4967
4968 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4969
4970 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4971 in CodePeer mode, to support more legacy code automatically.
4972
4973 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4974
4975 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4976 and thus not a controlling argument, preserve its type after
4977 rewriting because it may appear in an nested call with a classwide
4978 parameter.
4979
4980 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4981
4982 * comperr.adb (Delete_SCIL_Files): Handle case of
4983 N_Package_Instantiation.
4984
4985 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4986
4987 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4988 clause for a unit U appears in a context that includes a regular
4989 with_clause on U, rewrite the redundant private clause into a null
4990 statement, rather than removing it altogether from the context,
4991 so that ASIS tools can reconstruct the original source.
4992
4993 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4994
4995 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4996 for aspect Small can be of any real type (not only a universal
4997 real literal) as long as it is a static constant.
4998
4999 2017-09-07 Thomas Quinot <quinot@adacore.com>
5000
5001 * par_sco.adb: Minor reformatting.
5002
5003 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5004
5005 * s-parame-ae653.ads: Removed.
5006
5007 2017-09-07 Nicolas Roche <roche@adacore.com>
5008
5009 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
5010 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
5011 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
5012 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
5013 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
5014 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
5015
5016 2017-09-07 Yannick Moy <moy@adacore.com>
5017
5018 * a-ngelfu.ads Add preconditions to all functions
5019 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
5020
5021 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5022
5023 * lib-xref.adb (Generate_Reference): ignore
5024 references to entities which are Part_Of single concurrent
5025 objects.
5026
5027 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5028
5029 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
5030 comment.
5031
5032 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5033
5034 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
5035 Null_Task_Id is passed.
5036
5037 2017-09-07 Javier Miranda <miranda@adacore.com>
5038
5039 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
5040 attribute. Defined for record types and subtypes.
5041 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
5042 (Init_Tags_List) to facilitate generating separate code in the
5043 IP routine to initialize the object components and for completing
5044 the elaboration of dispatch tables.
5045 * exp_ch3.adb (Build_Init_Procedure): Improve the code
5046 generated in the IP routines by means of keeping separate
5047 the initialization of the object components from the
5048 initialization of its dispatch tables. (Init_Secondary_Tags):
5049 Adding new formal (Init_Tags_List) and adjusting calls to
5050 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
5051 adjusting also calls to Ada.Tags.Register_Interface_Offset
5052 because the type of one of its formals has been changed.
5053 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
5054 modified. Instead of receiving a pointer to an object this
5055 routine receives now a primary tag.
5056 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
5057 additional formal: the tag of the primary dispatch table.
5058 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
5059 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
5060 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
5061 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
5062 formal in calls to Init_Secondary_Tags.
5063
5064 2017-09-07 Javier Miranda <miranda@adacore.com>
5065
5066 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
5067 subprogram.
5068 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
5069 applied to generic subprograms.
5070
5071 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5072
5073 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
5074 (because it refers to the anonymous concurrent object, not its type);
5075 fix condition for emitting error message about task/protected type,
5076
5077 2017-09-07 Bob Duff <duff@adacore.com>
5078
5079 * binde.adb (Debug_Flag_Old): If both -do and -dp
5080 are specified, behave as if just -do was specified, rather than
5081 using a mixture.
5082
5083 2017-09-07 Nicolas Roche <roche@adacore.com>
5084
5085 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
5086 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
5087
5088 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5089
5090 * sem_prag.adb (Find_Role): The Global_Seen flag
5091 is now consulted not only for abstract states and variables,
5092 but for all kinds of items.
5093 (Collect_Subprogram_Inputs_Outputs): Do not process formal
5094 generic parameters, because unlike ordinary formal parameters,
5095 generic formals only act as input/ outputs if they are explicitly
5096 mentioned in a Global contract.
5097
5098 2017-09-07 Yannick Moy <moy@adacore.com>
5099
5100 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
5101 predicate procedure. Check predicate pragma/aspect with Ghost entity.
5102 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
5103 reformatting.
5104
5105 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5106
5107 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
5108 (code cleanup);
5109 * sem_ch3.adb (Build_Derived_Record_Type):i Call
5110 Copy_Dimensions_Of_Components after creating the copy of the
5111 record declaration.
5112 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
5113 derived recor type, copy the dikensions if any of each component
5114 of the parent record to the corresponding component declarations
5115 of the derived record. These expressions are used among other
5116 things as default values in aggregates with box associations.
5117 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
5118 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
5119 Minor reformatting.
5120
5121 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5122
5123 * sem_util.adb: Remove extra space after THEN.
5124
5125 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5126
5127 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
5128 also mark the renamed subprogram as referenced.
5129
5130 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5131
5132 * par-ch6.adb (P_Subprogram): Improve error message on null
5133 procedure with misplaced aspect specification, which the parser
5134 first attempts to interpret as a malformed expression function.
5135
5136 2017-09-07 Gary Dismukes <dismukes@adacore.com>
5137
5138 * sem_attr.adb (Analyze_Attribute_Old_Result):
5139 Allow attributes Result and Old in the case of an expression
5140 function.
5141
5142 2017-09-07 Justin Squirek <squirek@adacore.com>
5143
5144 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
5145 Volatile to subcomponents.
5146
5147 2017-09-07 Bob Duff <duff@adacore.com>
5148
5149 * exp_ch7.adb (Find_Last_Init): Check for the
5150 case where a build-in-place function call has been replaced by a
5151 'Reference attribute reference.
5152
5153 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5154
5155 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
5156 nodes.
5157
5158 2017-09-07 Bob Duff <duff@adacore.com>
5159
5160 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
5161 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
5162 secondary stack for all functions that return limited tagged
5163 types -- just do it for dispatching calls. Misc cleanup.
5164 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
5165 remove qualifications and type conversions. Fix various bugs
5166 where only a single level of qualification or conversion was
5167 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
5168 instead of "X".
5169 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
5170 cleanup.
5171
5172 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5173
5174 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
5175 do not create actual subtypes that may generate further predicate
5176 functions.
5177 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
5178 of body is a predicate function as well.
5179 (Resolve_Aspect_Expressions, Resolve_Name): For a component
5180 association, only the expression needs resolution, not the name.
5181 (Resolve_Aspect_Expressions, case Predicates): Construct and
5182 analyze the predicate function declaration in the scope of the
5183 type, before making the type and its discriminants visible.
5184
5185 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5186
5187 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
5188 only if the record type itself comes from source.
5189
5190 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5191
5192 * sem_ch5.adb: Minor reformatting and a typo fix
5193
5194 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5195
5196 * sinput-l.ads: minor remove extra period at the end of comment
5197
5198 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5199
5200 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
5201 E_Discriminant.
5202 (Find_Role): remove support for E_Discriminant.
5203
5204 2017-09-06 Javier Miranda <miranda@adacore.com>
5205
5206 * exp_ch6.adb (Expand_Simple_Function_Return):
5207 Add missing implicit type conversion to force displacement of the
5208 "this" pointer.
5209
5210 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5211
5212 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
5213
5214 2017-09-06 Yannick Moy <moy@adacore.com>
5215
5216 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
5217 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
5218
5219 2017-09-06 Bob Duff <duff@adacore.com>
5220
5221 * sem_ch8.adb: Change Assert to be consistent with
5222 other similar ones.
5223
5224 2017-09-06 Bob Duff <duff@adacore.com>
5225
5226 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
5227 requested. Previously, the -do switch meant "run Elab_New and
5228 Elab_Old and use the order chosen by Elab_Old, possibly with
5229 debugging printouts comparing the two orders." Now it means
5230 "do not run Elab_New." This is of use if there are bugs that
5231 cause Elab_New to crash.
5232 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
5233 type conversions.
5234 * ali.ads (Elab_Position): Change type to Nat, to avoid various
5235 type conversions.
5236
5237 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5238
5239 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
5240 reference to SPARK RM.
5241
5242 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5243
5244 * layout.adb: Use SSU short hand consistently throughout the file.
5245
5246 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5247
5248 * freeze.adb (Freeze_Record_Type)
5249 <Sized_Component_Total_Round_RM_Size>: New local variable to
5250 accumulate the rounded RM_Size of components. Update it for
5251 every component whose RM_Size is statically known. Add missing
5252 guard to check that bit packing is really required before issuing
5253 the error about packing. Swap condition for clarity's sake.
5254 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
5255
5256 2017-09-06 Fedor Rybin <frybin@adacore.com>
5257
5258 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
5259 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
5260 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5261 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
5262 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
5263 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
5264 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
5265 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
5266 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
5267 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
5268 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
5269 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
5270 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
5271 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
5272 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
5273 project manager sources.
5274
5275 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5276
5277 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
5278 entity of a mutable type and the right-hand side is a conditional
5279 expression, resolve the alternatives of the conditional using
5280 the base type of the target entity, because the alternatives
5281 may have distinct subtypes. This is particularly relevant if
5282 the alternatives are aggregates.
5283
5284 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5285
5286 * checks.adb (Apply_Predicate_Check): If the expression is an
5287 aggregate that is the RHS of an assignment, apply the check to
5288 the LHS after the assignment, rather than to the aggregate. This
5289 is more efficient than creating a temporary for the aggregate,
5290 and prevents back-end crashes when the aggregate includes a
5291 dynamic "others' association.
5292
5293 2017-09-06 Yannick Moy <moy@adacore.com>
5294
5295 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5296 Set variable to ignore SPARK_Mode in instance before the analysis
5297 of the generated package declaration.
5298
5299 2017-09-06 Yannick Moy <moy@adacore.com>
5300
5301 * sem_res.adb (Resolve_Call): Do not issue a
5302 message for calls inside expression function, unless body was
5303 seen and is candidate for inlining.
5304
5305 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5306
5307 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5308 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5309 body. do not freeze the formals of the generic unit.
5310
5311 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5312
5313 * errout.adb (Error_Msg): Separate the
5314 treatment for warning vs. style messages in inlinings and
5315 instantiations. Prevents blowups on calls to Warn_Insertion for
5316 style messages, which should not be called in that case because
5317 Warning_Msg_Char is not set.
5318
5319 2017-09-06 Justin Squirek <squirek@adacore.com>
5320
5321 * sem_prag.adb (Check_VFA_Conflicts): Created
5322 to group all Volatile_Full_Access checks relating to other
5323 representation pragmas (Mark_Component_Or_Object): Created
5324 to centeralize the flagging of attributes for the record type
5325 component case, a pragma applied individually to a component, and
5326 the object case.
5327 (Process_Atomic_Independent_Shared_Volatile):
5328 Add propagation of certain pragmas to record components and move
5329 evaluation of VFA checks
5330
5331 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5332
5333 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5334 Do not warn on conditions that are not obeyed for Inline_Always
5335 subprograms, when assertions are not enabled.
5336
5337 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5338
5339 * sem_util.adb (Unique_Entity): For abstract states return their
5340 non-limited view.
5341
5342 2017-09-06 Bob Duff <duff@adacore.com>
5343
5344 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5345 that is a proper body corresponding to a stub, we defer the
5346 adjustment of the sloc until after the correct adjustment has
5347 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5348 the adjustment, because it will be outside the range in (the old,
5349 incorrect) S_Adjustment.
5350 * inline.adb: Use named notation for readability and uniformity.
5351 * sinput-l.adb: Minor improvements to debugging output printed
5352 for Debug_Flag_L.
5353 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5354 correction.
5355
5356 2017-09-06 Vincent Celier <celier@adacore.com>
5357
5358 * make.adb: Do not invoke gprbuild for -bargs -P.
5359
5360 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5361
5362 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5363 case when Op is of kind N_Qualified_Expression. In this case,
5364 the function is called recursively on the subexpression like in
5365 other cases.
5366 * make.adb: Minor reformatting
5367
5368 2017-09-06 Justin Squirek <squirek@adacore.com>
5369
5370 * einfo.adb (Set_Linker_Section_Pragma): Modify
5371 Set_Linker_Section_Pragma to be consistant with the "getter"
5372 Linker_Section_Pragma.
5373 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5374 checking for container loops so that the index cursor is not
5375 directly changable by the user with the use of E_Loop_Parameter.
5376 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5377 * sem_warn.adb (Check_References): Revert previous change.
5378
5379 2017-09-06 Bob Duff <duff@adacore.com>
5380
5381 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5382 calls and the like.
5383
5384 2017-09-06 Yannick Moy <moy@adacore.com>
5385
5386 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5387 declarations to only consider valid uses of Global/Depends those on
5388 single concurrent objects.
5389
5390 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5391
5392 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5393 error as soon as one of the specified components overlaps the
5394 parent field.
5395
5396 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5397
5398 * sem_prag.ads: minor fix typo in comment.
5399
5400 2017-09-06 Justin Squirek <squirek@adacore.com>
5401
5402 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5403 from source before checking source references.
5404 * sem_warn.adb (Check_References): Add check for internal block
5405 before recursing.
5406
5407 2017-09-06 Vincent Celier <celier@adacore.com>
5408
5409 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5410 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5411 gnatname.adb: Remove the Project Manager from the GNAT tools.
5412 * gcc-interface/Makefile.in: ditto.
5413
5414 2017-09-06 Bob Duff <duff@adacore.com>
5415
5416 * sem_util.ads: Minor comment fix.
5417
5418 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5419
5420 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5421 Generate a freeze node for the actual of a formal package, if
5422 the actual is declared in the same unit and has a corresponding
5423 body, to prevent the current instance from being frozen before
5424 the actual is.
5425
5426 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5427
5428 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5429
5430 2017-09-06 Yannick Moy <moy@adacore.com>
5431
5432 * sem_warn.adb: Minor refactoring.
5433
5434 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5435
5436 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5437 to retrieve the inherited classwide precondition/postcondition
5438 of a subprogram.
5439 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5440 freezing a subprogram, to complete the generation of the
5441 corresponding checking code.
5442
5443 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5444
5445 * exp_util.adb (Is_Controlled_Indexing): New routine.
5446 (Is_Displace_Call): Use routine Strip to remove indirections.
5447 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5448 missing case of controlled generalized indexing.
5449 (Is_Source_Object): Use routine Strip to remove indirections.
5450 (Strip): New routine.
5451
5452 2017-09-06 Bob Duff <duff@adacore.com>
5453
5454 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5455 we include the proper header. Otherwise, we just declare the necessary
5456 things from the capabilities library. This is so we can build on
5457 machines without that library, while still enabling that library.
5458 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5459 simply return 0 if the library is not present, or not included
5460 in the link.
5461
5462 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5463
5464 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5465 for renamings that involve function calls in prefix form.
5466
5467 2017-09-06 Bob Duff <duff@adacore.com>
5468
5469 * sem_ch3.adb (Analyze_Subtype_Declaration):
5470 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5471
5472 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5473
5474 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5475 has no parameter specification and no entry index, use the entry name
5476 as the end of the generated SCO statement.
5477
5478 2017-09-06 Steve Baird <baird@adacore.com>
5479
5480 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5481 uses of 'Image and related attributes as having side effects in
5482 order to avoid replicating such uses.
5483 * pprint.ads (Expression_Image) Add new generic formal flag
5484 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5485 (eventually) override the default.
5486 * pprint.adb (Expression_Image) If the new flag is set, then
5487 suppress the ".all" suffix when displaying a dereference whose
5488 prefix is a use of a value-capturing compiler temp of the sort
5489 generated by Expr_Util.Remove_Side_Effects .
5490 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5491 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5492 Minor reformatting.
5493 * inline.adb: Minor wording change.
5494
5495 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5496
5497 * sem_ch7.adb: Update comment.
5498
5499 2017-09-06 Yannick Moy <moy@adacore.com>
5500
5501 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5502 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5503 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5504 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5505 so that applies to any entity.
5506
5507 2017-09-06 Yannick Moy <moy@adacore.com>
5508
5509 * sem_ch3.adb (Derived_Type_Declaration): Use
5510 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5511
5512 2017-09-06 Javier Miranda <miranda@adacore.com>
5513
5514 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5515 following ISO-8861.
5516
5517 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5518
5519 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5520 conversion takes its dimensions from the expression, not from
5521 the context type.
5522 (Dimensions_Of_Operand): Ditto.
5523
5524 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5525
5526 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5527 null procedures when GNAT coverage is used, so that their (empty)
5528 bodies are properly covered.
5529
5530 2017-09-06 Bob Duff <duff@adacore.com>
5531
5532 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5533 the entity is a type with discriminants, make the discriminants
5534 directly visible in aspect clauses.
5535
5536 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5537
5538 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5539 Universal_Real and the context is a floating-point type, resolve
5540 both operands to the target type.
5541
5542 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5543
5544 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5545 sem_ch3.adb, sem_util.adb: Minor reformatting.
5546
5547 2017-09-06 Yannick Moy <moy@adacore.com>
5548
5549 * freeze.adb (Check_Inherited_Conditions): Rewriting
5550 of inherited preconditions and postconditions should only occur
5551 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5552 be confused with SPARK_Mode being On.
5553
5554 2017-09-06 Yannick Moy <moy@adacore.com>
5555
5556 * sem_warn.adb (Check_References): Take into
5557 account possibility of attribute reference as original node.
5558
5559 2017-09-06 Yannick Moy <moy@adacore.com>
5560
5561 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5562 use of attribute.
5563
5564 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5565
5566 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5567 on the procedure created to encapsulate the body.
5568 * sem_ch7.adb: Add with clause for GNAT.HTable.
5569 (Entity_Table_Size): New constant.
5570 (Entity_Hash): New function.
5571 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5572 (Is_Subprogram_Ref): Rename into...
5573 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5574 the table instead of bailing out on them. Scan the value of constants
5575 if it is not known at compile time.
5576 (Contains_Subprograms_Refs): Rename into...
5577 (Scan_Subprogram_Refs): ...this.
5578 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5579 Is_Public flag on subprograms if they are not actually referenced.
5580 (Hide_Public_Entities): Beef up comment on the algorithm.
5581 Reset the table of subprograms on entry.
5582
5583 2017-09-06 Yannick Moy <moy@adacore.com>
5584
5585 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5586
5587 2017-09-06 Javier Miranda <miranda@adacore.com>
5588
5589 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5590 cannot handle a type conversion of an array as an aggregate
5591 component.
5592
5593 2017-09-06 Bob Duff <duff@adacore.com>
5594
5595 * g-comlin.adb (Try_Help): Remove ".exe" so we
5596 get the same results on windows and unix.
5597
5598 2017-09-06 Justin Squirek <squirek@adacore.com>
5599
5600 * exp_imgv.adb (Expand_Image_Attribute),
5601 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5602 Added case to handle new-style 'Image expansion
5603 (Rewrite_Object_Image): Moved from exp_attr.adb
5604 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5605 attribute cases so that the relevant subprograms in exp_imgv.adb
5606 handle all expansion.
5607 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5608 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5609 cases to call common function Analyze_Image_Attribute.
5610 (Analyze_Image_Attribute): Created as a common path for all
5611 image attributes (Check_Object_Reference_Image): Removed
5612 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5613 Removed and refactored into Is_Object_Image (Is_Object_Image):
5614 Created as a replacement for Is_Image_Applied_To_Object
5615
5616 2017-09-06 Yannick Moy <moy@adacore.com>
5617
5618 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5619 message for missing input.
5620
5621 2017-09-06 Yannick Moy <moy@adacore.com>
5622
5623 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5624 of protected subprograms and entries.
5625 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5626 New function to detect when a subprogram of entry is defined
5627 inside a protected object.
5628
5629 2017-09-06 Bob Duff <duff@adacore.com>
5630
5631 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5632 whether the current process has the CAP_SYS_NICE capability.
5633 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5634 ceiling priorities if the current process has the CAP_SYS_NICE
5635 capability.
5636
5637 2017-09-06 Bob Duff <duff@adacore.com>
5638
5639 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5640 check back to the body, because SPARK is not yet ready for
5641 "or else raise Constraint_Error".
5642
5643 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5644
5645 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5646 procedure by a single null statement, after evaluating the
5647 actuals that require it.
5648
5649 2017-09-06 Javier Miranda <miranda@adacore.com>
5650
5651 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5652 Generating C code improve the code that checks the use of nested
5653 aggregates to initialize object declarations.
5654
5655 2017-09-06 Yannick Moy <moy@adacore.com>
5656
5657 * sem_ch3.adb (Derived_Type_Declaration): Detect
5658 violations of new rule SPARK RM 3.4(1). Also refactor existing
5659 check to use the new function Find_Partial_View.
5660
5661 2017-09-06 Vincent Celier <celier@adacore.com>
5662
5663 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5664 from the Prj hierarchy has been removed from the GNAT driver.
5665
5666 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5667
5668 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5669 expression function, or within a spec expression (default value,
5670 etc) a reference to an incomplete type is legal: legality of
5671 the operation will be checked when some related entity (type,
5672 object or subprogram) is frozen.
5673
5674 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5675
5676 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5677 adjustments and a typo fix.
5678
5679 2017-09-06 Yannick Moy <moy@adacore.com>
5680
5681 * sem_res.adb (Resolve_Call): Do not issue info
5682 message about inlining of calls to functions in assertions,
5683 for functions whose body has not been seen yet.
5684
5685 2017-09-06 Bob Duff <duff@adacore.com>
5686
5687 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5688 we can use modern Ada in this package.
5689 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5690 Move Ada.Command_Line.Response_File to System.Response_File,
5691 and make Ada.Command_Line.Response_File into a rename of
5692 System.Response_File. This is to avoid having gnatbind depend
5693 Ada.Command_Line, which would damage the bootstrap process now
5694 that Ada.Command_Line contains modern Ada (the raise expression).
5695 * gnatbind.adb: Avoid dependence on
5696 Ada.Command_Line. Depend on System.Response_File instead
5697 of Ada.Command_Line.Response_File. Change one call to
5698 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5699 to Ada.Command_Line.Argument_Count to use Arg_Count.
5700 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5701
5702 2017-09-06 Bob Duff <duff@adacore.com>
5703
5704 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5705 switch, because we've already read gnat.adc by default.
5706
5707 2017-09-06 Bob Duff <duff@adacore.com>
5708
5709 * exp_ch5.adb (Get_Default_Iterator): Replace
5710 "Assert(False)" with "return Iter", because if an iterable
5711 type is derived from a noniterable one, then we won't find an
5712 overriding or inherited default iterator.
5713
5714 2017-09-06 Yannick Moy <moy@adacore.com>
5715
5716 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5717 literal index used to access a string is null or negative.
5718
5719 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5720
5721 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5722 allowed on loop parameters.
5723 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5724 on loop parameters.
5725 (Write_Field15_Name): Update the output for
5726 Status_Flag_Or_Transient_Decl.
5727 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5728 to loop parameters. Update the documentation of the attribute
5729 and the E_Loop_Parameter entity.
5730 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5731 which assumes that cursors can never be controlled.
5732 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5733 guard which assumes that cursors can never be controlled.
5734
5735 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5736
5737 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5738 sem_warn.adb: Minor reformatting.
5739
5740 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5741
5742 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5743 fix and preserve older GNAT warning on overlapping actuals that
5744 are not elementary types.
5745
5746 2017-09-06 Justin Squirek <squirek@adacore.com>
5747
5748 * sem_attr.adb: Comment correction.
5749
5750 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5751
5752 * sem_util.adb: Minor reformatting.
5753
5754 2017-09-06 Yannick Moy <moy@adacore.com>
5755
5756 * a-comlin.ads (Argument): Add precondition for analysis.
5757
5758 2017-09-06 Yannick Moy <moy@adacore.com>
5759
5760 * sem_res.adb (Resolve): Update message for function call as statement.
5761
5762 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5763
5764 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5765 generated bodies for renamings that are completions, when renamed
5766 procedure is No_Return.
5767 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5768 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5769 with No_Return, the renamed entity must be No_Return as well.
5770
5771 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5772
5773 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5774 Minor reformatting.
5775
5776 2017-09-06 Justin Squirek <squirek@adacore.com>
5777
5778 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5779 attribute cases (Rewrite_Object_Reference_Image): Created to
5780 aid the rewriting of new-style 'Image attributes.
5781 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5782 (Check_Object_Reference_Image): Created to handle verification of
5783 'Image with object-references as prefixes.
5784 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5785 Create predicate to identify cases where an 'Image attribute's
5786 prefix applies to an object reference.
5787
5788 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5789
5790 * freeze.adb (Freeze_Entity): Do not generate a freeze
5791 node for a generic unit, even if it includes delayed aspect
5792 specifications. Freeze nodes for generic entities must never
5793 appear in the tree that reaches the back-end of the compiler.
5794
5795 2017-09-06 Yannick Moy <moy@adacore.com>
5796
5797 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5798
5799 2017-09-06 Yannick Moy <moy@adacore.com>
5800
5801 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5802 to subprograms in other units as possibly inlined.
5803
5804 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5805
5806 * freeze.adb (Freeze_Entity): For a derived type that has no
5807 explicit delayed aspects but may inherit delayed aspects from its
5808 parent type, analyze aspect at freeze point for proper capture
5809 of an inherited aspect.
5810
5811 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5812
5813 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5814 renamings; also, avoid repeated calls to Renamed_Object when getting
5815 through object renamings.
5816
5817 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5818
5819 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5820 array type declaration in a private part, when an index is a
5821 subtype indication of a discrete type with a private partial view.
5822
5823 2017-09-06 Javier Miranda <miranda@adacore.com>
5824
5825 * exp_ch4.adb (Expand_Modular_Op): Force generating
5826 temporary to improve the generated code.
5827
5828 2017-09-06 Tristan Gingold <gingold@adacore.com>
5829
5830 * s-fatgen.adb: Minor typo fix in comment.
5831
5832 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5833
5834 * exp_ch5.adb (Make_Field_Assign): If the type
5835 of the right-hand side has stored constraint, use its values
5836 (except for those that are renamings of parent discriminants)
5837 to produce additional assignments for the discriminants of the
5838 left-hand side, which are invisible in the righ-hand side and
5839 not retrievable as selected components.
5840
5841 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5842
5843 * sem_util.adb (Needs_One_Formal): The first formal of such a
5844 function must be a controlling formal, so that Obj.F (X, Y)
5845 can have the interpretation F(Obj)(X, Y).
5846 * sem_util.ads: Clarify documentation.
5847
5848 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5849
5850 * table.ads, table.adb: Restore original implementation.
5851 * namet.h (Names_Ptr): Adjust back.
5852 (Name_Chars_Ptr): Likewise.
5853 * uintp.h (Uints_Ptr): Likewise.
5854 (Udigits_Ptr): Likewise.
5855 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5856 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5857 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5858 * spark_xrefs.ads: Likewise.
5859 * scos.h: Undo latest changes.
5860
5861 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5862
5863 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5864 No_Return flag to instance if pragma applies to generic unit. This
5865 must be done explicitly because the pragma does not appear
5866 directly in the generic declaration (unlike the corresponding
5867 aspect specification).
5868
5869 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5870
5871 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5872 explaining the test used to detect inlining. Use same test
5873 in second occurrence.
5874 (Analyze_Package_Body_Helper): Minor formatting fixes.
5875
5876 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5877
5878 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5879 derived type with a mixture of renamed and constrained parent
5880 discriminants, the constraint for the target must obtain the
5881 discriminant values from both the operand and from the stored
5882 constraint for it, given that the constrained discriminants are
5883 not visible in the object.
5884 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5885 side may be derived from that of the left-hand side (as in the
5886 case of an assignment with a change of representation) so the
5887 discriminant to be used in the retrieval of the value of the
5888 component must be the entity in the type of the right-hand side.
5889
5890 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5891
5892 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5893 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5894 * exp_util.adb (Is_Source_Object): Account for
5895 the cases where the source object may appear as a dereference
5896 or within a type conversion.
5897 * exp_ch6.adb: Fix missing space in error message.
5898
5899 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5900
5901 * sem_prag.adb: Update description of Eliminate.
5902
5903 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5904
5905 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5906 properly an attribute reference 'Loop_Entry that appears in the
5907 list of indices of an indexed expression, to prevent an infinite
5908 loop in the compiler.
5909
5910 2017-09-06 Bob Duff <duff@adacore.com>
5911
5912 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5913
5914 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5915
5916 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5917 in a set membership is an overloaded enumeration literal, and
5918 the type of the alternative is resolved from a previous one,
5919 replace the entity of the alternative as well as the type,
5920 to prevent inconsistencies between the entity and the type.
5921
5922 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5923
5924 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5925 (No_Component_Reordering_Specified): New switch.
5926 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5927 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5928 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5929 New check.
5930 (Check_Configuration_Consistency): Invoke it.
5931 * debug.adb (d.r): Toggle the effect of the switch.
5932 (d.v): Change to no-op.
5933 * einfo.ads (Has_Complex_Representation):
5934 Restrict to record types.
5935 (No_Reordering): New alias for Flag239.
5936 (OK_To_Reorder_Components): Delete.
5937 (No_Reordering): Declare.
5938 (Set_No_Reordering): Likewise.
5939 (OK_To_Reorder_Components): Delete.
5940 (Set_OK_To_Reorder_Components): Likewise.
5941 * einfo.adb (Has_Complex_Representation): Expect record types.
5942 (No_Reordering): New function.
5943 (OK_To_Reorder_Components): Delete.
5944 (Set_Has_Complex_Representation): Expect base record types.
5945 (Set_No_Reordering): New procedure.
5946 (Set_OK_To_Reorder_Components): Delete.
5947 (Write_Entity_Flags): Adjust to above change.
5948 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5949 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5950 OK_To_Reorder_Components on record types with convention Ada.
5951 * lib-writ.adb (Write_ALI): Deal with NC marker.
5952 * opt.ads (No_Component_Reordering): New flag.
5953 (No_Component_Reordering_Config): Likewise.
5954 (Config_Switches_Type): Add No_Component_Reordering component.
5955 * opt.adb (Register_Opt_Config_Switches): Copy
5956 No_Component_Reordering onto No_Component_Reordering_Config.
5957 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5958 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5959 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5960 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5961 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5962 No_Reordering flag from the default.
5963 (Build_Derived_Private_Type): Likewise.
5964 (Build_Derived_Record_Type): Likewise. Then inherit it
5965 for untagged types and clean up handling of similar flags.
5966 (Record_Type_Declaration): Likewise.
5967 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5968 remove redundant test on Is_Tagged_Type.
5969 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5970 (Sig_Flags): Likewise.
5971 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5972 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5973 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5975 Copy the layout of the parent type only if the No_Reordering
5976 settings match.
5977 (components_to_record): Reorder record types with
5978 convention Ada by default unless No_Reordering is set or -gnatd.r
5979 is specified and do not warn if No_Reordering is set in GNAT mode.
5980
5981 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5982
5983 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5984 new predicate to reject declarations that can be completions,
5985 when there is a visible prior homograph that is a null procedure.
5986 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5987 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5988
5989 2017-09-06 Thomas Quinot <quinot@adacore.com>
5990
5991 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5992 run of 253 characters or more.
5993
5994 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5995
5996 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5997 properly incomplete subtypes that may be created by explicit or
5998 implicit declarations.
5999 (Is_Base_Type): Take E_Incomplete_Subtype into account.
6000 (Subtype_Kind): Ditto.
6001 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
6002 Ekind of a subtype of a discriminated incomplete type.
6003 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
6004 incomplete types, to preserve error reporting.
6005 (Process_Incomplete_Dependents): Do not create a subtype
6006 declaration for an incomplete subtype that is created internally.
6007 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
6008 incomplete subtypes that do not require a completion, either
6009 because they are limited views, of they are generic actuals.
6010
6011 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
6012
6013 * checks.adb (Insert_Valid_Check): Remove the
6014 suspicious manipulation of the Do_Range_Check flag as ths is
6015 no linger needed. Suppress validity check when analysing the
6016 validation variable.
6017
6018 2017-09-06 Philippe Gil <gil@adacore.com>
6019
6020 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
6021 GNATCOLL.Memory
6022
6023 2017-09-06 Bob Duff <duff@adacore.com>
6024
6025 * sem_elim.adb: Minor comment fix.
6026
6027 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6028
6029 * sem_util.adb (Is_Object_Reference): A function call is an
6030 object reference, and thus attribute references for attributes
6031 that are functions (such as Pred and Succ) as well as predefined
6032 operators are legal in contexts that require an object, such as
6033 the prefix of attribute Img and the Ada2020 version of 'Image.
6034
6035 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
6036
6037 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
6038 exp_ch3.adb, xoscons.adb: Minor reformatting.
6039
6040 2017-09-06 Raphael Amiard <amiard@adacore.com>
6041
6042 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
6043 Position parameter. If supplied, use it to provide efficient iteration.
6044 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
6045 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
6046 iteration.
6047
6048 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6049
6050 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
6051 designated type is class-wide and the expression is an unchecked
6052 conversion, preserve the conversion when checking the tag of the
6053 designated object, to prevent spurious semantic errors when the
6054 expression in the conversion has an untagged type (for example
6055 an address attribute).
6056
6057 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6058
6059 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
6060 operation is subject to a pragma Eliminate.
6061
6062 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6063
6064 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
6065
6066 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
6067
6068 * fe.h (Eliminate_Error_Msg): Remove.
6069
6070 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6071
6072 * gcc-interface/utils.c (make_packable_type): Update call to
6073 mode_for_size_tree.
6074
6075 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6076
6077 * gcc-interface/utils2.c (build_load_modify_store):
6078 Use int_mode_for_size.
6079
6080 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6081
6082 PR ada/62235
6083 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6084 for Itypes that are E_Record_Subtype with a cloned subtype.
6085 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
6086
6087 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6088
6089 * gcc-interface/trans.c (convert_with_check): Use a custom base type
6090 if the base type of the expression has a different machine mode.
6091 Rename a couple of parameters and local variable.
6092
6093 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6094
6095 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
6096 conversions around prefixes that are not references.
6097
6098 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6099
6100 * gcc-interface/utils.c (unchecked_convert): When the result type is a
6101 non-biased integral type with size 0, set the result to 0 directly.
6102
6103 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6104
6105 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
6106 (renaming_from_instantiation_p): ...this.
6107 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
6108 instead of explicit tests on kind of entities. Adjust for renaming.
6109 (gnat_to_gnu_profile_type): Likewise.
6110 (gnat_to_gnu_subprog_type): Likewise.
6111 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
6112 (Case_Statement_to_gnu): Likewise.
6113 (gnat_to_gnu): Likewise.
6114 (process_freeze_entity): Likewise.
6115 (process_type): Likewise.
6116 (add_stmt_with_node): Adjust for renaming.
6117 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
6118 (renaming_from_generic_instantiation_p): Rename to...
6119 (renaming_from_instantiation_p): ...this. Use inline predicate.
6120 (pad_type_hasher::keep_cache_entry): Fold.
6121
6122 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6123
6124 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
6125 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
6126 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
6127 (N_Slice): Likewise.
6128 (N_Selected_Component): Likewise. Do not try again to translate it.
6129 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
6130
6131 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6132
6133 * repinfo.ads: Document new treatment of dynamic values.
6134 (TCode): Bump upper bound to 29.
6135 (Dynamic_Val): New constant set to 29.
6136 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
6137 (Rep_Value) <Dynamic_Val>: Likewise.
6138 * repinfo.h (Dynamic_Val): New macro.
6139 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
6140 DECL_P nodes too.
6141 <INTEGER_CST>: Set TCODE instead of recursing.
6142 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
6143 <VAR_DECL>: New case.
6144 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
6145 <BIT_AND_EXPR>: Adjust.
6146 <CALL_EXPR>: Do not fall through.
6147
6148 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6149
6150 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
6151 there is no target, do not create a temporary for the return value for
6152 an allocator either.
6153
6154 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6155
6156 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
6157 unconstrained array type.
6158
6159 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6160 Alan Hayward <alan.hayward@arm.com>
6161 David Sherwood <david.sherwood@arm.com>
6162
6163 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
6164 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
6165
6166 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6167 Alan Hayward <alan.hayward@arm.com>
6168 David Sherwood <david.sherwood@arm.com>
6169
6170 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
6171 is_a <scalar_int_mode>.
6172 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
6173 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
6174
6175 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6176 Alan Hayward <alan.hayward@arm.com>
6177 David Sherwood <david.sherwood@arm.com>
6178
6179 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
6180 instead of mode_for_size.
6181 (gnat_to_gnu_subprog_type): Likewise.
6182 * gcc-interface/utils.c (make_type_from_size): Likewise.
6183
6184 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6185 Alan Hayward <alan.hayward@arm.com>
6186 David Sherwood <david.sherwood@arm.com>
6187
6188 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
6189 (fp_size_to_prec): Likewise.
6190
6191 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6192 Alan Hayward <alan.hayward@arm.com>
6193 David Sherwood <david.sherwood@arm.com>
6194
6195 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
6196 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
6197
6198 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6199 Alan Hayward <alan.hayward@arm.com>
6200 David Sherwood <david.sherwood@arm.com>
6201
6202 * gcc-interface/decl.c (validate_size): Update use of
6203 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
6204
6205 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6206 Alan Hayward <alan.hayward@arm.com>
6207 David Sherwood <david.sherwood@arm.com>
6208
6209 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
6210 (fp_size_to_prec): Likewise.
6211
6212 2017-08-29 Martin Liska <mliska@suse.cz>
6213
6214 PR other/39851
6215 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
6216
6217 2017-08-08 Martin Liska <mliska@suse.cz>
6218
6219 * gcc-interface/trans.c: Include header files.
6220
6221 2017-07-29 Jakub Jelinek <jakub@redhat.com>
6222
6223 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
6224 as new argument to the imported_module_or_decl debug hook.
6225
6226 2017-07-25 Javier Miranda <miranda@adacore.com>
6227
6228 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
6229 evaluated twice.
6230
6231 2017-07-19 Jakub Jelinek <jakub@redhat.com>
6232
6233 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
6234 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
6235 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
6236
6237 2017-07-18 Mike Frysinger <vapier@chromium.org>
6238
6239 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
6240 (../../gnatlink$(exeext)): Likewise.
6241
6242 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
6243
6244 PR ada/81446
6245 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
6246 (Backend_Overflow_Checks): Set to True.
6247
6248 2017-06-23 Jakub Jelinek <jakub@redhat.com>
6249
6250 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
6251
6252 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
6253
6254 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
6255 notice. New macro.
6256 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
6257 as a definition.
6258 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
6259 definition.
6260 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
6261 imported subprograms for the current compilation unit as
6262 definitions. Disable debug info for references to variables.
6263 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
6264 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
6265 not built-in functions to their binding scope.
6266 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
6267 the function as a definition. Update all callers.
6268 (gnat_write_global_declarations): Emit debug info for imported
6269 functions. Filter out external variables for which debug info
6270 is disabled.
6271
6272 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
6273
6274 PR ada/81105
6275 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
6276 (i[3456]86-pc-gnu): Likewise.
6277 (x86_64 kfreebsd): Likewise.
6278
6279 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6280
6281 PR bootstrap/80897
6282 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6283
6284 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6285
6286 PR ada/81070
6287 * s-interr-hwint.adb: Reinstate.
6288 * gcc-interface/Makefile.in (RTEMS): Use it again.
6289
6290 2017-06-08 Olivier Hainque <hainque@adacore.com>
6291
6292 * vx_crtbegin_auto.c: Update year in copyright notice.
6293 * vx_crtbegin.c: Likewise.
6294 * vx_crtbegin.inc: Likewise.
6295 * vx_crtend.c: Likewise.
6296
6297 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6298
6299 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6300 * s-tpopsp-rtems.adb: Delete.
6301
6302 2017-06-02 Olivier Hainque <hainque@adacore.com>
6303
6304 * vx_crtbegin_auto.c: New file.
6305 * vx_crtbegin.c: New file.
6306 * vx_crtbegin.inc: New file.
6307 * vx_crtend.c: New file.
6308
6309 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6310
6311 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6312 const qualifiers that cause -Wignored-qualifiers warnings.
6313
6314 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6315
6316 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6317 for Itypes that are E_Access_Subtype.
6318 <E_Access_Subtype>: Use the DECL of the base type directly.
6319
6320 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6321 Eric Botcazou <ebotcazou@adacore.com>
6322
6323 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6324 limited view may appear in the profile of a function, and a call to
6325 that function in another unit in which the full view is available must
6326 use this full view to spurious type errors at the point of call.
6327 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6328 of parent body with a with clause for the main unit.
6329 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6330 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6331 types declared in external units like types from limited with clauses.
6332 Adjust final processing of defer_limited_with_list accordingly.
6333 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6334 again to translate the prefix after the field if it is incomplete.
6335
6336 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6337
6338 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6339 alignment for simple volatile fields and remove associated errors.
6340
6341 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6342
6343 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6344 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6345
6346 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6347
6348 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6349 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6350 process Original_Node instead of expanded names.
6351
6352 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6353
6354 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6355 addressability check in the constrained case.
6356
6357 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6358
6359 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6360 types not coming from a limited context.
6361
6362 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6363
6364 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6365 the inlined list that are not public.
6366 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6367 there is a pragma Inline_Always on the subprogram.
6368
6369 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6370
6371 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6372 <N_Allocator>: Use properly typed constants.
6373 (extract_values): Move around.
6374 (pos_to_constructor): Minor tweaks.
6375 (Sloc_to_locus): Fix formatting.
6376 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6377 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6378 (Gigi_Equivalent_Type): Adjust head comment.
6379 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6380
6381 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6382
6383 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6384 is a representation clause on an extension, propagate the alignment of
6385 the parent type only if the platform requires strict alignment.
6386
6387 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6388
6389 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6390 instead of Word_Size.
6391
6392 Revert
6393 2017-03-28 Andreas Schwab <schwab@suse.de>
6394
6395 PR ada/80117
6396 * system-linux-aarch64-ilp32.ads: New file.
6397 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6398 from LIBGNAT_TARGET_PAIRS.
6399 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6400 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6401 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6402 or -mabi=ilp32, resp.
6403
6404 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6405
6406 PR ada/80626
6407 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6408 instead of Word_Size.
6409
6410 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6411
6412 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6413
6414 2017-05-02 Richard Biener <rguenther@suse.de>
6415
6416 * gcc-interface/misc.c (gnat_post_options): Do not set
6417 -fstrict-overflow.
6418
6419 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6420
6421 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6422 Corresponding_Discriminant is only called on discriminants.
6423 Skip the saving of the result only for them.
6424 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6425 <N_Unchecked_Type_Conversion>: Translate the result type first.
6426 (gigi): Set TREE_NOTHROW on Begin_Handler.
6427 (stmt_list_cannot_raise_p): New predicate.
6428 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6429 a cleanup if the statements of the handler cannot raise.
6430 (process_freeze_entity): Use Is_Record_Type.
6431 (process_type): Likewise.
6432
6433 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6434
6435 * einfo.ads (Corresponding_Record_Component): New alias
6436 for Node21 used for E_Component and E_Discriminant.
6437 * einfo.adb (Corresponding_Record_Component): New function.
6438 (Set_Corresponding_Record_Component): New procedure.
6439 (Write_Field21_Name): Handle Corresponding_Record_Component.
6440 * sem_ch3.adb (Inherit_Component): Set
6441 Corresponding_Record_Component for every component in
6442 the untagged case. Clear it afterwards for non-girder
6443 discriminants.
6444 * gcc-interface/decl.c (gnat_to_gnu_entity)
6445 <E_Record_Type>: For a derived untagged type with discriminants
6446 and constraints, apply the constraints to the layout of the
6447 parent type to deduce the layout.
6448 (field_is_aliased): Delete.
6449 (components_to_record): Test DECL_ALIASED_P directly.
6450 (annotate_rep): Check that fields are present except for
6451 an extension.
6452 (create_field_decl_from): Add DEBUG_INFO_P
6453 parameter and pass it in recursive and other calls. Add guard
6454 for the manual CSE on the size.
6455 (is_stored_discriminant): New predicate.
6456 (copy_and_substitute_in_layout): Consider only
6457 stored discriminants and check that original fields are present
6458 in the old type. Deal with derived types. Adjust call to
6459 create_variant_part_from.
6460
6461 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6462
6463 * exp_ch6.adb (Expand_Call_Helper): When locating the
6464 accessibility entity created for an access parameter, handle
6465 properly a reference to a formal of an enclosing subprogram. if
6466 the reference appears in an inherited class-wide condition, it
6467 is the rewriting of the reference in the ancestor expression,
6468 but the accessibility entity must be that of the current formal.
6469
6470 2017-05-02 Javier Miranda <miranda@adacore.com>
6471
6472 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6473 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6474 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6475 Call Expand_Non_Binary_Modular_Op.
6476
6477 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6478
6479 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6480 has discriminants, do not override the Stored_Constraint list of
6481 the full view of the derived type with that of the derived type.
6482
6483 2017-05-02 Bob Duff <duff@adacore.com>
6484
6485 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6486
6487 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6488
6489 * s-os_lib.ads: Minor typo fix.
6490
6491 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6492
6493 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6494 this deprecated dependency.
6495
6496 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6497
6498 * exp_util.ads: minor comment addition.
6499
6500 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6501
6502 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6503 pastos in part #3 of the head comment.
6504
6505 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6506
6507 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6508 procedure body for a local (sub)type declaration within a
6509 predicate function. Invariant checks do not apply to these, and
6510 the expansion of the procedure will happen in the wrong scope,
6511 leading to misplaced freeze nodes.
6512
6513 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6514
6515 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6516 to analyze generated actions. If the main unit is a body,
6517 the required scope is that of the corresponding unit declaration.
6518
6519 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6520
6521 * einfo.adb (Declaration_Node): flip branches of
6522 an IF statement to avoid repeated negations in its condition;
6523 no change in semantics, only to improve readability.
6524
6525 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6526
6527 * sem_case.adb: Remove extra spaces in parameter declarations.
6528
6529 2017-05-02 Justin Squirek <squirek@adacore.com>
6530
6531 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6532 in usage line for new -gnatwE switch.
6533
6534 2017-05-02 Claire Dross <dross@adacore.com>
6535
6536 * a-cofuve.ads (Remove): Remove unnecessary
6537 conditions in precondition.
6538
6539 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6540
6541 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6542 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6543
6544 2017-05-02 Justin Squirek <squirek@adacore.com>
6545
6546 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6547 alternative expression.
6548 * sem_res.adb (Resolve_Case_Expression): Ditto.
6549
6550 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6551
6552 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6553 Refine predicate for the case where the primitive operation
6554 is a renaming of equality. An overriding operation that is
6555 a user-defined renaming of predefined equality inherits its
6556 slot from the overridden operation. Otherwise it is treated
6557 as a predefined op and occupies the same predefined slot as
6558 equality. A call to it is transformed into a call to its alias,
6559 which is the predefined equality. A dispatching call thus uses
6560 the proper slot if operation is further inherited and called
6561 with class-wide arguments.
6562
6563 2017-05-02 Justin Squirek <squirek@adacore.com>
6564
6565 * errout.adb (Set_Msg_Text): Add a case to switch the message
6566 type when the character '[' is detected signifying a warning
6567 about a run-time exception.
6568 * opt.ads Add a new Warning_Mode value for new switch
6569 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6570 to handle new warning mode
6571 * usage.adb (Usage): Add usage entry for -gnatwE
6572 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6573
6574 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6575
6576 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6577 declaration that operates on some fixed point type.
6578
6579 2017-05-02 Justin Squirek <squirek@adacore.com>
6580
6581 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6582
6583 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6584
6585 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6586
6587 2017-05-02 Justin Squirek <squirek@adacore.com>
6588
6589 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6590 expression (Analyze_If_Expression): Add check for valid condition
6591 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6592 on case-expression
6593 * sem_res.adb (Resolve_If_Expression): Add check for valid
6594 condition and then-expression.
6595
6596 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6597
6598 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6599 statement if the initialization call is a null procedure, as
6600 can happen with a controlled type with no explicit Initialize
6601 procedure, or an array of such.
6602 * exp_ch7.adb (Process_Object_Declaration): For a type with
6603 controlled components that has a trivial Initialize procedure,
6604 insert declaration for finalization counter after object
6605 declaration itself.
6606 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6607 finalization block and attendant declarations if component has
6608 a trivial Initialize procedure.
6609 (Make_Init_Call): Do not generate a call if controlled type has
6610 a trivial Initialize procedure.
6611
6612 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6613
6614 * g-forstr.ads (Data): Move Format component last.
6615 * g-forstr.adb ("+"): Adjust for above change.
6616 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6617 * g-sechas.ads (Context): Move Key last.
6618 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6619 * s-fileio.adb (Temp_File_Record): Move Name last.
6620 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6621 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6622
6623 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6624
6625 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6626 switch introduced recently. finally not needed.
6627
6628 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6629
6630 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6631 Corresponding_Body link for a null procedure declaration.
6632
6633 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6634
6635 * atree.h (Flag290): Add missing terminating parenthesis.
6636 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6637 (Set_Is_Class_Wide_Clone): Likewise.
6638 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6639
6640 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6641
6642 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6643 parameter Array_Comp to indicate the case of an array object
6644 with null-excluding components.
6645 * checks.adb (Null_Exclusion_Static_Checks):
6646 Call Compile_Time_Constraint_Error instead of
6647 Apply_Compile_Time_Constraint_Error in the component case. Also
6648 call that when Array_Comp is True, with an appropriate warning for
6649 the array component case. Only create an explicit initialization
6650 by null in the case of an object of a null-excluding access type
6651 (and no longer do that in the component case).
6652 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6653 Array_Comp defaulted to False. Pass Empty for the Comp
6654 actual when calling Null_Exclusion_Static_Checks in the case
6655 where Comp_Decl matches Object_Decl, because we don't have a
6656 component in that case. In the case of an object or component
6657 of an array type, pass True for Array_Comp on the recursive call
6658 to Check_Component.
6659
6660 2017-05-02 Bob Duff <duff@adacore.com>
6661
6662 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6663 compute the linux priority from the Ada priority. Call this everywhere
6664 required. In particular, the previous version was not doing this
6665 computation when setting the ceiling priority in various places. It
6666 was just converting to C.int, which results in a ceiling that is off
6667 by 1.
6668
6669 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6670
6671 * sem_ch3.adb: Comment predicate inheritance.
6672
6673 2017-05-02 Tristan Gingold <gingold@adacore.com>
6674
6675 * s-trasym.ads: Add comment.
6676
6677 2017-05-02 Bob Duff <duff@adacore.com>
6678
6679 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6680 * sem_ch4.adb: Minor reformatting.
6681 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6682 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6683 * sinput.ads: Minor typo fix.
6684
6685 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6686
6687 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6688 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6689 here from exp_ch9, to recognize objects whose creation requires
6690 dynamic allocation, so that the proper warning can be emitted
6691 when restriction No_Implicit_Heap_Allocation is in effect.
6692 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6693 to emit proper warning when an object that requires dynamic
6694 allocation is declared.
6695
6696 2017-05-02 Tristan Gingold <gingold@adacore.com>
6697
6698 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6699
6700 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6701
6702 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6703 visibility rules for equality operators that apply within an
6704 instantiation apply within an inlined body.
6705 * sem_type.adb (Add_One_Interp): ditto.
6706
6707 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6708
6709 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6710 procedures.
6711
6712 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6713
6714 * snames.ads-tmpl
6715 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6716 Name_No_Tagged_Streams): Move to regular pragmas. Add
6717 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6718 and Secondary_Stack_Size.
6719 (Pragma_Id): Move Pragma_Assume,
6720 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6721 Pragma_No_Tagged_Streams to second part.
6722
6723 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6724
6725 * exp_attr.adb: Minor reformatting.
6726
6727 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6728
6729 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6730 detection for illegal references to private components or
6731 operations of a protected type in the body of the type.
6732
6733 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6734
6735 * opt.ads: Add missing GNAT markers in comments.
6736 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6737 settings of Optimize_Alignment at the end.
6738
6739 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6740
6741 * checks.adb (Apply_Constraint_Check): Do not apply
6742 a discriminant check when the associated type is a constrained
6743 subtype created for an unconstrained nominal type.
6744 * exp_attr.adb: Minor reformatting.
6745
6746 2017-05-02 Bob Duff <duff@adacore.com>
6747
6748 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6749 the N_Raise_Expression case.
6750 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6751 and add assertions.
6752
6753 2017-05-02 Yannick Moy <moy@adacore.com>
6754
6755 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6756 optimize length comparison in GNATprove mode.
6757 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6758 operator /= into negation of operator = when needed.
6759 (Expand_SPARK): Call new
6760 function to expand operator /=.
6761
6762 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6763
6764 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6765 Simplify the expression for a fixed-fixed division to remove
6766 divisions by constants whenever possible, as an optimization
6767 for restricted targets.
6768
6769 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6770
6771 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6772
6773 2017-05-02 Bob Duff <duff@adacore.com>
6774
6775 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6776 to find primitive ops, instead of using an Identifier that will
6777 later be looked up. This is necessary because these ops are not
6778 necessarily visible at all places where we need to call them.
6779 * exp_util.ads: Minor comment fix.
6780
6781 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6782
6783 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6784 references are fully conformant if they are both expansions
6785 of the discriminant of a protected type, within one of the
6786 protected operations. One occurrence may be expanded into a
6787 constant declaration while the other is an input parameter to
6788 the corresponding generated subprogram.
6789
6790 2017-05-02 Justin Squirek <squirek@adacore.com>
6791
6792 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6793 recursivly searching composite-types for null-excluding access
6794 types and verifying them.
6795 (Analyze_Object_Declaration): Add a
6796 call to Check_Null_Excluding_Components for static verification
6797 of non-initialized objects.
6798 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6799 a parameter for a composite-type's component and an extra case
6800 for printing component information.
6801
6802 2017-05-02 Yannick Moy <moy@adacore.com>
6803
6804 * sem_ch10.adb (Analyze_Subunit): Take
6805 configuration pragma into account when restoring appropriate
6806 pragma for analysis of subunit.
6807
6808 2017-05-02 Justin Squirek <squirek@adacore.com>
6809
6810 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6811 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6812 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6813 clauses from the runtime.
6814
6815 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6816
6817 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6818 array components specially.
6819
6820 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6821
6822 * sem_ch8.adb (Premature_Usage): If the premature usage of
6823 an entity is as the expression in its own object decaration,
6824 rewrite the reference as Any_Id to prevent cascaded errors or
6825 compiler loops when such an entity is used in an address clause.
6826
6827 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6828
6829 * gcc-interface/decl.c (components_to_record): Add missing guard.
6830
6831 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6832
6833 * gcc-interface/decl.c (components_to_record): Add more comments.
6834 Put back pending fields onto the regular list if the misalignment
6835 happens to cancel itself.
6836
6837 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6838
6839 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6840 controlling actual in a prefixed call, preserve the original node
6841 information if the prefix itself has been rewritten, for ASIS use.
6842
6843 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6844
6845 * exp_ch6.adb (Insert_Post_Call_Actions):
6846 Code clean up. Insert the post-call actions after an enclosing
6847 procedure call when N denotes a function call and appears as an
6848 actual parameter in the procedure call.
6849
6850 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6851
6852 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6853 for the component, also reject the attribute if the component
6854 doesn't end on a byte boundary and its scalar storage order is
6855 different from that of the enclosing record type.
6856
6857 2017-04-28 Javier Miranda <miranda@adacore.com>
6858
6859 * atree.ads (Info_Messages): Removed.
6860 (Warning_Info_Messages): New counter.
6861 (Report_Info_Messages): New counter.
6862 * err_vars.ads Update documentation.
6863 * errout.adb (Delete_Warning_And_Continuations): Update
6864 Info_Message occurrences.
6865 (Error_Msg_Internal): Update Info_Message occurrences.
6866 (Delete_Warning): Update Info_Message occurrences.
6867 (Write_Error_Summary): Update Info_Message occurrences.
6868 (Output_Messages): Update Info_Message occurrences.
6869 (To_Be_Removed): Update Info_Message occurrences.
6870 (Reset_Warnings): Update Info_Message occurrences.
6871 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6872 (Finalize): Update Info_Message occurrences.
6873 (Initialize): Update Info_Message occurrences.
6874 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6875 (Compilation_Errors): Update Info_Message_Occurences.
6876
6877 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6878
6879 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6880 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6881 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6882 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6883 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6884 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6885 Y_Size.
6886 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6887 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6888
6889 2017-04-28 Bob Duff <duff@adacore.com>
6890
6891 * sem_util.ads, sem_util.adb (Might_Raise): New function
6892 that replaces Is_Exception_Safe, but has the opposite
6893 sense. Is_Exception_Safe was missing various cases -- calls inside
6894 a pragma Debug, calls inside an 'if' or assignment statement,
6895 etc. Might_Raise now walks the entire subtree looking for things
6896 that can raise.
6897 * exp_ch9.adb (Is_Exception_Safe): Remove.
6898 (Build_Protected_Subprogram_Body): Replace call to
6899 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6900 constants where possible).
6901 * exp_ch7.adb: Rename Is_Protected_Body -->
6902 Is_Protected_Subp_Body. A protected_body is something different
6903 in the grammar.
6904
6905 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6906
6907 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6908 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6909 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6910 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6911 (P_Protected): Likewise.
6912 * sem_case.adb (Check_Duplicates):
6913 Add pragma Warnings on variable.
6914 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6915 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6916 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6917 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6918 (Analyze_Iterator_Specification): Initialize Bas variable.
6919 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6920 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6921 (Analyze_Accept_Statement): Initialize Task_Nam.
6922
6923 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6924
6925 * checks.adb (Install_Primitive_Elaboration_Check):
6926 Do not generate an elaboration check if all checks have been
6927 suppressed.
6928
6929 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6930
6931 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6932 Interrupt_Handler and Attach_Handler): Generate reference
6933 to protected operation to prevent spurious warnings about
6934 unreferenced entities. Previous scheme failed with style checks
6935 enabled.
6936
6937 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6938
6939 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6940 that follows an expression function must not be relocated to
6941 the generated body, because it applies to the code that follows.
6942
6943 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6944
6945 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6946 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6947 code that might violate the more stringent checking for 'Access
6948 introduced in Ada 2005.
6949
6950 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6951
6952 * a-cforse.adb: minor style fix in comment.
6953
6954 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6955
6956 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6957 initialize Block_Decls variable.
6958 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6959 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6960 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6961 Formal_DDT and Actual_DDT variables.
6962 (Expand_Interface_Thunk): Initialize Iface_Formal.
6963 (Make_DT): Initialize Size_Comp.
6964 (Make_Select_Specific_Data_Table): Initialize Decls.
6965 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6966 Also initialize more RPC_Receiver_* variables.
6967 (Build_To_Any_Function): Initialize Cstr_Formal.
6968 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6969
6970 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6971
6972 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6973 node between access types, freeze the designated type as well,
6974 so that dispatch table pointers are created in the proper scope,
6975 and not in the constructed body of the expression function.
6976
6977 2017-04-28 Bob Duff <duff@adacore.com>
6978
6979 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6980 value makes large compilations faster, but small compilations slower.
6981
6982 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6983
6984 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6985
6986 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6987
6988 * erroutc.adb (Compilation_Errors): Do not consider info messages
6989 as suitable warnings when warnings must be treated as errors.
6990 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6991 internally-generated packages when outputting completion
6992 information.
6993 * errout.adb (Output_Messages): Do not consider info messages as
6994 suitable warnings when warnings must be treated as errors.
6995 * errutil.adb (Finalize): Do not consider info messages as
6996 suitable warnings when warnings must be treated as errors.
6997
6998 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6999
7000 * warnsw.ads: Minor fix for incorrect wording in comment.
7001
7002 2017-04-28 Ed Schonberg <schonberg@adacore.com>
7003
7004 * sem_res.adb (In_Instance_Code): New predicate in
7005 Valid_Conversion, to determine whether a type conversion appears
7006 as (or within) an actual for a formal object. Type conversions
7007 in instances are not rechecked in Valid_Conversion because
7008 visibility changes between generic location andi instance may
7009 lead to spurious errors, but conversions within an actual must be
7010 fully checked, and they are not fully resolved when pre-analyzing
7011 the actuals.
7012
7013 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7014
7015 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
7016 New_Copy_Tree instead of Relocate_Node as any subsequent copies
7017 of the relocated node will have mangled Parent pointers.
7018 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
7019 tables used in conjunction with entity and itype replication.
7020 (Visit_Entity): Rewrite the restriction on which entities
7021 require duplication. The restriction now includes all types.
7022
7023 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7024
7025 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
7026 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
7027 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
7028 cleanups.
7029
7030 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7031
7032 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
7033 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
7034
7035 2017-04-28 Gary Dismukes <dismukes@adacore.com>
7036
7037 * exp_util.adb: Minor reformatting.
7038
7039 2017-04-28 Ed Schonberg <schonberg@adacore.com>
7040
7041 * sem_ch4.adb: Fix copy/pasto.
7042
7043 2017-04-27 Tristan Gingold <gingold@adacore.com>
7044
7045 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
7046 raise-gcc.c. Fix include search path for raise-gcc.c
7047
7048 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7049
7050 * fe.h (Warn_On_Questionable_Layout): Declare.
7051 * warnsw.ads (Warn_On_Record_Holes): Move down.
7052 (Warn_On_Questionable_Layout): New boolean variable.
7053 (Warning_Record): Add Warn_On_Questionable_Layout field.
7054 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
7055 (Restore_Warnings): Likewise.
7056 (Save_Warnings): Likewise.
7057 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
7058 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
7059 components_to_record.
7060 (gnu_field_to_gnat): New function.
7061 (warn_on_field_placement): Likewise.
7062 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
7063 parameters. Rename local variables and adjust recursive call.
7064 Rework final scan of the field list and implement warnings on the
7065 problematic placement of specific sorts of fields.
7066
7067 2017-04-27 Bob Duff <duff@adacore.com>
7068
7069 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
7070 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
7071 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
7072 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
7073 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
7074 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
7075 For efficiency, cache results of Is_Internal_File_Name and
7076 Is_Predefined_File_Name in the Units table. This avoids a lot
7077 of repeated text processing.
7078
7079 2017-04-27 Emmanuel Briot <briot@adacore.com>
7080
7081 * g-comlin.adb (Sort_Sections): remove useless test.
7082
7083 2017-04-27 Claire Dross <dross@adacore.com>
7084
7085 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
7086 allow the use of regular equality over elements in contracts.
7087 (Formal_Model): Ghost package containing model functions that are
7088 used in subprogram contracts.
7089 (Current_To_Last): Removed, model functions should be used instead.
7090 (First_To_Previous): Removed, model functions should be used instead.
7091 (Strict_Equal): Removed, model functions should be used instead.
7092 (No_Overlap): Removed, model functions should be used instead.
7093 (Equivalent_Keys): Functions over cursors are removed. They were
7094 awkward with explicit container parameters.
7095 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
7096 allow the use of regular equality over elements in contracts.
7097 (Formal_Model): Ghost package containing model functions that
7098 are used in subprogram contracts.
7099 (Current_To_Last): Removed, model functions should be used instead.
7100 (First_To_Previous): Removed, model functions should be used instead.
7101 (Strict_Equal): Removed, model functions should be used instead.
7102 (No_Overlap): Removed, model functions should be used instead.
7103
7104 2017-04-27 Yannick Moy <moy@adacore.com>
7105
7106 * gnat1drv.adb: Code cleanup.
7107
7108 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7109
7110 * exp_util.adb (Replace_Entity): The prefix of a 'Result
7111 attribute reference in a post- condition is the subprogram to
7112 which the condition applies. If the condition is inherited
7113 by a type extension, the prefix becomes a reference to the
7114 inherited operation, but there is no need to create a wrapper
7115 for this operation, because 'Result is expanded independently
7116 when elaborating the postconditions.
7117
7118 2017-04-27 Bob Duff <duff@adacore.com>
7119
7120 * sinput.adb: Minor code cleanup.
7121 * namet.adb (Append): Create faster versions of
7122 Append(String) and Append(Name_Id) by using slice assignment
7123 instead of loops.
7124 * sem_util.adb (In_Instance): Speed this up by removing
7125 unnecessary tests; Is_Generic_Instance is defined for all
7126 entities.
7127 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
7128 Remove unused function.
7129 * alloc.ads (Nodes_Initial): Use a much larger value, because
7130 the compiler was spending a lot of time copying the nodes table
7131 when it grows. This number was chosen in 1996, so is rather out
7132 of date with current memory sizes. Anyway, it's virtual memory.
7133 Get rid of Orig_Nodes_...; use Node_... instead.
7134 * atree.adb (Lock): Do not release the Nodes tables; it's a
7135 waste of time.
7136 Orig_Nodes_ ==> Nodes_
7137 * nlists.adb: Orig_Nodes_ ==> Nodes_
7138 * g-table.adb: Remove unused "with" clause.
7139 * g-table.ads, table.ads: Remove Big_Table_Type, which should
7140 not be used by clients.
7141 * g-dyntab.adb (Last_Allocated): New function
7142 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
7143
7144 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7145
7146 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
7147 check.
7148 (Subtypes_Statically_Match): Remove duplicate check.
7149 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
7150
7151 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7152
7153 * exp_aggr.adb (Replace_Type): Remove the special processing
7154 for selected components.
7155 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
7156 processing for attributes Fixed_Value and Integer_Value.
7157 * exp_util.adb (Side_Effect_Free): Merge the processing for
7158 qualified expressions, type conversions, and unchecked type
7159 conversions.
7160 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
7161 and Optional.
7162 * par-ch3.adb (P_Declarative_Items): Merge the processing for
7163 tokens function, not, overriding, and procedure.
7164 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
7165 for qualified expressions, type conversions, and unchecked
7166 type conversions.
7167 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
7168 processing for Ada 83 and instances.
7169 (Object_Access_Level): Merge the processing for indexed components
7170 and selected components.
7171 * uname.adb (Add_Node_Name): Merge the processing for stubs.
7172
7173 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7174
7175 * checks.adb (Install_Primitive_Elaboration_Check):
7176 Do not generate the check when restriction No_Elaboration_Code
7177 is in effect.
7178
7179 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7180
7181 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
7182 of Expand_Dispatching_Call. If the denoted subprogram has a
7183 class-wide precondition, this is the only precondition that
7184 applies to the call, rather that the class-wide preconditions
7185 that may apply to the body that is executed. (This is specified
7186 in AI12-0195).
7187
7188 2017-04-27 Yannick Moy <moy@adacore.com>
7189
7190 * gnat1drv.adb (Adjust_Global_Switches): Issue
7191 a warning in GNATprove mode if the runtime library does not
7192 support IEEE-754 floats.
7193
7194 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7195
7196 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
7197 is itself inherited it does not carry any contract information,
7198 so examine its parent operation which is its Alias.
7199
7200 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7201
7202 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
7203 prefix can be an object reference in which case Obj'Image (X)
7204 can only be interpreted as an indexing of the parameterless
7205 version of the attribute.
7206 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
7207 an indexing or a slice operation if the attribute does not require
7208 parameters. In Ada2012 'Image also belongs in this category,
7209 and A'Image (lo .. hi) is legal and must be parsed as a slice.
7210
7211 2017-04-27 Yannick Moy <moy@adacore.com>
7212
7213 * exp_ch4.adb: Minor reformatting.
7214 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
7215 disable the CodePeer and C generation modes. Similar to the
7216 opposite actions done in CodePeer mode.
7217
7218 2017-04-27 Yannick Moy <moy@adacore.com>
7219
7220 * sem_res.adb: Remove duplicate code.
7221 * sem_attr.adb: Delete duplicate code.
7222
7223 2017-04-27 Bob Duff <duff@adacore.com>
7224
7225 * g-dyntab.adb: Reduce the amount of copying in
7226 Release. No need to copy items past Last.
7227
7228 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7229
7230 * checks.adb Add with and use clauses for Sem_Disp.
7231 (Install_Primitive_Elaboration_Check): New routine.
7232 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
7233 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
7234 processing of 'Elaborated.
7235 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
7236 elaboration check.
7237
7238 2017-04-27 Bob Duff <duff@adacore.com>
7239
7240 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
7241 If the table grows and then shrinks back to empty, we won't necessarily
7242 point back to the empty array. Code cleanups.
7243 * sinput.ads: Add 'Base to Size clause to match the declared
7244 component subtypes.
7245
7246 2017-04-27 Claire Dross <dross@adacore.com>
7247
7248 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
7249 allow the use of regular equality over elements in contracts.
7250 (Formal_Model): Ghost package containing model functions that
7251 are used in subprogram contracts.
7252 (Current_To_Last): Removed, model functions should be used instead.
7253 (First_To_Previous): Removed, model functions should be used instead.
7254 (Strict_Equal): Removed, model functions should be used instead.
7255 (No_Overlap): Removed, model functions should be used instead.
7256 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
7257 Boolean generic parameter to disable contracts for equivalence
7258 between keys.
7259 (Witness): Create a witness of a key that is used for handling of
7260 equivalence between keys.
7261 (Has_Witness): Check whether a witness is contained in a map.
7262 (W_Get): Get the element associated to a witness.
7263 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
7264 directly.
7265 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
7266 Boolean generic parameter to disable contracts for equivalence
7267 between keys.
7268 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
7269 of equivalence on functional maps.
7270 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
7271 of equivalence on functional maps.
7272
7273 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7274
7275 * exp_ch9.adb (Expand_Entry_Barrier): Code
7276 cleanup. Do not perform the optimization which removes the
7277 declarations of the discriminant and component renamings when
7278 validity checks on operands and attributes are in effect.
7279
7280 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7281
7282 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7283 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7284 a-cfhama.ads, a-cofove.ads: Minor reformatting.
7285
7286 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7287
7288 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7289 pointer dereference.
7290 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7291 null pointer dereference.
7292
7293 2017-04-27 Bob Duff <duff@adacore.com>
7294
7295 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7296 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7297 Free renames Init, since they do the same thing.
7298 * g-table.ads: Default for Table_Low_Bound.
7299 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7300 Table_Increment.
7301
7302 2017-04-27 Bob Duff <duff@adacore.com>
7303
7304 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7305 can reallocate.
7306 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7307 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7308 Reorder code so that above assertions do not fail.
7309 * table.ads: Remove obsolete comment on Locked.
7310
7311 2017-04-27 Claire Dross <dross@adacore.com>
7312
7313 * a-cfdlli.ads: Code cleanup.
7314
7315 2017-04-27 Yannick Moy <moy@adacore.com>
7316
7317 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7318 when needed for proof. (Expand_SPARK): Call the new procedure.
7319 * exp_util.ads Fix typo.
7320
7321 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7322
7323 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7324 fixes.
7325
7326 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7327
7328 * sem_elab.adb Add new type Visited_Element
7329 and update the contents of table Elab_Visited. Various code clean up.
7330 (Check_Elab_Call): Determine whether a prior call to
7331 the same subprogram was already examined within the same context.
7332 (Check_Internal_Call_Continue): Register the subprogram being
7333 called as examined within a particular context. Do not suppress
7334 elaboration warnings.
7335
7336 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7337
7338 * xoscons.adb, osint.ads: Minor reformatting.
7339
7340 2017-04-27 Bob Duff <duff@adacore.com>
7341
7342 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7343 Table_Count_Type --> Table_Last_Type, because the name
7344 was confusing (a "count" usually starts at zero). Add
7345 functionality supported or needed by other tables packages
7346 (Move, Release_Threshold).
7347 * g-table.ads, g-table.adb: This is now just a thin wrapper
7348 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7349 or needed by other tables packages (Save, Restore).
7350 * table.ads, table.adb: This is now just a thin wrapper around
7351 * g-table.ads/g-table.adb.
7352 * namet.h, scos.h, uintp.h: These files are reaching into the
7353 private data of some instances of g-table, whose names changed,
7354 so the above change requires some adjustment here. It now uses
7355 public interfaces.
7356
7357 2017-04-27 Bob Duff <duff@adacore.com>
7358
7359 * namet.adb, namet.ads: Minor: remove unused procedures.
7360
7361 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7362
7363 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7364 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7365 Add pragma Warnings on Rtype variable in nested block. *
7366 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7367 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7368 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7369 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7370 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7371 (Build_Finalize_Statements): Initialize Bod_Stmts.
7372 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7373
7374 2017-04-27 Claire Dross <dross@adacore.com>
7375
7376 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7377 allow the use of regular equality over elements in contracts.
7378 (Formal_Model): Ghost package containing model functions that are
7379 used in subprogram contracts.
7380 (Current_To_Last): Removed, model
7381 functions should be used instead.
7382 (First_To_Previous): Removed, model functions should be used instead.
7383 (Strict_Equal): Removed, model functions should be used instead.
7384 (No_Overlap): Removed, model functions should be used instead.
7385 (Equivalent_Keys): Functions over cursors are removed. They were
7386 awkward with explicit container parameters.
7387 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7388 (proof only) procedure to help GNATprove when equivalence over
7389 keys is not equality.
7390
7391 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7392
7393 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7394 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7395 Minor reformatting and code cleanups.
7396
7397 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7398
7399 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7400 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7401 operation whose ancestor has classwide pre/postconditions. This
7402 is used both to check the legality of the inheritance in Ada
7403 and in SPARK, and to determine whether a wrapper is needed for
7404 an inherited operation.
7405 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7406 Improve placement of error message for inherited classwide
7407 conditions that become illegal on type derivation.
7408
7409 2017-04-27 Yannick Moy <moy@adacore.com>
7410
7411 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7412 SPARK_Mode from context on generic package.
7413 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7414 useless test.
7415
7416 2017-04-27 Claire Dross <dross@adacore.com>
7417
7418 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7419 overflows in computations.
7420 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7421 overflows in computations.
7422 (Insert): Rewrite precondition to avoid overflows in computations.
7423 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7424 overflows in computations.
7425 (Insert): Rewrite precondition to avoid overflows in computations.
7426
7427 2017-04-27 Steve Baird <baird@adacore.com>
7428
7429 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7430 flag when it is declared in order to avoid confusing CodePeer about
7431 the possibility of an uninitialized variable read.
7432
7433 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7434
7435 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7436 no dimensionality error if the subtype of the expression is
7437 identical to the nominal subtype in the declaration, even though
7438 the expression itself may have been constant-folded and lack a
7439 dimension vector.
7440 * sem_dim.ads: Add comments on setting of dimension vectors and
7441 its interaction with node rewritings and side-effect removal.
7442
7443 2017-04-27 Bob Duff <duff@adacore.com>
7444
7445 * debug.adb: Minor comment correction.
7446 * sem_dim.ads: Minor reformatting and typo fixes.
7447
7448 2017-04-27 Bob Duff <duff@adacore.com>
7449
7450 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7451 Last of the tables via function calls, rather than relying on layout
7452 of data structures.
7453
7454 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7455
7456 * exp_util.adb: No wrapper in GNATprove mode.
7457
7458 2017-04-27 Yannick Moy <moy@adacore.com>
7459
7460 * sem_res.adb (Resolve_Comparison_Op): Always
7461 evaluate comparisons between values of universal types.
7462
7463 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7464
7465 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7466 an elaboration counter nor a check when in GNATprove mode.
7467 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7468 elaboration counter when in GNATprove mode.
7469
7470 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7471
7472 * freeze.adb: copy-paste typo.
7473
7474 2017-04-27 Yannick Moy <moy@adacore.com>
7475
7476 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7477 Use correct test to detect call in GNATprove mode instead of
7478 compilation.
7479
7480 2017-04-27 Claire Dross <dross@adacore.com>
7481
7482 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7483 New property function expressing that the element of a
7484 sequence are contained in the union of two sequences.
7485 (Formal_Model.M_Elements_Included): New property function
7486 expressing that the element of a sequence are another sequence.
7487 (Generic_Sorting): Use new property functions to state that
7488 elements are preserved by Sort and Merge.
7489 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7490 allow the use of regular equality over elements in contracts.
7491 (Formal_Model): Ghost package containing model functions
7492 that are used in subprogram contracts. (Capacity):
7493 On unbounded containers, return the maximal capacity.
7494 (Current_To_Last): Removed, model functions should be used instead.
7495 (First_To_Previous): Removed, model functions should be used instead.
7496 (Append): Default parameter value replaced
7497 by new wrapper to allow more precise contracts.
7498 (Insert): Subprogram restored, it seems it was useful to users even if
7499 it is inefficient.
7500 (Delete): Subprogram restored, it seems it was useful to users even if
7501 it is inefficient.
7502 (Prepend): Subprogram restored, it seems it was useful to users even
7503 if it is inefficient.
7504 (Delete_First): Subprogram restored, it seems it
7505 was useful to users even if it is inefficient. (Delete_Last):
7506 Default parameter value replaced by new wrapper to allow more
7507 precise contracts.
7508 (Generic_Sorting.Merge): Subprogram restored.
7509 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7510 allow the use of regular equality over elements in contracts.
7511 (Formal_Model): Ghost package containing model functions
7512 that are used in subprogram contracts. (Capacity):
7513 On unbounded containers, return the maximal capacity.
7514 (Current_To_Last): Removed, model functions should be used
7515 instead.
7516 (First_To_Previous): Removed, model functions should be used instead.
7517 (Append): Default parameter value replaced
7518 by new wrapper to allow more precise contracts.
7519 (Insert): Subprogram restored, it seems it was useful to users even if
7520 it is inefficient.
7521 (Delete): Subprogram restored, it seems it was useful to users even if
7522 it is inefficient.
7523 (Prepend): Subprogram restored, it seems it was useful to users even
7524 if it is inefficient.
7525 (Delete_First): Subprogram restored, it seems it
7526 was useful to users even if it is inefficient. (Delete_Last):
7527 Default parameter value replaced by new wrapper to allow more
7528 precise contracts.
7529 (Generic_Sorting.Merge): Subprogram restored.
7530 (Vector): Do not reuse formal vectors, as it is no longer possible
7531 to supply them with an equality function over elements.
7532
7533 2017-04-27 Bob Duff <duff@adacore.com>
7534
7535 * g-dyntab.adb (Release): When allocating the new
7536 table, use the correct slice of the old table to initialize it.
7537
7538 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7539
7540 * einfo.ads: Minor fixes in comments.
7541
7542 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7543
7544 * sem_prag.adb: disable clones in SPARK_Mode.
7545
7546 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7547
7548 * sem_util.ads, contracts.adb: Minor reformatting.
7549
7550 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7551
7552 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7553 Build body of subprogram that has a class-wide condition that
7554 contains calls to other primitives.
7555 (Build_Class_Wide_Clone_Call); Build a call to the common
7556 class-wide clone of a subprogram with classwide conditions. The
7557 body of the subprogram becomes a wrapper for a call to the
7558 clone. The inherited operation becomes a similar wrapper to which
7559 modified conditions apply, and the call to the clone includes
7560 the proper conversion in a call the parent operation.
7561 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7562 subprogram that has a classwide condition that contains calls to
7563 other primitives, build an internal subprogram that is invoked
7564 through a type-specific wrapper for all inherited subprograms
7565 that may have a modified condition.
7566 * sem_prag.adb (Check_References): If subprogram has a classwide
7567 condition, create entity for corresponding clone, to be invoked
7568 through wrapper subprograns.
7569 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7570 message about placement if pragma isi internally generated.
7571 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7572 a classwide clone, build body of clone as copy of original body,
7573 and rewrite original body as a wrapper as a wrapper for a call to
7574 the clone, so that it incorporates the original pre/postconditions
7575 of the subprogram.
7576 * freeze.adb (Check_Inherited_Conditions): For an inherited
7577 subprogram that inherits a classwide condition, build spec and
7578 body of corresponding wrapper so that call to inherited operation
7579 gets the modified conditions.
7580 * contracts.adb (Analyze_Contracts): If analysis of classwide
7581 condition has created a clone for a primitive operation, analyze
7582 declaration of clone.
7583
7584 2017-04-27 Steve Baird <baird@adacore.com>
7585
7586 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7587 Add "Suppress => All_Checks" to avoid generating unnecessary
7588 checks.
7589
7590 2017-04-27 Yannick Moy <moy@adacore.com>
7591
7592 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7593 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7594 inlining body in GNATprove mode when switch -gnatdm used.
7595 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7596 in GNATprove mode when switch -gnatdm used.
7597
7598 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7599
7600 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7601 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7602 clauses, so that we keep an indication of the address clause
7603 before removing it from the tree.
7604
7605 2017-04-27 Yannick Moy <moy@adacore.com>
7606
7607 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7608 of expression being qualified, when not an object name, or else
7609 evaluate the underlying name.
7610
7611 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7612
7613 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7614
7615 2017-04-27 Justin Squirek <squirek@adacore.com>
7616
7617 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7618 Process_Component_List_For_Finalization as a local variable.
7619 (Process_Component_For_Finalize): Add an extra parameter to avoid
7620 global references.
7621 (Process_Component_List_For_Finalization): Correct calls to
7622 Process_Component_For_Finalize to take Num_Comps as a parameter.
7623
7624 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7625
7626 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7627 a use-visible entity is defined within a nested scope of an
7628 instance when giving priority to entities which were visible in
7629 the original generic.
7630 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7631
7632 2017-04-27 Tristan Gingold <gingold@adacore.com>
7633
7634 * raise-gcc.c: Don't use unwind.h while compiling
7635 for the frontend, but mimic host behavior.
7636
7637 2017-04-27 Javier Miranda <miranda@adacore.com>
7638
7639 * sem_ch3.adb (Build_Discriminated_Subtype):
7640 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7641
7642 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7643
7644 * sem_prag.adb (Analyze_Global_Item):
7645 Do not consider discriminants because they are not "entire
7646 objects". Remove the discriminant-related checks because they are
7647 obsolete.
7648 (Analyze_Input_Output): Do not consider discriminants
7649 because they are not "entire objects".
7650
7651 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7652
7653 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7654 perform check if the current scope does not come from source,
7655 as is the case for a rewritten task body, because check has
7656 been performed already, and may not be doable because of changed
7657 visibility.
7658
7659 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7660
7661 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7662 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7663 Minor reformatting.
7664
7665 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7666
7667 * sem_ch4.adb (Analyze_Call): If the return type of a function
7668 is incomplete in an context in which the full view is available,
7669 replace the type of the call by the full view, to prevent spurious
7670 type errors.
7671 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7672 abstract subprogram so that compiler does not reject a parameter
7673 of a primitive operation of a tagged type being frozen, when
7674 the untagged type of that parameter cannot be frozen.
7675
7676 2017-04-27 Bob Duff <duff@adacore.com>
7677
7678 * sem_attr.adb (Compute_Type_Key): Don't walk
7679 representation items for irrelevant types, which could be in a
7680 different source file.
7681
7682 2017-04-27 Steve Baird <baird@adacore.com>
7683
7684 * exp_attr.adb (Expand_N_Attribute_Reference):
7685 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7686 for CodePeer.
7687
7688 2017-04-27 Yannick Moy <moy@adacore.com>
7689
7690 * exp_unst.ads: Fix typos in comments.
7691
7692 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7693
7694 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7695 whose type has a defined static predicate.
7696
7697 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7698
7699 * exp_ch4.adb (Insert_Dereference_Action):
7700 Do not adjust the address of a controlled object when the
7701 associated access type is subject to pragma No_Heap_Finalization.
7702 Code reformatting.
7703
7704 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7705
7706 * gcc-interface/utils.c (gnat_type_for_size): Set
7707 TYPE_ARTIFICIAL on created types.
7708
7709 2017-04-27 Claire Dross <dross@adacore.com>
7710
7711 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7712 modifications in functional containers.
7713 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7714 to improve readablity. Subprograms are separated between basic
7715 operations, constructors and properties. Universally quantified
7716 formulas in contracts are factorized in independant functions
7717 with a name and a comment. Names of parameters are improved.
7718
7719 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7720
7721 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7722
7723 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7724
7725 * sem_res.adb (Resolve_Type_Conversion): Do not
7726 install a predicate check here since this is already done during
7727 the expansion phase. Verify whether the operand satisfies the
7728 static predicate (if any) of the target type.
7729 * sem_ch3.adb (Analyze_Object_Declaration): Do
7730 not install a predicate check if the object is initialized by
7731 means of a type conversion because the conversion is subjected
7732 to the same check.
7733
7734 2017-04-27 Tristan Gingold <gingold@adacore.com>
7735
7736 * raise.c (__gnat_builtin_longjmp): Remove.
7737 (__gnat_bracktrace):
7738 Add a dummy definition for the compiler (__gnat_eh_personality,
7739 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7740 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7741 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7742 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7743 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7744 and a-except-2005.adb.
7745 * raise-gcc.c: Allow build in compiler, compiled as a C++
7746 file.
7747 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7748 (db): Constify msg_format.
7749 (get_call_site_action_for): Don't use void arithmetic.
7750 * system.ads (Frontend_Exceptions): Set to False.
7751 (ZCX_By_Default): Set to True.
7752 (GCC_ZC_Support): Set to True.
7753 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7754 a-except.ad[sb].
7755 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7756 in gnat1 and gnatbind.
7757 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7758 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7759 * s-excmac.ads, s-excmac.adb: Copy of variants.
7760 * a-except.o: Adjust preequisites.
7761 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7762
7763 2017-04-27 Claire Dross <dross@adacore.com>
7764
7765 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7766 modifications in functional containers.
7767 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7768 to improve readablity. Subprograms are separated between basic
7769 operations, constructors and properties. Universally quantified
7770 formulas in contracts are factorized in independant functions
7771 with a name and a comment. Names of parameters are improved.
7772
7773 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7774
7775 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7776
7777 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7778
7779 * sem_res.adb (Resolve_Type_Conversion): Do not
7780 install a predicate check here since this is already done during
7781 the expansion phase. Verify whether the operand satisfies the
7782 static predicate (if any) of the target type.
7783 * sem_ch3.adb (Analyze_Object_Declaration): Do
7784 not install a predicate check if the object is initialized by
7785 means of a type conversion because the conversion is subjected
7786 to the same check.
7787
7788 2017-04-27 Tristan Gingold <gingold@adacore.com>
7789
7790 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7791 replaced by their variants).
7792
7793 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7794
7795 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7796 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7797 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7798
7799 2017-04-27 Tristan Gingold <gingold@adacore.com>
7800
7801 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7802 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7803 Ada95.
7804
7805 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7806
7807 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7808 the loop which detects potential enclosing transient scopes. The
7809 loop now terminates much earlier as transient scopes are bounded
7810 by packages and subprograms.
7811
7812 2017-04-27 Claire Dross <dross@adacore.com>
7813
7814 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7815 allow the use of regular equality over elements in contracts.
7816 (Cursor): Type is now public so that it can be used in
7817 model functions.
7818 (Formal_Model): Ghost package containing
7819 model functions that are used in subprogram contracts.
7820 (Current_To_Last): Removed, model functions should be used
7821 instead.
7822 (First_To_Previous): Removed, model functions should
7823 be used instead.
7824 (Strict_Equal): Removed, model functions
7825 should be used instead.
7826 (Append): Default parameter value
7827 replaced by new wrapper to allow more precise contracts.
7828 (Insert): Default parameter value replaced by new wrapper to
7829 allow more precise contracts.
7830 (Delete): Default parameter
7831 value replaced by new wrapper to allow more precise contracts.
7832 (Prepend): Default parameter value replaced by new wrapper to
7833 allow more precise contracts.
7834 (Delete_First): Default parameter
7835 value replaced by new wrapper to allow more precise contracts.
7836 (Delete_Last): Default parameter value replaced by new wrapper
7837 to allow more precise contracts.
7838
7839 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7840
7841 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7842 for object declarations.
7843 (Expand_SPARK_N_Object_Declaration): New routine.
7844 * sem_elab.adb (Check_A_Call): Include calls to the
7845 Default_Initial_Condition procedure of a type under the SPARK
7846 elaboration checks umbrella.
7847
7848 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7849
7850 * sem.adb (Analyze): Diagnose an illegal iterated component
7851 association.
7852 * sem_util.ads, sem_util.adb
7853 (Diagnose_Iterated_Component_Association): New routine.
7854
7855 2017-04-27 Bob Duff <duff@adacore.com>
7856
7857 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7858 getcwd fails.
7859 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7860 exception if getcwd failed.
7861
7862 2017-04-27 Yannick Moy <moy@adacore.com>
7863
7864 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7865 entities with special prefix.
7866
7867 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7868
7869 * debug.adb Change the documentation of switch -gnatd.s.
7870 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7871 to manage the secondary stack when an enclosing scope already
7872 performs this functionality (aka relaxed management). Switch
7873 -gnatd.s may be used to force strict management in which case
7874 the block will manage the secondary stack unconditionally. Add
7875 a guard to stop the traversal when encountering a package or a
7876 subprogram scope.
7877
7878 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7879
7880 * sem_res.adb (Resolve_Call): Refine further the handling of
7881 limited views of return types in function calls. If the function
7882 that returns a limited view appears in the current unit,
7883 we do not replace its type by the non-limited view because
7884 this transformation is performed int the back-end. However,
7885 the type of the call itself must be the non-limited view, to
7886 prevent spurious resolution errors.
7887
7888 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7889
7890 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7891 Removed, proposed implementation using generics for class-wide
7892 preconditions proved impractical.
7893 (Class_Wide_Clone): New attribute of subprogram. Designates
7894 subprogram created for primitive operations with class-wide
7895 pre/postconditions that contain calls to other primitives. The
7896 clone holds the body of the original primitive, but the
7897 pre/postonditions do not apply to it. The original body is
7898 rewritten as a wrapper for a call to the clone.
7899 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7900 the flag is set, no code for the corresponding pre/postconditions
7901 is inserted into its body.
7902
7903 2017-04-27 Bob Duff <duff@adacore.com>
7904
7905 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7906 Scalar_Storage_Order if -gnatI is given.
7907 * sem_prag.adb (Analyze_Pragma): Ignore
7908 Default_Scalar_Storage_Order if -gnatI is given.
7909
7910 2017-04-27 Claire Dross <dross@adacore.com>
7911
7912 * a-cofuba.ads (Add): Take as an additional input parameter
7913 the position where the element should be inserted.
7914 (Remove): New function that removes an element from the container.
7915 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7916 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7917 (Remove): New function that removes an element from a set.
7918 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7919 (Remove): New function that removes an element from a sequence.
7920 (Insert): New function that adds anywhere in a sequence.
7921
7922 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7923
7924 * checks.adb (Generate_Range_Check): Revert previous change.
7925
7926 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7927
7928 * sem_util.adb: Minor reformatting/rewording.
7929
7930 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7931
7932 * lib-xref.adb (Generate_Reference): The use
7933 of attribute 'Result is not considered a violation of pragma
7934 Unreferenced.
7935
7936 2017-04-27 Justin Squirek <squirek@adacore.com>
7937
7938 * cstand.adb (Create_Standard): Correctly set
7939 Directly_Designated_Type for Any_Access.
7940 * sem_type.adb (Covers): Minor grammar fixes.
7941
7942 2017-04-27 Bob Duff <duff@adacore.com>
7943
7944 * sem_attr.adb: Minor cleanup.
7945
7946 2017-04-27 Claire Dross <dross@adacore.com>
7947
7948 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7949 private child of Ada.Containers used to implement all functional
7950 containers.
7951 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7952 child of Ada.Containers. It provides functional indefinite unbounded
7953 maps which can be used as high level models for specification
7954 of data structures.
7955 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7956 child of Ada.Containers. It provides functional indefinite unbounded
7957 sets which can be used as high level models for specification
7958 of data structures.
7959 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7960 child of Ada.Containers. It provides functional indefinite unbounded
7961 vectors which can be used as high level models for specification
7962 of data structures.
7963 * Makefile.rtl: Add new packages.
7964 * impunit.adb: Add new packages.
7965
7966 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7967
7968 * sem_ch4.adb: Minor reformatting.
7969
7970 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7971
7972 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7973 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7974 point type actual that has user-defined arithmetic primitives,
7975 when there is a previous actual for a formal package that defines
7976 a fixed-point type with the parent user-defined operator.
7977
7978 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7979
7980 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7981 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7982 the component type allows range checks.
7983
7984 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7985
7986 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7987 corresponding declaration, because formal derived types are
7988 rewritten as private extensions.
7989
7990 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7991
7992 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7993 dimensions of operands if node has been analyzed already, because
7994 previous analysis and dimension checking will have removed the
7995 dimension information from the operands.
7996
7997 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7998
7999 * debug.adb: Document the use of switch -gnatd.s.
8000 * einfo.ads Update the documentation on attribute
8001 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
8002 the uses of these attributes from certain entities.
8003 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
8004 which determines whether the block should continue to manage
8005 the secondary stack.
8006 (Manages_Sec_Stack): New routine.
8007
8008 2017-04-27 Bob Duff <duff@adacore.com>
8009
8010 * atree.ads: Minor edit.
8011
8012 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
8013
8014 * sinfo.ads: Update the section on Ghost mode. Add
8015 a section on SPARK mode. Update the placement of section on
8016 expression functions.
8017
8018 2017-04-27 Bob Duff <duff@adacore.com>
8019
8020 * sinput.adb (Get_Source_File_Index): Don't
8021 assert that S is in the right range in the case where this is
8022 a .dg file under construction.
8023
8024 2017-04-27 Yannick Moy <moy@adacore.com>
8025
8026 * sem_util.adb (Check_Result_And_Post_State):
8027 Handle more precisely each conjunct in expressions formed by
8028 and'ing sub-expressions.
8029
8030 2017-04-27 Gary Dismukes <dismukes@adacore.com>
8031
8032 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
8033
8034 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8035
8036 * gnat_rm.texi, gnat_ugn.texi,
8037 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
8038 doc/gnat_ugn/platform_specific_information.rst,
8039 doc/gnat_ugn/gnat_and_program_execution.rst,
8040 doc/gnat_ugn/gnat_utility_programs.rst,
8041 doc/gnat_ugn/the_gnat_compilation_model.rst,
8042 doc/gnat_rm/implementation_defined_attributes.rst,
8043 doc/gnat_rm/the_gnat_library.rst,
8044 doc/gnat_rm/implementation_defined_pragmas.rst,
8045 doc/gnat_rm/representation_clauses_and_pragmas.rst,
8046 doc/gnat_rm/implementation_of_specific_ada_features.rst,
8047 doc/gnat_rm/implementation_defined_aspects.rst,
8048 doc/gnat_rm/implementation_defined_characteristics.rst: Update
8049 documentation.
8050
8051 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8052
8053 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
8054 generating C code on complex case expressions.
8055
8056 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8057
8058 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
8059 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
8060 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
8061 Ada_2012 instead of Ada_2005 to be compatible with the above
8062 change.
8063 * bindgen.adb: Silence new warning on pragma Ada_95.
8064
8065 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8066
8067 * checks.adb (Generate_Range_Check): Revert part of previous change.
8068
8069 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8070
8071 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
8072 container indexing operation that appears as a an actual in a
8073 parameter association in a procedure call.
8074
8075 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
8076
8077 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
8078 Fix spelling mistakes.
8079
8080 2017-04-25 Bob Duff <duff@adacore.com>
8081
8082 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
8083 * sinput-p.adb: Use regular fat pointers, with bounds checking,
8084 for source buffers. Fix misc obscure bugs.
8085 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
8086 checking, for source buffers. Modify representation clause for
8087 Source_File_Record as appropriate. Move Source_File_Index_Table
8088 from spec to body, because it is not used outside the body.
8089 Move Set_Source_File_Index_Table into the private part, because
8090 it is used only in the body and in children. Use trickery to
8091 modify the dope in the generic instantiation case. It's ugly,
8092 but not as ugly as the previous method. Fix documentation.
8093 Remove obsolete code.
8094 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
8095 indexing in source buffers.
8096 * fmap.adb: Avoid conversions from one string type to another.
8097 Remove a use of global name buffer.
8098 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
8099 fixes.
8100
8101 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8102
8103 * exp_util.adb, exp_ch4.adb: Minor reformatting.
8104
8105 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8106
8107 * checks.adb: Code clean up in various routines.
8108 (Generate_Range_Check): Do not generate a range check when the
8109 expander is not active or when index/range checks are suppressed
8110 on the target type.
8111 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
8112 Remove variants that include a Supress parameter. These routines
8113 are never used, and were introduced before the current scope-based
8114 check suppression method.
8115
8116 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
8117
8118 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
8119 code and some subprogram calls that are now noop.
8120
8121 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8122
8123 * exp_ch4.adb (Expand_N_Case_Expression): Take
8124 Minimize_Expression_With_Actions into account when possible.
8125
8126 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8127
8128 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
8129 (Known_Null): Moved to Sem_Util.
8130 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
8131 (Known_Null): Moved to Sem_Util.
8132 * sem_util.adb Add new enumeration type Null_Status_Kind.
8133 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
8134 this routine is now carried out by Null_Status.
8135 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
8136 is now carried out by Null_Status.
8137 (Null_Status): New routine.
8138 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
8139 (Known_Null): Moved from Exp_Util.
8140
8141 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8142
8143 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
8144 error on the return type of an expression function that is a
8145 completion, if the type is derived from a generic formal type.
8146
8147 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8148
8149 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
8150 conversion are those of the target type.
8151
8152 2017-04-25 Bob Duff <duff@adacore.com>
8153
8154 * a-clrefi.adb: Minor cleanup.
8155
8156 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8157
8158 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
8159
8160 2017-04-25 Bob Duff <duff@adacore.com>
8161
8162 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
8163 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
8164 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
8165 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
8166 the Internal_Source buffer. This removes the incorrect call to "="
8167 the customer noticed.
8168 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
8169 eventually need to eliminate them altogether. Or else get rid
8170 of zero-origin addressing.
8171
8172 2017-04-25 Claire Dross <dross@adacore.com>
8173
8174 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
8175 function used in GNATprove to know if an expression contains
8176 non-dispatching calls on primitives of a tagged type.
8177
8178 2017-04-25 Bob Duff <duff@adacore.com>
8179
8180 * rtsfind.adb (Initialize): Initialize
8181 First_Implicit_With. Building the compiler with Normalize_Scalars
8182 and validity checking finds this being used as an uninitialized
8183 variable.
8184
8185 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8186
8187 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
8188 Add a warning about SPARK mode management. The routine now
8189 saves and restores both the mode and associated pragma.
8190 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
8191 SPARK mode management. The routine now saves and restores both
8192 the mode and associated pragma.
8193 (Analyze_Object_Contract):
8194 Add a warning about SPARK mode management. The routine
8195 now saves and restores both the mode and associated pragma.
8196 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
8197 management. The routine now saves and restores both the mode
8198 and associated pragma. (Analyze_Package_Contract): Add a warning
8199 about SPARK mode management. The routine now saves and restores
8200 both the mode and associated pragma.
8201 (Analyze_Task_Contract):
8202 Add a warning about SPARK mode management. The routine now saves
8203 and restores both the mode and associated pragma.
8204 * expander.adb (Expand): Change the way the Ghost mode is saved
8205 and restored.
8206 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
8207 saved and restored.
8208 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
8209 and restored.
8210 * exp_util.adb (Build_DIC_Procedure_Body):
8211 Change the way the Ghost mode is saved and restored.
8212 (Build_DIC_Procedure_Declaration): Change the way the Ghost
8213 mode is saved and restored.
8214 (Build_Invariant_Procedure_Body):
8215 Change the way the Ghost mode is saved and restored.
8216 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
8217 mode is saved and restored.
8218 (Make_Predicate_Call): Change the
8219 way the Ghost mode is saved and restored.
8220 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
8221 saved and restored.
8222 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8223 and its assignment.
8224 (Mark_And_Set_Ghost_Body): Remove parameter
8225 Mode and its assignment.
8226 (Mark_And_Set_Ghost_Completion):
8227 Remove parameter Mode and its assignment.
8228 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
8229 assignment.
8230 (Mark_And_Set_Ghost_Instantiation): Remove parameter
8231 Mode and its assignment.
8232 (Mark_And_Set_Ghost_Procedure_Call):
8233 Remove parameter Mode and its assignment.
8234 (Set_Ghost_Mode):
8235 Remove parameter Mode and its assignment.
8236 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8237 and update the comment on usage.
8238 (Mark_And_Set_Ghost_Body):
8239 Remove parameter Mode and update the comment on usage.
8240 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
8241 update the comment on usage.
8242 (Mark_And_Set_Ghost_Declaration):
8243 Remove parameter Mode and update the comment on usage.
8244 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
8245 update the comment on usage.
8246 (Mark_And_Set_Ghost_Procedure_Call):
8247 Remove parameter Mode and update the comment on usage.
8248 (Set_Ghost_Mode): Remove parameter Mode and update the comment
8249 on usage.
8250 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
8251 types.
8252 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
8253 of obsolete field SPARK_Mode_Pragma.
8254 (Load_Main_Source): Remove
8255 the assignment of obsolete field SPARK_Mode_Pragma.
8256 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
8257 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
8258 the assignment of obsolete field SPARK_Mode_Pragma.
8259 (Ensure_System_Dependency): Remove the assignment of obsolete
8260 field SPARK_Mode_Pragma.
8261 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
8262 mode management. Change the way Ghost and SPARK modes are saved
8263 and restored.
8264 * sem.adb (Analyze): Change the way the Ghost mode is saved
8265 and restored.
8266 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
8267 Ghost mode is saved and restored.
8268 (Process_Full_View): Change
8269 the way the Ghost mode is saved and restored.
8270 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
8271 mode is saved and restored.
8272 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
8273 mode is saved and restored.
8274 (Analyze_Subprogram_Body_Helper):
8275 Change the way the Ghost mode is saved and restored.
8276 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
8277 Ghost mode is saved and restored.
8278 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
8279 management. Save the SPARK mode-related data prior to any changes
8280 to the scope stack and contexts. The mode is then reinstalled
8281 before the subunit is analyzed in order to restore the original
8282 view of the subunit.
8283 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8284 warning on region management. Change the way the Ghost and
8285 SPARK modes are saved and restored.
8286 (Inline_Instance_Body):
8287 Add a warning about SPARK mode management. Code clean up.
8288 (Analyze_Subprogram_Instantiation): Update the warning on region
8289 management. Change the way the Ghost and SPARK modes are saved
8290 and restored.
8291 (Instantiate_Package_Body): Update the warning
8292 on region management. Change the way the Ghost and SPARK modes
8293 are saved and restored.
8294 (Instantiate_Subprogram_Body): Update
8295 the warning on region management. Change the way the Ghost and
8296 SPARK modes are saved and restored.
8297 (Set_Instance_Env): Add a
8298 warning about SPARK mode management. Change the way SPARK mode
8299 is saved and restored.
8300 * sem_ch13.adb (Build_Predicate_Functions):
8301 Change the way the Ghost mode is saved and restored.
8302 (Build_Predicate_Function_Declaration): Change the way the Ghost
8303 mode is saved and restored.
8304 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8305 mode management. Change the way SPARK mode is saved and restored.
8306 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8307 Change the way the Ghost mode is saved and restored.
8308 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8309 the Ghost mode is saved and restored.
8310 (Analyze_Pragma):
8311 Change the way the Ghost mode is saved and restored.
8312 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8313 Ghost mode is saved and restored.
8314 * sem_util.adb (Install_SPARK_Mode): New routine.
8315 (Restore_SPARK_Mode): New routine.
8316 (Save_SPARK_Mode_And_Set): Removed.
8317 (Set_SPARK_Mode): New routine.
8318 * sem_util.ads (Install_SPARK_Mode): New routine.
8319 (Restore_SPARK_Mode): New routine.
8320 (Save_SPARK_Mode_And_Set): Removed.
8321 (Set_SPARK_Mode): New routine.
8322
8323 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8324
8325 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8326 to determine whether a type is declared in a local package that
8327 has not yet been frozen.
8328 * freeze.adb (Freeze_Before): Use new predicate to determine
8329 whether a local package must be installed on the scope stack
8330 in order to evaluate in the proper scope actions generated by
8331 aspect specifications, such as Predicate
8332 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8333 using new predicate.
8334
8335 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8336
8337 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8338 comparisons between non- scalar expressions expressions because
8339 their values cannot be invalidated.
8340 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8341 comment on usage.
8342
8343 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8344
8345 * par_sco.adb: Minor reformatting.
8346
8347 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8348
8349 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8350 is a type from an unfrozen local package, install package to
8351 complete the analysis of delayed aspects of the type.
8352
8353 2017-04-25 Tristan Gingold <gingold@adacore.com>
8354
8355 * bingen.adb (System_Version_Control_Used): New variable.
8356 (Resolve_Binder_Options): Set the above variable.
8357 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8358 (Gen_Elab_Order): Emit blank line before.
8359
8360 2017-04-25 Justin Squirek <squirek@adacore.com>
8361
8362 * sem_cat.adb (Validate_RT_RAT_Component): Added
8363 an extra check to ignore incomplete types.
8364
8365 2017-04-25 Thomas Quinot <quinot@adacore.com>
8366
8367 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8368 bogus circuitry for the case where Name is Predicate.
8369
8370 2017-04-25 Thomas Quinot <quinot@adacore.com>
8371
8372 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8373 Create SCOs for Predicate aspects in disabled
8374 state initially, to be enabled later on by...
8375 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8376 SCO for predicate as enabled.
8377
8378 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8379
8380 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8381 pragmas Warnings Off / On.
8382 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8383 Warnings Off / On.
8384 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8385 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8386 consider comparisons between static expressions because their
8387 values cannot be invalidated.
8388 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8389 Warnings Off / On.
8390 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8391 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8392
8393 2017-04-25 Bob Duff <duff@adacore.com>
8394
8395 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8396 task bodies.
8397
8398 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8399
8400 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8401 typo fixes.
8402
8403 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8404
8405 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8406 On/Off to defend against a spurious warning in conditional
8407 compilation.
8408 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8409 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8410 defend against a spurious warning in conditional compilation.
8411 * output.adb Add a pair of pragma Warnings On/Off to defend
8412 against a spurious warning in conditional compilation.
8413 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8414 (Fold_General_Op): New routine.
8415 (Fold_Static_Real_Op): New routine.
8416 (Test_Comparison): New routine.
8417 * sem_eval.ads (Test_Comparison): New routine.
8418 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8419 (Warn_On_Constant_Valid_Condition): New routine.
8420 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8421 to detect a specific case.
8422 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8423 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8424 to defend against a spurious warning in conditional compilation.
8425 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8426 against a spurious warning in conditional compilation.
8427 * usage.adb Add a pair of pragma Warnings On/Off to defend
8428 against a spurious warning in conditional compilation.
8429
8430 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8431
8432 * sinfo.ads, sem_ch13.adb: Update comment.
8433
8434 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8435
8436 * sem_util.adb (Is_Post_State): A reference to a
8437 generic in out parameter is considered a change in the post-state
8438 of a subprogram.
8439
8440 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8441
8442 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8443 declaration of a subprogram instance within its wrapper package,
8444 skip over null statements that may result from the rewriting of
8445 ignored pragmas.
8446
8447 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8448
8449 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8450 If the type is an unchecked_union, replace the attribute with
8451 a Raise_Program_Error (rather than inserting such before the
8452 attribute reference) to handle properly the case where we are
8453 processing a component of a larger record, and we need to prevent
8454 further expansion for the unchecked union.
8455 (Expand_Attribute_Reference, case 'Write): If the type is
8456 an unchecked_union, check whether enclosing scope is a Write
8457 subprogram. Replace attribute with a Raise_Program_Error if the
8458 discriminants of the unchecked_union type have not default values
8459 because such a use is erroneous..
8460
8461 2017-04-25 Tristan Gingold <gingold@adacore.com>
8462
8463 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8464 Add relative_deadline to task record on edf profile.
8465 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8466 (Make_Task_Create_Call): Pass relative_deadline value.
8467 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8468 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8469 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8470 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8471 GNAT_Ravenscar_EDF (set scheduling policy).
8472 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8473 pragma.
8474 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8475 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8476 New names.
8477 (Pragma_Deadline_Floor): New pragma.
8478 * targparm.adb (Get_Target_Parameters): Recognize
8479 GNAT_Ravenscar_EDF profile.
8480
8481 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8482
8483 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8484
8485 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8486
8487 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8488 declaration to locate nearest ancestor, because derived
8489 type declarations for record types are rewritten as record
8490 declarations.
8491 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8492 properly derivations that are completions of private types.
8493 (Add_Predicates): If type is private, examine rep. items of full
8494 view, which may include inherited predicates.
8495 (Build_Predicate_Functions): Ditto.
8496
8497 2017-04-25 Javier Miranda <miranda@adacore.com>
8498
8499 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8500 to generate new entities for subtype declarations located in
8501 Expression_With_Action nodes.
8502
8503 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8504
8505 * sem_elab.adb (Check_A_Call): Remove
8506 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8507 need for Elaborate_All when SPARK elaboration checks are
8508 required. Update the checks for instances, variables, and calls
8509 to Default_Initial_Condition procedures.
8510
8511 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8512
8513 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8514 into a boolean aspect, in analogy with the Ada aspect No_Return.
8515
8516 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8517
8518 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8519
8520 2017-04-25 Bob Duff <duff@adacore.com>
8521
8522 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8523 Is_True_Constant for an array variable that is passed to a
8524 foreign function as an 'in' parameter.
8525 * debug.adb: Document -gnatd.q.
8526
8527 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8528
8529 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8530 is completion and return type is an access type do not freeze
8531 designated type: this will be done in the process of freezing
8532 the expression if needed.
8533 (Freeze_Expr_Types): Check whether type is complete before
8534 creating freeze node, to provide a better error message if
8535 reference is premature.
8536 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8537 functions created by type derivations.
8538
8539 2017-04-25 Pascal Obry <obry@adacore.com>
8540
8541 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8542
8543 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8544
8545 * sem_res.adb (Resolve_Type_Conversion):
8546 When resolving against any fixed type, set the type of the
8547 operand as universal real when the operand is a multiplication
8548 or a division where both operands are of any fixed type.
8549 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8550 placement of an error message by pointing to the operand of a
8551 type conversion rather than the conversion itself.
8552
8553 2017-04-25 Thomas Quinot <quinot@adacore.com>
8554
8555 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8556 Needs_Debug_Info when producing SCOs.
8557
8558 2017-04-25 Thomas Quinot <quinot@adacore.com>
8559
8560 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8561 Always pass a null finalization master for a library level named access
8562 type to which a pragme No_Heap_Finalization applies.
8563
8564 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8565
8566 PR ada/78845
8567
8568 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8569 set to A'First(2) and vice versa.
8570
8571 2017-04-25 Yannick Moy <moy@adacore.com>
8572
8573 * freeze.adb (Freeze_Record_Type): Remove obsolete
8574 rule on volatile tagged record restriction on SPARK code.
8575
8576 2017-04-25 Yannick Moy <moy@adacore.com>
8577
8578 * sem_prag.adb (minor) Fix SPARK RM reference.
8579
8580 2017-04-25 Yannick Moy <moy@adacore.com>
8581
8582 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8583 comment to reflect which entity is chosen as unique entity.
8584 (Unique_Entity): Return full view instead of private spec for
8585 protected type or task type. Fix possible incorrect access when
8586 called on entry.
8587
8588 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8589
8590 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8591 array types only instead of all packed array types.
8592
8593 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8594
8595 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8596 dimension system, verify that dimensions of both match.
8597 (Check_Conformance): Add error message in case of dimension
8598 mismatch.
8599 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8600 predicate.
8601
8602 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8603
8604 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8605 confusing.
8606
8607 2017-04-25 Yannick Moy <moy@adacore.com>
8608
8609 * sem_util.adb: Minor refactoring.
8610 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8611
8612 2017-04-25 Claire Dross <dross@adacore.com>
8613
8614 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8615 ultimate alias when accessing overridden operation. Indeed, if the
8616 overridden operation is itself inherited, it won't have any explicit
8617 contract.
8618
8619 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8620
8621 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8622 overlap if the two formals have different types, because formally
8623 the corresponding actuals cannot designate the same objects.
8624
8625 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8626
8627 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8628 dimensions are present from context, use them. b) If operand is
8629 a static constant rewritten as a literal, obtain the dimensions
8630 from the original declaration, otherwise use dimensions of type
8631 established from context.
8632
8633 2017-04-25 Yannick Moy <moy@adacore.com>
8634
8635 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8636 of array that is private.
8637
8638 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8639
8640 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8641 reformatting.
8642
8643 2017-04-25 Yannick Moy <moy@adacore.com>
8644
8645 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8646 on body.
8647
8648 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8649
8650 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8651 the check that recognizes a call to a private overridding and
8652 replaces the called subprogram with its alias.
8653
8654 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8655
8656 * exp_util.adb: Minor reformatting.
8657
8658 2017-04-25 Justin Squirek <squirek@adacore.com>
8659
8660 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8661 interface types as a partial view of a private type for the
8662 generation of invariant procedure bodies.
8663 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8664 Add a condition to get the Corresponding_Record_Type for
8665 concurrent types, add condition to return in the absence of a
8666 class in the pragma, remove call to Replace_Type_References,
8667 and add call to Replace_References.
8668 (Add_Interface_Invariatns),
8669 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8670 to including the working type T.
8671 (Add_Own_Invariants): Remove
8672 legacy condition for separate units, remove dispatching for ASIS
8673 and save a copy of the expression in the pragma expression.
8674 (Build_Invariant_Procedure_Body): Default initalize vars,
8675 remove return condition on interfaces, always use the
8676 private type for interfaces, and move the processing of types
8677 until after the processing of invariants for the full view.
8678 (Build_Invariant_Procedure_Declaration): Remove condition
8679 to return if an interface type is encountered and add
8680 condition to convert the formal parameter to its class-wide
8681 counterpart if Work_Typ is abstract.
8682 (Replace_Type): Add call to Remove_Controlling_Arguments.
8683 (Replace_Type_Ref): Remove class-wide dispatching for the current
8684 instance of the type.
8685 (Replace_Type_References): Remove parameter "Derived"
8686 (Remove_Controlling_Arguments): Created in order to removing
8687 the controlliong argument from calls to primitives in the case
8688 of the formal parameter being an class-wide abstract type.
8689 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8690 to the change made to Freeze_Type in exp_ch3. Add a condition
8691 to treat interface types as a partial view.
8692 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8693 to Build_Invariant_Procedure_Declaration to properly generate a
8694 "partial" invariant procedure when Typ is an interface.
8695
8696 2017-04-25 Bob Duff <duff@adacore.com>
8697
8698 * a-numeri.ads: Go back to using brackets encoding for the Greek
8699 letter pi.
8700
8701 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8702
8703 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8704 (10-15): if derived type T with progenitors is abstract,
8705 and primitive P of this type inherits non-trivial classwide
8706 preconditions from both a parent operation and from an interface
8707 operation, then the inherited operation is abstract if the parent
8708 operation is not null.
8709 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8710 with Covered_Interface_Op to yield the actual interface operation
8711 that is implemented by a given inherited operation.
8712
8713 2017-04-25 Javier Miranda <miranda@adacore.com>
8714
8715 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8716 and right operands after performing the validity checks. Required
8717 because validity checks may remove side effects from the operands.
8718
8719 2017-04-25 Javier Miranda <miranda@adacore.com>
8720
8721 * exp_attr.adb (Attribute_Unrestricted_Access):
8722 Do not disable implicit type conversion. Required to generate
8723 code that displaces the pointer to reference the secondary
8724 dispatch table.
8725
8726 2017-04-25 Pascal Obry <obry@adacore.com>
8727
8728 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8729 Required_Artifacts attribute.
8730
8731 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8732
8733 * sem_util.adb (Same_Value): String literals are compile-time
8734 values, and comparing them must use Expr_Value_S.
8735
8736 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8737
8738 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8739 dereference is introduced for the object, and the object is
8740 overloaded, do not check whether it is aliased, because it may
8741 include an implicit dereference.
8742 * sem_type.adb (Disambiguate): If two interpretations are access
8743 attribute types with the same designated type keep either of
8744 them and do not report an ambiguity. A true ambiguity will be
8745 reported elsewhere.
8746
8747 2017-04-25 Bob Duff <duff@adacore.com>
8748
8749 * a-numeri.ads: Change the encoding of Greek letter Pi from
8750 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8751 to indicate the encoding. We considered using a byte order mark
8752 (BOM), but that causes various trouble (misc software eats the
8753 BOM, if you have a patch with a BOM, then it's not at the start
8754 of the patch, so it's not a BOM, the BOM affects with-ing files,
8755 etc.).
8756 * scng.adb, s-wchcnv.adb: Minor.
8757
8758 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8759
8760 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8761 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8762
8763 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8764 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8765 Improve error message on operations that inherit non-conforming
8766 classwide preconditions from ancestor and progenitor.
8767 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8768 moved here from sem_ch3.
8769 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8770 check given in RM 6.1.1 (17) concerning renamings of overriding
8771 operations that inherits class-wide preconditions from ancestor
8772 or progenitor.
8773
8774 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8775
8776 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8777 (Build_Adjust_Statements): Code cleanup.
8778 (Build_Finalizer): Update the initialization of
8779 Exceptions_OK.
8780 (Build_Finalize_Statements): Code cleanup.
8781 (Build_Initialize_Statements): Code cleanup.
8782 (Make_Deep_Array_Body): Update the initialization of
8783 Exceptions_OK.
8784 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8785 (Process_Object_Declaration): Generate a null exception handler only
8786 when exceptions are allowed.
8787 (Process_Transients_In_Scope): Update the initialization of
8788 Exceptions_OK.
8789 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8790 routine.
8791 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8792 restrictions when the handler is internally generated and the
8793 mode is warnings.
8794
8795 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8796
8797 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8798 enforce legality rule on classwide preconditions inherited from
8799 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8800 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8801 subprogram need not be dispatching if it appears in a precondition
8802 for an abstract or null subprogram.
8803
8804 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8805
8806 * sem_ch10.adb: Minor typo fix.
8807
8808 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8809
8810 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8811
8812 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8813
8814 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8815 have a length which is a power of 2.
8816 (Is_Predefined_File_Name): Likewise. Adjust comment.
8817
8818 2017-04-25 Bob Duff <duff@adacore.com>
8819
8820 * exp_aggr.adb (Component_Count): Protect the
8821 arithmetic from attempting to convert a value >= 2**31 to Int,
8822 which would otherwise raise Constraint_Error.
8823
8824 2017-04-25 Bob Duff <duff@adacore.com>
8825
8826 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8827 first character of the policy name is not unique.
8828
8829 2017-04-25 Bob Duff <duff@adacore.com>
8830
8831 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8832 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8833 about this flag not being used. It was already used, and it is
8834 now used more.
8835
8836 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8837
8838 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8839 (Ignore_SPARK_Mode_Pragmas): New routine.
8840 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8841 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8842 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8843 related entities.
8844 (Ignore_SPARK_Mode_Pragmas): New routine
8845 along with pragma Inline.
8846 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8847 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8848 Ignore_SPARK_Mode_Pragmas_In_Instance.
8849 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8850 Save and restore the value of global flag
8851 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8852 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8853 the corresponding spec or the body must ignore all SPARK_Mode
8854 pragmas found within.
8855 (Analyze_Subprogram_Declaration): Mark
8856 the spec when it needs to ignore all SPARK_Mode pragmas found
8857 within to allow the body to infer this property in case it is
8858 instantiated or inlined later.
8859 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8860 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8861 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8862 when the corresponding spec also ignored all SPARK_Mode pragmas
8863 found within.
8864 (Analyze_Package_Declaration): Mark the spec when
8865 it needs to ignore all SPARK_Mode pragmas found within to allow
8866 the body to infer this property in case it is instantiated or
8867 inlined later.
8868 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8869 Save and restore the value of flag
8870 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8871 formal spec when it needs to ignore all SPARK_Mode
8872 pragmas found within to allow the body to infer this
8873 property in case it is instantiated or inlined later.
8874 (Analyze_Package_Instantiation): Save and restore the value
8875 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8876 the instance spec when it needs to ignore all SPARK_Mode
8877 pragmas found within to allow the body to infer this
8878 property in case it is instantiated or inlined later.
8879 (Analyze_Subprogram_Instantiation): Save and restore the value
8880 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8881 instance spec and anonymous package when they need to ignore
8882 all SPARK_Mode pragmas found within to allow the body to infer
8883 this property in case it is instantiated or inlined later.
8884 (Instantiate_Package_Body): Save and restore the value of global
8885 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8886 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8887 corresponding instance spec also ignored all SPARK_Mode pragmas
8888 found within.
8889 (Instantiate_Subprogram_Body): Save and restore the
8890 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8891 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8892 when the corresponding instance spec also ignored all SPARK_Mode
8893 pragmas found within.
8894 * sem_prag.adb (Analyze_Pragma): Update the reference to
8895 Ignore_Pragma_SPARK_Mode.
8896 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8897 all SPARK_Mode pragmas defined within yields mode "off".
8898
8899 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8900
8901 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8902
8903 2017-04-25 Bob Duff <duff@adacore.com>
8904
8905 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8906 All_Checks" to avoid generating unnecessary checks.
8907 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8908 All_Checks".
8909 * sem.ads: Fix comment.
8910 * expander.ads: Fix comment.
8911 * exp_atag.ads: Fix comment: "Index = 0" should be
8912 "Index >= 0".
8913
8914 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8915
8916 * s-taprop-linux.adb: Minor editorial fixes.
8917
8918 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8919
8920 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8921 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8922 variable and set it to True whenever the main hash table is
8923 populated. Short- circuit the Assoc function if it is false
8924 and add associated guards.
8925
8926 2017-04-25 Olivier Hainque <hainque@adacore.com>
8927
8928 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8929 specs without elaboration code that have an elaboration counter
8930 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8931 * sem_ch10.adb (Analyze_Compilation_Unit):
8932 Set_Elaboration_Entity_Required when requested to preserve
8933 control flow, to ensure the unit elaboration is materialized at
8934 bind time, resulting in the inclusion of the unit object file
8935 in the executable closure at link time.
8936
8937 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8938
8939 * exp_dbug.adb: In Debug_Renaming_Declaration,
8940 when dealing with indexed component, accept to produce a renaming
8941 symbol when the index is an IN parameter or when it is a name
8942 defined in an outer scope.
8943
8944 2017-04-25 Yannick Moy <moy@adacore.com>
8945
8946 * errout.adb (Error_Msg): Adapt continuation
8947 message in instantiations and inlined bodies for info messages.
8948
8949 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8950
8951 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8952 Use direct 4-character slice comparisons.
8953 (Has_Prefix): Add
8954 pragma Inline. (Has_Suffix): Delete.
8955 (Is_Internal_File_Name):
8956 Test Is_Predefined_File_Name first.
8957 (Is_Predefined_File_Name):
8958 Use direct slice comparisons as much as possible and limit all
8959 comparisons to at most 8 characters.
8960
8961 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8962
8963 * checks.adb (Insert_Valid_Check): Code cleanup.
8964 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8965 (Expand_Actuals): Generate proper copy-back for a validation
8966 variable when it acts as the argument of a type conversion.
8967 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8968 predicate to operate on type qualifications.
8969
8970 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8971
8972 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8973 Minor reformatting.
8974
8975 2017-04-25 Bob Duff <duff@adacore.com>
8976
8977 * sem_prag.adb (No_Return): Give an error if the pragma applies
8978 to a body. Specialize the error for the specless body case,
8979 as is done for (e.g.) pragma Convention.
8980 * debug.adb: Add switch -gnatd.J to disable the above legality
8981 checks. This is mainly for use in our test suite, to avoid
8982 rewriting a lot of illegal (but working) code. It might also
8983 be useful to customers. Under this switch, if a pragma No_Return
8984 applies to a body, and the procedure raises an exception (as it
8985 should), the pragma has no effect. If the procedure does return,
8986 execution is erroneous.
8987
8988 2017-04-25 Bob Duff <duff@adacore.com>
8989
8990 * exp_ch6.adb (Expand_Actuals): This is the
8991 root of the problem. It took N as an 'in out' parameter, and in
8992 some cases, rewrote N, but then set N to Original_Node(N). So
8993 the node returned in N had no Parent. The caller continued
8994 processing of this orphaned node. In some cases that caused a
8995 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8996 and trips over the Empty Parent). The solution is to make N an
8997 'in' parameter. Instead of rewriting it, return the list of
8998 post-call actions, so the caller can do the rewriting later,
8999 after N has been fully processed.
9000 (Expand_Call_Helper): Move most of Expand_Call here. It has
9001 too many premature 'return' statements, and we want to do the
9002 rewriting on return.
9003 (Insert_Post_Call_Actions): New procedure to insert the post-call
9004 actions in the appropriate place. In the problematic case,
9005 that involves rewriting N as an Expression_With_Actions.
9006 (Expand_Call): Call the new procedures Expand_Call_Helper and
9007 Insert_Post_Call_Actions.
9008
9009 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9010
9011 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
9012 properly type derived from generic formal types, to handle
9013 properly modified version of ACATS 4.1B B611017.
9014
9015 2017-04-25 Javier Miranda <miranda@adacore.com>
9016
9017 * exp_unst.adb (Subp_Index): Adding missing
9018 support for renamings and functions that return a constrained
9019 array type (i.e. functions for which the frontend built a
9020 procedure with an extra out parameter).
9021
9022 2017-04-25 Pascal Obry <obry@adacore.com>
9023
9024 * s-string.adb: Minor code clean-up.
9025
9026 2017-04-25 Bob Duff <duff@adacore.com>
9027
9028 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
9029 procedure.
9030 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
9031 function for Non_Blocking_Wait_Process.
9032
9033 2017-04-25 Bob Duff <duff@adacore.com>
9034
9035 * prep.adb (Preprocess): Remove incorrect
9036 Assert. Current character can be ASCII.CR.
9037
9038 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9039
9040 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
9041 convention Stdcall, which has a number of exceptions. Convention
9042 is legal on a component declaration whose type is an anonymous
9043 access to subprogram.
9044
9045 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9046
9047 * sem_ch4.adb: sem_ch4.adb Various reformattings.
9048 (Try_One_Prefix_Interpretation): Use the base type when dealing
9049 with a subtype created for purposes of constraining a private
9050 type with discriminants.
9051
9052 2017-04-25 Javier Miranda <miranda@adacore.com>
9053
9054 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
9055 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
9056 dispatching primitives (Restore_Warnings): Restore warning on
9057 late dispatching primitives (Save_Warnings): Save warning on late
9058 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
9059 to enable/disable this warning.
9060 (WA_Warnings): Set warning on late dispatching primitives.
9061 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
9062 that its parent type has a private extension.
9063 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
9064 New subprogram.
9065 * usage.adb: Document -gnatw.j and -gnatw.J.
9066
9067 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9068
9069 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
9070 reformatting.
9071
9072 2017-04-25 Bob Duff <duff@adacore.com>
9073
9074 * binde.adb (Validate): Do not pass dynamic strings
9075 to pragma Assert, because older compilers do not support that.
9076
9077 2017-04-25 Bob Duff <duff@adacore.com>
9078
9079 * s-fileio.adb (Close): When a temp file is
9080 closed, delete it and clean up its Temp_File_Record immediately,
9081 rather than waiting until later.
9082 (Temp_File_Record): Add File
9083 component, so Close can know which Temp_File_Record corresponds
9084 to the file being closed.
9085 (Delete): Don't delete temp files,
9086 because they are deleted by Close.
9087 (Open): Set the File component
9088 of Temp_File_Record. This requires moving the creation of the
9089 Temp_File_Record to the end, after the AFCB has been created.
9090
9091 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9092
9093 * checks.adb (Insert_Valid_Check): Do not generate
9094 a validity check when inside a generic.
9095
9096 2017-04-25 Yannick Moy <moy@adacore.com>
9097
9098 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
9099
9100 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9101
9102 * snames.ads-tmpl (Snames): More names for detecting predefined
9103 potentially blocking subprograms.
9104
9105 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9106
9107 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
9108 concerning inheritance of class-wide preconditions do not apply
9109 to postconditions.
9110
9111 2017-04-25 Bob Duff <duff@adacore.com>
9112
9113 * s-ficobl.ads: Minor comment fix.
9114
9115 2017-04-25 Yannick Moy <moy@adacore.com>
9116
9117 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
9118 conversions from float to integer in GNATprove mode.
9119 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
9120 to call Apply_Type_Conversion_Checks, so that range checks
9121 are properly positioned when needed on conversions, including
9122 when converting from float to integer. (Determine_Range): In
9123 GNATprove mode, take into account the possibility of conversion
9124 from float to integer.
9125 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
9126 check on conversions from fixed-point to integer, not anymore
9127 on conversions from floating-point to integer, when in GNATprove
9128 mode.
9129
9130 2017-04-25 Yannick Moy <moy@adacore.com>
9131
9132 * checks.adb (Determine_Range_R): Special case type conversions
9133 from integer to float in order to get bounds in that case too.
9134 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
9135 mode, for computations involved in interval checking.
9136
9137 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9138
9139 * checks.adb (Insert_Valid_Check): Partially reimplement validity
9140 checks.
9141 * einfo.adb Node36 is now used as Validated_Object.
9142 (Validated_Object): New routine.
9143 (Set_Validated_Object): New routine.
9144 (Write_Field36_Name): Add an entry for Validated_Object.
9145 * einfo.ads Add new attribute Validated_Object along with
9146 usage in entities.
9147 (Validated_Object): New routine along with pragma Inline.
9148 (Set_Validated_Object): New routine along with pragma Inline.
9149 * exp_attr.adb (Make_Range_Test): Add processing for validation
9150 variables to avoid extra reads and copies of the prefix.
9151 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
9152 variables in order to reflect any changes done in the variable
9153 back into the original object.
9154 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
9155 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
9156
9157 2017-04-25 Steve Baird <baird@adacore.com>
9158
9159 * exp_ch7.adb (Build_Array_Deep_Procs,
9160 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
9161 generate Finalize_Address routines for CodePeer.
9162
9163 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9164
9165 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
9166 Analyze_Pre_Post_Condition, to implement the legality checks
9167 mandated by AI12-0131: Pre'Class shall not be specified for an
9168 overriding primitive subprogram of a tagged type T unless the
9169 Pre'Class aspect is specified for the corresponding primitive
9170 subprogram of some ancestor of T.
9171
9172 2017-04-25 Bob Duff <duff@adacore.com>
9173
9174 * sem_ch8.adb (Use_One_Type): If a use_type_clause
9175 is redundant, set its Used_Operations to empty. This is only
9176 necessary for use clauses that appear in the parent of a generic
9177 child unit, because those use clauses get reanalyzed when we
9178 instantiate the generic, and we don't want the Used_Operations
9179 carried over from the original context (where it was probably
9180 not redundant).
9181
9182 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9183
9184 * exp_ch6.adb: Minor reformatting.
9185
9186 2017-04-25 Bob Duff <duff@adacore.com>
9187
9188 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9189 Use Source_Index (Current_Sem_Unit) to find the correct casing.
9190 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
9191 (Current_Sem_Unit) to find the correct casing.
9192 * par.adb (Par): Null out Current_Source_File, to ensure that
9193 the above bugs won't rear their ugly heads again.
9194
9195 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9196
9197 * sem_ch8.adb (Find_Type): For an attribute reference
9198 'Class, if prefix type is synchronized and previous errors
9199 have suppressed the creation of the corresponding record type,
9200 create a spurious class-wide for the synchonized type itself,
9201 to catch other misuses of the attribute
9202
9203 2017-04-25 Steve Baird <baird@adacore.com>
9204
9205 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
9206 is True, then don't generate the accessibility check for the
9207 tag of a tagged result.
9208 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
9209 if CodePeer_Mode is True, then don't generate the
9210 tag checks for the result of call to an instance of
9211 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
9212 descendant of" check and the accessibility check).
9213
9214 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9215
9216 * sem_ch13.adb: Code cleanups.
9217 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
9218 * sem_ch8.ads: Minor comment fix.
9219
9220 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9221
9222 * exp_ch4.adb (Library_Level_Target): New function.
9223 (Expand_Concatenate): When optimization is enabled, also expand
9224 the operation out-of-line if the concatenation is present within
9225 the expression of the declaration of a library-level object and
9226 not only if it is the expression of the declaration.
9227
9228 2017-04-25 Bob Duff <duff@adacore.com>
9229
9230 * freeze.adb (Freeze_Object_Declaration): Do
9231 not Remove_Side_Effects if there is a pragma Linker_Section,
9232 because in that case we want static initialization in the
9233 appropriate section.
9234
9235 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9236
9237 * exp_dbug.adb: Minor rewording and reformatting.
9238
9239 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9240
9241 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
9242 handle the proposed changes to rules concerning potentially
9243 unevaluated expressions, to include selected components that
9244 do not depend on discriminants, and indexed components with
9245 static indices.
9246 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
9247 predicate in quantified expression, and fix bugs in the handling
9248 of case expressions and membership test.
9249 (Analyze_Attribute_Old_Result): use new predicate.
9250 (Analyze_Attribute, case Loop_Entry): ditto.
9251
9252 2017-04-25 Bob Duff <duff@adacore.com>
9253
9254 * s-secsta.adb (SS_Info): Add a comment
9255 explaining why we don't need to walk all the chunks in order to
9256 compute the total size.
9257
9258 2017-04-25 Bob Duff <duff@adacore.com>
9259
9260 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
9261 of the global name buffer to 4*Max_Line_Length.
9262
9263 2017-04-25 Javier Miranda <miranda@adacore.com>
9264
9265 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
9266 renaming entity for debug information, mark the entity as needing debug
9267 info if it comes from sources.
9268
9269 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9270
9271 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
9272 restriction converning the use of 'Address where the prefix is
9273 of a controlled type.
9274
9275 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
9276
9277 * exp_dbug.adb: In Debug_Renaming_Declaration,
9278 skip slices that are made redundant by an indexed component
9279 access.
9280 * atree.h: New definition for Original_Node.
9281
9282 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9283
9284 * sem_prag.adb, sem_prag.ads: Minor reformatting.
9285
9286 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9287
9288 * sem_ch3.adb (Check_Entry_Contract): Call
9289 Preanalyze_Spec_Expression so that resolution takes place as well.
9290 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9291 internal calls that appear in preconditions of protected
9292 operations, in default values for same, and in contract guards
9293 for contract cases in SPARK.
9294
9295 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9296
9297 * a-numaux.ads: Fix description of a-numaux-darwin
9298 and a-numaux-x86.
9299 (Double): Define to Long_Float.
9300 * a-numaux-vxworks.ads (Double): Likewise.
9301 * a-numaux-darwin.ads
9302 (Double): Likewise.
9303 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9304 * a-numaux-x86.ads: Fix package description.
9305 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9306 (Reduce): Adjust and complete description. Call Is_Nan instead of
9307 testing manually. Use an integer temporary to hold rounded value.
9308 * a-numaux-darwin.adb (Reduce): Likewise.
9309 (Is_Nan): New function.
9310
9311 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9312
9313 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9314 on analysis of prefix whose type is a current instance of a
9315 synchronized type, but where the prefix itself is an entity that
9316 is an object.
9317
9318 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9319
9320 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9321 the identity of callable entities therein, because they have been
9322 properly resolved, and prefixed calls may have been rewritten
9323 as normal calls.
9324
9325 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9326
9327 * exp_ch3.adb (Build_Init_Statements): Convert
9328 the expression of the pragma/aspect Secondary_Stack_Size to
9329 internal type System.Parameters.Size_Type before assigning
9330 it to the Secondary_Stack_Size component of the task type's
9331 corresponding record.
9332
9333 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9334
9335 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9336 (etc) optimizations when the type is modular and the offsets
9337 are equal.
9338
9339 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9340
9341 * s-osinte-freebsd.ads: Minor comment tweaks
9342
9343 2017-04-25 Javier Miranda <miranda@adacore.com>
9344
9345 * urealp.adb (UR_Write): Reverse previous patch
9346 adding documentation on why we generate multiplications instead
9347 of divisions (needed to avoid expressions whose computation with
9348 large numbers may cause division by 0).
9349
9350 2017-04-25 Bob Duff <duff@adacore.com>
9351
9352 * erroutc.adb (Set_Specific_Warning_Off,
9353 Set_Warnings_Mode_Off): Use the correct source file for
9354 Stop. Was using Current_Source_File, which is only valid during
9355 parsing. Current_Source_File will have a leftover value from
9356 whatever file happened to be parsed last, because of a with_clause
9357 or something.
9358
9359 2017-04-25 Bob Duff <duff@adacore.com>
9360
9361 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9362 to In_Predefined_Unit, but including GNAT units.
9363 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9364 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9365 because Should_Ignore_Pragma was not working reliably outside
9366 the parser, because Current_Source_File is not valid.
9367 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9368 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9369
9370 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9371
9372 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9373 codepeer mode.
9374
9375 2017-04-25 Javier Miranda <miranda@adacore.com>
9376
9377 * urealp.adb (UR_Write): Fix output of constants with a base other
9378 that 10.
9379
9380 2017-04-25 Justin Squirek <squirek@adacore.com>
9381
9382 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9383 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9384 Add extra parameter for Process_Interface_Name.
9385 (Process_Interface_Name): Add parameter for pragma to analyze
9386 corresponding aspect.
9387 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9388 from sem_ch13.adb
9389
9390 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9391
9392 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9393 correction.
9394
9395 2017-04-25 Yannick Moy <moy@adacore.com>
9396
9397 * sem_res.adb (Resolve_Comparison_Op): Do not
9398 attempt evaluation of relational operations inside assertions.
9399
9400 2017-04-25 Justin Squirek <squirek@adacore.com>
9401
9402 * exp_util.adb (Add_Interface_Invariants):
9403 Restored, code moved back from Build_Invariant_Procedure_Body.
9404 (Add_Parent_Invariants): Restored, code moved back from
9405 Build_Invariant_Procedure_Body.
9406 (Build_Invariant_Procedure_Body):
9407 Remove refactored calls and integrated code from
9408 Add_Parent_Invariants and Add_Interface_Invariants.
9409
9410 2017-04-25 Johannes Kanig <kanig@adacore.com>
9411
9412 * errout.adb (Output_Messages): Adjust computation of total
9413 errors
9414 * erroutc.adb (Error_Msg): In statistics counts, deal
9415 correctly with informational messages that are not warnings.
9416 * errutil.adb (Finalize): adjust computation of total errors.
9417
9418 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9419
9420 * terminals.c (__gnat_terminate_pid): New.
9421 * g-exptty.ads (Terminate_Process): New. Update comments.
9422
9423 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9424
9425 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9426
9427 2017-04-25 Justin Squirek <squirek@adacore.com>
9428
9429 * sem_ch3.adb (Analyze_Declarations): Minor
9430 correction to comments, move out large conditional and scope
9431 traversal into a predicate.
9432 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9433 logic.
9434
9435 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9436
9437 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9438 of prefix whose type is a current instance of a synchronized
9439 type. If the prefix is an object this is an external call (or
9440 requeue) that can only access public operations of the object. The
9441 previous predicate was too restrictive, and did not allow public
9442 protected operations, only task entries.
9443
9444 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9445
9446 * sem_ch5.adb, fname.adb: Minor reformatting.
9447
9448 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9449
9450 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9451 * einfo.ads Update the placement of
9452 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9453 mention the ekind.
9454 (Is_Anonymous_Access_Type): New routine.
9455 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9456 master for an access type subject to pragma No_Heap_Finalization.
9457 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9458 allocated or deallocated does not finalization actions if the
9459 associated access type is subject to pragma No_Heap_Finalization.
9460 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9461 * par-prag.adb Pragma No_Heap_Finalization does not need special
9462 processing from the parser.
9463 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9464 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9465 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9466 No_Heap_Finalization.
9467 (Analyze_Pragma): Add processing for
9468 pragma No_Heap_Finalization. Update various error messages to
9469 use Duplication_Error.
9470 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9471 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9472 and corresponding pragma id.
9473
9474 2017-04-25 Bob Duff <duff@adacore.com>
9475
9476 * freeze.adb (Freeze_Record_Type): Use the
9477 underlying type of the component type to determine whether it's
9478 elementary. For representation clause purposes, a private type
9479 should behave the same as its full type.
9480 * fname.ads, fname.adb (Is_Predefined_File_Name):
9481 Make sure things like "system.ali" are recognized as predefined.
9482
9483 2017-04-25 Javier Miranda <miranda@adacore.com>
9484
9485 * debug.adb: Update documentation of -gnatd.6.
9486
9487 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9488
9489 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9490 element iterator when the name is an overloaded function call,
9491 one of whose interpretations yields an array.
9492
9493 2017-04-25 Bob Duff <duff@adacore.com>
9494
9495 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9496 Is_Internal_Unit_Name): New functions for operating on unit
9497 names, as opposed to file names. There's some duplicated code
9498 with fname.adb, which is unfortunate, but it seems like we don't
9499 want to add dependencies here.
9500 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9501 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9502 is not a file name at all.
9503 * fname.ads, fname.adb: Document the fact that
9504 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9505 for ALI files, and fix the code so it works properly for ALI
9506 files. E.g. these should return True for "system.ali".
9507
9508 2017-04-25 Justin Squirek <squirek@adacore.com>
9509
9510 * exp_util.adb (Add_Invariant): Removed,
9511 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9512 and Add_Own_Invariant. (Add_Invariant_Check): Used
9513 for adding runtime checks from any kind of invariant.
9514 (Add_Inherited_Invariant): Generates invariant checks for
9515 class-wide invariants (Add_Interface_Invariants): Removed, code
9516 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9517 Create a types own invariant procedure (Add_Parent_Invariants):
9518 Removed, code moved to Build_Invariant_Procedure_Body
9519 (Build_Invariant_Procedure_Body): Add refactored calls
9520 and integrated code from Add_Parent_Invariants and
9521 Add_Interface_Invariants.
9522 (Process_Type): Removed, the
9523 relavant code was inlined into both Add_Own_Invariant and
9524 Add_Inherited_Invariant.
9525
9526 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9527
9528 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9529 scn.adb, osint.adb, fname.adb: Minor reformatting.
9530
9531 2017-04-25 Pascal Obry <obry@adacore.com>
9532
9533 * s-taprop-mingw.adb: Do not check for CloseHandle in
9534 Finalize_TCB.
9535
9536 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9537
9538 * sem_util.adb (Check_Part_Of_Reference):
9539 Continue to examine the context if the reference appears within
9540 an expression function.
9541
9542 2017-04-25 Justin Squirek <squirek@adacore.com>
9543
9544 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9545 and Build_Invariant_Procedure_Declaration.
9546 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9547 and Build_Invariant_Procedure_Declaration from exp_ch7
9548 and break-out Is_Untagged_Private_Derivation from
9549 Build_Invariant_Procedure_Body.
9550 (Replace_Type_References):
9551 Append an extra parameter to allow for dispatching replacements
9552 and add the corrasponding logic.
9553 (Type_Invariant): Remove
9554 Replace_Typ_Refs and replace its references with calls to
9555 Replace_Type_References.
9556 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9557
9558 2017-04-25 Bob Duff <duff@adacore.com>
9559
9560 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9561 that returns True when appropriate.
9562 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9563 when compiling predefined files.
9564 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9565 "gnat.adc" should not be considered a predefined file name.
9566 That required (or at least encouraged) a lot of cleanup of global
9567 variable usage. We shouldn't be communicating information via
9568 the global name buffer.
9569 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9570 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9571 required by the above-mentioned cleanup.
9572
9573 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9574
9575 * osint.adb (Find_File): Handle properly a request for a
9576 configuration file whose name is a directory.
9577
9578 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9579
9580 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9581
9582 2017-04-25 Bob Duff <duff@adacore.com>
9583
9584 * types.ads: Minor: Fix '???' comment.
9585 * sem_ch8.adb: Minor comment fix.
9586
9587 2017-04-25 Bob Duff <duff@adacore.com>
9588
9589 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9590 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9591 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9592 Add String_To_Name with no side effects.
9593
9594 2017-04-25 Justin Squirek <squirek@adacore.com>
9595
9596 * sem_ch3.adb (Analyze_Declarations): Add
9597 additional condition for edge case.
9598
9599 2017-04-25 Bob Duff <duff@adacore.com>
9600
9601 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9602 reserved words inside pragmas. This is necessary to allow the
9603 pragma name Interface to be used in pragma Ignore_Pragma.
9604 * par.adb: Minor comment fix.
9605
9606 2017-04-25 Javier Miranda <miranda@adacore.com>
9607
9608 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9609 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9610 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9611 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9612 occurrences of RE_Type_Is_Abstract
9613
9614 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9615
9616 * exp_util.adb (Build_Chain): Account for ancestor
9617 subtypes while traversing the derivation chain.
9618
9619 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9620
9621 * sem_attr.adb: minor reformatting.
9622
9623 2017-04-25 Doug Rupp <rupp@adacore.com>
9624
9625 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9626
9627 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9628
9629 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9630 the first pass over an assignment statement with target names,
9631 to prevent the generation of subtypes (such as discriminated
9632 record components)that may carry the target name outside of the
9633 tree for the assignment. The subtypes will be generated when
9634 the assignment is reanalyzed in full.
9635 (Analyze_Target_Name): Handle properly class-wide types.
9636
9637 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9638
9639 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9640 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9641 the purposes of freezing.
9642 * exp_util.adb Update the documentation and structure of the
9643 type map used in class-wide semantics of assertion expressions.
9644 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9645 and resolve the triaged expression because all substitutions
9646 refer to the proper entities. Update the replacement of
9647 references.
9648 (Build_DIC_Procedure_Body): Add formal parameter
9649 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9650 are now only processed when freezing occurs. Build a body only
9651 when one is needed.
9652 (Entity_Hash): Removed.
9653 (Map_Types): New routine.
9654 (Replace_Object_And_Primitive_References): Removed.
9655 (Replace_References): New routine.
9656 (Replace_Type_References): Moved to the library level of Exp_Util.
9657 (Type_Map_Hash): New routine.
9658 (Update_Primitives_Mapping): Update the mapping call.
9659 (Update_Primitives_Mapping_Of_Types): Removed.
9660 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9661 parameter For_Freeze and update the comment on usage.
9662 (Map_Types): New routine.
9663 (Replace_References): New routine.
9664 (Replace_Type_References): Moved to the library level of Exp_Util.
9665 (Update_Primitives_Mapping_Of_Types): Removed.
9666 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9667 properties of the private type to the full view in case the full
9668 view derives from a parent type and inherits a DIC pragma.
9669 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9670 DIC pragma is placed at the top of a declarative region.
9671
9672 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9673
9674 * a-tasatt.adb: Complete previous change and use an unsigned
9675 int to avoid overflow checks.
9676
9677 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9678
9679 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9680 the error message when the attribute reference is an actual in
9681 a call to a subprogram inherited from a generic formal type with
9682 unknown discriminants, which makes the subprogram and its formal
9683 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9684
9685 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9686
9687 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9688 sem_prag.adb: Minor reformatting.
9689
9690 2017-04-25 Bob Duff <duff@adacore.com>
9691
9692 * sem_attr.adb (Type_Key): Add code in the
9693 recursive Compute_Type_Key to protect against fetching the source
9694 code for Standard, in case a component of the type is declared
9695 in Standard. There was already code to do this for the original
9696 type, but not for its components.
9697
9698 2017-04-25 Javier Miranda <miranda@adacore.com>
9699
9700 * exp_ch3.adb (Build_Initialization_Call): Handle
9701 subtypes of private types when searching for the underlying full
9702 view of a private type.
9703
9704 2017-04-25 Javier Miranda <miranda@adacore.com>
9705
9706 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9707 real conditional expression can appear in a fixed-type context
9708 and must be resolved with that context to facilitate the code
9709 generation to the backend.
9710
9711 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9712
9713 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9714 to indicate whether during inline processing, when some unit U1
9715 appears in the context of a unit U2 compiled for instantiation
9716 or inlining purposes, the body of U1 needs to be compiled as well.
9717 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9718 context is a package declaration.
9719 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9720 Analyze_Generic_Package_Declaration): ditto.
9721 * inline.adb (Analyze_Inlined_Bodies): Check
9722 Body_Needed_For_Inlining.
9723
9724 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9725
9726 * par.adb (Current_Assign_Node): Global variable use to record
9727 the presence of a target_name in the right hand side of the
9728 assignment being parsed.
9729 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9730 enclosing assignment node accordingly.
9731 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9732 appropriately.
9733 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9734 analyzing RHS if the statement has target_names.
9735 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9736 properly choices that are subtype marks.
9737 * exp_ch5.adb: Code cleanup.
9738
9739 2017-04-25 Bob Duff <duff@adacore.com>
9740
9741 * s-memory.adb: Add a comment regarding efficiency.
9742 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9743 "the source has an extension if and only if the destination does."
9744 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9745
9746 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9747
9748 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9749 conversion.
9750
9751 2017-04-25 Doug Rupp <rupp@adacore.com>
9752
9753 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9754 handling for ppc64-vx7.
9755 * sigtramp-vxworks-target.inc
9756 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9757
9758 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9759
9760 * ada_get_targ.adb: New file.
9761
9762 2017-04-25 Bob Duff <duff@adacore.com>
9763
9764 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9765 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9766 (UI_GCD): Remove ??? comment involving possible efficiency
9767 improvements. This just isn't important after all these years.
9768 Also minor cleanup.
9769 * uintp.ads: Minor cleanup.
9770
9771 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9772
9773 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9774 Revert previous changes.
9775 * scng.adb: Minor reformatting.
9776 * s-stratt.ads: Fix unbalanced parens in comment.
9777
9778 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9779
9780 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9781 Minor reformatting.
9782
9783 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9784
9785 * scng.adb (Scan): Handle '@' appropriately.
9786 * sem_ch5.adb: Code cleanup.
9787
9788 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9789
9790 * freeze.adb (Check_Expression_Function): Do not check for the
9791 use of deferred constants if the freezing of the expression
9792 function is triggered by its generated body, rather than a
9793 premature use.
9794
9795 2017-04-25 Javier Miranda <miranda@adacore.com>
9796
9797 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9798 subtypes of private types when performing the view conversion.
9799
9800 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9801
9802 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9803 the purposes of freezing.
9804 * exp_util.adb Update the documentation and structure of the
9805 type map used in class-wide semantics of assertion expressions.
9806 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9807 and resolve the triaged expression because all substitutions
9808 refer to the proper entities. Update the replacement of
9809 references.
9810 (Build_DIC_Procedure_Body): Add formal parameter
9811 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9812 are now only processed when freezing occurs. Build a body only
9813 when one is needed.
9814 (Entity_Hash): Removed.
9815 (Map_Types): New routine.
9816 (Replace_Object_And_Primitive_References): Removed.
9817 (Replace_References): New routine.
9818 (Replace_Type_References): Moved to the library level of Exp_Util.
9819 (Type_Map_Hash): New routine.
9820 (Update_Primitives_Mapping): Update the mapping call.
9821 (Update_Primitives_Mapping_Of_Types): Removed.
9822 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9823 parameter For_Freeze and update the comment on usage.
9824 (Map_Types): New routine.
9825 (Replace_References): New routine.
9826 (Replace_Type_References): Moved to the library level of Exp_Util.
9827 (Update_Primitives_Mapping_Of_Types): Removed.
9828 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9829 properties of the private type to the full view in case the full
9830 view derives from a parent type and inherits a DIC pragma.
9831 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9832 DIC pragma is placed at the top of a declarative region.
9833
9834 2017-04-25 Tristan Gingold <gingold@adacore.com>
9835
9836 * s-mmap.ads (Data): Add pragma Inline.
9837
9838 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9839
9840 * checks.adb (Insert_Valid_Check): Do not use
9841 a renaming to alias a volatile name because this will lead to
9842 multiple evaluations of the volatile name. Use a constant to
9843 capture the value instead.
9844
9845 2017-04-25 Doug Rupp <rupp@adacore.com>
9846
9847 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9848
9849 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9850
9851 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9852 Add out parameter to indicate to caller that a wrapper must
9853 be constructed for an inherited primitive whose inherited
9854 pre/postcondition has called to overridden primitives.
9855 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9856 for inherited primitive that requires it.
9857 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9858 legal primitive operations and belong to the list of bodies
9859 generated after the freeze point of a type.
9860 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9861 of Build_Class_Wide_Expression.
9862 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9863 to construct the specification of the wrapper subprogram created
9864 for an inherited operation.
9865
9866 2017-04-25 Bob Duff <duff@adacore.com>
9867
9868 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9869 pthread_mutexattr_setprioceiling): Add new interfaces for these
9870 pthread operations.
9871 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9872 protocols as appropriate for Locking_Policy 'C' and 'I'.
9873 * s-taprop-posix.adb: Minor reformatting to make it more similar
9874 to s-taprop-linux.adb.
9875
9876 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9877
9878 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9879 Handle properly a multi- level derivation involving both renamed
9880 and constrained parent discriminants, when the type to be
9881 constrained has fewer discriminants that the ultimate ancestor.
9882
9883 2017-04-25 Bob Duff <duff@adacore.com>
9884
9885 * sem_util.adb (Is_Object_Reference): In the
9886 case of N_Explicit_Dereference, return False if it came from a
9887 conditional expression.
9888
9889 2017-04-25 Bob Duff <duff@adacore.com>
9890
9891 * par-ch4.adb (P_Case_Expression): If a semicolon
9892 is followed by "when", assume that ";" was meant to be ",".
9893
9894 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9895
9896 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9897 fixes.
9898
9899 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9900
9901 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9902 loading of an entity.
9903 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9904 previously repeated in the analysis.
9905 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9906 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9907 use new procedure SPARK_Implicit_Load.
9908 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9909 SPARK_Implicit_Load.
9910
9911 2017-04-25 Javier Miranda <miranda@adacore.com>
9912
9913 * sem_util.adb (New_Copy_Tree): By default
9914 copying of defining identifiers is prohibited because
9915 this would introduce an entirely new entity into the
9916 tree. This patch introduces an exception to this general
9917 rule: the declaration of constants and variables located in
9918 Expression_With_Action nodes.
9919 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9920 (In_Map): New subprogram.
9921 (Visit_Entity): New subprogram.
9922 (Visit_Node): Handle EWA_Level,
9923 EWA_Inner_Scope_Level, and take care of defining entities defined
9924 in Expression_With_Action nodes.
9925
9926 2017-04-25 Thomas Quinot <quinot@adacore.com>
9927
9928 * exp_ch6.adb: minor comment edit.
9929 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9930 procedure specifications that come from source.
9931 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9932 Null_Statement attribute.
9933 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9934 procedure, generate statement SCO for the generated NULL statement.
9935 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9936 parser, if available.
9937
9938 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9939
9940 * system-linux-s390.ads: Use Long_Integer'Size to define
9941 Memory_Size.
9942
9943 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9944
9945 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9946
9947 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9948
9949 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9950 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9951 * gnat_ugn.texi: Fix typo.
9952 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9953 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9954 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9955 * sem_util.adb (Mark_Coextensions): Likewise.
9956 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9957
9958 2017-03-28 Andreas Schwab <schwab@suse.de>
9959
9960 PR ada/80117
9961 * system-linux-aarch64-ilp32.ads: New file.
9962 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9963 from LIBGNAT_TARGET_PAIRS.
9964 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9965 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9966 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9967 or -mabi=ilp32, resp.
9968
9969 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9970
9971 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9972
9973 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9974
9975 PR ada/79903
9976 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9977
9978 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9979
9980 PR ada/79945
9981 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9982
9983 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9984 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9985 * system-linux-armeb.ads: Delete.
9986 * system-linux-mipsel.ads: Likewise.
9987 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9988 (ARM/Linux): Likewise.
9989
9990 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9991
9992 PR c/79677
9993 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9994 handle_generated_option GENERATED_P.
9995
9996 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9997
9998 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9999 around a justified modular type if it doesn't have the same scalar
10000 storage order as the enclosing record type.
10001
10002 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10003
10004 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
10005 of boolean rvalues to function calls.
10006
10007 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10008
10009 * gcc-interface/utils.c (fold_bit_position): New function.
10010 (rest_of_record_type_compilation): Call it instead of bit_position to
10011 compute the field position and remove the call to remove_conversions.
10012 (compute_related_constant): Factor out the multiplication in both
10013 operands, if any, and streamline the final test.
10014
10015 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10016
10017 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
10018
10019 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10020
10021 * gcc-interface/decl.c: Include demangle.h.
10022 (is_cplusplus_method): Return again true for a primitive operation
10023 only if it is dispatching. For a subprogram with an interface name,
10024 call the demangler to get the number of C++ parameters and compare it
10025 with the number of Ada parameters.
10026
10027 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10028
10029 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
10030 there is no end label, put the location of the At_End procedure on
10031 the call to the procedure.
10032
10033 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10034
10035 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
10036 value for array types with TYPE_INDEX_TYPE set on their domain type.
10037 * gcc-interface/utils.c (max_size): For operations and expressions, do
10038 not build a new node if the operands have not changed or are missing.
10039
10040 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10041
10042 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
10043 argument when recursing on TRUTH_NOT_EXPR.
10044
10045 2017-02-12 John Marino <gnugcc@marino.st>
10046
10047 * system-freebsd-x86.ads: Rename into...
10048 * system-freebsd.ads: ...this.
10049 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
10050 * gcc-interface/Makefile.in: Support aarch64-freebsd.
10051 (x86-64/FreeBSD): Adjust to above renaming.
10052 (i386/FreeBSD): Likewise.
10053
10054 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
10055
10056 * comperr.adb: Update FSF bug reporting URL.
10057
10058 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
10059 Jakub Jelinek <jakub@redhat.com>
10060
10061 PR ada/79309
10062 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
10063
10064 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
10065
10066 PR lto/79061
10067 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
10068 to build_translation_unit_decl.
10069
10070 2017-01-23 Javier Miranda <miranda@adacore.com>
10071
10072 * sem_util.adb (New_Copy_Tree): Code cleanup:
10073 removal of the internal map (ie. variable Actual_Map, its
10074 associated local variables, and all the code handling it).
10075 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
10076 force loading of the System package when processing a task type.
10077 (Analyze_Protected_Type_Declaration): in GNATprove mode force
10078 loading of the System package when processing a protected type.
10079 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
10080 force loading of the System package when processing compilation
10081 unit with a main-like subprogram.
10082 * frontend.adb (Frontend): remove forced loading of the System
10083 package.
10084
10085 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10086
10087 * sem_prag.adb (Default_Initial_Condition): If the desired type
10088 declaration is a derived type declaration with discriminants,
10089 it is rewritten as a private type declaration.
10090 * sem_ch13.adb (Replace_Type_References_Generic,
10091 Visible_Component): A discriminated private type with descriminnts
10092 has components that must be rewritten as selected components
10093 if they appear as identifiers in an aspect expression such as
10094 a Default_Initial_Condition.
10095 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
10096 nodes.
10097
10098 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10099
10100 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
10101 * gnat1drv.adb Generate an empty object file for an ignored
10102 Ghost compilation unit.
10103 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
10104
10105 2017-01-23 Yannick Moy <moy@adacore.com>
10106
10107 * sem_ch4.adb (Analyze_Indexed_Component_Form):
10108 Adapt to inlined prefix with string literal subtype.
10109 * inline.adb (Expand_Inlined_Call): Keep unchecked
10110 conversion inside inlined call when formal type is constrained.
10111
10112 2017-01-23 Javier Miranda <miranda@adacore.com>
10113
10114 * sem_util.adb (New_Copy_Tree): Code cleanup:
10115 removal of global variables. All the global variables, global
10116 functions and tables of this subprogram are now declared locally.
10117
10118 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10119
10120 * exp_strm.ads: Minor reformatting and typo fixes.
10121
10122 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10123
10124 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
10125 exp_aggr.adb: Minor reformatting.
10126 * g-diopit.adb: minor grammar/punctuation fix in comment.
10127 * g-byorma.ads: minor fix of unbalanced parens in comment.
10128
10129 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10130
10131 * par.adb: Update the documentation of component Labl.
10132 * par-ch6.adb (P_Return_Statement): Set the expected label of
10133 an extended return statement to Error.
10134
10135 2017-01-23 Tristan Gingold <gingold@adacore.com>
10136
10137 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
10138
10139 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10140
10141 * expander.adb: Handle N_Delta_Aggregate.
10142
10143 2017-01-23 Javier Miranda <miranda@adacore.com>
10144
10145 * exp_ch6.adb (Expand_Call): Improve the code that
10146 checks if some formal of the called subprogram is a class-wide
10147 interface, to handle subtypes of class-wide interfaces.
10148
10149 2017-01-23 Javier Miranda <miranda@adacore.com>
10150
10151 * checks.adb (Apply_Parameter_Aliasing_Checks):
10152 Remove side effects of the actuals before generating the overlap
10153 check.
10154
10155 2017-01-23 Justin Squirek <squirek@adacore.com>
10156
10157 * exp_strm.ads, exp_strm.ads
10158 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
10159 as to avoid getting the underlying type by default.
10160 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
10161 underlying type in the Iiput and output attribute cases when
10162 building their respective functions.
10163
10164 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10165
10166 * scng.adb: Minor reformatting of error message.
10167
10168 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10169
10170 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
10171 to freeze the return type of an expression funxtion that is a
10172 completion, if the type is a limited view and the non-limited
10173 view is available.
10174
10175 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10176
10177 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
10178 aggregate construct.
10179 (P_Record_Or_Array_Component_Association): An array aggregate
10180 can start with an Iterated_Component_Association.
10181 * scng.adb: Modify error message on improper use of @ in earlier
10182 versions of the language.
10183 * sinfo.ads: New node kind N_Delta_Aggregate.
10184 * sinfo.adb: An N_Delta_Aggregate has component associations and
10185 an expression.
10186 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
10187 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
10188 Create a new index for each one of the choices in the association,
10189 to prevent spurious homonyms in the scope.
10190 (Resolve_Delta_Aggregate): New.
10191 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
10192 * exp_util.adb (Insert_Actions): Take into account
10193 N_Delta_Aggregate.
10194 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
10195 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
10196 and local procedures Expand_Delta_Array_Aggregate and
10197 expand_Delta_Record_Aggregate.
10198 * sprint.adb: Handle N_Delta_Aggregate.
10199
10200 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10201
10202 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
10203 empty name when the exception declaration is subject to pragma
10204 Discard_Names.
10205 (Null_String): New routine.
10206
10207 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10208
10209 * par-ch9.adb (P_Protected_Definition): Parse
10210 any optional and potentially illegal pragmas which appear in
10211 a protected operation declaration list.
10212 (P_Task_Items): Parse
10213 any optional and potentially illegal pragmas which appear in a
10214 task item list.
10215
10216 2017-01-23 Pascal Obry <obry@adacore.com>
10217
10218 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
10219 is needed when a foreign thread call a Win32 API using a thread handle
10220 like GetThreadTimes() for example.
10221
10222 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10223
10224 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10225 allow an 'Address clause to be specified on a prefix of a
10226 class-wide type.
10227
10228 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10229
10230 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10231 attribute 'Valid is a renaming of the original expression when
10232 the expression denotes a name. For all other kinds of expression,
10233 use a constant to capture the value.
10234 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10235 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10236
10237 2017-01-23 Justin Squirek <squirek@adacore.com>
10238
10239 * sem_eval.adb (Eval_Integer_Literal): Add special
10240 case to avoid optimizing out check if the literal appears in
10241 an if-expression.
10242
10243 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10244
10245 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10246 allow an 'Address clause to be specified on a prefix of a
10247 class-wide type.
10248
10249 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10250
10251 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10252 attribute 'Valid is a renaming of the original expression when
10253 the expression denotes a name. For all other kinds of expression,
10254 use a constant to capture the value.
10255 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10256 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10257
10258 2017-01-23 Justin Squirek <squirek@adacore.com>
10259
10260 * sem_eval.adb (Eval_Integer_Literal): Add special
10261 case to avoid optimizing out check if the literal appears in
10262 an if-expression.
10263
10264 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10265
10266 * sem_ch4.adb (Try_Primitive_Operations,
10267 Is_Valid_First_Argument_Of): argument is valid if it is a derived
10268 type with unknown discriminants that matches its underlying
10269 record view.
10270 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
10271 expression if its type is derived from a limited type with
10272 unknown discriminants, because the expansion (which is a call)
10273 must be expanded in the enclosing context to add the proper build-
10274 in-place parameters to the call.
10275 * lib.ads, exp_ch9.adb: Minor fixes in comments.
10276
10277 2017-01-23 Yannick Moy <moy@adacore.com>
10278
10279 * frontend.adb (Frontend): Do not load runtime
10280 unit for GNATprove when parsing failed.
10281 * exp_ch9.adb: minor removal of extra whitespace
10282 * exp_ch6.adb: minor typo in comment
10283 * sem_util.adb: Code cleanup.
10284 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10285 * a-ngcefu.adb: minor style fix in whitespace
10286
10287 2017-01-23 Thomas Quinot <quinot@adacore.com>
10288
10289 * scos.ads: Document usage of 'd' as default SCO kind for
10290 declarations.
10291 * par_sco.adb (Traverse_Declarations_Or_Statements.
10292 Traverse_Degenerate_Subprogram): New supporting routine for expression
10293 functions and null procedures.
10294 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10295 N_Expression_Function to the subprogram case; add required
10296 support for null procedures and expression functions.
10297
10298 2017-01-23 Bob Duff <duff@adacore.com>
10299
10300 * namet.ads (Bounded_String): Decrease the size of type
10301 Bounded_String to avoid running out of stack space.
10302 * namet.ads (Append): Don't ignore buffer overflow; raise
10303 Program_Error instead.
10304
10305 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10306
10307 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10308 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10309 reformatting.
10310 * exp_ch9.adb: minor style fix in comment.
10311
10312 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10313
10314 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10315 for a limited record extension with unknown discriminants whose
10316 full view has no discriminants.
10317
10318 2017-01-23 Yannick Moy <moy@adacore.com>
10319
10320 * exp_spark.adb: Alphabetize with clauses.
10321
10322 2017-01-23 Yannick Moy <moy@adacore.com>
10323
10324 * sem_util.adb (Has_Enabled_Property): Treat
10325 protected objects and variables differently from other variables.
10326
10327 2017-01-23 Thomas Quinot <quinot@adacore.com>
10328
10329 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10330 Split original Ada 95 part off into new subprogram
10331 below. Call that subprogram (instead of proceeding with
10332 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10333 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10334 * debug.adb Document new switch -gnatd.p
10335 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10336 record for reverse bit order if an error has already been posted
10337 on the record type. This avoids generating extraneous "info:"
10338 messages for illegal code.
10339
10340 2017-01-23 Justin Squirek <squirek@adacore.com>
10341
10342 * sem_ch3.adb (Analyze_Declarations): Correct comments
10343 * freeze.adb (Find_Constant): Add detection of deferred constants
10344 so they are not incorrectly flagged as premature.
10345
10346 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10347
10348 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10349 characters for future version of the language. '@' is legal name.
10350 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10351 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10352 denotes a Target_Name.
10353 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10354 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10355 (Has_Target_Names): New flag on N_Assignment_Statement, to
10356 indicate that RHS has occurrences of N_Target_Name.
10357 * sem.adb: Call Analyze_Target_Name.
10358 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10359 (urrent_LHS): Global variable that denotes LHS of assignment,
10360 used in the analysis of Target_Name nodes.
10361 * sem_res.adb (Resolve_Target_Name): New procedure.
10362 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10363 N is an assignment statement whose RHS contains occurences of @
10364 that designate the value of the LHS of the assignment. If the
10365 LHS is side-effect free the target names can be replaced with
10366 a copy of the LHS; otherwise the semantics of the assignment
10367 is described in terms of a procedure with an in-out parameter,
10368 and expanded as such.
10369 (Expand_N_Assignment_Statement): Call
10370 Expand_Assign_With_Target_Names when needed.
10371 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10372 * sprint.adb: Handle N_Target_Name.
10373
10374 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10375
10376 * checks.adb: Minor fix in comment.
10377
10378 2017-01-23 Philippe Gil <gil@adacore.com>
10379
10380 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10381 count in Sort = Memory_Usage or Allocations_Count
10382
10383 2017-01-23 Justin Squirek <squirek@adacore.com>
10384
10385 * sem_ch3.adb: Code cleanup.
10386
10387 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10388
10389 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10390 variables to the local variable section. Update the profile
10391 of various nested routine that previously had visibility
10392 of those globals. One the matching phase has completed,
10393 remove certain classes of clauses which are considered noise.
10394 (Check_Dependency_Clause): Properly detect a match between two
10395 'Result attributes. Update the various post-match cases to use
10396 Is_Already_Matched as this routine now automatically recognizes
10397 a previously matched 'Result attribute.
10398 (Is_Already_Matched): New routine.
10399 (Remove_Extra_Clauses): New routine.
10400 (Report_Extra_Clauses): Remove the detection of ... => null
10401 clauses as this is now done in Remove_Extra_Clauses.
10402
10403 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10404
10405 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10406 report on spurious overlaps between values involving a subtype
10407 with a static predicate, because the expansion of such a subtype
10408 into individual ranges in inhibited in ASIS mode.
10409
10410 2017-01-23 Justin Squirek <squirek@adacore.com>
10411
10412 * sem_ch3.adb (Analyze_Declarations): Add detection
10413 of an edge case and delay freezing if it is present.
10414
10415 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10416
10417 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10418 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10419
10420 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10421
10422 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10423 access-to-subprogram types inherit the convention of the
10424 associated subprogram. (Set_Profile_Convention): New routine.
10425 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10426 of the two entities directly, use Conventions_Match to account
10427 for anonymous access-to-subprogram and subprogram types.
10428 (Conventions_Match): New routine.
10429
10430 2017-01-23 Claire Dross <dross@adacore.com>
10431
10432 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10433 which return Universal_Integer, force the overflow check flag for
10434 Length and Range_Length for types as big as Long_Long_Integer.
10435
10436 2017-01-23 Claire Dross <dross@adacore.com>
10437
10438 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10439 attributes which return Universal_Integer, introduce a conversion
10440 to the expected type with the appropriate check flags set.
10441 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10442 base type if the range is null. It may still be invalid if it
10443 is higher than the lower bound. This is checked later in the
10444 context in which the range appears.
10445
10446 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10447
10448 * scos.ads: Introduce a constant to represent ignored
10449 dependencies in SCO_Unit_Table_Entry.
10450
10451 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10452
10453 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10454 spaces from error messages.
10455
10456 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10457
10458 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10459 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10460 an object declaration for an array type with a modular index type
10461 with the size of Long_Long_Integer. Special processing is needed
10462 in this case to compute reliably the size of the object, and
10463 eventually to raise Storage_Error, when wrap-around arithmetic
10464 might compute a meangingless size for the object.
10465
10466 2017-01-23 Justin Squirek <squirek@adacore.com>
10467
10468 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10469 sem_type.adb: Code cleanups.
10470
10471 2017-01-23 Bob Duff <duff@adacore.com>
10472
10473 * sem_res.adb (Resolve_Call): In the part of the code where
10474 it is deciding whether to turn the call into an indexed
10475 component, avoid doing so if the call is to an instance of
10476 Unchecked_Conversion. Otherwise, the compiler turns it into an
10477 indexed component, and resolution of that turns it back into a
10478 function call, and so on, resulting in infinite recursion.
10479 * sem_util.adb (Needs_One_Actual): If the first formal has a
10480 default, then return False.
10481
10482 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10483
10484 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10485 optimizations when the type is modular and the offsets are equal.
10486
10487 2017-01-20 Thomas Quinot <quinot@adacore.com>
10488
10489 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10490 message.
10491
10492 2017-01-20 Nicolas Roche <roche@adacore.com>
10493
10494 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10495
10496 2017-01-20 Bob Duff <duff@adacore.com>
10497
10498 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10499 (etc) optimizations when the type is modular.
10500
10501 2017-01-20 Yannick Moy <moy@adacore.com>
10502
10503 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10504 but copy the SPARK_Mode pragma instead of moving it.
10505 (Build_Subprogram_Declaration): Ensure that the generated spec
10506 and original body share the same SPARK_Pragma aspect/pragma.
10507 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10508 procedure to copy SPARK_Mode aspect.
10509
10510 2017-01-20 Bob Duff <duff@adacore.com>
10511
10512 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10513 even in ASIS mode.
10514 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10515 Empty even in ASIS mode.
10516
10517 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10518
10519 * exp_ch9.adb: minor style fixes in comments.
10520 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10521 relative statement introduces an implicit dependency on
10522 Ada.Real_Time.Clock_Time.
10523 * sem_util.adb: Minor reformatting.
10524
10525 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10526
10527 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10528 must be treated as delayed aspect even if the expression is
10529 a literal, because the aspect affects the freezing and the
10530 elaboration of the object to which it applies.
10531
10532 2017-01-20 Tristan Gingold <gingold@adacore.com>
10533
10534 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10535
10536 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10537
10538 * lib-xref.adb (Generate_Reference): Do not warn about the
10539 presence of a pragma Unreferenced if the entity appears as the
10540 actual in a procedure call that does not come from source.
10541
10542 2017-01-20 Pascal Obry <obry@adacore.com>
10543
10544 * expect.c, terminals.c: Fix some warnings about unused variables.
10545 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10546 of the runtime.
10547
10548 2017-01-20 Bob Duff <duff@adacore.com>
10549
10550 * exp_attr.adb (Constrained): Apply an access check (check that
10551 the prefix is not null) when the prefix denotes an object of an
10552 access type; that is, when there is an implicit dereference.
10553
10554 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10555
10556 * s-rident.ads (constant Profile_Info): Remove
10557 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10558
10559 2017-01-20 Tristan Gingold <gingold@adacore.com>
10560
10561 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10562
10563 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10564
10565 * ghost.adb (Mark_Ghost_Clause): New routine.
10566 (Prune_Node): Do not prune compilation unit nodes.
10567 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10568 This does not touch the node itself, but does prune all its fields.
10569 * ghost.ads (Mark_Ghost_Clause): New routine.
10570 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10571 package clause mentions Ghost and non-Ghost packages. Mark a
10572 use package clause as Ghost when it mentions a Ghost package.
10573 (Analyze_Use_Type): Emit an error when a use type clause mentions
10574 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10575 it mentions a Ghost type.
10576 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10577 Ghost when it withs a Ghost unit.
10578
10579 2017-01-20 Javier Miranda <miranda@adacore.com>
10580
10581 * sem_res.adb (Resolve_Call): If a function call
10582 returns a limited view of a type and at the point of the call the
10583 function is not declared in the extended main unit then replace
10584 it with the non-limited view, which must be available. If the
10585 called function is in the extended main unit then no action is
10586 needed since the back-end handles this case.
10587
10588 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10589
10590 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10591 (Contains_Subprograms_Refs): ...this. Adjust comment
10592 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10593 (Is_Subprogram_Ref): ...this.
10594 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10595 Has_Non_Subprograms_Referencer and adjust comment. Remove
10596 incorrect shortcut for package declarations and bodies.
10597
10598 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10599
10600 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10601 base type differs from that of the completion and the private
10602 subtype is an itype (created for a constraint on an access
10603 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10604 anomalies in gigi.
10605
10606 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10607
10608 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10609 When inheriting the SPARK_Mode of a prior expression function,
10610 look at the properly resolved entity rather than the initial
10611 candidate which may denote a homonym.
10612
10613 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10614
10615 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10616 Precondition or Postcondition, and the context is pragma
10617 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10618 and suggest the standard names Assertion_Policy /Pre /Post
10619 instead.
10620
10621 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10622
10623 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10624
10625 2017-01-20 Javier Miranda <miranda@adacore.com>
10626
10627 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10628 Entity attribute.
10629 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10630 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10631 malformed trees.
10632
10633 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10634
10635 * sem_ch13.adb (Analyze_Aspect_Specification, case
10636 Dynamic_Predicate): If the entity E is a subtype that inherits
10637 a static predicate for its parent P,, the inherited and the
10638 new predicate combine in the generated predicate function,
10639 and E only has a dynamic predicate.
10640
10641 2017-01-20 Tristan Gingold <gingold@adacore.com>
10642
10643 * s-boustr.ads, s-boustr.adb: New package.
10644 * Makefile.rtl: Add s-boustr.
10645
10646 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10647
10648 * inline.adb (Process_Formals): Qualify the
10649 expression of a return statement when it yields a universal type.
10650
10651 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10652
10653 * freeze.adb (Freeze_All): Freeze the default
10654 expressions of all eligible formal parameters that appear in
10655 entries, entry families, and protected subprograms.
10656
10657 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10658
10659 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10660 for illegal inherited Implicit_Dereference aspects with renamed
10661 discriminants.
10662
10663 2017-01-20 Javier Miranda <miranda@adacore.com>
10664
10665 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10666 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10667 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10668 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10669 Set_Prev, Tree_Read): Adding assertion.
10670 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10671 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10672 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10673 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10674 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10675 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10676 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10677 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10678 Set_ListN_With_Parent): Adding assertion.
10679
10680 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10681
10682 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10683 import that applies to several homograph subprograms. when one
10684 of them is declared by a subprogram body.
10685
10686 2017-01-20 Justin Squirek <squirek@adacore.com>
10687
10688 * exp_ch6.adb (Expand_Call): Remove optimization
10689 that nulls out calls to null procedures.
10690
10691 2017-01-20 Yannick Moy <moy@adacore.com>
10692
10693 * inline.adb (Expand_Inlined_Call): Keep more
10694 precise type of actual for inlining whenever possible. In
10695 particular, do not switch to the formal type in GNATprove mode in
10696 some case where the GNAT backend might require it for visibility.
10697
10698 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10699
10700 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10701 aspect Implicit_Dereference can be inherited by a full view if
10702 the partial view has no discriminants, because there is no way
10703 to apply the aspect to the partial view.
10704 (Build_Derived_Record_Type): If derived type renames discriminants
10705 of the parent, the new discriminant inherits the aspect from
10706 the old one.
10707 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10708 call through an access discriminant designating a subprogram.
10709 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10710 properly a parameterless call through an access discriminant on
10711 the left-hand side of an assignment.
10712 * sem_res.adb (resolve): If an interpreation involves a
10713 discriminant with an implicit dereference and the expression is an
10714 entity, resolution takes place later in the appropriate routine.
10715 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10716 access discriminants that designate a subprogram type.
10717
10718 2017-01-20 Pascal Obry <obry@adacore.com>
10719
10720 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10721
10722 2017-01-20 Yannick Moy <moy@adacore.com>
10723
10724 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10725 on implicitly with'ed units in GNATprove mode.
10726 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10727 with'ed units in GNATprove mode.
10728
10729 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10730
10731 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10732 unit Do not report an error on a non-static entity that appears
10733 in the context of a spec expression, such as an aspect expression.
10734
10735 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10736
10737 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10738 (Is_Underlying_Full_View): New routine.
10739 (Set_Is_Underlying_Full_View): New routine.
10740 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10741 * einfo.ads Add new attribute Is_Underlying_Full_View.
10742 (Is_Underlying_Full_View): New routine along with pragma Inline.
10743 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10744 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10745 class-wide types and underlying full views. The first subtype
10746 is used as the working type for all Itypes, not just array base types.
10747 (Build_DIC_Procedure_Declaration): Do not consider
10748 class-wide types and underlying full views. The first subtype
10749 is used as the working type for all Itypes, not just array
10750 base types.
10751 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10752 view or an underlying full view without clobbering the attributes
10753 of a previous freeze node.
10754 (Inherit_Freeze_Node): New routine.
10755 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10756 full view as such.
10757 (Build_Underlying_Full_View): Mark an underlying full view as such.
10758 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10759 full view as such.
10760
10761 2017-01-20 Yannick Moy <moy@adacore.com>
10762
10763 * sinfo.ads: Document lack of Do_Division_Check flag
10764 on float exponentiation.
10765
10766 2017-01-19 Javier Miranda <miranda@adacore.com>
10767
10768 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10769 identifier attribute of a block-statement node. Required to avoid
10770 assertion failure when building the new containers library.
10771
10772 2017-01-19 Bob Duff <duff@adacore.com>
10773
10774 * exp_ch3.adb: Update comment.
10775
10776 2017-01-19 Vincent Celier <celier@adacore.com>
10777
10778 * gprep.adb (Gnatprep): Parse the definition file without
10779 "replace in comments" even when switch -C is used.
10780
10781 2017-01-19 Justin Squirek <squirek@adacore.com>
10782
10783 * exp_ch9.adb (Is_Pure_Barrier): Create function
10784 Is_Count_Attribute to identify an expansion of the 'Count
10785 attribute.
10786
10787 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10788
10789 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10790 statements within an element iterator loop are only analyzed
10791 agter the loop is rewritten. Within a generic the analysis must
10792 be performed in any case to complete name capture.
10793
10794 2017-01-19 Bob Duff <duff@adacore.com>
10795
10796 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10797 before checking for unrecognized pragmas.
10798 Initialize Pname on its declarations; that's always good style.
10799
10800 2017-01-19 Claire Dross <dross@adacore.com>
10801
10802 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10803 body into the tree for GNATprove by setting its Parent field. The
10804 components invariants of composite types are not checked by
10805 the composite type's invariant procedure in GNATprove mode.
10806 (Build_Invariant_Procedure_Declaration): Semi-insert the
10807 declaration into the tree for GNATprove by setting its Parent
10808 field.
10809 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10810 the component invariants to the array type invariant procedure
10811 so that the procedure can be used to check the array type
10812 invariants if any.
10813 (Freeze_Record_Type): In GNATprove mode, do
10814 not add the component invariants to the record type invariant
10815 procedure so that the procedure can be used to check the record
10816 type invariants if any.
10817
10818 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10819
10820 * lib-xref-spark_specific.adb: Minor reformatting.
10821 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10822
10823 2017-01-19 Javier Miranda <miranda@adacore.com>
10824
10825 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10826 Build_Back_End_Aggregate.
10827 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10828 (Prepend_Stored_Values): Code cleanup.
10829
10830 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10831
10832 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10833 incomplete return type after attempting to freeze it, so that
10834 other freeze actiona are generated in the proper order.
10835
10836 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10837
10838 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10839 type, ie. a type whose component is a character type, and the
10840 aggregate is positional, do not convert into a string literal
10841 if the index type is not an integer type, because the original
10842 type may be required in an enclosing operation.
10843
10844 2017-01-19 Bob Duff <duff@adacore.com>
10845
10846 * binde.adb, debug.adb: Enable new elaboration order algorithm
10847 by default. -dp switch reverts to the old algorithm.
10848
10849 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10850
10851 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10852 (Analyze_Declarations): Create the DIC and Invariant
10853 procedure bodies s after all freezing has taken place.
10854 (Build_Assertion_Bodies): New routine.
10855 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10856 and Exp_Util.
10857 (Analyze_Package_Specification): Remove the
10858 generation of the DIC and Invariant procedure bodies. This is
10859 now done by Analyze_Declarations.
10860 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10861 procedures are never treated as primitives.
10862
10863 2017-01-19 Yannick Moy <moy@adacore.com>
10864
10865 * frontend.adb: Analyze inlined bodies and check elaboration
10866 rules in GNATprove mode too.
10867 * sem_elab.adb (Delay_Element): Add Boolean component to save
10868 indication that call is in SPARK code. (Check_Elab_Calls):
10869 Check elaboration rules in GNATprove mode, and correctly set
10870 the current value of SPARK_Mode.
10871 * lib-xref-spark_specific.adb
10872 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10873
10874 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10875
10876 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10877 checks on the expression for the high bound of concatenation
10878 when checks are disabled, to suppress warnings about potential
10879 constraint errors in restricted runtimes.
10880
10881 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10882
10883 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10884 representation-to-position function as inlined.
10885 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10886 the purity of an internally generated entity if it has been
10887 explicitly marked as pure for optimization purposes.
10888 * exp_aggr.adb: Minor reformatting.
10889
10890 2017-01-19 Javier Miranda <miranda@adacore.com>
10891
10892 * exp_ch6.adb (Expand_Call): Remove side effects on
10893 actuals that are allocators with qualified expression since the
10894 initialization of the object is performed by means of individual
10895 statements (and hence it must be done before the call).
10896
10897 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10898
10899 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10900 (Build_Derived_Enumeration_Type): If the derived type inherits a
10901 dynamic predicate from its parent, the bounds of the type must
10902 freeze because an explicit constraint is constructed for the
10903 type and the corresponding range is elaborated now.
10904
10905 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10906
10907 * sem_attr.ads: minor fix of inconsistent casing in comment
10908 * lib-writ.ads: minor align comments in columns
10909 * sem_ch3.adb: Minor reformatting.
10910 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10911 * table.ads: minor style fix in comment
10912 * lib-xref-spark_specific.adb
10913 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10914 * sem_ch12.adb: minor whitespace fix
10915 * freeze.adb: Add comment.
10916 * sem_util.adb (Unique_Name): for instances of
10917 generic subprograms ignore the name of the wrapper package.
10918
10919 2017-01-19 Javier Miranda <miranda@adacore.com>
10920
10921 * exp_aggr.adb (Resolve_Record_Aggregate):
10922 Factorize code needed for aggregates of limited and unlimited
10923 types in a new routine.
10924 (Pass_Aggregate_To_Back_End): New subprogram.
10925
10926 2017-01-19 Yannick Moy <moy@adacore.com>
10927
10928 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10929
10930 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10931
10932 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10933 public, for use elsewhere.
10934 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10935 an Inlined_body, recognize a call that uses object notation
10936 and has not been rewritten as a regular call because regular
10937 expansion has not taken place.
10938
10939 2017-01-19 Bob Duff <duff@adacore.com>
10940
10941 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10942 in case of generic formal discrete types, because it causes crashes in
10943 the compiler when built with assertions on.
10944
10945 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10946
10947 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10948 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10949
10950 2017-01-19 Bob Duff <duff@adacore.com>
10951
10952 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10953 Increment Warnings_Detected. It was decrementing, which is
10954 wrong since we just issued a warning message.
10955 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10956 these variables to be of subtype Nat instead of Int, because
10957 they should never be negative.
10958
10959 2017-01-19 Javier Miranda <miranda@adacore.com>
10960
10961 * contracts.adb (Build_Postconditions_Procedure): Replace
10962 Generate_C_Code by Modify_Tree_For_C.
10963 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10964 Replace Generate_C_Code by Modify_Tree_For_C.
10965 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10966 Modify_Tree_For_C.
10967 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10968 Generate_C_Code by Modify_Tree_For_C.
10969 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10970 Generate_C_Code by Modify_Tree_For_C.
10971 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10972 by Modify_Tree_For_C.
10973 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10974 Generate_C_Code by Modify_Tree_For_C.
10975 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10976 by Modify_Tree_For_C.
10977 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10978
10979 2017-01-19 Javier Miranda <miranda@adacore.com>
10980
10981 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10982 subprogram.
10983 (Is_Inlinable_Expression_Function): New subprogram.
10984 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10985 to Sem_Util.
10986 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10987
10988 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10989
10990 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10991 selected component has a prefix that might be interpreted
10992 as a parameterless function call, but none of the candidate
10993 interpretations is parameterless, and there is a hidden homonym
10994 of the prefix that is a package.
10995 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10996 interpreted as a parameterless function call and its analysis
10997 fails, do not call Analyze_Selected_Component.
10998
10999 2017-01-19 Steve Baird <baird@adacore.com>
11000
11001 * sem_util.ads: Add new Use_Full_View Boolean parameter to
11002 Get_Index_Bounds.
11003 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
11004 calls to a newly-defined Scalar_Range_Of_Right_View function.
11005
11006 2017-01-19 Arnaud Charlet <charlet@adacore.com>
11007
11008 * gnat1drv.adb: minor fix of unbalanced parens in comment
11009 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
11010 to visible part of the package to allow re-use in GNATprove.
11011 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
11012 from repeated code of Traverse_Compilation_Unit.
11013 (Traverse_Declaration_Or_Statement): fixed detection of
11014 generic subprograms and packages; also, iteration over case
11015 statement alternatives rewritten to avoid testing if the first
11016 alternative is present (since it must be present due to Ada
11017 syntax restrictions).
11018
11019 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
11020
11021 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
11022 returning by reference not just for subprogram body stubs,
11023 but for all subprogram cases.
11024 * sem_util.adb: Code reformatting.
11025 (Requires_Transient_Scope): Update the call to Results_Differ.
11026 (Results_Differ): Update the parameter profile and the associated
11027 comment on usage.
11028
11029 2017-01-19 Ed Schonberg <schonberg@adacore.com>
11030
11031 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
11032 identifier nodes that do not come from source, to handle properly
11033 dimensionality check within an inlined body which inclddes both
11034 original operands and rewritten operands. This removes spurious
11035 dimensionality errors in the presence of front-end inlining,
11036 as well as in SPARK mode.
11037
11038 2017-01-16 Jakub Jelinek <jakub@redhat.com>
11039
11040 PR driver/49726
11041 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
11042
11043 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11044
11045 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
11046
11047 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11048
11049 * doc/gnat_ugn/getting_started_with_gnat.rst,
11050 doc/gnat_ugn/inline_assembler.rst,
11051 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
11052 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
11053 doc/gnat_ugn/about_this_guide.rst,
11054 doc/gnat_ugn/platform_specific_information.rst,
11055 doc/gnat_ugn/example_of_binder_output.rst,
11056 doc/gnat_ugn/gnat_and_program_execution.rst,
11057 doc/gnat_ugn/gnat_utility_programs.rst,
11058 doc/gnat_ugn/the_gnat_compilation_model.rst,
11059 doc/gnat_rm/implementation_defined_attributes.rst,
11060 doc/gnat_rm/compatibility_and_porting_guide.rst,
11061 doc/gnat_rm/standard_library_routines.rst,
11062 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
11063 doc/gnat_rm/implementation_defined_pragmas.rst,
11064 doc/gnat_rm/the_gnat_library.rst,
11065 doc/gnat_rm/obsolescent_features.rst,
11066 doc/gnat_rm/about_this_guide.rst,
11067 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
11068 doc/gnat_rm/implementation_of_ada_2012_features.rst,
11069 doc/gnat_rm/interfacing_to_other_languages.rst,
11070 doc/gnat_rm/implementation_defined_aspects.rst,
11071 doc/gnat_rm.rst: Update documentation.
11072 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
11073
11074 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11075
11076 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
11077 * scil_ll.adb: Minor style fix in comment.
11078 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
11079 even if entity is already set, because the node may be renalyzed
11080 after inlining transformations.
11081
11082 2017-01-13 Javier Miranda <miranda@adacore.com>
11083
11084 * sem_res.adb (Resolve_Call): Do not establish a transient scope
11085 for a call to inlinable expression function (since the call will
11086 be replaced by its returned object).
11087 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
11088 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
11089 (Expand_Call): For inlinable expression function call replace the
11090 call by its returned object.
11091 (Is_Inlinable_Expression_Function): New subprogram.
11092
11093 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11094
11095 * checks.adb: Minor typo fix and reformatting.
11096
11097 2017-01-13 Javier Miranda <miranda@adacore.com>
11098
11099 * contracts.adb (Contract_Only_Subprograms): Remove formal.
11100 (Copy_Original_Specification): Removed.
11101 (Skip_Contract_Only_Subprogram): Move here checks previously
11102 located in the caller of this routine (to leave the code more clean).
11103 (Build_Contract_Only_Subprogram): Code cleanup.
11104 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
11105 (Get_Contract_Only_Missing_Body_Name): Removed.
11106
11107 2017-01-13 Javier Miranda <miranda@adacore.com>
11108
11109 * sem_ch6.adb (Cloned_Expression): New subprogram.
11110 (Freeze_Expr_Types): Complete previous patch since the expression
11111 of an expression-function may have iterators and loops with
11112 defining identifiers which, as part of the preanalysis of the
11113 expression, may be left decorated with itypes that will not be
11114 available in the tree passed to the backend.
11115
11116 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11117
11118 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
11119 conversion to Integer of an expression that is an attribute
11120 reference 'Pos on an enumeration type.
11121
11122 2017-01-13 Bob Duff <duff@adacore.com>
11123
11124 * atree.ads: Minor comment fix.
11125
11126 2017-01-13 Justin Squirek <squirek@adacore.com>
11127
11128 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
11129 calls in accessibility check on return statement.
11130
11131 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11132
11133 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
11134 Ensure that the input body is a subprogram body before trying to
11135 determine whether it denoted an expression function. Note that
11136 subprogram body stubs cannot denote expression functions.
11137
11138 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11139
11140 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
11141 and typo fixes.
11142
11143 2017-01-13 Javier Miranda <miranda@adacore.com>
11144
11145 * einfo.ads (Component_Bit_Offset): Fix documentation.
11146 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
11147 on record holes for components with unknown compile-time offsets.
11148
11149 2017-01-13 Bob Duff <duff@adacore.com>
11150
11151 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
11152 * g-locfil.ads: Minor comment fix.
11153
11154 2017-01-13 Bob Duff <duff@adacore.com>
11155
11156 * binde.adb (Elab_New): New elaboration order algorithm
11157 that is expected to cause fewer ABE issues. This is a work in
11158 progress. The new algorithm is currently disabled, and can be
11159 enable by the -dp switch, or by modifying the Do_Old and Do_New
11160 etc. flags and rebuilding. Experimental code is included to
11161 compare the results of the old and new algorithms.
11162 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
11163 can have multiple of these tables, so the old and new algorithms
11164 can coexist.
11165 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
11166 parameter of type array. This avoids the global variable, and
11167 allows bounds checking (which is normally defeated by the tables
11168 packages). It also ensures that the Elab_Order is read-only
11169 to Bindgen.
11170 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
11171 subprograms that need it, as above.
11172 * debug.adb: Document new -dp switch. Modify doc of old -do
11173 switch.
11174 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
11175 and Bindgen. Move writing of closure (-R and -Ra switches)
11176 to Binde; that's more convenient.
11177
11178 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11179
11180 * sem_ch6.adb (Analyze_Expression_Function): If the expression
11181 function is a completion, all entities referenced in the
11182 expression are frozen. As a consequence, a reference to an
11183 uncompleted private type from an enclosing scope is illegal.
11184
11185 2017-01-13 Javier Miranda <miranda@adacore.com>
11186
11187 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
11188 (Analyze_Subprogram_Body_Helper): At the occurrence of an
11189 expression function declaration that is a completion, its
11190 expression causes freezing (AI12-0103).
11191
11192 2017-01-13 Vadim Godunko <godunko@adacore.com>
11193
11194 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
11195 Reference functions of Ada.Containers.Indefinite_Holders.
11196
11197 2017-01-13 Bob Duff <duff@adacore.com>
11198
11199 * s-os_lib.ads: Minor comment fixes.
11200
11201 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11202
11203 * exp_ch3.adb (Default_Initialize_Object): Do not default
11204 initialize an object when it is of a task type and restriction
11205 No_Tasking is in effect because the initialization is obsolete.
11206 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
11207 restriction No_Tasking is in effect.
11208 (Build_Master_Renaming): Do not rename a master when restriction
11209 No_Tasking is in effect.
11210
11211 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11212
11213 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
11214 the legality of An others clause applies as well to a choice in
11215 an Iterated_component_ association.
11216 (Resolve_Iterated_Component_Association): An others choice
11217 is legal.
11218 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
11219 Iterated_Component_Association is not static.
11220
11221 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11222
11223 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
11224 control is passed to the expresion handler before the new mode
11225 is set.
11226 * sem_ch12.adb (Analyze_Package_Instantiation,
11227 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
11228 in case control is passed to the expresion handler before the
11229 new mode is set.
11230
11231 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11232
11233 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
11234 exp_aggr.adb: Minor reformatting.
11235
11236 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11237
11238 * inline.adb: Minor reformatting and typo fix.
11239
11240 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11241
11242 * sem_util.ads, sem_util.adb (Choice_List): Move function here
11243 from sem_aggr.adb, for use elsewhere.
11244 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
11245 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
11246 Iterated_Component_Present.
11247 * exp_aggr.adb: Use Choice_List throughout, to handle
11248 Iterated_Component_Associations.
11249 (Gen_Loop): Generate proper loop for an
11250 Iterated_Component_Association: loop variable has the identifier
11251 of the original association. Generate a loop even for a single
11252 component choice, in order to make loop parameter visible in
11253 expression.
11254 (Flatten): An Iterated_Component_Association is not static.
11255
11256 2017-01-13 Yannick Moy <moy@adacore.com>
11257
11258 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
11259 float exponentiation for statically known small negative values
11260 is the reciprocal of the exponentiation for the opposite value
11261 of the exponent.
11262 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
11263 Ensure that the value of float exponentiation for negative values
11264 is the reciprocal of the exponentiation for the opposite value
11265 of the exponent.
11266 * inline.adb (Expand_Inlined_Call): Fix the count
11267 for the number of generated gotos.
11268
11269 2017-01-13 Yannick Moy <moy@adacore.com>
11270
11271 * inline.adb: Code cleanup.
11272 * sem_util.adb (Is_OK_Volatile_Context): Add
11273 expression in delay statement as OK for volatile context.
11274
11275 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11276
11277 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
11278 mode a choice that is a subtype with a static predicate is
11279 replaced by the values it covers. This transformation must not
11280 be performed in ASIS mode, to preserve the source for analysis.
11281
11282 2017-01-13 Justin Squirek <squirek@adacore.com>
11283
11284 * nlists.ads: Correct minor typo.
11285
11286 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11287
11288 * sem_ch13.adb: Minor reformatting and typo fix.
11289
11290 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11291
11292 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11293 Iterated_Component_Association is a named association in an
11294 array aggregate.
11295 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11296 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11297 and resolve the discrete choices and the expression of the
11298 new construct.
11299 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11300 Loop_Actions and Box_Present are attributes of
11301 N_Iterated_Component_Association nodes. Box_Present is always
11302 False in this case.
11303 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11304 has a Discrete_Choices list, as specified in the RM. A
11305 Component_Association for aggregate uses instead a Choices list.
11306 We have to live with this small inconsistency because the new
11307 construct also has a defining identifier, and there is no way
11308 to merge the two node structures.
11309
11310 2017-01-13 Yannick Moy <moy@adacore.com>
11311
11312 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11313 list of pragmas to remove. Remove pragmas from the list of
11314 statements in the body to inline.
11315 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11316
11317 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11318
11319 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11320 Analyze_Declarations, to analyze and resolve the expressions of
11321 aspect specifications in the current declarative list, so that
11322 the expressions have proper entity and type info. This is needed
11323 for ASIS when there is no subsequent expansion to generate this
11324 semantic information.
11325 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11326 original expression, to suppress cascaded errors when expression
11327 has been constant-folded.
11328 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11329 ASIS mode, because there is no subsequent expansion to decorate
11330 the tree.
11331
11332 2017-01-13 Yannick Moy <moy@adacore.com>
11333
11334 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11335 New function to detect when a call may be inlined or not in
11336 GNATprove mode.
11337 (Expand_Inlined_Call): Ensure that a temporary
11338 is always created in the cases where a type conversion may be
11339 needed on an input parameter in GNATprove mode, so that GNATprove
11340 sees the check to perform.
11341 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11342 when not applicable due to actual requiring type conversion
11343 with possible check but no temporary value can be copied for
11344 GNATprove to see the check.
11345
11346 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11347
11348 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11349 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11350 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11351 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11352 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11353 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11354 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11355 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11356 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11357 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11358 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11359 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11360 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11361 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11362 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11363 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11364 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11365 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11366 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11367 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11368 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11369 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11370 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11371 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11372 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11373 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11374 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11375 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11376 statements to reflect the new style for case alternatives. Various
11377 code clean up and reformatting.
11378
11379 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11380
11381 * exp_util.adb: Minor reformatting.
11382
11383 2017-01-13 Yannick Moy <moy@adacore.com>
11384
11385 * exp_spark.adb: Code cleanup.
11386 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11387 expression so that calls are identified as such inside delay
11388 until.
11389
11390 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11391
11392 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11393 * par-ch3.adb (P_Discrete_Choice_List): An
11394 Iterated_Component_Association is an array aggregate component.
11395 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11396 (Is_Quantified_Expression): New function that performs a lookahead
11397 to distinguish quantified expressions from iterated component
11398 associations.
11399 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11400 associations.
11401 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11402 * sem.adb (Analyze): Handle Iterated_Component_Association.
11403 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11404 component associations.
11405 * sinfo.ads, sinfo.adb: Entries for for
11406 N_Iterated_Component_Association and its fields.
11407 * sprint.adb (Sprint_Node_Actual): Handle
11408 N_Iterated_Component_Association.
11409
11410 2017-01-13 Justin Squirek <squirek@adacore.com>
11411
11412 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11413 of the style check until after preanalysis of acutals.
11414
11415 2017-01-13 Yannick Moy <moy@adacore.com>
11416
11417 * sem_ch13.adb: Minor reformatting.
11418 * par-ch11.adb: minor style fix in whitespace
11419 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11420 reduced to Add_Artificial_ALI_File; style fix in declaration of
11421 Text; grammar fix in comment.
11422 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11423 * freeze.adb: Cleanup to pass pragma instead of
11424 expression to call.
11425 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11426 replace System'To_Address by equivalent call.
11427
11428 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11429
11430 * bindusg.adb: Improve usage output for -f switch.
11431
11432 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11433
11434 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11435 Minor reformatting.
11436
11437 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11438
11439 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11440 treat comparisons on strings as legal in a Static_Predicate.
11441 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11442 a function call that is the expansion of a string comparison.The
11443 function call is built when compiling the corresponding predicate
11444 function, but the expression has been found legal as a static
11445 predicate during earlier analysis.
11446 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11447 properly a function call that is the expansion of a string
11448 comparison operation, in order to recover the Static_Predicate
11449 expression and apply it to a static argument when needed.
11450
11451 2017-01-13 Tristan Gingold <gingold@adacore.com>
11452
11453 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11454 (Open_Read): Re-implement using Open_Read_No_Exception.
11455 (Open_Write): Raise exception in case of error.
11456 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11457 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11458 reaise exception.
11459 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11460
11461 2017-01-13 Yannick Moy <moy@adacore.com>
11462
11463 * checks.adb: Code cleanup.
11464
11465 2017-01-13 Yannick Moy <moy@adacore.com>
11466
11467 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11468 expression instead of unanalyzed aspect expression for checking
11469 the validity of inheriting an operation. Also copy the expression
11470 being passing it to Build_Class_Wide_Expression, as this call
11471 modifies its argument.
11472 * sem_util.ads Fix comment to reference correct function name
11473 New_Copy_Tree.
11474
11475 2017-01-13 Javier Miranda <miranda@adacore.com>
11476
11477 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11478 when we propagate information about the indexes back to the original
11479 indexing mode and the prefix of the index is a function call, do not
11480 remove any parameter from such call.
11481
11482 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11483
11484 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11485 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11486 a build-in-place function whose result type is tagged.
11487
11488 2017-01-13 Yannick Moy <moy@adacore.com>
11489
11490 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11491 Do not generate a wrapper when the only candidate is a class-wide
11492 subprogram.
11493 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11494 inside a generic context.
11495
11496 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11497
11498 * exp_util.adb (Add_Inherited_Tagged_DIC):
11499 Pass the object parameters of both the parent and the derived
11500 type DIC procedure to the reference replacement circuitry.
11501 (Find_DIC_Type): Modify the circuitry to present the partial
11502 view of a private type in case the private type defines its own
11503 DIC pragma.
11504 (Replace_Object_And_Primitive_References): Add two
11505 optional formal parameters. Update the comment on usage. Update
11506 the replacement of references to object parameters.
11507
11508 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11509
11510 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11511
11512 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11513
11514 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11515 an out parameter that is a type conversion, independently of th
11516 range check that may apply to the expression of the conversion,
11517 for use in GNATProve.
11518
11519 2017-01-13 Yannick Moy <moy@adacore.com>
11520
11521 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11522 GNATprove_Mode here to Frontend.
11523 * frontend.adb (Frontend): Move the implicit with for System
11524 in GNATprove_Mode here as it ismore correct this way; the old
11525 place only worked by chance, since there were no overloaded names.
11526 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11527 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11528 four attributes identified in SRM 9(18), add an implicit with
11529 to Ada.Task_Identification.
11530 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11531 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11532 mode.
11533 * checks.adb (Apply_Discriminant_Check,
11534 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11535 In GNATprove mode, we do not apply the checks, but we still
11536 analyze the expression to possibly issue errors on SPARK
11537 code when a run-time error can be detected at compile time.
11538 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11539 in GNATprove mode.
11540
11541 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11542
11543 * expander.adb (Expand): Add a warning about using return
11544 statements in Ghost management code.
11545 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11546 statements in Ghost management code.
11547 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11548 Build_Invariant_Procedure_Declaration): Add a warning about
11549 using return statements in Ghost management code.
11550 * exp_disp.adb (Make_DT): Add a warning about using return
11551 statements in Ghost management code.
11552 * exp_util.adb (Build_DIC_Procedure_Body,
11553 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11554 warning about using return statements in Ghost management code.
11555 * freeze.adb (Freeze_Entity): Add a warning about using return
11556 statements in Ghost management code.
11557 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11558 statements in Ghost management code.
11559 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11560 a warning about using return statements in Ghost management code.
11561 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11562 return statements in Ghost management code.
11563 * sem_ch6.adb (Analyze_Procedure_Call,
11564 Analyze_Subprogram_Body_Helper): Add a warning about using return
11565 statements in Ghost management code.
11566 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11567 using return statements in Ghost management code.
11568 * sem_ch12.adb (Analyze_Package_Instantiation,
11569 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11570 Instantiate_Subprogram_Body): Add a warning about using return
11571 statements in Ghost management code.
11572 * sem_ch13.adb (Build_Predicate_Functions,
11573 Build_Predicate_Function_Declarations): Add a warning about
11574 using return statements in Ghost management code.
11575 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11576 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11577 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11578 using return statements in Ghost management code.
11579
11580 2017-01-13 Tristan Gingold <gingold@adacore.com>
11581
11582 * s-mmosin-mingw.adb: Fix pragma import.
11583
11584 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11585
11586 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11587 codepeer mode.
11588
11589 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11590
11591 * atree.adb (Allocate_Initialize_Node): A newly created node is
11592 no longer marked as Ghost at this level.
11593 (Mark_New_Ghost_Node): New routine.
11594 (New_Copy): Mark the copy as Ghost.
11595 (New_Entity): Mark the entity as Ghost.
11596 (New_Node): Mark the node as Ghost.
11597 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11598 apply to unanalyzed entities.
11599 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11600 entities.
11601 (Set_Is_Checked_Ghost_Entity): This attribute now
11602 applies to all entities as well as unanalyzed entities.
11603 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11604 all entities as well as unanalyzed entities.
11605 * expander.adb Add with and use clauses for Ghost.
11606 (Expand): Install and revert the Ghost region associated with the node
11607 being expanded.
11608 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11609 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11610 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11611 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11612 (Freeze_Type): Install and revert the Ghost region associated
11613 with the type being frozen.
11614 * exp_ch5.adb Remove with and use clauses for Ghost.
11615 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11616 * exp_ch6.adb Remove with and use clauses for Ghost.
11617 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11618 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11619 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11620 Ghost region of the working type.
11621 (Build_Invariant_Procedure_Declaration): Install and revert
11622 the Ghost region of the working type.
11623 (Expand_N_Package_Body): Remove all Ghost-related code.
11624 * exp_ch8.adb Remove with and use clauses for Ghost.
11625 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11626 code.
11627 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11628 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11629 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11630 code.
11631 * exp_ch13.adb Remove with and use clauses for Ghost.
11632 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11633 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11634 the tagged type. Move the generation of various entities within
11635 the Ghost region of the type.
11636 * exp_prag.adb Remove with and use clauses for Ghost.
11637 (Expand_Pragma_Check): Remove all Ghost-related code.
11638 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11639 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11640 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11641 * exp_util.adb (Build_DIC_Procedure_Body): Install
11642 and revert the Ghost region of the working types.
11643 (Build_DIC_Procedure_Declaration): Install and revert the
11644 Ghost region of the working type.
11645 (Make_Invariant_Call): Install and revert the Ghost region of the
11646 associated type.
11647 (Make_Predicate_Call): Reimplemented. Install and revert the
11648 Ghost region of the associated type.
11649 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11650 of the entity being frozen.
11651 (New_Freeze_Node): Removed.
11652 * ghost.adb Remove with and use clauses for Opt.
11653 (Check_Ghost_Completion): Update the parameter profile
11654 and all references to formal parameters.
11655 (Ghost_Entity): Update the comment on usage.
11656 (Install_Ghost_Mode): New routines.
11657 (Is_Ghost_Assignment): New routine.
11658 (Is_Ghost_Declaration): New routine.
11659 (Is_Ghost_Pragma): New routine.
11660 (Is_Ghost_Procedure_Call): New routine.
11661 (Is_Ghost_Renaming): Removed.
11662 (Is_OK_Declaration): Reimplemented.
11663 (Is_OK_Pragma): Reimplemented.
11664 (Is_OK_Statement): Reimplemented.
11665 (Is_Subject_To_Ghost): Update the comment on usage.
11666 (Mark_And_Set_Ghost_Assignment): New routine.
11667 (Mark_And_Set_Ghost_Body): New routine.
11668 (Mark_And_Set_Ghost_Completion): New routine.
11669 (Mark_And_Set_Ghost_Declaration): New routine.
11670 (Mark_And_Set_Ghost_Instantiation): New routine.
11671 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11672 (Mark_Full_View_As_Ghost): Removed.
11673 (Mark_Ghost_Declaration_Or_Body): New routine.
11674 (Mark_Ghost_Pragma): New routine.
11675 (Mark_Ghost_Renaming): New routine.
11676 (Mark_Pragma_As_Ghost): Removed.
11677 (Mark_Renaming_As_Ghost): Removed.
11678 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11679 (Prune_Node): Freeze nodes no longer need special pruning, they
11680 are processed by the general ignored Ghost code mechanism.
11681 (Restore_Ghost_Mode): New routine.
11682 (Set_Ghost_Mode): Reimplemented.
11683 (Set_Ghost_Mode_From_Entity): Removed.
11684 * ghost.ads Add with and use clauses for Ghost.
11685 (Check_Ghost_Completion): Update the parameter profile
11686 along with the comment on usage.
11687 (Install_Ghost_Mode): New routine.
11688 (Is_Ghost_Assignment): New routine.
11689 (Is_Ghost_Declaration): New routine.
11690 (Is_Ghost_Pragma): New routine.
11691 (Is_Ghost_Procedure_Call): New routine.
11692 (Mark_And_Set_Ghost_Assignment): New routine.
11693 (Mark_And_Set_Ghost_Body): New routine.
11694 (Mark_And_Set_Ghost_Completion): New routine.
11695 (Mark_And_Set_Ghost_Declaration): New routine.
11696 (Mark_And_Set_Ghost_Instantiation): New routine.
11697 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11698 (Mark_Full_View_As_Ghost): Removed.
11699 (Mark_Ghost_Pragma): New routine.
11700 (Mark_Ghost_Renaming): New routine.
11701 (Mark_Pragma_As_Ghost): Removed.
11702 (Mark_Renaming_As_Ghost): Removed.
11703 (Restore_Ghost_Mode): New routine.
11704 (Set_Ghost_Mode): Redefined.
11705 (Set_Ghost_Mode_From_Entity): Removed.
11706 * sem.adb (Analyze): Install and revert the Ghost region of the
11707 node being analyzed.
11708 (Do_Analyze): Change the way a clean Ghost
11709 region is installed and reverted.
11710 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11711 all Ghost-related code.
11712 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11713 (Analyze_Number_Declaration): Remove all Ghost-related code.
11714 (Analyze_Object_Declaration): Install and revert the Ghost region of
11715 a deferred object declaration's completion.
11716 (Array_Type_Declaration): Remove all Ghost-related code.
11717 (Build_Derived_Type): Update the comment on
11718 the propagation of Ghost attributes from a parent to a derived type.
11719 (Derive_Subprogram): Remove all Ghost-related code.
11720 (Make_Class_Wide_Type): Remove all Ghost-related code.
11721 (Make_Implicit_Base): Remove all Ghost-related code.
11722 (Process_Full_View): Install and revert the Ghost region of
11723 the partial view. There is no longer need to check the Ghost
11724 completion here.
11725 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11726 region of the left hand side.
11727 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11728 all Ghost-related code.
11729 (Analyze_Expression_Function): Remove all Ghost-related code.
11730 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11731 (Analyze_Procedure_Call): Install and revert the Ghost region of
11732 the procedure being called.
11733 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11734 region of the spec or body.
11735 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11736 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11737 (Find_Corresponding_Spec): Remove all Ghost-related code.
11738 (Process_Formals): Remove all Ghost-related code.
11739 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11740 the Ghost region of the spec.
11741 (Analyze_Package_Declaration): Remove all Ghost-related code.
11742 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11743 Ghost when it aliases a Ghost entity.
11744 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11745 a Ghost entity.
11746 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11747 it aliases a Ghost entity.
11748 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11749 a Ghost entity.
11750 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11751 aliases a Ghost entity.
11752 * sem_ch11.adb Remove with and use clauses for Ghost.
11753 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11754 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11755 Ghost-related code.
11756 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11757 code.
11758 (Analyze_Package_Instantiation): Install and revert the Ghost region
11759 of the package instantiation.
11760 (Analyze_Subprogram_Instantiation): Install
11761 and revert the Ghost region of the subprogram instantiation.
11762 (Instantiate_Package_Body): Code clean up. Install and revert the
11763 Ghost region of the package body.
11764 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11765 Ghost region of the subprogram body.
11766 * sem_ch13.adb (Build_Predicate_Functions): Install
11767 and revert the Ghost region of the related type.
11768 (Build_Predicate_Function_Declaration): Code clean up. Install
11769 and rever the Ghost region of the related type.
11770 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11771 Install and revert the Ghost region of the pragma.
11772 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11773 Ghost region of the pragma.
11774 (Analyze_Pragma): Install and revert the Ghost region of various
11775 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11776 or encloses a Ghost entity.
11777 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11778 region of the pragma.
11779 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11780 Ghost region of the pragma.
11781 * sem_res.adb (Resolve): Remove all Ghost-related code.
11782 * sem_util.adb (Is_Declaration): Reimplemented.
11783 (Is_Declaration_Other_Than_Renaming): New routine.
11784 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11785 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11786 (Is_Ghost_Pragma): Removed.
11787 (Is_Ignored_Ghost_Pragma): New routine.
11788 (Set_Is_Checked_Ghost_Pragma): New routine.
11789 (Set_Is_Ghost_Pragma): Removed.
11790 (Set_Is_Ignored_Ghost_Pragma): New routine.
11791 * sinfo.ads: Update the documentation on Ghost mode and
11792 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11793 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11794 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11795 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11796 (Is_Ghost_Pragma): Removed along with pragma Inline.
11797 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11798 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11799 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11800 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11801
11802 2017-01-12 Tristan Gingold <gingold@adacore.com>
11803
11804 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11805 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11806
11807 2017-01-12 Yannick Moy <moy@adacore.com>
11808
11809 * errout.adb, errout.ads (Initialize): Factor common treatment
11810 in Reset_Warnings.
11811 (Reset_Warnings): New procedure to reset counts related to warnings.
11812 (Record_Compilation_Errors): New variable to store the presence of an
11813 error, used in gnat2why to allow changing the Warning_Mode.
11814 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11815 store the presence of an error.
11816
11817 2017-01-12 Javier Miranda <miranda@adacore.com>
11818
11819 * sem_ch13.adb (Analyze_Aspect_Specifications):
11820 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11821 internally built reference to the protected procedure as coming
11822 from sources and force its analysis.
11823
11824 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11825
11826 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11827 inherit predicates if any from the first_subtype of the parent,
11828 not from the anonymous parent type.
11829 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11830 predicate is not a static subtype.
11831
11832 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11833
11834 * freeze.adb (Check_Suspicious_Convention): New procedure
11835 performing a warning check on discriminated record types with
11836 convention C or C++. Factored out of procedure Freeze_Record_Type,
11837 and changed to only apply to base types (to avoid spurious
11838 warnings on subtypes). Minor improvement of warning messages
11839 to refer to discriminated rather than variant record types.
11840 (Freeze_Record_Type): Remove code for performing a suspicious
11841 convention check.
11842 (Freeze_Entity): Only call Freeze_Record_Type
11843 on types that aren't declared within any enclosing generic units
11844 (rather than just excluding the type when the innermost scope
11845 is generic). Call Check_Suspicious_Convention whether or not
11846 the type is declared within a generic unit.
11847 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11848 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11849 from Sem_Ch8).
11850
11851 2017-01-12 Tristan Gingold <gingold@adacore.com>
11852
11853 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11854 (__gnat_current_codepage): Renamed from CurrentCodePage
11855 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11856
11857 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11858
11859 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11860 quantified expressions, following AI12-050: the loop parameters
11861 of two quantified expressions are conformant if they have the
11862 same identifier.
11863
11864 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11865
11866 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11867
11868 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11869
11870 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11871 Hnadle properly the attribute reference when it appears as part
11872 of an expression in another loop aspect.
11873
11874 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11875
11876 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11877 subsidiary of Build_Initialization_Call, to complete generation
11878 of predicate checks on discriminants whose (sub)types have
11879 predicates, and to add checks on variants that do not have an
11880 others clause.
11881 * sem_util.adb (Gather_Components): A missing Others alternative is
11882 not an error when the type of the discriminant is a static predicate
11883 (and coverage has been checked when analyzing the case statement). A
11884 runtime check is generated to verify that a given discriminant
11885 satisfies the predicate (RM 3.8.1. (21.1/2)).
11886
11887 2017-01-12 Yannick Moy <moy@adacore.com>
11888
11889 * gnat1drv.adb (Adjust_Global_Switches): Only
11890 perform checking of exception mechanism when generating code.
11891
11892 2017-01-12 Justin Squirek <squirek@adacore.com>
11893
11894 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11895 Remove handling of access component with invariant.
11896 (Build_Invariant_Procedure_Declaration): Remove return on class
11897 wide type.
11898 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11899 conditional exception for component or array so Has_Own_Invariants
11900 flag is not falsly set.
11901 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11902 wide type to have no invariant flags.
11903
11904 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11905
11906 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11907 sem_ch13.adb: Minor reformatting.
11908
11909 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11910
11911 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11912 adjustment primitive when the ancestor type was not properly frozen.
11913 (Gen_Assign): Guard against a missing initialization
11914 primitive when the component type was not properly frozen.
11915 (Initialize_Array_Component): Guard against a missing adjustment
11916 primitive when the component type was not properly frozen.
11917 (Initialize_Record_Component): Guard against a missing adjustment
11918 primitive when the component type was not properly frozen.
11919 (Process_Transient_Component_Completion): The transient object may
11920 not be finalized when its associated type was not properly frozen.
11921 * exp_ch3.adb (Build_Assignment): Guard against a missing
11922 adjustment primitive when the component type was not properly frozen.
11923 (Build_Initialization_Call): Guard against a missing
11924 initialization primitive when the associated type was not properly
11925 frozen.
11926 (Expand_N_Object_Declaration): Guard against a missing
11927 adjustment primitive when the base type was not properly frozen.
11928 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11929 body when there is no adjustment primitive available. Create an
11930 empty Deep_Finalize body when there is no finalization primitive
11931 available.
11932 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11933 missing finalization primitive when the designated type was
11934 not properly frozen.
11935 (Expand_N_Allocator): Guard against a missing initialization primitive
11936 when the designated type was not properly frozen.
11937 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11938 only when the corresponding adjustment primitive is available.
11939 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11940 adjustment/finalization statements only when there is an available
11941 primitive to carry out the action.
11942 (Build_Initialize_Statements): Generate the initialization/finalization
11943 statements only when there is an available primitive to carry out the
11944 action.
11945 (Make_Adjust_Call): Do not generate a call when the underlying
11946 type is not present due to a possible missing full view.
11947 (Make_Final_Call): Do not generate a call when the underlying
11948 type is not present due to a possible missing full view.
11949 (Make_Finalize_Address_Stmts): Generate an empty body when the
11950 designated type lacks a finalization primitive.
11951 (Make_Init_Call): Do not generate a call when the underlying type is
11952 not present due to a possible missing full view.
11953 (Process_Component_For_Adjust): Add the adjustment call only when the
11954 corresponding adjustment primitive is available.
11955 (Process_Component_For_Finalize): Add the finalization call only when
11956 the corresponding finalization primitive is available.
11957 (Process_Object_Declaration): Use a null statement to emulate a
11958 missing call to the finalization primitive of the object type.
11959 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11960 (Make_Final_Call): Update the comment on usage.
11961 (Make_Init_Call): Update the comment on usage.
11962 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11963
11964 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11965
11966 * einfo.ads: Update documentation of Address_Taken.
11967 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11968 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11969 for subprograms when setting Address_Taken flag.
11970
11971 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11972
11973 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11974 Configurable_Run_Time_Mode off when analysing with'ed predefined
11975 libraries.
11976
11977 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11978
11979 * sem_prag.adb: Minor reformatting.
11980 * sem_util.adb (Unique_Entity): fix result for
11981 bodies of entry families.
11982
11983 2017-01-12 Justin Squirek <squirek@adacore.com>
11984
11985 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11986 Resolve_Suppressible in the pragma Assertion_Policy case.
11987 (Resolve_Suppressible): Created this function to factor out
11988 common code used to resolve Suppress to either Ignore or Check
11989 * snames.ads-tmpl: Add name for Suppressible.
11990
11991 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11992
11993 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11994 reformatting.
11995 * debug.adb: Minor comment fixes.
11996
11997 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11998
11999 * sem_util.adb (Unique_Entity): For concurrent
12000 bodies that are defined with stubs and complete a declaration
12001 of a single concurrent object return the entity of an implicit
12002 concurrent type, not the entity of the anonymous concurrent
12003 object.
12004 * debug.adb: -gnatd.J is no longer used.
12005 * make.adb (Globalize): Removed, no longer used.
12006 * sem_ch9.adb: minor typo in comment for entry index
12007
12008 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
12009
12010 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12011 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12012 the value record of a task, set its _Secondary_Stack_Size field
12013 if present.
12014 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12015 a _Secondary_Stack_Size field in the value record of
12016 the task if a Secondary_Stack_Size rep item is present.
12017 (Make_Task_Create_Call): Include secondary stack size
12018 parameter. If No_Secondary_Stack restriction is in place, passes
12019 stack size of 0.
12020 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12021 Secondary_Stack_Size.
12022 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12023 function to define the overhead of the secondary stack.
12024 * s-tarest.adb (Create_Restricted_Task,
12025 Create_Restricted_Task_Sequential): Functions now include
12026 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12027 * s-tarest.adb (Create_Restricted_Task,
12028 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
12029 include Secondary_Stack_Size parameter.
12030 (Task_Wrapper): Secondary stack now allocated to the size specified by
12031 the Secondary_Stack_Size parameter in the task's ATCB.
12032 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
12033 Secondary_Stack_Size component.
12034 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12035 Create_Restricted_Task_Sequential): Function now include
12036 Secondary_Stack_Size parameter.
12037 (Task_Wrapper): Secondary stack now allocated to the size
12038 specified by the Secondary_Stack_Size parameter in the task's
12039 ATCB.
12040 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
12041 to include Secondary_Stack_Size parameter.
12042 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
12043 Secondary_Stack_Size aspect, turning the aspect into its corresponding
12044 internal attribute.
12045 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
12046 * snames.adb-tmpl, snames.ads-tmpl: Added names
12047 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12048 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12049
12050 2017-01-12 Yannick Moy <moy@adacore.com>
12051
12052 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
12053 subtree.
12054
12055 2017-01-12 Justin Squirek <squirek@adacore.com>
12056
12057 * exp_attr.adb (Expand_N_Attribute_Reference):
12058 Fix Finalization_Size case by properly resolving the type after
12059 rewritting the node.
12060
12061 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12062
12063 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
12064 the tree.
12065 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
12066 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
12067 exp_sel.ads: Minor reformatting.
12068
12069 2017-01-12 Justin Squirek <squirek@adacore.com>
12070
12071 * exp_ch6.adb (Expand_Call): Add guard to prevent
12072 invariant checks from being created for internally generated
12073 subprograms.
12074
12075 2017-01-12 Bob Duff <duff@adacore.com>
12076
12077 * lib-writ.ads: Remove incorrect comment.
12078
12079 2017-01-12 Javier Miranda <miranda@adacore.com>
12080
12081 * debug.adb (-gnatd.K): Enable generation of contract-only
12082 procedures in CodePeer mode.
12083 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
12084 New subprogram.
12085 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
12086 set.
12087 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
12088 subprogram.
12089 (Get_Contract_Only_Missing_Body_Name): New subprogram.
12090 (Get_Contract_Only_Body): New subprogram.
12091 (Set_Contract_Only_Body): New subprogram.
12092 (Is_Contract_Only_Body): New subprogram.
12093 (Set_Is_Contract_Only_Body): New subprogram.
12094 (SCIL_Nodes): Replace table by hash-table.
12095
12096 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12097
12098 * exp_ch6.adb: Minor reformatting.
12099 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
12100
12101 2017-01-12 Bob Duff <duff@adacore.com>
12102
12103 * binde.adb (Forced): New reason for a dependence.
12104 (Force_Elab_Order): Implementation of the new switch.
12105 * binde.ads: Minor comment fixes.
12106 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
12107 long ago that is no longer supported; removed comment about that.
12108 * opt.ads (Force_Elab_Order_File): Name of file specified for
12109 -f switch.
12110 * switch-b.adb: Parse -f switch.
12111
12112 2017-01-12 Justin Squirek <squirek@adacore.com>
12113
12114 * exp_ch6.adb (Check_View_Conversion): Created this function
12115 to properly chain calls to check type invariants that may be
12116 present in a subprogram call after the subprogram.
12117 (Expand_Call): Add a conditional to identify when a view conversion
12118 needs to be checked.
12119 * nlists.adb, nlists.ads (Prepend_New): New routine.
12120 (Prepend_New_To): New routine.
12121
12122 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12123
12124 * sinfo.ads: Minor reformatting.
12125
12126 2017-01-12 Gary Dismukes <dismukes@adacore.com>
12127
12128 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
12129 reformatting.
12130
12131 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12132
12133 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
12134 variable Definite. Create a local object and pass its 'Access to the
12135 BIP function when the result type is either definite or it does not
12136 require any finalization or secondary stack management.
12137
12138 2017-01-12 Bob Duff <duff@adacore.com>
12139
12140 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
12141 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
12142 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
12143 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
12144 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
12145 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
12146 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12147 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
12148 Change name to Pragma_Name_Unmapped.
12149 (Pragma_Name_Mapped): Change name to Pragma_Name.
12150 This is because the "mapped" version should be the usual case.
12151
12152 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
12153
12154 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
12155 Is_Default_Init_Cond_Procedure, and
12156 Has_Inherited_Default_Init_Cond. Add uses of flags
12157 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
12158 (Default_Init_Cond_Procedure): Removed.
12159 (DIC_Procedure): New routine.
12160 (Has_Default_Init_Cond): Removed.
12161 (Has_DIC): New routine.
12162 (Has_Inheritable_Invariants): The attribute applies to the base type.
12163 (Has_Inherited_Default_Init_Cond): Removed.
12164 (Has_Inherited_DIC): New routine.
12165 (Has_Inherited_Invariants): The attribute applies to the base type.
12166 (Has_Own_DIC): New routine.
12167 (Has_Own_Invariants): The attribute applies to the base type.
12168 (Is_Default_Init_Cond_Procedure): Removed.
12169 (Is_DIC_Procedure): New routine.
12170 (Set_Default_Init_Cond_Procedure): Removed.
12171 (Set_DIC_Procedure): New routine.
12172 (Set_Has_Default_Init_Cond): Removed.
12173 (Set_Has_Inheritable_Invariants): The attribute applies
12174 to the base type.
12175 (Set_Has_Inherited_Default_Init_Cond): Removed.
12176 (Set_Has_Inherited_DIC): New routine.
12177 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
12178 (Set_Has_Own_DIC): New routine.
12179 (Set_Has_Own_Invariants): The attribute applies to the base type.
12180 (Set_Is_Default_Init_Cond_Procedure): Removed.
12181 (Set_Is_DIC_Procedure): New routine.
12182 (Write_Entity_Flags): Update the output of all flags related to
12183 default initial condition.
12184 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
12185 of the call to the DIC procedure.
12186 (Freeze_Type): Generate the body of the DIC procedure.
12187 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
12188 all occurrences of Create_Append with Append_New_To. Do
12189 not generate an invariant procedure for a class-wide type.
12190 The generated body acts as a freeze action of the working type.
12191 (Build_Invariant_Procedure_Declaration): Do not generate an
12192 invariant procedure for a class-wide type.
12193 (Create_Append): Removed.
12194 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
12195 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
12196 class-wide pre/postcondition description and data structures from
12197 Sem_Prag.
12198 (Build_Class_Wide_Expression): Moved from Sem_Prag.
12199 (Build_DIC_Call): New routine.
12200 (Build_DIC_Procedure_Body): New routine.
12201 (Build_DIC_Procedure_Declaration): New routine.
12202 (Entity_Hash): Moved from Sem_Prag.
12203 (Find_DIC_Type): New routine.
12204 (Update_Primitives_Mapping): Reimplemented.
12205 (Update_Primitives_Mapping_Of_Types): New routine.
12206 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
12207 (Build_DIC_Call): New routine.
12208 (Build_DIC_Procedure_Body): New routine.
12209 (Build_DIC_Procedure_Declaration): New routine.
12210 (Update_Primitives_Mapping): Moved from Sem_Prag.
12211 (Update_Primitives_Mapping_Of_Types): New routine.
12212 * nlists.adb (Append_New): New routine.
12213 (Append_New_To): New routine.
12214 * nlists.ads (Append_New): New routine.
12215 (Append_New_To): New routine.
12216 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
12217 of DIC procedures here. This is now done at the end of the
12218 visible declarations, private declarations, and at the freeze
12219 point of a type.
12220 (Analyze_Private_Extension_Declaration):
12221 A private extension inherits the DIC pragma of a parent type.
12222 (Analyze_Subtype_Declaration): No need to propagate invariant
12223 attributes to a subtype as those apply to the base type.
12224 (Build_Derived_Record_Type): No need to inherit invariants here
12225 as this is now done in Build_Derived_Type.
12226 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
12227 a parent type.
12228 (Process_Full_View): Update the propagation of DIC attributes.
12229 (Propagate_Default_Init_Cond_Attributes): Removed.
12230 * sem_ch7.adb Add with and use clauses for Exp_Util.
12231 (Analyze_Package_Specification): Create the body of the DIC
12232 procedure at the end of the visible and private declarations.
12233 (Preserve_Full_Attributes): Propagate DIC attributes.
12234 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
12235 DIC attributes.
12236 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
12237 * sem_elab.adb (Check_A_Call): Update the call to
12238 Is_Nontrivial_Default_Init_Cond_Procedure.
12239 * sem_prag.adb Remove the with and use clauses for
12240 GNAT.HTable. Move the handling of class- wide pre/postcondition
12241 description and data structures to Exp_Util.
12242 (Analyze_Pragma): Create the declaration of the DIC procedure. There
12243 is no need to propagate invariant-related attributes at this point
12244 as this is done in Build_Invariant_Procedure_Declaration.
12245 (Build_Class_Wide_Expression): Moved to Exp_Util.
12246 (Entity_Hash): Moved to Exp_Util.
12247 (Update_Primitives_Mapping): Moved to Exp_Util.
12248 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
12249 (Update_Primitives_Mapping): Moved to Exp_Util.
12250 * sem_util.adb: Remove with and use clauses for Ghost
12251 and Sem_Ch13.
12252 (Build_Default_Init_Cond_Call): Removed.
12253 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12254 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12255 (Get_Views): Reimplemented.
12256 (Has_Full_Default_Initialization): Reimplement the section on DIC.
12257 (Inherit_Default_Init_Cond_Procedure): Removed.
12258 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12259 (Is_Nontrivial_DIC_Procedure): New routine.
12260 (Is_Verifiable_DIC_Pragma): New routine.
12261 (Propagate_DIC_Attributes): New routine.
12262 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
12263 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12264 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12265 (Inherit_Default_Init_Cond_Procedure): Removed.
12266 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12267 (Is_Nontrivial_DIC_Procedure): New routine.
12268 (Is_Verifiable_DIC_Pragma): New routine.
12269 (Propagate_DIC_Attributes): New routine.
12270 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
12271 on DIC.
12272 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
12273 usage in nodes.
12274 (Expression_Copy): New routine along with pragma Inline.
12275 (Set_Expression_Copy): New routine along with pragma Inline.
12276
12277 2017-01-06 Bob Duff <duff@adacore.com>
12278
12279 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
12280 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
12281 we won't generate the call to s_stalib_adafinal when the main
12282 is not written in Ada.
12283
12284 2017-01-06 Bob Duff <duff@adacore.com>
12285
12286 * sem_prag.adb: Minor: remove pragma Warnings.
12287
12288 2017-01-06 Tristan Gingold <gingold@adacore.com>
12289
12290 * Makefile.rtl: Do not compile s-stchop by default.
12291
12292 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12293
12294 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12295 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12296 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12297 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12298 Reverted previous change for now.
12299
12300 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12301
12302 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12303 check to default discriminant value if checks are enabled.
12304 (Build_Assignment): If type of component has static predicate,
12305 apply check to its default value, if any.
12306
12307 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12308
12309 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12310 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12311 the value record of a task, set its _Secondary_Stack_Size field
12312 if present.
12313 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12314 a _Secondary_Stack_Size field in the value record of
12315 the task if a Secondary_Stack_Size rep item is present.
12316 (Make_Task_Create_Call): Include secondary stack size
12317 parameter. If No_Secondary_Stack restriction is in place, passes
12318 stack size of 0.
12319 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12320 Secondary_Stack_Size.
12321 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12322 function to define the overhead of the secondary stack.
12323 * s-tarest.adb (Create_Restricted_Task,
12324 Create_Restricted_Task_Sequential): Functions now include
12325 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12326 * s-tarest.adb (Create_Restricted_Task,
12327 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12328 now include Secondary_Stack_Size parameter.
12329 (Task_Wrapper):
12330 Secondary stack now allocated to the size specified by the
12331 Secondary_Stack_Size parameter in the task's ATCB.
12332 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12333 Secondary_Stack_Size component.
12334 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12335 Create_Restricted_Task_Sequential): Function now include
12336 Secondary_Stack_Size parameter.
12337 (Task_Wrapper): Secondary stack
12338 now allocated to the size specified by the Secondary_Stack_Size
12339 parameter in the task's ATCB.
12340 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12341 for Secondary_Stack_Size aspect, turning the aspect into its
12342 corresponding internal attribute.
12343 (Analyze_Attribute_Definition):
12344 Process Secondary_Stack_Size attribute.
12345 * snames.adb-tmpl, snames.ads-tmpl: Added names
12346 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12347 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12348
12349 2017-01-06 Pascal Obry <obry@adacore.com>
12350
12351 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12352 Sequential_IO and Direct_IO.
12353
12354 2017-01-06 Bob Duff <duff@adacore.com>
12355
12356 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12357 * par-ch2.adb: Allow the new pragma (with analysis deferred
12358 to Sem_Prag).
12359 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12360 Keep a mapping from new pragma names to old names.
12361 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12362 implement it by calling Map_Pragma_Name.
12363 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12364 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12365 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12366 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12367 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12368 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12369 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12370 as appropriate.
12371
12372 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12373
12374 * exp_ch9.adb: Minor reformatting.
12375
12376 2017-01-06 Tristan Gingold <gingold@adacore.com>
12377
12378 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12379 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12380 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12381 (unused).
12382 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12383 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12384 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12385 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12386
12387 2017-01-06 Bob Duff <duff@adacore.com>
12388
12389 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12390 dummy implementation of Map_Pragma_Name.
12391
12392 2017-01-06 Tristan Gingold <gingold@adacore.com>
12393
12394 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12395 entry_body variable constant.
12396 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12397 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12398 to constant.
12399 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12400 now access to constant.
12401
12402 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12403
12404 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12405 reformatting and typo fixes.
12406
12407 2017-01-06 Bob Duff <duff@adacore.com>
12408
12409 * snames.ads-tmpl: New names for pragma renaming.
12410 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12411 * par-prag.adb: Add new pragma name to case statement.
12412 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12413 of the pragma.
12414 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12415 Dummy implementation of Pragma_Name_Mapped.
12416
12417 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12418
12419 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12420 better detect call within an entry_wrapper.
12421 * sem_res.adb (Resolve_Call): A protected call within an
12422 entity_wrapper is analyzed in the context of the protected
12423 object but corresponds to a pre-analysis and is not an access
12424 before elaboration.
12425 * sem_attr.adb: Minor reformatting.
12426
12427 2017-01-06 Justin Squirek <squirek@adacore.com>
12428
12429 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12430 Finalization_Size to allow a prefix of any non-class-wide type.
12431 * sem_attr.ads Modify comment for Finalization_Size to include
12432 definite type use case.
12433
12434 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12435
12436 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12437 on procedures that are wrappers created for entries that have
12438 preconditions.
12439 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12440 body is an entry_wrapper, compile it in the context of the
12441 synchronized type, because a precondition may refer to funtions
12442 of the type.
12443 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12444 body entity.
12445 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12446 within an Entry_Wrapper this is an external call whose target
12447 is the synchronized object that is the actual in the call to
12448 the wrapper.
12449
12450 2017-01-06 Yannick Moy <moy@adacore.com>
12451
12452 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12453 in tree, which means not analyzing the previous prefix if the node has
12454 been rewritten into its prefix.
12455
12456 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12457
12458 * s-tpobop.adb: Minor reformatting.
12459
12460 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12461
12462 * checks.adb (Ensure_Valid): Do not generate a validity check
12463 within a generated predicate function, validity checks will have
12464 been applied earlier when required.
12465
12466 2017-01-06 Tristan Gingold <gingold@adacore.com>
12467
12468 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12469 components for performances.
12470 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12471 semantic.
12472
12473 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12474
12475 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12476 If expression is compile-time known and obeys a static predicate
12477 it must be labelled as static, to prevent spurious warnings and
12478 run-time errors, e.g. in case statements. This is relevant when
12479 the expression is the result of constant-folding a type conversion
12480 whose expression is a variable with a known static value.
12481
12482 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12483
12484 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12485
12486 2017-01-06 Justin Squirek <squirek@adacore.com>
12487
12488 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12489 expansion of Finalization_Size attribute.
12490 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12491 semantics of Finalization_Size.
12492 (Eval_Attribute): Add null entry for Finalization_Size.
12493 * sem_attr.ads: Add Finalization_Size to the implementation
12494 dependent attribute list.
12495 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12496
12497 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12498
12499 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12500 iterator specification with a serious syntactic error, transform
12501 construct into an infinite loop in order to continue analysis
12502 and prevent a compiler abort.
12503
12504 2017-01-06 Tristan Gingold <gingold@adacore.com>
12505
12506 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12507 max_queue_lengths_array if unused.
12508
12509 2017-01-06 Bob Duff <duff@adacore.com>
12510
12511 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12512 array access, in case "\" is at the end of Text.
12513 * stylesw.adb (Set_Style_Check_Options): Don't include input
12514 characters in the error message template, because they could
12515 be control characters such as "\", which Errout will try to
12516 interpret.
12517
12518 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12519
12520 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12521 For a private type examine the visible declarations that follow
12522 the partial view, not just the private declarations that follow
12523 the full view.
12524
12525 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12526
12527 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12528 code cleanup.
12529
12530 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12531
12532 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12533 alias of the inherited op is the parent iterator, no need to
12534 examine dispatch table positions which might not be established
12535 yet if type is not frozen.
12536 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12537 predicate function may be a subtype of a tagged type.
12538 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12539 of representation items for the completion of a type extension
12540 where a predicate applies to the partial view.
12541 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12542 parameter that designates function whose actual receives a
12543 predicate check, to improve warning message when the check will
12544 lead to infinite recursion.
12545 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12546 Apply_Predicate_Check.
12547
12548 2017-01-06 Tristan Gingold <gingold@adacore.com>
12549
12550 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12551 Gnat_Extended_Ravenscar.
12552 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12553
12554 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12555
12556 * sem_util.ads: Minor typo fix and reformatting.
12557
12558 2017-01-06 Yannick Moy <moy@adacore.com>
12559
12560 * ghost.adb Minor fixing of references to SPARK RM.
12561 (Check_Ghost_Context): Check whether reference is to a lvalue
12562 before issuing an error about violation of SPARK RM 6.9(13)
12563 when declaration has Ghost policy Check and reference has Ghost
12564 policy Ignore.
12565 * sem_util.adb Minor indentation.
12566 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12567 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12568 * sem_util.ads (Unique_Defining_Entity): Document the result
12569 for package body stubs.
12570
12571 2017-01-06 Tristan Gingold <gingold@adacore.com>
12572
12573 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12574 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12575 constant.
12576 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12577 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12578 values.
12579 * exp_util.adb (Corresponding_Runtime_Package): Consider
12580 Max_Queue_Length pragma.
12581
12582 2017-01-06 Justin Squirek <squirek@adacore.com>
12583
12584 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12585 Remove declaration generation in the case of
12586 System_Tasking_Protected_Objects_Single_Entry being used,
12587 and add a warning message when this is detected to occur.
12588 (Make_Initialize_Protection): Remove reference pass in the case
12589 of System_Tasking_Protected_Objects_Single_Entry.
12590 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12591 * s-tposen.adb (Initialize_Protection_Entry): Remove
12592 Entry_Queue_Max parameter.
12593 * s-tposen.ads: Remove the types use to store the entry queue
12594 maximum.
12595 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12596
12597 2017-01-06 Yannick Moy <moy@adacore.com>
12598
12599 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12600 behavior of function, to also accept out of range positions
12601 and raise Constraint_Error in such case, and to copy sloc from
12602 literal if No_Location passed as location.
12603 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12604 of functions to raise Constraint_Error in case of value not in
12605 appropriate range.
12606
12607 2017-01-06 Tristan Gingold <gingold@adacore.com>
12608
12609 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12610 Invalidate_Stack_Cache.
12611
12612 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12613
12614 * s-os_lib.adb: Minor fix to the signature of Readlink.
12615
12616 2017-01-06 Javier Miranda <miranda@adacore.com>
12617
12618 * sem_ch6.adb (Conforming_Types): Handle another
12619 confusion between views in a nested instance with an actual
12620 private type whose full view is not in scope.
12621
12622 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12623
12624 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12625 mark a rewritten if statement as explicit (Comes_From_Source).
12626
12627 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12628
12629 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12630
12631 2017-01-06 Tristan Gingold <gingold@adacore.com>
12632
12633 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12634
12635 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12636
12637 * sem_case.adb: Minor reformatting.
12638
12639 2017-01-06 Thomas Quinot <quinot@adacore.com>
12640
12641 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12642
12643 2017-01-06 Justin Squirek <squirek@adacore.com>
12644
12645 * aspects.adb: Register aspect in Canonical_Aspect.
12646 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12647 into respective tables.
12648 * einfo.ads, einfo.adb: Add a new attribute for
12649 handling the parameters for Pragma_Max_Entry_Queue
12650 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12651 for accessing and setting were added as well.
12652 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12653 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12654 declaration for pramga arguments and store them in the protected
12655 type node.
12656 (Make_Initialize_Protection): Pass a reference to
12657 the Entry_Max_Queue_Lengths_Array in the protected type node to
12658 the runtime.
12659 * rtsfind.adb: Minor grammar fix.
12660 * rtsfind.ads: Register new types taken from the
12661 runtime libraries RE_Protected_Entry_Queue_Max and
12662 RE_Protected_Entry_Queue_Max_Array
12663 * s-tposen.adb, s-tpoben.adb
12664 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12665 Add extra parameter and add assignment to local object.
12666 * s-tposen.ads, s-tpoben.ads: Add new types to
12667 store entry queue maximums and a field to the entry object record.
12668 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12669 for Aspect_Max_Queue_Length.
12670 (Check_Aspect_At_Freeze_Point):
12671 Add aspect to list of aspects that don't require delayed analysis.
12672 * sem_prag.adb (Analyze_Pragma): Add case statement for
12673 Pragma_Max_Queue_Length, check semantics, and register arugments
12674 in the respective entry nodes.
12675 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12676 and Has_Max_Queue_Length
12677 * snames.ads-tmpl: Add constant for the new aspect-name
12678 Name_Max_Queue_Length and corrasponding pragma.
12679
12680 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12681
12682 * exp_util.adb (Is_Controlled_Function_Call):
12683 Reimplemented. Consider any node which has an entity as the
12684 function call may appear in various ways.
12685
12686 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12687
12688 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12689 an unchecked type conversion when performing a view conversion
12690 to/from a private type. In all other cases use a regular type
12691 conversion to ensure that any relevant checks are properly
12692 installed.
12693
12694 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12695
12696 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12697
12698 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12699
12700 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12701 error on case expression that is an entity, when coverage is
12702 incomplete and entity has a static value obtained by local
12703 propagation.
12704 (Handle_Static_Predicate): New procedure, subsidiary of
12705 Check_Choices, to handle case alternatives that are either
12706 subtype names or subtype indications involving subtypes that
12707 have static predicates.
12708
12709 2017-01-06 Thomas Quinot <quinot@adacore.com>
12710
12711 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12712 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12713
12714 2017-01-06 Bob Duff <duff@adacore.com>
12715
12716 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12717 Elaborate_All(P) to P itself. That could happen in obscure cases,
12718 and always introduced a cycle (P body must be elaborated before
12719 P body).
12720 * lib-writ.ads: Comment clarification.
12721 * ali-util.ads: Minor comment fix.
12722 * ali.adb: Minor reformatting.
12723
12724 2017-01-06 Tristan Gingold <gingold@adacore.com>
12725
12726 * a-exexpr-gcc.adb: Improve comment.
12727
12728 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12729
12730 * s-linux-mips.ads: Use correct signal and errno constants.
12731 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12732
12733 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12734
12735 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12736 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12737 sections.
12738
12739 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12740
12741 * gnatvsn.ads: Bump copyright year.
12742
12743 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12744
12745 * gnat_ugn.texi: Bump @copying's copyright year.
12746 * gnat_rm.texi: Likewise.
12747 \f
12748 Copyright (C) 2017 Free Software Foundation, Inc.
12749
12750 Copying and distribution of this file, with or without modification,
12751 are permitted in any medium without royalty provided the copyright
12752 notice and this notice are preserved.