decl.c (gnat_to_gnu_entity): Always take into account the Esize if it is known.
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-21 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always take
4 into account the Esize if it is known.
5
6 2017-12-21 Richard Sandiford <richard.sandiford@linaro.org>
7 Alan Hayward <alan.hayward@arm.com>
8 David Sherwood <david.sherwood@arm.com>
9
10 * gcc-interface/trans.c (Attribute_to_gnu): Track polynomial
11 offsets and sizes.
12 * gcc-interface/utils2.c (build_unary_op): Likewise.
13
14 2017-12-20 Eric Botcazou <ebotcazou@adacore.com>
15
16 * gcc-interface/trans.c (Loop_Statement_to_gnu): Use IN_RANGE macro.
17 * gcc-interface/misc.c (gnat_get_array_descr_info): Likewise.
18 (default_pass_by_ref): Likewise.
19 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
20
21 2017-12-19 Jakub Jelinek <jakub@redhat.com>
22
23 * gcc-interface/trans.c (Loop_Statement_to_gnu): Replace Yoda
24 conditions with typical order conditions.
25 * gcc-interface/misc.c (gnat_get_array_descr_info): Likewise.
26 (default_pass_by_ref): Likewise.
27 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
28 * adaint.c (__gnat_tmp_name): Likewise.
29
30 2017-12-19 Arnaud Charlet <charlet@adacore.com>
31
32 PR ada/66205
33 * bindgen.adb (Gen_AdaFinal): Revert previous change.
34
35 2017-12-15 Jakub Jelinek <jakub@redhat.com>
36
37 * gcc-interface/utils.c (gnat_internal_attribute_table): Swap
38 affects_type_identity and handler fields, adjust comments.
39
40 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
41
42 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of
43 the innermost array instead of Esize of its component type to exclude
44 inappropriate array types, including packed array types.
45
46 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
47
48 * sem_prag.adb (Analyze_Input_Item): Allow concurrent types to appear
49 within the input list of Initializes. Remove the uses of Input_OK.
50
51 2017-12-15 Ed Schonberg <schonberg@adacore.com>
52
53 * exp_ch4.adb (Expand_N_In): Do not replace a membership test on a
54 scalar type with a validity test when the membership appears in a
55 predicate expression, to prevent a spurious error when predicate is
56 specified static.
57 * sem_ch13.adb (Build_Predicate_Functions): Add warning if a static
58 predicate, after constant-folding, reduces to True and is this
59 redundant.
60 * par-ch4.adb: Typo fixes and minor reformattings.
61
62 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
63
64 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Mark the generated
65 with clause as being implicit for an instantiation in order to
66 circumvent an issue with 'W' and 'Z' line encodings in ALI files.
67
68 2017-12-15 Ed Schonberg <schonberg@adacore.com>
69
70 * sem_util.adb (Is_Potentially_Unevaluated): Detect further cases of
71 misuse of 'Old that appear within an expression that is potentially
72 unevaluated, when the prefix of the attribute does not statically
73 designate an object (e.g. a function call).
74
75 2017-12-15 Ed Schonberg <schonberg@adacore.com>
76
77 * sem_ch6.adb (Conformking_Types): Two incomplete types are conforming
78 when one of them is used as a generic actual, but only within an
79 instantiation.
80 * einfo.ads: Clarify use of flag Used_As_Generic_Actual.
81
82 2017-12-15 Justin Squirek <squirek@adacore.com>
83
84 * sem_attr.adb (Resolve_Attribute): Modify check for aliased view on
85 prefix to use the prefix's original node to avoid looking at expanded
86 conversions for certain array types.
87
88 2017-12-15 Ed Schonberg <schonberg@adacore.com>
89
90 * sem_res.adb (Resolve_Membership_Op): Add warning on a membership
91 operation on a scalar type for which there is a user-defined equality
92 operator.
93
94 2017-12-15 Yannick Moy <moy@adacore.com>
95
96 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Ghost assertion
97 policy.
98
99 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
100
101 * sem_prag.adb (Analyze_Initialization_Item): Remove the specialized
102 processing for a null initialization item. Such an item is always
103 illegal.
104
105 2017-12-15 Bob Duff <duff@adacore.com>
106
107 * types.ads, types.h, libgnat/a-except.adb, exp_ch11.adb
108 (PE_Build_In_Place_Mismatch): New reason code for raising when the
109 BIPalloc formal parameter is incorrect. This can happen if a compiler
110 bug causes a mismatch of build-in-place between caller and callee.
111 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
112 PE_Build_In_Place_Mismatch.
113
114 2017-12-15 Ed Schonberg <schonberg@adacore.com>
115
116 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reduction_Expression): New
117 procedure.
118 * exp_util.adb (Insert_Actions): Handle N_Reduction_Expression.
119 * expander.adb (Expand): Call Expand_N_Reduction_Expression
120 * par-ch4.adb (P_Reduction_Expression): New procedure.
121 (P_Iterated_Component_Assoc_Or_Reduction): New precedure, extension of
122 P_Iterated_Component_Association.
123 (OK_Reduction_Expression_Parameter): New procedure.
124 (P_Aggregate_Or_Paren_Expr): Improve error message for malformed delta
125 aggregate.
126 * sem.adb (Analyze): Call Analyze_Reduction_Expression and
127 Analyze_Reduction_Expression_Parameter
128 * sinfo.ads, sinfo.adb: New node kinds N_Reduction_Expression and
129 N_Reduction_Expression_Parameter.
130 * sem_ch4.ads, sem_ch4.adb (Analyze_Reduction_Expression,
131 Analyze_Reduction_Expression_Parameter): New procedures.
132 * sem_res.adb (Resolve): Handle Reduction_Expression and
133 Reduction_Expression_Parameter
134 * sem_spark.adb: Dummy entries for Reduction_Expression and
135 Reduction_Expression_Parameter
136 * sprint.adb (Sprint_Node_Actual): Print Reduction_Expression,
137 Reduction_Expression_Parameter
138
139 2017-12-15 Bob Duff <duff@adacore.com>
140
141 * einfo.ads: Comment fix.
142
143 2017-12-15 Piotr Trojanek <trojanek@adacore.com>
144
145 * s-vercon.adb: Minor style fixes.
146
147 2017-12-15 Ed Schonberg <schonberg@adacore.com>
148
149 * sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
150 itype that is the type of a discriminant-dependent component.
151
152 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
153
154 * sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
155 analysis is now directed to several specialized routines.
156 (Check_Part_Of_Abstract_State): New routine.
157 (Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
158 involving the item, the single concurrent type, and their respective
159 contexts.
160 * sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
161 concurrent type are now recorded regardless of the SPARK mode.
162 * sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
163 individual predicates. A Part_Of reference is legal when it appears
164 within the statement list of the object's immediately enclosing
165 package.
166 (Is_Enclosing_Package_Body): New routine.
167 (Is_Internal_Declaration_Or_Body): New routine.
168 (Is_Single_Declaration_Or_Body): New routine.
169 (Is_Single_Task_Pragma): New routine.
170
171 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
172
173 * gnat_ugn.texi: Regenerate.
174
175 2017-12-15 Bob Duff <duff@adacore.com>
176
177 * gnatvsn.ads: Minor comment fixes.
178
179 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
180
181 * doc/gnat_ugn/gnat_and_program_execution.rst: Update section "Dynamic
182 Stack Usage Analysis" to include more details about GNAT_STACK_LIMIT.
183
184 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
185
186 * exp_util.adb (Add_Own_DIC): Ensure that the expression of the pragma
187 is available (Is_Verifiable_DIC_Pragma): Moved from Sem_Util.
188 * sem_util.adb (Has_Full_Default_Initialization):
189 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
190 whether a type has full default initialization due to pragma
191 Default_Initial_Condition.
192 (Has_Fully_Default_Initializing_DIC_Pragma): New routine.
193 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
194 * sem_util.ads (Has_Fully_Default_Initializing_DIC_Pragma): New
195 routine.
196 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
197 * sem_warn.adb (Is_OK_Fully_Initialized):
198 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
199 whether a type has full default initialization due to pragma
200 Default_Initial_Condition.
201
202 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
203
204 * sem_prag.adb (Match_Constituent): Do not quietly accept constants as
205 suitable constituents.
206 * exp_util.adb: Minor reformatting.
207
208 2017-12-15 Ed Schonberg <schonberg@adacore.com>
209
210 * exp_aggr.adb (In_Place_Assign_OK): Extend the predicate to recognize
211 an array aggregate in an allocator, when the designated type is
212 unconstrained and the upper bound of the aggregate belongs to the base
213 type of the index.
214
215 2017-12-15 Bob Duff <duff@adacore.com>
216
217 * exp_ch6.adb (Expand_N_Extended_Return_Statement,
218 Expand_Simple_Function_Return): Assert that the b-i-p-ness of the
219 caller and callee match. Otherwise, we would need some substantial
220 changes to allow b-i-p calls non-b-i-p, and vice versa.
221
222 2017-12-15 Ed Schonberg <schonberg@adacore.com>
223
224 * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
225 a generic package body. Unnesting is only an issue when generating
226 code, and if the main unit is generic then nested instance bodies have
227 not been created and analyzed, and unnesting will crash in the absence
228 of those bodies,
229
230 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
231
232 * inline.adb (Add_Inlined_Body): Do not add a function which is
233 completed by an expression function defined in the same context as the
234 initial declaration because the completing body is not in a package
235 body.
236 (Is_Non_Loading_Expression_Function): New routine.
237
238 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
239
240 * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
241 the behavior of -gnatdL from before revision 255412.
242 * sem_elab.adb: Update the section of compiler switches.
243 (Build_Call_Marker): Do not create a marker for a call which originates
244 from an expanded spec or body of an instantiated gener, does not invoke
245 a generic formal subprogram, the target is external to the instance,
246 and -gnatdL is in effect.
247 (In_External_Context): New routine.
248 (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
249 and associated flag.
250 (Process_Conditional_ABE_Call): Update the uses of -gnatdL and
251 associated flag.
252 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
253 -gnatd_i.
254 * exp_unst.adb: Minor typo fixes and edits.
255
256 2017-12-15 Ed Schonberg <schonberg@adacore.com>
257
258 * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
259 subprogram instantiation, now that the enclosing wrapper package
260 carries an explicit freeze node. THis prevents freeze nodes for the
261 subprogram for appearing in the wrong scope. This is relevant when the
262 generic subprogram has a private or incomplete formal type and the
263 instance appears within a package that declares the actual type for the
264 instantiation, and that type has itself a delayed freeze.
265
266 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
267
268 * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
269 the environment variable GNAT_STACK_LIMIT from the Stack Overflow
270 Checking section as it is no longer used by any of our supported
271 targets.
272
273 2017-12-15 Bob Duff <duff@adacore.com>
274
275 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
276 Init_Assignment is rewritten, we need to set Assignment_OK on the new
277 node. Otherwise, we will get spurious errors when initializing via
278 assignment statement.
279
280 2017-12-15 Arnaud Charlet <charlet@adacore.com>
281
282 * exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
283 relevant nodes.
284 (Has_Non_Null_Statements): Moved to sem_util for later reuse.
285
286 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
287
288 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
289 * libgnat/s-fatgen.adb (Model): Use Machine attribute.
290 (Truncation): Likewise.
291
292 2017-12-15 Bob Duff <duff@adacore.com>
293
294 * exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
295 statement sequence generated for certain extended return statements
296 have a Sloc that is not No_Location. Otherwise, the back end doesn't
297 set any location and ends up reading uninitialized variables.
298
299 2017-12-15 Bob Duff <duff@adacore.com>
300
301 * types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
302 r255414, committed by mistake.
303
304 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
305
306 * gcc-interface/Makefile.in: Generalize support for symbolic traces.
307
308 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
309
310 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
311
312 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
313
314 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
315 to 0 on the callee if the call is recursive.
316
317 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
318
319 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
320 of the enclosing record type if it is not already set.
321
322 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
323
324 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
325 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
326 a padding type for the alignment before validating the size.
327 Flip conditional construct and add a comment.
328 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
329 apply the exception for padded objects to the type of the object.
330 * gcc-interface/utils.c (hash_pad_type): New static function.
331 (lookup_and_insert_pad_type): Rename into...
332 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
333 lookup with insertion and always return the canonical type.
334 (maybe_pad_type): Adjust to above changes. Set debug type later.
335 (pad_type_has_rm_size): New predicate.
336 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
337
338 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
339
340 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
341
342 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
343
344 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
345 package without body.
346
347 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
348
349 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
350 descendant of System.Address.
351 (gnat_to_gnu_subprog_type): Likewise.
352
353 2017-12-08 Jakub Jelinek <jakub@redhat.com>
354
355 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
356 exclusions to the comment.
357
358 2017-12-07 Martin Sebor <msebor@redhat.com>
359
360 PR c/81544
361 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
362 new member of struct attribute_spec.
363
364 2017-12-06 Simon Wright <simon@pushface.org>
365
366 PR ada/66205
367 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
368 set, generate a null body.
369
370 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
371
372 * sem_util.adb (Contains_Refined_State): Remove.
373
374 2017-12-05 Ed Schonberg <schonberg@adacore.com>
375
376 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
377 predicate cannot apply to a formal type.
378
379 2017-12-05 Arnaud Charlet <charlet@adacore.com>
380
381 * exp_unst.ads: Fix typos.
382
383 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
384
385 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
386 QNX. At startup, the first mutex created has a non-zero ceiling
387 priority whatever its actual policy. This makes some tests fail
388 (c940013 for example).
389
390 2017-12-05 Bob Duff <duff@adacore.com>
391
392 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
393 Expand_Cleanup_Actions for N_Extended_Return_Statement.
394 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
395 N_Extended_Return_Statement by transforming the statements into a
396 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
397 It's too hard for Expand_Cleanup_Actions to operate directly on the
398 N_Extended_Return_Statement, because it has a different structure than
399 the other node kinds that Expand_Cleanup_Actions.
400 * exp_util.adb (Requires_Cleanup_Actions): Add support for
401 N_Extended_Return_Statement. Change "when others => return False;" to
402 "when others => raise ...;" so it's clear what nodes this function
403 handles. Use named notation where appropriate.
404 * exp_util.ads: Mark incorrect comment with ???.
405
406 2017-12-05 Javier Miranda <miranda@adacore.com>
407
408 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
409 Debug_Info_Needed decoration of internally generated discriminal
410 renaming declaration.
411
412 2017-12-05 Arnaud Charlet <charlet@adacore.com>
413
414 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
415 nested subprograms.
416
417 2017-12-05 Sergey Rybin <rybin@adacore.com>
418
419 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
420 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
421
422 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
423
424 * sem_util.adb (Contains_Refined_State): Remove.
425
426 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
427
428 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
429 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
430 Ada.Calendar.Clock_Time).
431
432 2017-12-05 Ed Schonberg <schonberg@adacore.com>
433
434 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
435 subprogram is overloaded, scan the list of homonyms in the same
436 scope, to find the inherited operation that may be overridden
437 by the candidate.
438 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
439
440 2017-12-05 Bob Duff <duff@adacore.com>
441
442 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
443 Init_Assignment is rewritten, we need to set Assignment_OK on the new
444 node. Otherwise, we will get spurious errors when initializing via
445 assignment statement.
446
447 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
448
449 * sem_elab.adb: Update the terminology and switch sections.
450 (Check_SPARK_Model_In_Effect): New routine.
451 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
452 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
453 SPARK.
454 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
455 effect for SPARK.
456 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
457 in effect for SPARK.
458
459 2017-12-05 Nicolas Setton <setton@adacore.com>
460
461 * terminals.c (__gnat_setup_child_communication): As documented,
462 __gnat_setup_child_communication should not terminate - it is intended
463 to be used as the child process of a call to fork(). However, execvp
464 might actually return in some cases, for instance when attempting to
465 run a 32-bit binary on a 64-bit Linux distribution when the
466 compatibility packages are not installed. In these cases, exit the
467 program to conform to the documentation.
468
469 2017-12-05 Olivier Hainque <hainque@adacore.com>
470
471 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
472 update.
473
474 2017-12-05 Gary Dismukes <dismukes@adacore.com>
475
476 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
477 and reformatting.
478 * gnat_ugn.texi: Regenerate.
479
480 2017-12-05 Olivier Hainque <hainque@adacore.com>
481
482 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
483 on access to subprogram types with foreign convention.
484
485 2017-12-05 Yannick Moy <moy@adacore.com>
486
487 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
488 Guide description of default settings of warnings.
489
490 2017-12-05 Olivier Hainque <hainque@adacore.com>
491
492 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
493 of section. Add comments explaining the rationale of the computation.
494
495 2017-12-05 Bob Duff <duff@adacore.com>
496
497 * exp_ch11.adb: Minor refactoring.
498
499 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
500
501 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
502 documentation.
503 (Set_Underscored_Debug_Flag): New routine.
504 * debug.ads: Add the flags for all underscore switches.
505 (Set_Underscored_Debug_Flag): New routine.
506 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
507 (Suppress_Elaboration_Warnings): New routine.
508 (Set_Suppress_Elaboration_Warnings): New routine.
509 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
510 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
511 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
512 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
513 Inline.
514 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
515 legacy elaboration model.
516 (Default_Initialize_Object): Restore the behavior of the legacy
517 elaboration model.
518 * exp_ch9.adb: Add with and use clause for Sem_Elab.
519 (Build_Task_Activation_Call): Restore the behavior of the legacy
520 elaboration model.
521 * frontend.adb (Frontend): Restore the behavior of the legacy
522 elaboration model.
523 * opt.ads: Add new flags Legacy_Elaboration_Checks and
524 Relaxed_Elaboration_Checks, along with documentation.
525 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
526 legacy elaboration model.
527 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
528 elaboration model.
529 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
530 the legacy elaboration model.
531 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
532 elaboration model.
533 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
534 of the legacy elaboration model.
535 (Analyze_Package_Instantiation): Restore the behavior of the legacy
536 elaboration model.
537 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
538 elaboration model.
539 * sem_elab.adb: Update the documentation of the Processing phase.
540 Update the documentation on elaboration-related compilation
541 switches. Update the documentation on adding a new target. Add
542 Processing_Attributes which represent the state of the Processing
543 phase. Resurrect the previous elaboration model as "legacy elaboration
544 model".
545 (Build_Call_Marker): This routine does not function when the legacy
546 elaboration model is in effect. Do not consider entry calls and requeue
547 statements when debug flag d_e is in effect. Do not consider calls to
548 subprograms which verify the runtime semantics of certain assertion
549 pragmas when debug flag d_p is in effect.
550 (Build_Variable_Reference_Marker): This routine does not function when
551 the legacy elaboration model is in effect.
552 (Check_Elaboration_Scenarios): This routine does not function when the
553 legacy elaboration model is in effect.
554 (Ensure_Prior_Elaboration): The various flags have now been replaced
555 with a state. Do not generate implicit Elaborate[_All] pragmas when
556 their creation has been suppressed.
557 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
558 the requested pragma, not on the nature of the scenario.
559 (In_External_Context): Removed.
560 (Is_Assertion_Pragma_Target): New routine.
561 (Is_Potential_Scenario): Stop the traversal of a task body when
562 reaching an accept or select statement, and debug switch d_a is in
563 effect.
564 (Kill_Elaboration_Scenario): This routine does not function when the
565 legacy elaboration model is in effect.
566 (Process_Activation_Generic): The various flags have now been replaced
567 with a state.
568 (Process_Conditional_ABE): The various flags have now been replaced
569 with a state.
570 (Process_Conditional_ABE_Access): The various flags have now been
571 replaced with a state.
572 (Process_Conditional_ABE_Activation_Impl): The various flags have now
573 been replaced with a state. Do not process an activation call which
574 activates a task whose type is defined in an external instance, and
575 debug switch dL is in effect. Suppress the generation of implicit
576 Elaborate[_All] pragmas once a conditional ABE check has been
577 installed.
578 (Process_Conditional_ABE_Call): The various flags have now been
579 replaced with a state. Do not process a call which invokes a subprogram
580 defined in an external instance, and debug switch dL is in effect.
581 (Process_Conditional_ABE_Call_Ada): The various flags have now been
582 replaced with a state. Suppress the generation of implicit
583 Elaborate[_All] pragmas once a conditional ABE check has been
584 installed.
585 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
586 replaced with a state.
587 (Process_Conditional_ABE_Instantiation): The various flags have now
588 been replaced with a state.
589 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
590 been replaced with a state. Suppress the generation of implicit
591 Elaborate[_All] pragmas once a conditional ABE check has been
592 installed.
593 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
594 now been replaced with a state.
595 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
596 been replaced with a state.
597 (Process_Single_Activation): The various flags have now been replaced
598 with a state.
599 (Record_Elaboration_Scenario): This routine does not function when the
600 legacy elaboration model is in effect.
601 (Traverse_Body): The various flags have now been replaced with a state.
602 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
603 elaboration model".
604 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
605 elaboration model.
606 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
607 elaboration model.
608 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
609 model.
610 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
611 function when the legacy elaboration model is in effect.
612 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
613 (No_Elaboration_Check): New routine.
614 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
615 (Set_No_Elaboration_Check): New routine.
616 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
617 along with occurrences in nodes. Add new flag No_Elaboration_Check
618 along with occurrences in nodes.
619 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
620 switches with underscores. Add processing for switches -gnatH and
621 -gnatJ.
622 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
623 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
624 documentation to include the legacy and relaxed elaboration models.
625 * gnat_ugn.texi: Regenerate.
626
627 2017-12-05 Arnaud Charlet <charlet@adacore.com>
628
629 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
630 Improve doc on required packages for linux 32bits.
631
632 2017-12-05 Doug Rupp <rupp@adacore.com>
633
634 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
635
636 2017-12-05 Javier Miranda <miranda@adacore.com>
637
638 * checks.adb (Generate_Range_Check): Force evaluation of the node in
639 more cases. This patch was written to improve the code generated by
640 the CCG compiler but it is enabled for all targets since double
641 evaluation is always a potential source of inefficiency.
642
643 2017-12-05 Gary Dismukes <dismukes@adacore.com>
644
645 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
646 -fdump-xref switch.
647
648 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
649
650 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
651 iteration scheme throughout, except for the new loop statement(s).
652
653 2017-12-05 Ed Schonberg <schonberg@adacore.com>
654
655 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
656 assignment if it is part of an Iterated_Component_Association: the
657 analysis needs to take place once the loop structure is analyzed and
658 the loop parameter made visible, because references to it typically
659 appear in the corresponding expression. This is necessary if the
660 expression is an aggregate, because previous pre-analysis of the
661 expression does not handle nested aggregates properly.
662
663 2017-12-05 Bob Duff <duff@adacore.com>
664
665 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
666 allocator that is the expansion of a build-in-place function call.
667
668 2017-12-05 Olivier Hainque <hainque@adacore.com>
669
670 libgnat/
671 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
672 possibly adjusting the lookup address by a load address, expect
673 a extra argument through which the load address can be conveyed
674 separately.
675 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
676 retrieved load address to Init_Module.
677 * s-tsmona__linux.adb (Get): Honor the new interface.
678 * s-tsmona__mingw.adb (Get): Likewise.
679 * s-dwalin.ads: Adjust comments to be explicit about which
680 addresses are from module info and which are run-time addresses,
681 offsetted by the module load address.
682 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
683 Do not alter the module Low and High (relative) addresses.
684 (Is_Inside): Improve documentation regarding the kinds of addresses
685 at hand and correct the test.
686 (Symbolic_Traceback): Use separate variables with explicit names
687 for the address in traceback (run-time value) and the address to
688 lookup within the shared object (module-relative). Adjust the
689 computation of address passed to Symbolic_Address for symbolization.
690
691 2017-12-05 Arnaud Charlet <charlet@adacore.com>
692
693 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
694 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
695 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
696 other back-ends can also benefit from the front-end expansion. Remove
697 test for Modify_Tree_For_C in all callers to better share code.
698 * gnat1drv.adb (Adjust_Global_Switches): Set
699 Expand_Nonbinary_Modular_Ops when generating C code.
700
701 2017-12-05 Ed Schonberg <schonberg@adacore.com>
702
703 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
704 parameter becomes invisible after analyzing the loop, which has been
705 rewritten as a while-loop.
706
707 2017-12-05 Doug Rupp <rupp@adacore.com>
708
709 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
710 and update for 64bit ports.
711
712 2017-12-05 Bob Duff <duff@adacore.com>
713
714 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
715 instead of the full name.
716 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
717 in the case of an instance of a generic.
718
719 2017-12-05 Arnaud Charlet <charlet@adacore.com>
720
721 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
722 pragma Annotate.
723
724 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
725
726 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
727
728 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
729
730 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
731 * libgnat/s-osprim__rtems.adb: New file.
732 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
733 (pthread_mutexattr_t): Likewise.
734 (pthread_rwlockattr_t): Likewise.
735 (pthread_rwlock_t): Likewise.
736 (time_t): Use 64-bit integer.
737
738 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
739
740 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
741 alignment.
742 (pthread_mutex_t): Likewise.
743 (pthread_rwlock_t): Likewise.
744
745 2017-11-28 Jakub Jelinek <jakub@redhat.com>
746
747 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
748 using build2 instead of build3.
749
750 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
751
752 PR ada/83091
753 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
754 type for the implementation type of a packed array.
755
756 2017-11-23 Mike Stump <mikestump@comcast.net>
757 Eric Botcazou <ebotcazou@adacore.com>
758
759 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
760 operand to ANNOTATE_EXPR and also pass unrolling hints.
761
762 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
763
764 PR ada/83016
765 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
766 (Usage): Adjust.
767 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
768 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
769 the invocations of $(GNATLINK).
770 (../../gnatdll$(exeext)): Likewise.
771 (../../vxaddr2line$(exeext)): Likewise.
772 (gnatmake-re): Likewise.
773 (gnatlink-re): Likewise.
774
775 2017-11-16 Doug Rupp <rupp@adacore.com>
776
777 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
778
779 2017-11-16 Steve Baird <baird@adacore.com>
780
781 * debug.adb: Update another comment to indicate gnat2scil's use of the
782 -gnatd.7 switch.
783
784 2017-11-16 Bob Duff <duff@adacore.com>
785
786 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
787 the case of nested build-in-place calls.
788
789 2017-11-16 Joel Brobecker <brobecker@adacore.com>
790
791 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
792 available in gnatsymbolize.
793
794 2017-11-16 Steve Baird <baird@adacore.com>
795
796 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
797 switch.
798
799 2017-11-16 Gary Dismukes <dismukes@adacore.com>
800
801 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
802 sem_elab.adb: Minor editorial corrections.
803 * gnat_ugn.texi: Regenerate.
804
805 2017-11-16 Joel Brobecker <brobecker@adacore.com>
806
807 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
808 gnatsymbolize documentation.
809 * gnat_ugn.texi: Regenerate.
810
811 2017-11-16 Steve Baird <baird@adacore.com>
812
813 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
814 "Scope (Parent_Type)" with "Scope (Parent_Base)".
815
816 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
817
818 * opt.ads: Elaboration warnings are now on by default. Add a comment
819 explaining why this is needed.
820 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
821 warnings.
822 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
823 elaboration warnings.
824 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
825 warnings.
826 * sem_elab.adb: Update the structure of Call_Attributes and
827 Instantiation_Attributes.
828 (Build_Call_Marker): Propagate the status of elaboration warnings from
829 the call to the marker.
830 (Extract_Call_Attributes): Extract the status of elaboration warnings.
831 (Extract_Instantiation_Attributes): Extract the status of elaboration
832 warnings.
833 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
834 now dependent on the status of elaboration warnings.
835 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
836 dependent on the status of elaboration warnings.
837 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
838 are now dependent on the status of elaboration warnings.
839 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
840 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
841 status of elaboration warnings.
842 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
843 dependent on the status of elaboration warnings.
844 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
845 dependent on the status of elaboration warnings.
846 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
847 concerning pragma Elaborate.
848 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
849 warnings.
850 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
851 from the procedure call to the entry call.
852 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
853 Warnings.
854 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
855 warnings
856 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
857 Warnings. Update the comment on usage.
858 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
859 (Is_Elaboration_Warnings_OK_Node): New routine.
860 (Set_Is_Dispatching_Call): Update to use Flag6.
861 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
862 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
863 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
864 in nodes.
865 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
866 Inline.
867 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
868 Inline.
869 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
870 sections to indicate how to suppress elaboration warnings. Document
871 switches -gnatwl and -gnatwL.
872 * gnat_ugn.texi: Regenerate.
873
874 2017-11-16 Sylvain Dailler <dailler@adacore.com>
875
876 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
877 lower than 0.
878
879 2017-11-16 Bob Duff <duff@adacore.com>
880
881 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
882 System'To_Address.
883
884 2017-11-16 Yannick Moy <moy@adacore.com>
885
886 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
887
888 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
889
890 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
891 Context_Id denotes a record type.
892
893 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
894
895 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
896 instantiations.
897
898 2017-11-16 Doug Rupp <rupp@adacore.com>
899
900 Initial gnat port to aarch64-wrs-vxworks7
901 * libgnarl/s-vxwork__aarch64.ads,
902 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
903 libgnat/system-vxworks7-aarch64.ads: New files
904 * sigtramp-vxworks-target.inc (aarch64): New section.
905 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
906
907 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
908
909 * sem_elab.adb (Include): Including a node which is also a compilation
910 unit terminates the search because there are no more lists to examine.
911
912 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
913
914 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
915 declaration does not define a primitive operation of a tagged type for
916 SPARK.
917 (Check_SPARK_Primitive_Operation): New routine.
918
919 2017-11-16 Arnaud Charlet <charlet@adacore.com>
920
921 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
922 message when using -E binder switch.
923
924 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
925
926 * errout.ads: Fix minor typo in comment.
927
928 2017-11-16 Ed Schonberg <schonberg@adacore.com>
929
930 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
931 syntactically denote a type, return Any_Type to prevent subsequent
932 compiler crashes or infinite loops.
933
934 2017-11-16 Steve Baird <baird@adacore.com>
935
936 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
937 cases when writing out a .ali file when a Rename_Pragma pragma is in
938 effect.
939 * lib-writ.adb (Write_Unit_Information): Replace call to
940 Pragma_Name_Unmapped with call to Pragma_Name.
941
942 2017-11-16 Gary Dismukes <dismukes@adacore.com>
943
944 * sem_elab.adb: Minor typo fixes.
945
946 2017-11-16 Justin Squirek <squirek@adacore.com>
947
948 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
949 them more explicit.
950
951 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
952
953 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
954 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
955 the elaboration flag as elaboration code.
956 * einfo.adb (Contract): Update the comments.
957 (Ignore_SPARK_Mode_Pragmas): Update the comments.
958 (SPARK_Aux_Pragma): Update the comments.
959 (SPARK_Aux_Pragma_Inherited): Update the comments.
960 (SPARK_Pragma): Update the comments. The attribute now applies
961 to all types and abstract states.
962 (SPARK_Pragma_Inherited): Update the comments. The attribute now
963 applies to all types and abstract states.
964 (Set_Contract): Update the comments.
965 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
966 (Set_SPARK_Aux_Pragma): Update the comments.
967 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
968 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
969 all types and abstract states.
970 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
971 applies to all types and abstract states.
972 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
973 type and abstract states.
974 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
975 SPARK_Pragma_Inherited. Both of them now apply to all types and
976 abstract states.
977 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
978 elaboration flag as elaboration code.
979 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
980 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
981 a derived type for later processing by the ABE mechanism.
982 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
983 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
984 type.
985 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
986 the type.
987 * sem_elab.adb: Define the term "early call region". Update the
988 terminology for "scenario" and "target". Update the architecture of
989 the ABE mechanism. Update the steps which must be taken when adding a
990 new scenario. Update the section on debugging ABE issues. Add new
991 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
992 table SPARK_Scenarios. Hash table Elaboration_Context is now
993 Elaboration_Statuses. The majority of Process_xxx routines have been
994 updated to better reflect their role.
995 (Add_Unit): Reimplemented.
996 (Check_Elaboration_Constituent): New routine.
997 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
998 conditional ABE issues. Verify previously recorded SPARK scenarios.
999 (Check_SPARK_Derived_Type): New routine.
1000 (Check_SPARK_Instantiation): New routine.
1001 (Check_SPARK_Scenario): New routine.
1002 (Check_SPARK_Refined_State_Pragma): New routine.
1003 (Early_Call_Region): New routine.
1004 (Elaboration_Status): New routine.
1005 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
1006 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
1007 (Find_Early_Call_Region): New routine.
1008 (Info_Scenario): Add output for refinement constituents.
1009 (Is_Recorded_SPARK_Scenario): New routine.
1010 (Is_Suitable_SPARK_Derived_Type): New routine.
1011 (Is_Suitable_SPARK_Instantiation): New routine.
1012 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
1013 (Is_Visited_Body): New routine.
1014 (Kill_Elaboration_Scenario): Reimplemented.
1015 (Output_Active_Scenarios): Add output for pragma Refined_State.
1016 (Output_SPARK_Refined_State_Pragma): New routine.
1017 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
1018 is now achieved by different means.
1019 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
1020 the subprogram body appears within the early call region of the body.
1021 Either ensure the prior elaboration of external subprograms or verify
1022 that the context meets the suitable elaboration requirement.
1023 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
1024 (Record_Elaboration_Scenario): Reimplement the portion which enforces
1025 the level restrictions of the static model. Add support for SPARK
1026 scenarios.
1027 (Record_SPARK_Elaboration_Scenario): New routine.
1028 (Reset_Visited_Bodies): New routine.
1029 (Set_Early_Call_Region): New routine.
1030 (Set_Elaboration_Status): New routine.
1031 (Set_Is_Recorded_SPARK_Scenario): New routine.
1032 (Update_Elaboration_Scenario): Reimplemented.
1033 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
1034 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
1035 for examination by the ABE Processing phase.
1036 (Create_Abstract_State): Save the SPARK_Mode from the context.
1037 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
1038 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
1039 * sinfo.adb (Is_Elaboration_Code): New routine.
1040 (Set_Is_Elaboration_Code): New routine.
1041 (Nkind_In): Add 10 and 11 parameter versions.
1042 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
1043 occurrences in nodes.
1044 (Is_Elaboration_Code): New routine along with pragma Inline.
1045 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
1046 (Nkind_In): Add 10 and 11 parameter versions.
1047
1048 2017-11-16 Justin Squirek <squirek@adacore.com>
1049
1050 * sem.adb (Analyze): Remove requirement that the original node of N be
1051 an operator in the case that analysis on the node yields the relevant
1052 operator - so prefer it instead.
1053
1054 2017-11-16 Bob Duff <duff@adacore.com>
1055
1056 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
1057 formal must not have a designated type that is the full view coming
1058 from a limited-with'ed package.
1059 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
1060 function called from sem_ch6.
1061 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
1062 specially for b-i-p cases.
1063
1064 2017-11-10 Martin Sebor <msebor@redhat.com>
1065
1066 PR c/81117
1067 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
1068 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
1069
1070 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
1071
1072 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
1073 not fall through to the next case.
1074 <ARRAY_TYPE>: Deal specially with a dereference from another array
1075 type with the same element type.
1076
1077 2017-11-09 Gary Dismukes <dismukes@adacore.com>
1078
1079 * exp_util.adb, freeze.adb: Minor reformatting.
1080
1081 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1082
1083 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
1084
1085 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1086
1087 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
1088 N_Variable_Reference_Marker nodes.
1089
1090 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1091
1092 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
1093 the pragma Compile_Time_Error when it appears in a generic package
1094 declaration and uses an expanded name to denote the current unit.
1095
1096 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1097
1098 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
1099 * tracebak.c: Add support for tracebacks in QNX.
1100
1101 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1102
1103 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
1104
1105 2017-11-09 Yannick Moy <moy@adacore.com>
1106
1107 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
1108 justification.
1109
1110 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1111
1112 * doc/gnat_ugn/platform_specific_information.rst: Document packages
1113 needed on GNU/Linux by GNAT.
1114 * gnat_ugn.texi: Regenerate.
1115
1116 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1117
1118 * contracts.adb (Analyze_Contracts): Remove the three parameter
1119 version. This routine now only analyzes contracts and does not perform
1120 any freezing actions.
1121 (Analyze_Previous_Contracts): Removed.
1122 (Freeze_Previous_Contracts): New routine.
1123 * contracts.ads (Analyze_Previous_Contracts): Removed.
1124 (Freeze_Previous_Contracts): New routine.
1125 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1126 enclosing package spec regardless of whether the list denotes the
1127 visible or private declarations. Fix the removal of partial state
1128 refinements when the context is a package spec.
1129 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
1130 contracts.
1131 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
1132 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
1133 (Analyze_Protected_Body): Freeze previous contracts.
1134 (Analyze_Task_Body): Freeze previous contracts.
1135 * sem_prag.adb: Comment reformatting.
1136
1137 2017-11-09 Bob Duff <duff@adacore.com>
1138
1139 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
1140 Export this so users can use it without importing
1141 System.Tasking.Utilities.
1142 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
1143 that fails when Make_Independent is called on a user task.
1144 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
1145 capitalization style ((style) bad casing of "Master_of_Task").
1146
1147 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1148
1149 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
1150 uninitialized variable uncovered by Codepeer.
1151
1152 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1153
1154 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
1155
1156 2017-11-09 Javier Miranda <miranda@adacore.com>
1157
1158 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1159 (Static_Dispatch_Tables): Minor rewording.
1160 * gnat_rm.texi: Regenerate.
1161
1162 2017-11-09 Justin Squirek <squirek@adacore.com>
1163
1164 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
1165 use_clauses within instances.
1166 (Use_One_Package): Add condition to check for "hidden" open scopes to
1167 avoid skipping over packages that have not been properly installed even
1168 though they are visible.
1169
1170 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1171
1172 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
1173 private operation of a protected type, when the type has no visible
1174 operations.
1175
1176 2017-11-09 Javier Miranda <miranda@adacore.com>
1177
1178 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
1179 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
1180 if available.
1181
1182 2017-11-09 Bob Duff <duff@adacore.com>
1183
1184 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
1185 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
1186 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
1187 variables.
1188
1189 2017-11-09 Yannick Moy <moy@adacore.com>
1190
1191 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
1192 Ifaces_Comp_List.
1193
1194 2017-11-09 Pascal Obry <obry@adacore.com>
1195
1196 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
1197 only for foreign threads. We initialize the thread handle only if not
1198 yet initialized. This happens in Enter_Task for foreign threads only.
1199 But for native threads (Ada tasking) we do want to keep the real
1200 handle (from Create_Task) to be able to free the corresponding
1201 resources in Finalize_TCB (CloseHandle).
1202
1203 2017-11-09 Yannick Moy <moy@adacore.com>
1204
1205 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
1206 P_Base_Type.
1207 (Error_Attr_P): Fix name in pragma No_Return.
1208 (Unexpected_Argument): Add pragma No_Return.
1209 (Placement_Error): Add pragma No_Return.
1210
1211 2017-11-09 Javier Miranda <miranda@adacore.com>
1212
1213 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
1214 dispatch table is statically built.
1215 (Make_DT): Declare constant the Interface_Table object associated with
1216 an statically built dispatch table. For this purpose the Offset_To_Top
1217 value of each interface is computed using the dummy object.
1218 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
1219 the Offset_To_Top field of secondary dispatch tables when the dispatch
1220 table is statically built.
1221 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
1222 when the dispatch table is statically built.
1223 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1224 Document the new GNAT restriction Static_Dispatch_Tables.
1225 * gnat_rm.texi: Regenerate.
1226
1227 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1228
1229 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
1230 to avoid a dormant bug.
1231
1232 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1233
1234 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
1235 as such capability is not available on the OS.
1236 * link.c: Make sure linker options for QNX are correct.
1237 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
1238 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
1239 in particular a workaround with locks priority ceiling where a higher
1240 priority task is allowed to lock a lower ceiling priority lock. This
1241 also fixes the scheduling of FIFO tasks when the priority of a task is
1242 lowered.
1243 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
1244
1245 2017-11-09 Yannick Moy <moy@adacore.com>
1246
1247 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
1248 message.
1249 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
1250 condition.
1251 * namet.adb (Copy_One_Character): Add assumption for static analysis,
1252 as knowledge that Hex(2) is in the range 0..255 is too complex for
1253 CodePeer.
1254 (Finalize): Add assumption for static analysis, as the fact that there
1255 are symbols in the table depends on a global invariant at this point in
1256 the program.
1257 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
1258 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
1259 true.
1260
1261 2017-11-09 Javier Miranda <miranda@adacore.com>
1262
1263 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
1264 * exp_disp.adb (Building_Static_DT): Check restriction.
1265 (Building_Static_Secondary_DT): Check restriction.
1266 (Make_DT): Initialize the HT_Link to No_Tag.
1267 * opt.ads (Static_Dispatch_Tables): Rename flag...
1268 (Building_Static_Dispatch_Tables): ... into this. This will avoid
1269 conflict with the restriction name.
1270 * gnat1drv.adb: Update.
1271 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
1272 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
1273
1274 2017-11-09 Pascal Obry <obry@adacore.com>
1275
1276 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
1277 named number.
1278
1279 2017-11-09 Yannick Moy <moy@adacore.com>
1280
1281 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
1282 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
1283 use. Default initialize Hi, Lo.
1284 (Selected_Range_Checks): Retype Num_Checks more precisely.
1285 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
1286 Lo_Right.
1287 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
1288 Unmodified.
1289 (Process_Postconditions): Mark parameter Stmts as Unmodified.
1290 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
1291 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
1292 (Expand_Concatenate): Default initialize High_Bound.
1293 (Optimize_Length_Comparison): Default initialize Ent, Index.
1294 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
1295 L_Lo.
1296 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
1297 Return_Stmt.
1298 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
1299 remove pragma Warnings(Off).
1300 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
1301 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
1302 * freeze.adb (Check_Component_Storage_Order): Default initialize
1303 Comp_Byte_Aligned rather than silencing messages with pragma
1304 Warnings(Off), which does not work for CodePeer initialization
1305 messages, and given that here the possible read of an unitialized value
1306 depends on a proper use of parameters by the caller.
1307 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1308 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1309 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1310 Implicit_Base.
1311 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1312 pragma Warnings(Off).
1313 (Analyze_Case_Expression): Rescope checking block within branch where
1314 Others_Present is set by the call to Check_Choices.
1315 * sem_ch5.adb (Analyze_Assignment): Default initialize
1316 Save_Full_Analysis.
1317 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1318 and restructure code to defend against previous errors, so that, in
1319 that case, control does not flow to the elsif condition which read an
1320 uninitialized Obj_Decl.
1321 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1322 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1323 which seem to be left uninitialized and possibly read in some cases.
1324 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1325 precisely. This requires to exchange the test for exiting in case of
1326 too many positions and the increment to Position, inside the loop.
1327 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1328 which cannot be read uninitialized, but the reasons for that are quite
1329 subtle.
1330 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1331 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1332 Spec_Id.
1333 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1334 and test for presence of non-null Opnd_Type before testing its scope,
1335 in a test which would read its value uninitialized, and is very rarely
1336 exercized (it depends on the presence of an extension of System).
1337 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1338 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1339 Test_Result.
1340 * set_targ.adb (FailN): Mark procedure with No_Return.
1341 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1342 initialize all array Options to white space, as there is already code
1343 doing the same for the remaining positions in Options at the end of the
1344 procedure.
1345
1346 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1347
1348 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1349 generic instantiations either.
1350
1351 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1352
1353 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1354 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1355 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1356 mode.
1357
1358 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1359
1360 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1361 a limited view of a type T declared in unit U1, when the function is
1362 declared in another unit U2 and the call appears in a procedure within
1363 another unit.
1364
1365 2017-11-09 Justin Squirek <squirek@adacore.com>
1366
1367 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1368 when processing generic instances.
1369
1370 2017-11-09 Bob Duff <duff@adacore.com>
1371
1372 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1373 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1374 objects can have those special values. Valid_Name_Id could usefully be
1375 used all over the compiler front end, but that's too much trouble for
1376 now. If we did that, we might want to rename:
1377 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1378 For parameters of type Valid_Name_Id, remove some redundant tests,
1379 including the ones found by CodePeer. Use Is_Valid_Name instead of
1380 membership test when appropriate.
1381 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1382 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1383 "in Error_Name_Or_No_Name".
1384 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1385 Error_Name_Or_No_Name".
1386
1387 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1388
1389 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1390 mode here unless -gnateC is specified.
1391 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1392 -gnatC here.
1393
1394 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1395
1396 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1397 part of the ALI writing; they are now processed directly from memory
1398 when requested by the backend.
1399 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1400 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1401 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1402 (Add_SPARK_File): Remove.
1403 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1404 that are trivially uninteresting to the SPARK backend.
1405 * spark_xrefs.ads: Remove code that is no longer needed.
1406 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1407
1408 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1409
1410 * sem_elab.adb: Update the documentation on adding a new elaboration
1411 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1412 (Is_Check_Emitting_Scenario): Removed.
1413 (Is_Recorded_Top_Level_Scenario): New routine.
1414 (Kill_Elaboration_Scenario): Reimplemented.
1415 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1416 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1417 (Update_Elaboration_Scenario): Reimplemented.
1418 * sinfo.adb (Is_Recorded_Scenario): Removed.
1419 (Set_Is_Recorded_Scenario): Removed.
1420 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1421 occurrences in nodes.
1422 (Is_Recorded_Scenario): Removed along with pragma Inline.
1423 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1424
1425 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1426
1427 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1428 error message.
1429
1430 2017-11-09 Justin Squirek <squirek@adacore.com>
1431
1432 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1433 to the allocation of an anonymous access-to-controlled object.
1434
1435 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1436
1437 * sigtramp-qnx.c: Fix obvious typo.
1438
1439 2017-11-09 Doug Rupp <rupp@adacore.com>
1440
1441 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1442
1443 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1444
1445 * sem_res.adb (Resolve): If expression is an entity whose type has
1446 implicit dereference, generate reference to it, because no reference is
1447 generated for an overloaded entity during analysis, given that its
1448 identity may not be known.
1449
1450 2017-11-09 Javier Miranda <miranda@adacore.com>
1451
1452 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1453 offset-to-top field by addition.
1454 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1455 offset.
1456 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1457 return a negative offset-to-top value.
1458 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1459 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1460 initialize also the offset-to-top field with a negative offset.
1461 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1462 an addition since the offset-to-top field is now a negative value.
1463 (Displace): Displace the pointer to the object means of a substraction
1464 since it is now a negative value.
1465 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1466 means of a substraction since it is now a negative value.
1467
1468 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1469
1470 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1471 before Errout.Output_Messages also in the case of compilation errors.
1472
1473 2017-11-09 Javier Miranda <miranda@adacore.com>
1474
1475 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1476 the Class Level): Fix error interfacing with C strings.
1477 * gnat_ugn.texi: Regenerate.
1478
1479 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1480
1481 * system-qnx-aarch64.ads: Fix the priority constants.
1482 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1483 and scheduling.
1484 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1485 corresponds to an idle priority on QNX.
1486
1487 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1488
1489 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1490 comments.
1491
1492 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1493
1494 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1495 in expression funtions that are expanded into variables.
1496
1497 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1498
1499 * sem_util.adb: Minor whitespace cleanup.
1500
1501 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1502
1503 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1504 s-taprop version rather than a custom one.
1505 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1506
1507 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1508
1509 * lib-xref.ads, lib-xref-spark_specific.adb
1510 (Traverse_Compilation_Unit): Move declaration to package body.
1511
1512 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1513
1514 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1515 the type of the renaming from its defining entity, rather then the
1516 subtype mark as there may not be a subtype mark.
1517
1518 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1519
1520 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1521 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1522 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1523 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1524 terminals.c: Initial port of GNAT for aarch64-qnx
1525
1526 2017-11-08 Elisa Barboni <barboni@adacore.com>
1527
1528 * exp_util.adb (Find_DIC_Type): Move...
1529 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1530
1531 2017-11-08 Justin Squirek <squirek@adacore.com>
1532
1533 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1534 the owner and corresponding coextension.
1535
1536 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1537
1538 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1539 following separate procedures.
1540 (Resolve_Delta_Array_Aggregate): Previous code form
1541 Resolve_Delta_Aggregate.
1542 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1543 ARG decisions on the legality rules for delta aggregates for records:
1544 in the case of a variant record, components from different variants
1545 cannot be specified in the delta aggregate, and this must be checked
1546 statically.
1547
1548 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1549
1550 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1551 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1552 removed component.
1553
1554 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1555
1556 * sem_ch4.adb: Minor typo fix.
1557
1558 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1559
1560 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1561 Spec_Scope_Num components.
1562 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1563 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1564 removed components.
1565 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1566 components.
1567
1568 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1569
1570 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1571 name is a discriminant in check for unconditional accessibility
1572 violation within instances.
1573
1574 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1575
1576 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1577 for constants (with variable input).
1578 (Is_Constant_Object_Without_Variable_Input): Remove.
1579
1580 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1581
1582 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1583
1584 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1585
1586 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1587 cross-references.
1588 (dspark): Remove hardcoded table bound.
1589
1590 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1591
1592 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1593 the type of the base of the construct to determine the type (or
1594 candidate interpretations) of the delta aggregate. This allows the
1595 construct to appear in a context that expects a private extension.
1596 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1597 overloaded base.
1598
1599 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1600
1601 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1602 with Entity_Id of the reference.
1603 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1604 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1605 reference, not the file and scope indices.
1606
1607 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1608
1609 * errout.ads (Current_Node): New.
1610 * errout.adb (Error_Msg): Use Current_Node.
1611 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1612 when relevant.
1613 * style.adb: Call Error_Msg_N when possible.
1614
1615 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1616
1617 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1618 Entity.
1619 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1620 the Scope_Id record component.
1621
1622 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1623
1624 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1625 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1626 SPARK_File_Record components.
1627 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1628 representation of files/units.
1629
1630 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1631
1632 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1633 Remove Inside_Stubs parameter.
1634
1635 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1636
1637 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1638 represented by Entity_Id.
1639 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1640 represented by Entity_Id; this information is not repeated as
1641 Scope_Entity.
1642 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1643 Name_Of_Heap_Variable.
1644 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1645 data types.
1646 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1647 scope and xrefs tables to above changes in data types.
1648
1649 2017-11-08 Justin Squirek <squirek@adacore.com>
1650
1651 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1652 primitives of generic actuals.
1653 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1654 base type clauses as per ARM 8.4 (8.2/3).
1655
1656 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1657
1658 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1659 categorization dependency of the body, as is done for non-generic
1660 units.
1661 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1662 through declarations (Simple optimization, no behavior change).
1663
1664 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1665
1666 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1667 (SPARK_Scope_Record): Remove inessential components.
1668 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1669 components.
1670 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1671 removed record components.
1672 (Add_SPARK_Xrefs): Remove setting of removed record components.
1673
1674 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1675
1676 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1677 empty entities.
1678
1679 2017-11-08 Javier Miranda <miranda@adacore.com>
1680
1681 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1682 functionality of this routine to handle multiple levels of derivations.
1683
1684 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1685
1686 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1687 (Nested_Scenarios): New routine.
1688 (Set_Nested_Scenarios): New routine.
1689 (Write_Field36_Name): New routine.
1690 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1691 in entities.
1692 (Nested_Scenarios): New routine along with pragma Inline.
1693 (Set_Nested_Scenarios): New routine along with pragma Inline.
1694 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1695 (Process_Nested_Scenarios): New routine.
1696 (Traverse_Body): When a subprogram body is traversed for the first
1697 time, find, save, and process all suitable scenarios found within.
1698 Subsequent traversals of the same subprogram body utilize the saved
1699 scenarios.
1700
1701 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1702
1703 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1704 protected operations.
1705 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1706 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1707 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1708 reading and testing SPARK cross-references stored in the ALI files.
1709 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1710 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1711 ALI file.
1712 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1713 with description of the SPARK xrefs ALI format.
1714 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1715 and put_spark_refs.o.
1716
1717 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1718
1719 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1720 when the associated access type is subject to pragma
1721 No_Heap_Finalization.
1722 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1723 designated type in case it comes from a limited withed unit.
1724
1725 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1726
1727 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1728 SPARK-related flags. Add ??? comment.
1729 * exp_util.adb (Insert_Actions): Add an entry for node
1730 N_Variable_Reference_Marker.
1731 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1732 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1733 and record a variable reference marker for the current name.
1734 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1735 a variable reference marker for the current name.
1736 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1737 (Extract_Variable_Reference_Attributes): Reimplemented.
1738 (Info_Scenario): Add output for variable references and remove output
1739 for variable reads.
1740 (Info_Variable_Read): Removed.
1741 (Info_Variable_Reference): New routine.
1742 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1743 while variable reads are not.
1744 (Output_Active_Scenarios): Add output for variable references and
1745 remove output for variable reads.
1746 (Output_Variable_Read): Removed.
1747 (Output_Variable_Reference): New routine.
1748 (Process_Variable_Read): Removed.
1749 (Process_Variable_Reference): New routine.
1750 (Process_Variable_Reference_Read): New routine.
1751 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1752 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1753 marker for the current actual.
1754 * sem_spark.adb (Check_Node): Add an entry for node
1755 N_Variable_Reference_Marker.
1756 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1757 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1758 * sinfo.adb (Is_Read): New routine.
1759 (Is_Write): New routine.
1760 (Target): Updated to handle variable reference markers.
1761 (Set_Is_Read): New routine.
1762 (Set_Is_Write): New routine.
1763 (Set_Target): Updated to handle variable reference markers.
1764 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1765 occurrences in nodes. Update attribute Target. Add new node
1766 kind N_Variable_Reference_Marker.
1767 (Is_Read): New routine along with pragma Inline.
1768 (Is_Write): New routine along with pragma Inline.
1769 (Set_Is_Read): New routine along with pragma Inline.
1770 (Set_Is_Write): New routine along with pragma Inline.
1771 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1772 N_Variable_Reference_Marker.
1773
1774 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1775
1776 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1777 subprograms.
1778
1779 2017-11-08 Yannick Moy <moy@adacore.com>
1780
1781 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1782 about unused use-type or use-package clauses inside inlined bodies.
1783
1784 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1785
1786 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1787 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1788 prior elaboration of a unit when the need came from a partial
1789 finalization context.
1790 (In_Initialization_Context): Relocated to Process_Call.
1791 (Is_Partial_Finalization_Proc): New routine.
1792 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1793 on its usage.
1794 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1795 a comment on its usage.
1796 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1797 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1798 diagnostics when the activation occurs in a partial finalization
1799 context.
1800 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1801 In_Partial_Fin along with a comment on its usage.
1802 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1803 on its usage. A call is within a partial finalization context when it
1804 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1805 in initialization actions. Pass this information down to the recursive
1806 steps of the Processing phase.
1807 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1808 comment on its usage. Remove the guard which suppresses the generation
1809 of implicit Elaborate[_All] pragmas. This is now done in
1810 Ensure_Prior_Elaboration.
1811 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1812 with a comment on its usage. Do not emit any ABE diagnostics when the
1813 call occurs in a partial finalization context.
1814 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1815 comment on its usage.
1816 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1817 comment on its usage.
1818 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1819 with a comment on its usage.
1820 (Process_Instantiation_Conditional_ABE): Add new parameter
1821 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1822 diagnostics when the instantiation occurs in a partial finalization
1823 context.
1824 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1825 with a comment on its usage.
1826 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1827 comment on its usage.
1828 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1829 with a comment on its usage.
1830 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1831 on its usage.
1832
1833 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1834
1835 * sem_ch13.adb: Add optional parameter to Error_Msg.
1836
1837 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1838
1839 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1840 for the Interfaces.* hierarchy as longer unit names are now allowed.
1841
1842 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1843
1844 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1845 subprogram as well. Support more cases of entities.
1846 (Append_Entity_Name): Add some defensive code.
1847
1848 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1849
1850 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1851
1852 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1853
1854 PR ada/82785
1855 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1856
1857 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1858
1859 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1860
1861 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1862
1863 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1864 (convert): Do not use an unchecked conversion for converting from a
1865 type to another type padding it.
1866
1867 2017-10-20 Doug Rupp <rupp@adacore.com>
1868
1869 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1870 needed for using monotonic clock.
1871 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1872 changes.
1873 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1874 out monotonic clock related functions body.
1875 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1876 Compute_Deadline): Move to...
1877 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1878
1879 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1880
1881 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1882 case where the controlling formal is an anonymous access to interface
1883 type.
1884 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1885 access type, handle properly the the constructed dereference that
1886 designates the object used in the rewritten synchronized call.
1887 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1888 generated declaration in the parameter block does not need an
1889 initialization even if the type is a null-excluding access type,
1890 because it will be initialized with the value of the actual later on.
1891 (Parameter_Block_Pack): Do not add controlling actual to parameter
1892 block when its type is by-copy.
1893
1894 2017-10-20 Justin Squirek <squirek@adacore.com>
1895
1896 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1897 scope stack traversal into the context clause.
1898
1899 2017-10-20 Bob Duff <duff@adacore.com>
1900
1901 * sinfo.ads: Fix a comment typo.
1902
1903 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1904
1905 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1906 warning against usage in conjunction with -gnatn.
1907 (-fdump-xref): Delete entry.
1908 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1909 -fdump-xref switch.
1910 * gnat_ugn.texi: Regenerate.
1911
1912 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1913
1914 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1915 Minor reformatting.
1916
1917 2017-10-20 Yannick Moy <moy@adacore.com>
1918
1919 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1920 compare a dimensioned expression with a literal.
1921 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1922 special value zero.
1923 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1924 dimensionality system in GNAT.
1925 * gnat_ugn.texi: Regenerate.
1926
1927 2017-10-20 Yannick Moy <moy@adacore.com>
1928
1929 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1930 inadequate silencing of errors.
1931 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1932 checking the subprogram body generated from an expression function,
1933 when this is done as part of the preanalysis done on expression
1934 functions, as the subprogram body may not yet be attached in the AST.
1935 The error if any will be issued later during the analysis of the body.
1936 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1937
1938 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1939
1940 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1941 warning on ineffective use clause.
1942
1943 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1944
1945 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1946 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1947 to issue the warning on the absence of local raise.
1948 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1949 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1950 absence of local raise.
1951 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1952 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1953 where a scenario could give rise to raising Program_Error.
1954 * sem_elab.adb: Typo fixes.
1955 * fe.h (Warn_If_No_Local_Raise): Declare.
1956 * gcc-interface/gigi.h (get_exception_label): Change return type.
1957 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1958 simple vector of Entity_Id.
1959 (gnu_storage_error_label_stack): Likewise.
1960 (gnu_program_error_label_stack): Likewise.
1961 (gigi): Adjust to above changes.
1962 (Raise_Error_to_gnu): Likewise.
1963 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1964 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1965 (N_Push_Storage_Error_Label): Likewise.
1966 (N_Push_Program_Error_Label): Likewise.
1967 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1968 a warning on the absence of local raise.
1969 (N_Pop_Storage_Error_Label): Likewise.
1970 (N_Pop_Program_Error_Label): Likewise.
1971 (push_exception_label_stack): Delete.
1972 (get_exception_label): Change return type to Entity_Id and adjust.
1973 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1974 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1975 (build_call_raise): Adjust calls to get_exception_label and also
1976 build_goto_raise.
1977 (build_call_raise_column): Likewise.
1978 (build_call_raise_range): Likewise.
1979 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1980 Document actual default behavior.
1981
1982 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1983
1984 * einfo.ads: Minor consistent punctuation in comment. All numbered
1985 items in the comment of Is_Internal are now terminated with a period.
1986
1987 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1988
1989 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1990 internal.
1991
1992 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1993
1994 * sem_type.adb (In_Generic_Actual): Simplified.
1995
1996 2017-10-20 Justin Squirek <squirek@adacore.com>
1997
1998 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1999 verify a renaming exists for a generic formal before comparing it to
2000 the actual as defaulted formals will not have a renamed_object.
2001
2002 2017-10-20 Javier Miranda <miranda@adacore.com>
2003
2004 * exp_ch6.adb (Replace_Returns): Fix wrong management of
2005 N_Block_Statement nodes.
2006
2007 2017-10-20 Bob Duff <duff@adacore.com>
2008
2009 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
2010 component of an array aggregate if it is initialized by a
2011 build-in-place function call.
2012 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
2013 bip for nonlimited types.
2014 * debug.adb: Document -gnatd.9.
2015
2016 2017-10-20 Bob Duff <duff@adacore.com>
2017
2018 * sem_ch12.adb: Remove redundant setting of Parent.
2019
2020 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
2021
2022 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
2023 of the operands is a string literal.
2024
2025 2017-10-20 Bob Duff <duff@adacore.com>
2026
2027 * einfo.ads: Comment fix.
2028
2029 2017-10-20 Clement Fumex <fumex@adacore.com>
2030
2031 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
2032
2033 2017-10-20 Ed Schonberg <schonberg@adacore.com>
2034
2035 * sem_dim.adb (Extract_Power): Accept dimension values that are not
2036 non-negative integers when the dimensioned base type is an Integer
2037 type.
2038
2039 2017-10-20 Bob Duff <duff@adacore.com>
2040
2041 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
2042 that an allocator came from a b-i-p return statement.
2043 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
2044 object of a nonlimited build-in-place function call.
2045 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
2046 Alloc_For_BIP_Return flag on generated allocators.
2047 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
2048 If the N_Assignment_Statement has been transformed into something else,
2049 then Should_Transform_BIP_Assignment won't work.
2050 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
2051 "Remove Adjust if we're building the return object of an extended
2052 return statement in place." Back out that part of the change, because
2053 the Alloc_For_BIP_Return flag is now used for that.
2054
2055 2017-10-19 Bob Duff <duff@adacore.com>
2056
2057 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
2058 should be "T". Handle case of a subtype of a class-wide type.
2059
2060 2017-10-19 Bob Duff <duff@adacore.com>
2061
2062 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
2063 which node kinds can legitimately be ignored, and raise Program_Error
2064 for others.
2065
2066 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
2067
2068 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
2069 instantiation that acts as a compilation unit.
2070 (Find_Code_Unit): Reimplemented.
2071 (Find_Top_Unit): Reimplemented.
2072 (Find_Unit_Entity): New routine.
2073 (Process_Instantiation_SPARK): Correct the elaboration requirement a
2074 package instantiation imposes on a unit.
2075
2076 2017-10-19 Bob Duff <duff@adacore.com>
2077
2078 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
2079 for a narrow set of controlled types.
2080
2081 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2082
2083 * sinput.ads (Line_Start): Add pragma Inline.
2084 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
2085
2086 2017-10-19 Bob Duff <duff@adacore.com>
2087
2088 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
2089 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
2090 build-in-place function call so that the temp is declared in the right
2091 place.
2092
2093 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
2094
2095 * gcc-interface/misc.c (gnat_tree_size): Move around.
2096
2097 * gcc-interface/utils.c (max_size): Deal with SSA names.
2098
2099 2017-10-17 Jakub Jelinek <jakub@redhat.com>
2100
2101 * gcc-interface/misc.c (gnat_tree_size): New function.
2102 (LANG_HOOKS_TREE_SIZE): Redefine.
2103
2104 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2105
2106 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
2107 Remote_Call_Interface is not a suitable preelaboratd context when the
2108 call appears in the package body.
2109
2110 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2111
2112 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
2113 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
2114 alignment for consistency. If Align is non-zero, use the minimum of
2115 Align and M for the alignment.
2116 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
2117 setting the alignment directly.
2118
2119 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2120
2121 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
2122 optional string in an Assert pragma until the expansion of the pragma
2123 has rewritten it as a conditional statement, so that the string
2124 argument is only evaluaed if the assertion fails. This is mandated by
2125 RM 11.4.2.
2126
2127 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2128
2129 * debug.adb: Switch -gnatd.v and associated flag are now used to
2130 enforce the SPARK rules for elaboration in SPARK code.
2131 * sem_elab.adb: Describe switch -gnatd.v.
2132 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
2133 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
2134 in effect.
2135 (Process_Variable_Assignment): Clarify why variable assignments are
2136 processed reglardless of whether -gnatd.v is in effect.
2137 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
2138 sections on elaboration code and compilation switches.
2139 * gnat_ugn.texi: Regenerate.
2140
2141 2017-10-14 Gary Dismukes <dismukes@adacore.com>
2142
2143 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
2144 sem_warn.adb: Minor reformattings.
2145
2146 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2147
2148 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
2149 for reverse iteration over formal containers.
2150 * gnat_rm.texi: Regenerate.
2151
2152 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2153
2154 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
2155 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
2156 (Ensure_Static_Prior_Elaboration): Renamed to
2157 Ensure_Prior_Elaboration_Static for consistency reasons.
2158 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
2159 reflect its new purpose.
2160 (Is_Initialized): New routine.
2161 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
2162 in order to reflect its new purpose.
2163 (Is_Variable_Read): New routine.
2164 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
2165 to reflect its new purpose.
2166 (Process_Variable_Assignment): This routine now acts as a top level
2167 dispatcher for variable assignments.
2168 (Process_Variable_Assignment_Ada): New routine.
2169 (Process_Variable_Assignment_SPARK): New routine.
2170 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
2171 to reflects its new purpose. A reference to a variable is now suitable
2172 for ABE processing only when it is a read. The logic in the routine now
2173 reflects the latest SPARK elaboration rules.
2174
2175 2017-10-14 Justin Squirek <squirek@adacore.com>
2176
2177 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
2178 triggers marking on formal subprograms.
2179
2180 2017-10-14 Javier Miranda <miranda@adacore.com>
2181
2182 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
2183 renamings of objects that come from the sources.
2184
2185 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2186
2187 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
2188 parameter and set the alignment of the type to Align.
2189 (Copy_Float_Type): Adjust call to Build_Float_Type.
2190 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
2191 call to Build_Float_Type and do not set RM_Size and Alignment.
2192
2193 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2194
2195 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
2196 GNATRTL_NONTASKING_OBJ.
2197
2198 2017-10-14 Bob Duff <duff@adacore.com>
2199
2200 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
2201 enabling b-i-p for nonlimited controlled types (but disabled).
2202
2203 2017-10-14 Justin Squirek <squirek@adacore.com>
2204
2205 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
2206 Has_Warnings_Off with Warnings_Off.
2207
2208 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
2209
2210 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2211
2212 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2213
2214 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
2215 enclosing package at the end of the visible declarations.
2216 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
2217 an initialization item which is undefined due to some illegality.
2218
2219 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2220
2221 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
2222 within each unit that require a default-sized primary and secondary
2223 stack to be generated by the binder.
2224 (Scan_ALI): Scan new 'T' lines.
2225 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
2226 * bindgen.adb (Gen_Output_File): Count the number of default-sized
2227 stacks within the closure that are to be created by the binder.
2228 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
2229 stacks and record these in System.Secodnary_Stack.
2230 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
2231 closure of the program being bound.
2232 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
2233 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
2234 (Expand_N_Object_Declaration): Count the number of default-sized stacks
2235 used by task objects contained within the object whose declaration is
2236 being expanded. Only performed when either the restrictions
2237 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
2238 effect.
2239 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
2240 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
2241 the expansion of a task type if the size of the stack is known at
2242 run-time and the restrictions No_Implicit_Heap_Allocations or
2243 No_Implicit_Task_Allocations are in effect.
2244 (Make_Task_Create_Call): If using a restricted profile provide
2245 secondary stack parameter: either the statically created stack or null.
2246 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
2247 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
2248 Unit_Record initialization expressions.
2249 * lib-writ.adb (Add_Preprocessing_Dependency,
2250 Ensure_System_Dependency): Include Primary_Stack_Count and
2251 Sec_Stack_Count in Unit_Record initialization expression.
2252 (Write_ALI): Write T lines.
2253 (Write_Unit_Information): Do not output 'T' lines if there are no
2254 stacks for the binder to generate.
2255 * lib-writ.ads: Updated library information documentation to include
2256 new T line entry.
2257 * lib.adb (Increment_Primary_Stack_Count): New routine.
2258 (Increment_Sec_Stack_Count): New routine.
2259 (Primary_Stack_Count): New routine.
2260 (Sec_Stack_Count): New routine.
2261 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
2262 Unit_Record and updated documentation.
2263 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
2264 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
2265 (Primary_Stack_Count): New routine along with pragma Inline.
2266 (Sec_Stack_Count): New routine along with pragma Inline.
2267 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
2268 redefined. New flag Default_Sec_Stack_Size and
2269 Quantity_Of_Default_Size_Sec_Stacks.
2270 * rtfinal.c Fixed erroneous comment.
2271 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
2272 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
2273 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
2274 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
2275 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
2276 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
2277 (Set_Sec_Stack_Addr): Removed routine.
2278 (Get_Sec_Stack): New routine.
2279 (Set_Sec_Stack): New routine.
2280 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
2281 reflect new procedure and global names.
2282 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
2283 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
2284 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
2285 parameter profile to allow the secondary stack size to be specified.
2286 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
2287 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
2288 call to remove Secondary_Stack_Size reference. Add secondary stack
2289 address and size to SSL.Create_TSD call.
2290 (Task_Wrapper): Remove secondary stack creation.
2291 * libgnarl/s-tarest.ads (Create_Restricted_Task,
2292 Create_Restricted_Task_Sequential): Update parameter profile to include
2293 Sec_Stack_Address and clarify the Size parameter.
2294 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
2295 from profile and body.
2296 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
2297 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
2298 Common_ATCB.
2299 (Initialize_ATCB): Update the parameter profile to remove
2300 Secondary_Stack_Size.
2301 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
2302 call to Initialize_ATCB. Add secondary stack address and size to
2303 SSL.Create_TSD call, and catch any storage exception from the call.
2304 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2305 new subprogram and component names.
2306 (Task_Wrapper): Remove secondary stack creation.
2307 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2308 * libgnarl/s-tassta.ads: Reformat comments.
2309 (Create_Task): Update parameter profile.
2310 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2311 profile to include secondary stack size. Remove secondary size
2312 parameter from Initialize_ATCB call and add it to Create_TSD call.
2313 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2314 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2315 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2316 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2317 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2318 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2319 Sec_Stack_Dynamic.
2320 (Default_Sec_Stack_Size): New routine.
2321 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2322 now Preelaborate.
2323 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2324 System.Soft_Links.Initialize to initialize non-tasking TSD.
2325 (Create_TSD): Update parameter profile. Initialize the TSD and
2326 unconditionally call SS_Init.
2327 (Destroy_TSD): Update SST.SS_Free call.
2328 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2329 Set_Sec_Stack_Addr_Soft): Remove routines.
2330 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2331 Set_Sec_Stack_Soft): Add routines.
2332 (NT_TSD): Move to private part of package specification.
2333 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2334 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2335 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2336 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2337 (Create_TSD): Update parameter profile.
2338 (NT_TSD): Move to private section from body.
2339 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2340 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2341 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2342 Remove routine.
2343 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2344 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2345 System.Secondary_Stack.
2346 (Init_RTS): Update body for new System.Soft_Links names.
2347 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2348 s-soliin.o.
2349
2350 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2351
2352 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2353 operating on trees as wide_ints.
2354
2355 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2356
2357 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2358 as a scoping construct when it is byproduct of exception handling.
2359
2360 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2361
2362 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2363 semantic field Target of node N_Call_Marker.
2364
2365 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2366
2367 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2368 attempts to copy a limited value, when the allocator is the expression
2369 in an expression function.
2370
2371 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2372
2373 * doc/share/conf.py: Tell the style checker that this is a Python
2374 fragment, and therefore that pyflakes should not be run to validate
2375 this file.
2376
2377 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2378
2379 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2380 (Is_Entity_Name): Likewise.
2381 (Is_String_Type): Likewise.
2382 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2383 and remove useless comparisons on the base types.
2384 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2385 on T2. Always test Is_Private_Type before Full_View_Covers.
2386
2387 2017-10-09 Bob Duff <duff@adacore.com>
2388
2389 * exp_ch4.adb: Minor refactoring.
2390
2391 2017-10-09 Javier Miranda <miranda@adacore.com>
2392
2393 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2394 not components.
2395
2396 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2397
2398 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2399 are verified only in the static model.
2400
2401 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2402
2403 * sem_ch5.adb (Analyze_Iterator_Specification,
2404 Check_Reverse_Iteration): Check that the domain of iteration supports
2405 reverse iteration when it is a formal container. This requires the
2406 presence of a Previous primitive in the Iterable aspect.
2407 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2408 primitives Last and Previous to support reverse iteration over formal
2409 containers.
2410 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2411 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2412 for reverse iteration using primitives Last and Previous in generated
2413 loop.
2414
2415 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2416
2417 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2418 of the Defining_Program_Unit_Name, which is an identifier, in order to
2419 construct the string for the fully qualified name.
2420
2421 2017-10-09 Justin Squirek <squirek@adacore.com>
2422
2423 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2424 Contains_Lib_Incomplete_Type.
2425
2426 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2427
2428 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2429 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2430 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2431 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2432 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2433
2434 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2435
2436 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2437 in the static model.
2438 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2439 in the static model.
2440 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2441 the static model.
2442
2443 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2444
2445 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2446 expressions when the enclosing scope is a subprogram body and the next
2447 declaration is a body that freezes entities previously declared in the
2448 scope.
2449
2450 2017-10-09 Justin Squirek <squirek@adacore.com>
2451
2452 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2453 ghost packages and living packages in use clauses.
2454 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2455
2456 2017-10-09 Justin Squirek <squirek@adacore.com>
2457
2458 * osint.ads: Document new parameter FD for Read_Source_File.
2459
2460 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2461
2462 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2463 which the predicate check applies is tagged, convert the expression to
2464 that type. This is in most cases a no-op, but is relevant if the
2465 expression is clas-swide, because the predicate function being invoked
2466 is not a primitive of the type and cannot take a class-wide actual.
2467
2468 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2469
2470 * exp_disp.adb: Minor reformatting.
2471
2472 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2473
2474 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2475
2476 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2477
2478 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2479 GNATprove.
2480 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2481
2482 2017-10-09 Bob Duff <duff@adacore.com>
2483
2484 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2485 immediately if the call has already been processed (by a previous call
2486 to Make_Build_In_Place_Call_In_Anonymous_Context).
2487 * sem_elab.adb: Minor typo fixes.
2488
2489 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2490
2491 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2492 predicate, do not replace an identifier that matches the type if the
2493 identifier is a selector in a selected component, because this
2494 indicates a reference to some homograph of the type itself, and not to
2495 the current occurence in the predicate.
2496
2497 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2498
2499 * repinfo.adb (List_Record_Layout): Tweak formatting.
2500 (Write_Val): Remove superfluous spaces in back-end layout mode.
2501
2502 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2503
2504 * sem_res.adb (Property_Error): Remove.
2505 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2506 current wording of the rule.
2507
2508 2017-10-09 Justin Squirek <squirek@adacore.com>
2509
2510 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2511 before analyzing a given scope due to an expression function.
2512 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2513
2514 2017-10-09 Bob Duff <duff@adacore.com>
2515
2516 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2517 Defining_Identifier (Obj_Decl) in two places, because it might have
2518 changed.
2519 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2520 involving 'Input on (not visibly) derived types.
2521
2522 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2523
2524 * atree.adb: Add new soft link Rewriting_Proc.
2525 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2526 (Set_Rewriting_Proc): New routine.
2527 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2528 (Set_Rewriting_Proc): New routine.
2529 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2530 for *E*laboration flag to maintain consistency with other elaboration
2531 flag generating subprograms.
2532 * debug.adb: Document the new usage of flag -gnatdL.
2533 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2534 as Protected_Subprogram. Flag148 is now used as
2535 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2536 Is_Initial_Condition_Procedure.
2537 (Is_Elaboration_Checks_OK_Id): New routine.
2538 (Is_Initial_Condition_Procedure): New routine.
2539 (Protected_Subprogram): New routine.
2540 (Receiving_Entry): New routine.
2541 (SPARK_Pragma): Update assertion.
2542 (SPARK_Pragma_Inherited): Update assertion.
2543 (Suppress_Elaboration_Warnings): Removed.
2544 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2545 (Set_Is_Initial_Condition_Procedure): New routine.
2546 (Set_Protected_Subprogram): New routine.
2547 (Set_Receiving_Entry): New routine.
2548 (Set_SPARK_Pragma): Update assertion.
2549 (Set_SPARK_Pragma_Inherited): Update assertion.
2550 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2551 (Write_Field19_Name): Add output for Receiving_Entry.
2552 (Write_Field39_Name): Add output for Protected_Subprogram.
2553 (Write_Field40_Name): Update the output for SPARK_Pragma.
2554 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2555 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2556 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2557 of various entities.
2558 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2559 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2560 (Protected_Subprogram): New routine along with pragma Inline.
2561 (Receiving_Entry): New routine along with pragma Inline.
2562 (Suppress_Elaboration_Warnings): Removed.
2563 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2564 Inline.
2565 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2566 Inline.
2567 (Set_Protected_Subprogram): New routine along with pragma Inline.
2568 (Set_Receiving_Entry): New routine along with pragma Inline.
2569 (Set_Suppress_Elaboration_Warnings): Removed.
2570 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2571 consistency with other finalizer generating subprograms.
2572 (Default_Initialize_Object): Mark the block which wraps the call to
2573 finalize as being part of initialization.
2574 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2575 Initial_Condition.
2576 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2577 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2578 markers generated by the ABE mechanism.
2579 * exp_ch9.adb (Activation_Call_Loc): New routine.
2580 (Add_Accept): Link the accept procedure to the original entry.
2581 (Build_Protected_Sub_Specification): Link the protected or unprotected
2582 version to the original subprogram.
2583 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2584 is very close to the "begin" or "end" keywords when generating the
2585 activation call.
2586 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2587 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2588 process loops.
2589 (Expand_SPARK_N_Loop_Statement): New routine.
2590 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2591 call to the Default_Initial_Condition procedure.
2592 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2593 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2594 effect.
2595 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2596 (Insert_Actions): Add processing for N_Call_Marker.
2597 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2598 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2599 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2600 elaboration scenarios for ABE issues.
2601 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2602 nodes.
2603 * lib.adb (Earlier_In_Extended_Unit): New variant.
2604 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2605 (Preanalysis_Active): New routine.
2606 * sem.ads (Preanalysis_Active): New routine.
2607 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2608 elaboration-related attributes. Save the scenario for ABE processing.
2609 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2610 effect. Save certain elaboration-related attributes.
2611 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2612 attributes. Save the scenario for ABE processing.
2613 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2614 mode in effect. Save certain elaboration-related attributes.
2615 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2616 locating the first real statement.
2617 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2618 certain elaboration-related attributes.
2619 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2620 elaboration warnings.
2621 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2622 generated for purposes of wrapping an attribute used as a generic
2623 actual.
2624 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2625 the scenario for ABE processing.
2626 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2627 the scenario for ABE processing.
2628 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2629 elaboration-related attributes.
2630 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2631 the scenario for ABE processing.
2632 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2633 attributes.
2634 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2635 attributes.
2636 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2637 elaboration-related attributes.
2638 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2639 effect. Save certain elaboration-related attributes.
2640 (Analyze_Package_Instantiation): Save certain elaboration-related
2641 attributes. Save the scenario for ABE processing. Create completing
2642 bodies in case the instantiation results in a guaranteed ABE.
2643 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2644 attributes Save the scenario for ABE processing. Create a completing
2645 body in case the instantiation results in a guaranteed ABE.
2646 (Provide_Completing_Bodies): New routine.
2647 * sem_elab.ads: Brand new implementation.
2648 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2649 Elaborate_Body): Do not suppress elaboration warnings.
2650 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2651 operator.
2652 (Resolve_Call): Save certain elaboration-related attributes. Save the
2653 scenario for ABE processing.
2654 (Resolve_Entity_Name): Do not perform any ABE processing here.
2655 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2656 * sem_util.adb (Begin_Keyword_Location): New routine.
2657 (Defining_Entity): Update the parameter profile. Add processing for
2658 concurrent subunits that are rewritten as null statements.
2659 (End_Keyword_Location): New routine.
2660 (Find_Enclosing_Scope): New routine.
2661 (In_Instance_Visible_Part): Code cleanup.
2662 (In_Subtree): Update the parameter profile. Add new version.
2663 (Is_Preelaborable_Aggregate): New routine.
2664 (Is_Preelaborable_Construct): New routine.
2665 (Mark_Elaboration_Attributes): New routine.
2666 (Scope_Within): Update the parameter profile.
2667 (Scope_Within_Or_Same): Update the parameter profile.
2668 * sem_util.ads (Begin_Keyword_Location): New routine.
2669 (Defining_Entity): Update the parameter profile and the comment on
2670 usage.
2671 (End_Keyword_Location): New routine.
2672 (Find_Enclosing_Scope): New routine.
2673 (In_Instance_Visible_Part): Update the parameter profile.
2674 (In_Subtree): Update the parameter profile. Add new version.
2675 (Is_Preelaborable_Aggregate): New routine.
2676 (Is_Preelaborable_Construct): New routine.
2677 (Mark_Elaboration_Attributes): New routine.
2678 (Scope_Within): Update the parameter profile and the comment on usage.
2679 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2680 usage.
2681 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2682 to determine whether a loop has meaningful condition actions.
2683 (Has_Condition_Actions): New routine.
2684 * sinfo.adb (ABE_Is_Certain): Removed.
2685 (Is_Declaration_Level_Node): New routine.
2686 (Is_Dispatching_Call): New routine.
2687 (Is_Elaboration_Checks_OK_Node): New routine.
2688 (Is_Initialization_Block): New routine.
2689 (Is_Known_Guaranteed_ABE): New routine.
2690 (Is_Recorded_Scenario): New routine.
2691 (Is_Source_Call): New routine.
2692 (Is_SPARK_Mode_On_Node): New routine.
2693 (No_Elaboration_Check): Removed.
2694 (Target): New routine.
2695 (Was_Attribute_Reference): New routine.
2696 (Set_ABE_Is_Certain): Removed.
2697 (Set_Is_Declaration_Level_Node): New routine.
2698 (Set_Is_Dispatching_Call): New routine.
2699 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2700 (Set_Is_Initialization_Block): New routine.
2701 (Set_Is_Known_Guaranteed_ABE): New routine.
2702 (Set_Is_Recorded_Scenario): New routine.
2703 (Set_Is_Source_Call): New routine.
2704 (Set_Is_SPARK_Mode_On_Node): New routine.
2705 (Set_No_Elaboration_Check): Removed.
2706 (Set_Target): New routine.
2707 (Set_Was_Attribute_Reference): New routine.
2708 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2709 Do_Discriminant_Check now utilizes Flag3. Attribute
2710 No_Side_Effect_Removal now utilizes Flag17. Add new node
2711 N_Call_Marker. Update the structure of various nodes.
2712 (ABE_Is_Certain): Removed along with pragma Inline.
2713 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2714 (Is_Dispatching_Call): New routine along with pragma Inline.
2715 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2716 (Is_Initialization_Block): New routine along with pragma Inline.
2717 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2718 (Is_Recorded_Scenario): New routine along with pragma Inline.
2719 (Is_Source_Call): New routine along with pragma Inline.
2720 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2721 (No_Elaboration_Check): Removed along with pragma Inline.
2722 (Target): New routine along with pragma Inline.
2723 (Was_Attribute_Reference): New routine along with pragma Inline.
2724 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2725 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2726 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2727 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2728 Inline.
2729 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2730 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2731 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2732 (Set_Is_Source_Call): New routine along with pragma Inline.
2733 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2734 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2735 (Set_Target): New routine along with pragma Inline.
2736 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2737 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2738
2739 2017-10-09 Bob Duff <duff@adacore.com>
2740
2741 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2742
2743 2017-10-09 Bob Duff <duff@adacore.com>
2744
2745 * freeze.ads: Minor comment fixed.
2746
2747 2017-10-09 Bob Duff <duff@adacore.com>
2748
2749 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2750 care of unchecked conversions in addition to regular conversions. This
2751 takes care of a case where a type is derived from a private untagged
2752 type that is completed by a tagged controlled type.
2753
2754 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2755
2756 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2757 rewriting a class-wide condition, handle properly the case where the
2758 controlling argument of the operation to which the condition applies is
2759 an access to a tagged type, and the condition includes a dispatching
2760 call with an implicit dereference.
2761
2762 2017-10-09 Bob Duff <duff@adacore.com>
2763
2764 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2765 the code at the end of this procedure that was setting the type of a
2766 class-wide object to the specific type returned by a function call.
2767 Treat this case as indefinite instead.
2768
2769 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2770
2771 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2772 Suppress spurious ambiguity error when two traversals of the homonym
2773 chain (first directly, and then through an examination of relevant
2774 interfaces) retrieve the same operation, when other irrelevant homonyms
2775 of the operatioh are also present.
2776
2777 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2778
2779 * sem_util.adb (Object_Access_Level): If the object is the return
2780 statement of an expression function, return the level of the function.
2781 This is relevant when the object involves an implicit conversion
2782 between access types and the expression function is a completion, which
2783 forces the analysis of the expression before rewriting it as a body, so
2784 that freeze nodes can appear in the proper scope.
2785
2786 2017-10-09 Bob Duff <duff@adacore.com>
2787
2788 * atree.adb: Make nnd apply to everything "interesting", including
2789 Rewrite. Remove rrd.
2790
2791 2017-10-09 Javier Miranda <miranda@adacore.com>
2792
2793 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2794 processing the declaration of the dummy object internally created by
2795 Make_DT to compute the offset to the top of components referencing
2796 secondary dispatch tables.
2797 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2798 been initialized initialized.
2799 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2800 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2801 (Make_DT): Create a dummy constant object if we can statically build
2802 secondary dispatch tables.
2803 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2804 use the dummy object to compute the offset-to-top field value by means
2805 of the attribute 'Position.
2806
2807 2017-10-09 Bob Duff <duff@adacore.com>
2808
2809 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2810 code so if BIPAlloc is not passed in, it will likely raise
2811 Program_Error instead of cause miscellaneous chaos.
2812 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2813 as for the other Is_B-I-P... functions.
2814 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2815 aggregate whose ancestor part is a build-in-place call returning a
2816 nonlimited type, transform the assignment to the ancestor part to use a
2817 temp.
2818 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2819 creating an Itype for a library unit entity.
2820 (Check_Initialization): Avoid spurious error message on
2821 internally-generated call.
2822 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2823 right-hand side is a build-in-place call. This didn't happen when b-i-p
2824 was only for limited types.
2825 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2826 implies >= Ada 2005.
2827 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2828 repeatedly.
2829 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2830
2831 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2832
2833 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2834
2835 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2836
2837 * libgnarl/s-taprob.adb: Minor whitespace fix.
2838
2839 2017-10-09 Bob Duff <duff@adacore.com>
2840
2841 * namet.ads: Minor comment fix.
2842
2843 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2844
2845 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2846 just like other program units listed in Ada RM 10.1(1).
2847
2848 2017-10-09 Justin Squirek <squirek@adacore.com>
2849
2850 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2851
2852 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2853
2854 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2855 actual for a formal package is an instantiation of a child unit, create
2856 a freeze node for the instance of the parent if it appears in the same
2857 scope and is not frozen yet.
2858
2859 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2860
2861 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2862 in-source documentation for tagged types's Offset_To_Top.
2863
2864 2017-10-09 Bob Duff <duff@adacore.com>
2865
2866 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2867 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2868 limited. This is for the case of a function call that occurs as the
2869 default for a record component.
2870 (Expand_N_Object_Declaration): Deal with the case where expansion has
2871 created an object declaration initialized with something like
2872 F(...)'Reference.
2873 * exp_ch3.adb: Minor reformatting.
2874
2875 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2876
2877 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2878 the attribute is an object, but it may appear within a conversion. The
2879 object itself must be retrieved when generating the range test that
2880 implements the validity check on a scalar type.
2881
2882 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2883
2884 PR ada/82393
2885 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2886 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2887
2888 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2889 Pierre-Marie de Rodat <derodat@adacore.com>
2890
2891 PR ada/82384
2892 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2893 (time_t): Change from derived type to subtype.
2894 (timeval): Use suseconds_t for tv_usec.
2895 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2896
2897 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2898
2899 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2900 handling the form (plus/mult (convert @0) @1).
2901
2902 2017-09-29 Bob Duff <duff@adacore.com>
2903
2904 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2905 what we had before.
2906 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2907 change. Set the Etype in the class-wide case. This fixes a regression
2908 in the libadalang test suite.
2909
2910 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2911
2912 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2913 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2914 in comment markup.
2915 * gnat_ugn.texi: Regenerate.
2916
2917 2017-09-29 Justin Squirek <squirek@adacore.com>
2918
2919 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2920 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2921 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2922 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2923 for checking source file status and error message and/or call to
2924 Read_Source_File.
2925 * libgnat/s-os_lib.ads: Add new potential value constant for
2926 uninitialized file descriptors.
2927 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2928 return result of IO to encompass a read access failure in addition to a
2929 file-not-found error.
2930
2931 2017-09-29 Bob Duff <duff@adacore.com>
2932
2933 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2934 functions returning nonlimited types. Allow for qualified expressions
2935 and type conversions.
2936 (Expand_N_Extended_Return_Statement): Correct the computation of
2937 Func_Bod to allow for child units.
2938 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2939 limited (initialization of In_Place_Expansion), and implies >= Ada
2940 2005.
2941 (Is_Build_In_Place_Result_Type): New function to accompany
2942 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2943 sometimes we just have the type on our hands, not the function. For
2944 now, does the same thing as the old version, so build-in-place is
2945 disabled for nonlimited types, except that you can use -gnatd.9 to
2946 enable it.
2947 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2948 accompany Is_Build_In_Place_Function and
2949 Is_Build_In_Place_Function_Call, because sometimes we just have the
2950 type on our hands, not the function.
2951 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2952 cases.
2953 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2954 questionable code at the end that was setting the Etype.
2955 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2956 determine whether "return (...agg...);" is returning from a
2957 build-in-place function.
2958 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2959 Remove assumption that b-i-p implies limited (initialization of
2960 In_Place_Expansion).
2961 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2962 an unchecked conversion. Add assertions.
2963 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2964 secondary stack here, just because the type needs finalization. That
2965 code is obsolete.
2966 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2967 For "return (...agg...);" don't assume b-i-p implies limited.
2968 Needs_Finalization does not imply secondary stack.
2969 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2970 Component_OK_For_Backend -- more readability with fewer double
2971 negatives.
2972 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2973 b-i-p implies >= Ada 2005.
2974 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2975 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2976 object of an extended return statement in place.
2977 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2978 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2979 b-i-p implies >= Ada 2005.
2980 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2981 b-i-p implies >= Ada 2005.
2982 * exp_ch7.adb: Comment fix.
2983 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2984 assumptions that b-i-p implies >= Ada 2005.
2985 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2986 b-i-p implies >= Ada 2005.
2987 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2988 (Expr), in case Pool_Id is not set.
2989 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2990 qualified or converted.
2991 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2992 (Param)) = N_Identifier; that's all it could be.
2993 * sinfo.ads: Comment fixes.
2994 * snames.ads-tmpl: Comment fixes.
2995 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2996
2997 2017-09-29 Justin Squirek <squirek@adacore.com>
2998
2999 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
3000 all cases related to marking entity identifiers.
3001
3002 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
3003
3004 * adaint.c (win32_wait): Properly handle error and take into account
3005 the WIN32 limitation on the number of simultaneous wait objects.
3006
3007 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
3008
3009 * cal.c: Minor proofreading.
3010
3011 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
3012
3013 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
3014 * gnat_ugn.texi: Regenerate.
3015
3016 2017-09-29 Bob Duff <duff@adacore.com>
3017
3018 * lib-xref.ads: Comment fix.
3019
3020 2017-09-29 Bob Duff <duff@adacore.com>
3021
3022 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
3023 Discriminants can't need finalization.
3024
3025 2017-09-29 Ed Schonberg <schonberg@adacore.com>
3026
3027 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
3028 for types in expression if the function is within a generic unit.
3029 * sem_res.adb (Resolve): In a generic context do not freeze an
3030 expression, unless it is an entity. This exception is solely for the
3031 purpose of detecting illegal uses of deferred constants in generic
3032 units.
3033 * sem_res.adb: Minor reformatting.
3034
3035 2017-09-29 Justin Squirek <squirek@adacore.com>
3036
3037 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
3038 redundant warnings.
3039
3040 2017-09-29 Yannick Moy <moy@adacore.com>
3041
3042 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
3043
3044 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3045
3046 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
3047 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
3048 Document the effect of pragma Optimize_Alignment (Space) on non-packed
3049 record types.
3050 * gnat_rm.texi: Regenerate.
3051
3052 2017-09-25 Justin Squirek <squirek@adacore.com>
3053
3054 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
3055 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
3056 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
3057 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
3058 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
3059 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
3060 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
3061 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
3062 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
3063 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
3064 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
3065 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
3066 Removal of ineffective use-clauses.
3067 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
3068 constant folded barriers.
3069 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
3070 Subtype_Marks and Names list in use-clause nodes to their new singular
3071 counterparts (e.g. Subtype_Mark, Name).
3072 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
3073 Prev_Ids and More_Ids in use-clause nodes.
3074 (P_Use_Clause): Modify to take a list as a parameter.
3075 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
3076 subtype_marks within an aggregate use-clauses into individual clauses.
3077 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
3078 P_Use_Clause to match its new behavior.
3079 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
3080 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
3081 errors.
3082 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
3083 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
3084 the declarative region.
3085 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
3086 after analysis (Analyze_Package_Specification): Update use clause chain
3087 when there is no body.
3088 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
3089 parameter to determine weither the installation of scopes should also
3090 propagate on the use-clause "chain".
3091 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
3092 what constitutes a valid "use" of a clause.
3093 (Update_Use_Clause_Chain): Created to aggregate common machinary used
3094 to clean up use-clause chains (and warn on ineffectiveness) at the end
3095 of declaritive regions.
3096 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
3097 package name from a use-package clause.
3098 (Analyze_Package_Name_List): Created to perform analysis on a list of
3099 package names (similar to Analyze_Package_Name).
3100 (Find_Most_Prev): Created to traverse to the beginning of a given
3101 use-clause chain.
3102 (Most_Decendant_Use_Clause): Create to identify which clause from a
3103 given set is highest in scope (not always the most prev).
3104 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
3105 handle the new chaining algorithm, also many changes related to
3106 redundant clauses. A new parameter has also been added to force
3107 installation to handle certain cases.
3108 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
3109 Analyze_Task_Body): Mark use clauses on relevant entities.
3110 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
3111 Install_Parents): Add parameter to determine weither the installation
3112 of scopes should also propagate on the use-clause "chain".
3113 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
3114 Install_Context to avoid redundant chaining of use-clauses.
3115 * sem_ch13.adb: Minor reformatting.
3116 * sem_res.adb (Resolve): Mark use clauses on operators.
3117 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
3118 entities.
3119 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
3120 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
3121 represent any given clause's usage/reference/necessity.
3122 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
3123 nodes to allow loose chaining of redundant clauses.
3124 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
3125 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
3126 reorganization in node fields.
3127 * types.ads (Source_File_Index): Adjust index bounds.
3128 (No_Access_To_Source_File): New constant.
3129
3130 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3131
3132 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
3133 the expression to be used in the generated attribute specification
3134 (rather than relocating it) to avoid resolving a potentially malformed
3135 tree when the expression is resolved through an ASIS-specific call to
3136 Resolve_Aspect_Expressions. This manifests itself as a crash on a
3137 function with parameter associations.
3138
3139 2017-09-25 Yannick Moy <moy@adacore.com>
3140
3141 * exp_spark.adb (Expand_SPARK_Indexed_Component,
3142 Expand_SPARK_Selected_Component): New procedures to insert explicit
3143 dereference if required.
3144 (Expand_SPARK): Call the new procedures.
3145
3146 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
3147
3148 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
3149 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
3150 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
3151 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
3152 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
3153
3154 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
3155
3156 * adaint.c (win32_wait): Properly handle error and take into account
3157 the WIN32 limitation on the number of simultaneous wait objects.
3158
3159 2017-09-25 Yannick Moy <moy@adacore.com>
3160
3161 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
3162 invariant procedure in GNATprove mode.
3163 * sem_ch5.adb (Analyze_Assignment): Likewise.
3164
3165 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3166
3167 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
3168 "back-end" in comments.
3169
3170 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3171
3172 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
3173 call that appears in a classwide precondition and that mentions an
3174 access formal of the subprogram, must use the accessibility level of
3175 the actual in the call. This is one case in which a reference to a
3176 formal parameter appears outside of the body of the subprogram.
3177
3178 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3179
3180 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
3181 for GNATprove.
3182 (Resolve_Entry): Clean up predicate
3183
3184 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3185
3186 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
3187 than Program_Error because U_E is more in line with respect to the
3188 intended behavior.
3189
3190 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3191
3192 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
3193 Storage_Size does not freeze, and thus can include references to
3194 deferred constants.
3195
3196 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3197
3198 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
3199 reference when it appears within a pragma of no significance to SPARK.
3200 (In_Insignificant_Pragma): New routine.
3201 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
3202
3203 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3204
3205 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
3206 actual is a renaming, indicate that it is the renamed package that must
3207 be frozen before the instantiation.
3208
3209 2017-09-25 Yannick Moy <moy@adacore.com>
3210
3211 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
3212 of dimensionality system in GNAT UG.
3213 * gnat_ugn.texi: Regenerate.
3214
3215 2017-09-25 Yannick Moy <moy@adacore.com>
3216
3217 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
3218 GNATprove_Mode when switch -gnatdF used.
3219
3220 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3221
3222 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
3223 the backend.
3224
3225 2017-09-25 Javier Miranda <miranda@adacore.com>
3226
3227 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
3228 expansion of user-defined enumeration types when the generation of
3229 names for enumeration literals is suppressed.
3230
3231 2017-09-25 Gary Dismukes <dismukes@adacore.com>
3232
3233 * libgnarl/s-taprop__linux.adb: Minor reformatting.
3234
3235 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3236
3237 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
3238 that appear as selector names of parameter associations, as these are
3239 never resolved by visibility.
3240
3241 2017-09-25 Justin Squirek <squirek@adacore.com>
3242
3243 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
3244
3245 2017-09-25 Doug Rupp <rupp@adacore.com>
3246
3247 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
3248
3249 2017-09-25 Javier Miranda <miranda@adacore.com>
3250
3251 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
3252 (Expand_User_Defined_Enumeration_Image): New subprogram.
3253 (Expand_Image_Attribute): Enable speed-optimized expansion of
3254 user-defined enumeration types when we are compiling with optimizations
3255 enabled.
3256
3257 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3258
3259 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
3260 routine is already provided by Einfo.
3261 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
3262 Sem_Util, which had better comments and avoided double calls to
3263 Abstract_State.
3264
3265 2017-09-25 Bob Duff <duff@adacore.com>
3266
3267 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
3268
3269 2017-09-25 Doug Rupp <rupp@adacore.com>
3270
3271 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
3272 (Compute_Base_Monotonic_Clock): New function.
3273 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
3274 (Timed_Delay): Likewise.
3275 (Monotonic_Clock): Likewise.
3276 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
3277
3278 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3279
3280 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
3281 previous change.
3282
3283 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3284
3285 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
3286 Minor reformatting.
3287
3288 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3289
3290 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
3291
3292 2017-09-18 Bob Duff <duff@adacore.com>
3293
3294 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
3295 reference types in the access-to-access case.
3296
3297 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3298
3299 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
3300 of the "aliased" keyword on the prefix from here to...
3301 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
3302 to Check_No_Implicit_Aliasing.
3303 * sinfo.ads (Non_Aliased_Prefix): Delete.
3304 (Set_Non_Aliased_Prefix): Likewise.
3305 * sinfo.adb (Non_Aliased_Prefix): Delete.
3306 (Set_Non_Aliased_Prefix): Likewise.
3307
3308 2017-09-18 Bob Duff <duff@adacore.com>
3309
3310 * exp_ch5.adb (Build_Formal_Container_Iteration,
3311 Expand_Formal_Container_Element_Loop): Convert the container to the
3312 root type before passing it to the iteration operations, so it will be
3313 of the right type.
3314
3315 2017-09-18 Bob Duff <duff@adacore.com>
3316
3317 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3318
3319 2017-09-18 Bob Duff <duff@adacore.com>
3320
3321 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3322 and it's a bit-packed array, pass False to the Consider_IS parameter of
3323 Needs_Simple_Initialization.
3324
3325 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3326
3327 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3328 the preexisting body.
3329 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3330 (Process_Inline): Verify the placement of pragma Inline_Always. The
3331 pragma must now appear on the initial declaration of the related
3332 subprogram.
3333
3334 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3335
3336 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3337 declarative list in a subprogram body, analyze aspext specifications to
3338 provide basic semantic information, because otherwise the aspect
3339 specifications might only be snalyzed during expansion, when related
3340 subprograms are generated.
3341
3342 2017-09-18 Bob Duff <duff@adacore.com>
3343
3344 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3345 validity checks have rewritten the tree.
3346
3347 2017-09-18 Bob Duff <duff@adacore.com>
3348
3349 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3350
3351 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3352
3353 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3354 qualified exxpression for an aggregate in a generic unit, verify that
3355 the scope of the type is itself visible and not hidden, so that the
3356 qualified expression is correctly resolved in any instance.
3357
3358 2017-09-18 Bob Duff <duff@adacore.com>
3359
3360 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3361 mark refers to the current instance. Set the type to Any_Type in that
3362 case, to avoid later crashes.
3363
3364 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3365
3366 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3367 subsidiary of Build_Assignment, used to handle the initialization code
3368 for a mutable record component whose default value is an aggregate that
3369 sets the values of the discriminants of the components.
3370
3371 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3372
3373 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3374 the entity as being volatile for an overlay that toggles the scalar
3375 storage order.
3376
3377 2017-09-18 Fedor Rybin <frybin@adacore.com>
3378
3379 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3380 options -U main and --harness-only are not compatible.
3381
3382 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3383
3384 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3385
3386 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3387
3388 * einfo.ads (Is_Imported): Update comment, as this
3389 routine also applies to constants.
3390
3391 2017-09-18 Yannick Moy <moy@adacore.com>
3392
3393 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3394 holding state.
3395
3396 2017-09-18 Justin Squirek <squirek@adacore.com>
3397
3398 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3399 constant indication for Pragma_Linker_Section.
3400
3401 2017-09-18 Bob Duff <duff@adacore.com>
3402
3403 Alternate fix for PR ada/71358
3404 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3405 Instead, make a local copy of Config, and if it's null, allocate an
3406 empty Command_Line_Configuration_Record, so we won't crash on null
3407 pointer dereference.
3408
3409 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3410
3411 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3412 * libgnarl/s-interr__hwint.adb: Likewise.
3413 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3414 * libgnarl/s-osinte__rtems.adb: Likewise.
3415 * libgnarl/s-osinte__rtems.ads: Likewise.
3416
3417 2017-09-13 Nicolas Roche <roche@adacore.com>
3418
3419 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3420 file and try to guess the locations of dependencies.
3421
3422 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3423
3424 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3425 the suppression status of Alignment_Check on the current scope.
3426 (Alignment_Checks_Suppressed): New function to use the saved instead of
3427 the current suppression status of Alignment_Check.
3428 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3429 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3430 the table, call Register_Address_Clause_Check.
3431 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3432 recorded address clause instead of its entity.
3433
3434 2017-09-13 Jerome Guitton <guitton@adacore.com>
3435
3436 * libgnarl/s-tpopsp__vxworks-tls.adb,
3437 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3438 (Self): Register thread if task id is null.
3439
3440 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3441
3442 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3443
3444 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3445
3446 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3447 from an entity to only scope index, as a mapping from an entity to the
3448 same entity was useless.
3449 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3450 to E.
3451 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3452 to E.
3453 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3454 variable, just use return statements.
3455
3456 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3457
3458 * libgnarl/s-vxwext__kernel-smp.adb,
3459 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3460 New file.
3461
3462 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3463
3464 * einfo.adb: Flag42 is now Is_Controlled_Active.
3465 (Is_Controlled): This attribute is now synthesized.
3466 (Is_Controlled_Active): This attribute is now an explicit flag rather
3467 than a synthesized attribute. (Set_Is_Controlled): Removed.
3468 (Set_Is_Controlled_Active): New routine.
3469 (Write_Entity_Flags): Update the output for Flag42.
3470 * einfo.ads: Update the documentation of the following attributes:
3471 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3472 and Is_Controlled_Active have swapped their functionality.
3473 (Is_Controlled): Renamed to Is_Controlled_Active.
3474 (Is_Controlled_Active): Renamed to Is_Controlled.
3475 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3476 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3477 Is_Controlled.
3478 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3479 (Needs_Finalization): Code clean up. Remove the tests for
3480 Disable_Controlled because a) they were incorrect as they would reject
3481 a type which is sublect to the aspect, but may contain controlled
3482 components, and b) they are no longer necessary.
3483 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3484 * freeze.adb (Freeze_Array_Type): Restore the original use of
3485 Is_Controlled.
3486 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3487 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3488 Is_Controlled.
3489 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3490 (Build_Derived_Private_Type): Restore the original use of
3491 Is_Controlled.
3492 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3493 type derived from Ada.Finalization.[Limited_]Controlled.
3494 (Build_Derived_Type): Restore the original use of Is_Controlled.
3495 (Record_Type_Definition): Restore the original use of Is_Controlled.
3496 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3497 Is_Controlled.
3498 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3499 (Analyze_Aspect_Specifications): Use routine
3500 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3501
3502 2017-09-13 Vincent Celier <celier@adacore.com>
3503
3504 * clean.adb (Gnatclean): Fix error when looking for target
3505 of <target>-gnatclean
3506
3507 2017-09-13 Javier Miranda <miranda@adacore.com>
3508 Ed Schonberg <schonberg@adacore.com>
3509
3510 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3511 expanded name that designates the current instance of a child unit in
3512 its own body and appears as the prefix of a reference to an entity
3513 local to the child unit.
3514
3515 2017-09-12 Bob Duff <duff@adacore.com>
3516
3517 * sem_warn.adb: Minor comment.
3518
3519 2017-09-12 Bob Duff <duff@adacore.com>
3520
3521 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3522 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3523 be Default_Initialized_Item, and apply pragma Unmodified to it,
3524 to suppress the warning.
3525
3526 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3527
3528 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3529 for access types.
3530
3531 2017-09-12 Yannick Moy <moy@adacore.com>
3532
3533 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3534 together with Global when ignoring one in CodePeer mode.
3535
3536 2017-09-12 Javier Miranda <miranda@adacore.com>
3537
3538 * sem_ch3.adb (Analyze_Declarations): In nested
3539 package declarations that have a private part enable missing check
3540 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3541 resolved at the end of the immediately enclosing declaration list.
3542
3543 2017-09-12 Bob Duff <duff@adacore.com>
3544
3545 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3546 Empty.
3547
3548 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3549
3550 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3551 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3552 dF flag.
3553 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3554 in preparation for the evolution of the SPARK language that
3555 includes a pointer analysis for checking non-aliasing of access
3556 types. The Check_Safe_Pointers function is the entry point, and
3557 will traverse the AST and raise compile-time errors everytime
3558 it detects non-begign aliasing. Detailed comments are present
3559 in the sem_spark.ads file.
3560 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3561 functions to iterate over the list of globals of a subprogram.
3562 * libgnat/system.ads: Add restriction No_Finalization.
3563 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3564 dependency on g-dynhta.adb.
3565
3566 2017-09-12 Bob Duff <duff@adacore.com>
3567
3568 * sem_ch6.adb (Analyze_Expression_Function): Call
3569 Check_Dynamically_Tagged_Expression.
3570 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3571 "and then Is_Tagged_Type (Typ)" because there is an earlier
3572 "Assert (Is_Tagged_Type (Typ))".
3573
3574 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3575
3576 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3577
3578 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3579
3580 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3581 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3582 for no longer supported platforms.
3583 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3584 description of the semantics for dimensionality analysis.
3585 * gnat_ugn.texi: Regenerated.
3586
3587 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3588
3589 * freeze.adb (Has_Incomplete_Compoent): Delete.
3590 (Freeze_Profile):
3591 Do not inhibit the freezing of the profile of an expression
3592 function here.
3593 (Freeze_Subprogram): Do not re-create extra formals.
3594 * sem_ch6.adb (Analyze_Expression_Function): Always
3595 pre-analyze the expression if the function is not a completion.
3596 (Analyze_Subprogram_Body_Helper): For the body generated
3597 from an expression function that is not a completion, do
3598 not freeze the profile and temporary mask the types declared
3599 outside the expression that are not yet frozen.
3600 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3601 during the pre-analysis of an expression function.
3602
3603 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3604
3605 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3606 (gigi): Likewise.
3607
3608 2017-09-11 Yannick Moy <moy@adacore.com>
3609
3610 * lib-xref-spark_specific.adb: Minor rewrite.
3611
3612 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3613
3614 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3615 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3616 renaming into account.
3617
3618 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3619
3620 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3621 * gcc-interface/Makefile.in: Take this renaming into account.
3622
3623 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3624
3625 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3626 longer used.
3627
3628 2017-09-11 Yannick Moy <moy@adacore.com>
3629
3630 * sem_util.adb (Check_Result_And_Post_State):
3631 Do not issue a warning about missing reference to an outcome if
3632 the subprogram is ghost and has no outputs.
3633 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3634 reformatting.
3635
3636 2017-09-11 Yannick Moy <moy@adacore.com>
3637
3638 * gnat1drv.adb (Adjust_Global_Switches): Set
3639 Check_Validity_Of_Parameters to False in GNATprove mode.
3640 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3641 set option.
3642
3643 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3644
3645 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3646 generate debug info for inner record types if -fgnat-encodings=minimal.
3647 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3648 type as the debug type.
3649
3650 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3651
3652 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3653 packed record types if pragma Optimize_Alignment (Space) is enabled.
3654
3655 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3656
3657 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3658 limits for expression functions.
3659 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3660
3661 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3662
3663 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3664 layout of the record from the parent type only if both are or are not
3665 unchecked unions.
3666 (is_stored_discriminant): Return false for an unchecked union.
3667
3668 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3669
3670 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3671 return NULL_EXPR.
3672
3673 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3674
3675 * gcc-interface/decl.c (promote_object_alignment): New function taken
3676 from...
3677 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3678 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3679 create a padding type on success before doing the atomic check.
3680
3681 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3682
3683 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3684 promotion to static memory earlier in the processing.
3685
3686 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3687
3688 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3689 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3690 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3691 Consider all kinds of entities.
3692
3693 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3694
3695 * gcc-interface/utils.c (convert): When converting to a padding type,
3696 reuse an existing CONSTRUCTOR if it has got the right size.
3697
3698 2017-09-08 Nicolas Roche <roche@adacore.com>
3699
3700 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3701 source in libgnat/
3702 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3703 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3704 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3705 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3706 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3707 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3708 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3709 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3710 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3711 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3712 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3713 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3714 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3715 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3716 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3717 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3718 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3719 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3720 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3721 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3722 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3723 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3724 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3725 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3726 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3727 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3728 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3729 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3730 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3731 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3732 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3733 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3734 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3735 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3736 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3737 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3738 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3739 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3740 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3741 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3742 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3743 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3744 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3745 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3746 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3747 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3748 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3749 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3750 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3751 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3752 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3753 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3754 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3755 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3756 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3757 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3758 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3759 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3760 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3761 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3762 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3763 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3764 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3765 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3766 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3767 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3768 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3769 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3770 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3771 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3772 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3773 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3774 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3775 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3776 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3777 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3778 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3779 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3780 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3781 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3782 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3783 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3784 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3785 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3786 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3787 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3788 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3789 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3790 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3791 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3792 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3793 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3794 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3795 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3796 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3797 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3798 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3799 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3800 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3801 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3802 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3803 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3804 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3805 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3806 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3807 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3808 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3809 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3810 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3811 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3812 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3813 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3814 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3815 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3816 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3817 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3818 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3819 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3820 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3821 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3822 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3823 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3824 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3825 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3826 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3827 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3828 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3829 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3830 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3831 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3832 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3833 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3834 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3835 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3836 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3837 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3838 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3839 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3840 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3841 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3842 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3843 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3844 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3845 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3846 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3847 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3848 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3849 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3850 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3851 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3852 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3853 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3854 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3855 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3856 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3857 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3858 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3859 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3860 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3861 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3862 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3863 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3864 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3865 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3866 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3867 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3868 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3869 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3870 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3871 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3872 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3873 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3874 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3875 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3876 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3877 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3878 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3879 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3880 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3881 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3882 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3883 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3884 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3885 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3886 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3887 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3888 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3889 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3890 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3891 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3892 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3893 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3894 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3895 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3896 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3897 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3898 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3899 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3900 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3901 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3902 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3903 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3904 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3905 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3906 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3907 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3908 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3909 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3910 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3911 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3912 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3913 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3914 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3915 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3916 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3917 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3918 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3919 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3920 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3921 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3922 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3923 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3924 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3925 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3926 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3927 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3928 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3929 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3930 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3931 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3932 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3933 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3934 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3935 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3936 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3937 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3938 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3939 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3940 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3941 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3942 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3943 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3944 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3945 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3946 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3947 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3948 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3949 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3950 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3951 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3952 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3953 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3954 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3955 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3956 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3957 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3958 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3959 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3960 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3961 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3962 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3963 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3964 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3965 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3966 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3967 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3968 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3969 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3970 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3971 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3972 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3973 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3974 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3975 to libgnat subdirectory.
3976
3977 2017-09-08 Yannick Moy <moy@adacore.com>
3978
3979 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3980 return the entity associated with the call.
3981 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3982 Replace the internal Get_Function_Id with the new
3983 Sem_Aux.Get_Called_Entity.
3984 (Iterate_Call_Parameters): New
3985 procedure to iterate on formals and actuals at the same time.
3986 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3987 Set SPARK_Mode from spec when set, for analysis
3988 of instance. Restore after analysis of instance.
3989 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3990 set, for analysis of body instance. Restored automatically at
3991 the end of the subprogram.
3992 * gnat1drv.adb (Adjust_Global_Switches): Set
3993 Check_Validity_Of_Parameters to False in GNATprove mode.
3994 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3995 set option.
3996
3997 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3998
3999 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
4000 (New_Copy_Tree): ...there. Reset the hash tables only if they
4001 were used in the previous invocation.
4002 * s-htable.adb: Fix typo.
4003
4004 2017-09-08 Bob Duff <duff@adacore.com>
4005
4006 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
4007
4008 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4009
4010 * sem_aggr.adb: minor style fix.
4011
4012 2017-09-08 Bob Duff <duff@adacore.com>
4013
4014 * sprint.adb (Write_Corresponding_Source): Ignore if there is
4015 no current source file.
4016 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
4017 Print something helpful in case N is invalid.
4018 * sprint.ads: Minor comment fix.
4019
4020 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4021
4022 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
4023 access types.
4024
4025 2017-09-08 Bob Duff <duff@adacore.com>
4026
4027 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
4028 Ada_2020, along the same lines as the other Ada version pragmas.
4029
4030 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4031
4032 * sem_ch12.adb: Minor typo fixes and reformatting.
4033
4034 2017-09-08 Yannick Moy <moy@adacore.com>
4035
4036 * sem_aggr.adb (Resolve_Record_Aggregate):
4037 Rewrite bounds of aggregate subexpressions which may depend on
4038 discriminants of the enclosing aggregate.
4039
4040 2017-09-08 Yannick Moy <moy@adacore.com>
4041
4042 * sem_ch5.adb: Prevent assertion failure on illegal code.
4043
4044 2017-09-08 Yannick Moy <moy@adacore.com>
4045
4046 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
4047 calling Renamed_Entity on an entity which cannot be a renaming.
4048
4049 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4050
4051 * exp_aggr.adb: Add with & use clause for Urealp.
4052 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
4053 elementary types instead of just discrete types.
4054 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
4055 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
4056 Be prepared for the FP zero value in the memset case. Add small
4057 guard.
4058
4059 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4060
4061 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
4062 of loop.
4063
4064 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4065
4066 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
4067 of New_Copy because the latter leaves the syntactic structure of
4068 the tree inconsistent (a child is accessible through two parents)
4069 and prevents proper replication of itypes by subsequent calls
4070 to New_Copy_Tree.
4071 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
4072 New_Copy because the latter leaves the syntactic structure of the
4073 tree inconsistent (a child is accessible through two parents)
4074 and prevents proper replication of itypes by subsequent calls
4075 to New_Copy_Tree.
4076 * sem_util.adb (In_Subtree): New routine.
4077 (New_Copy_Tree): Reimplemented.
4078 * sem_util.ads (In_Subtree): New routine.
4079 (New_Copy_Tree): Reimplemented.
4080
4081 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4082
4083 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
4084 for aspect Default_Value is a static scalar value, but it does
4085 not freeze the type. Yhis allows for subsequent representation
4086 clauses for the type.
4087
4088 2017-09-08 Javier Miranda <miranda@adacore.com>
4089
4090 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
4091 not add entries into the undefined reference table when we are
4092 compiling with errors ignored.
4093
4094 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4095
4096 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
4097 check if the instance is within an enclosing instance body. The
4098 formal package was legal in the enclosing generic, and is
4099 legal in the enclosing instantiation. This optimisation may be
4100 applicable elsewhere, and it also removes spurious errors that
4101 may arise with on-the-fly processing of instantiations that
4102 contain Inline_Always subprograms.
4103
4104 2017-09-08 Vincent Celier <celier@adacore.com>
4105
4106 * gnatcmd.adb: Disregard empty argument of GNAT driver.
4107
4108 2017-09-08 Justin Squirek <squirek@adacore.com>
4109
4110 * checks.adb (Insert_Valid_Check): Manually decorate
4111 the generated temporary for range valdity checks.
4112
4113 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4114
4115 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
4116
4117 2017-09-08 Justin Squirek <squirek@adacore.com>
4118
4119 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
4120 case to handle underscore flags.
4121 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
4122 new procedure to handle underscores.
4123
4124 2017-09-08 Javier Miranda <miranda@adacore.com>
4125
4126 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
4127 divisions with fixed point results to avoid generating twice
4128 the runtime check on divide by zero.
4129 * checks.adb (Apply_Divide_Checks): Ensure that operands are
4130 not evaluated twice (once for their runtime checks and once for
4131 their regular computation).
4132
4133 2017-09-08 Yannick Moy <moy@adacore.com>
4134
4135 * sem_prag.adb (Analyze_Part_Of): Add missing
4136 return statements after issuing errors. Add detection of
4137 out-of-order item and single concurrent type.
4138
4139 2017-09-08 Nicolas Roche <roche@adacore.com>
4140
4141 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
4142 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
4143 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
4144 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
4145 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
4146 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
4147 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
4148 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
4149 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
4150 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
4151 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
4152 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
4153 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
4154 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
4155 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
4156 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
4157 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
4158 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
4159 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
4160 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
4161 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
4162 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
4163 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
4164 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
4165 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
4166 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
4167 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
4168 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
4169 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
4170 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
4171 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
4172 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
4173 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
4174 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
4175 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
4176 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
4177 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
4178 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
4179 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
4180 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
4181 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
4182 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
4183 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
4184 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
4185 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
4186 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
4187 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
4188 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
4189 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
4190 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
4191 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
4192 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
4193 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
4194 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
4195
4196 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4197
4198 * doc/share/conf.py, doc/share/latex_elements.py,
4199 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
4200 highlighting.
4201
4202 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4203
4204 * gnat_rm.texi, gnat_ugn.texi,
4205 doc/gnat_ugn/the_gnat_compilation_model.rst,
4206 doc/gnat_ugn/getting_started_with_gnat.rst,
4207 doc/gnat_ugn/inline_assembler.rst,
4208 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4209 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
4210 doc/gnat_ugn/about_this_guide.rst,
4211 doc/gnat_ugn/platform_specific_information.rst,
4212 doc/gnat_ugn/example_of_binder_output.rst,
4213 doc/gnat_ugn/gnat_and_program_execution.rst,
4214 doc/gnat_ugn/gnat_utility_programs.rst,
4215 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4216 doc/gnat_rm/interfacing_to_other_languages.rst,
4217 doc/gnat_rm/implementation_defined_aspects.rst,
4218 doc/gnat_rm/intrinsic_subprograms.rst,
4219 doc/gnat_rm/implementation_defined_characteristics.rst,
4220 doc/gnat_rm/implementation_advice.rst,
4221 doc/gnat_rm/implementation_defined_attributes.rst,
4222 doc/gnat_rm/compatibility_and_porting_guide.rst,
4223 doc/gnat_rm/standard_library_routines.rst,
4224 doc/gnat_rm/the_gnat_library.rst,
4225 doc/gnat_rm/implementation_defined_pragmas.rst,
4226 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4227 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4228 doc/gnat_rm/obsolescent_features.rst,
4229 doc/gnat_rm/about_this_guide.rst,
4230 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4231 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4232 doc/gnat_ugn.rst,
4233 doc/gnat_rm.rst: Update documentation.
4234
4235 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4236
4237 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
4238 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
4239 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
4240
4241 2017-09-08 Bob Duff <duff@adacore.com>
4242
4243 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
4244 New routine to read the Tag robustly.
4245 * exp_attr.adb (Input): Change the expansion of 'Input,
4246 in the class-wide case, to call String_Input_Tag instead of
4247 String_Input_Blk_IO.
4248
4249 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4250
4251 * s-rident.ads (Restriction_Id): reorder enum
4252 literals, so that Pure_Barriers is no longer in range of the
4253 Cunit_Boolean_Restrictions subtype.
4254
4255 2017-09-08 Nicolas Roche <roche@adacore.com>
4256
4257 * a-taster.ads, a-taster.adb: Move to libgnarl
4258 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
4259 Add support for files in libgnarl.
4260
4261 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4262
4263 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
4264 accessibility check to an interface conversion, whose purpose
4265 is to perform a pointer adjustment in a dispatching call.
4266 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
4267 when the actual is a construct that involves a dereference of an
4268 expression that includes a formal of the enclosing subprogram,
4269 In such cases, the accessibility level of the actual is that of
4270 the corresponding formal, which is passed in as an additional
4271 actual in the outer call.
4272
4273 2017-09-08 Bob Duff <duff@adacore.com>
4274
4275 * exp_intr.adb (Add_Source_Info): Do not decode
4276 file names; they were not encoded in the first place.
4277
4278 2017-09-08 Bob Duff <duff@adacore.com>
4279
4280 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
4281 exceptions instead of crashes. Check for absurdly long strings
4282 and empty strings. Empty strings cause trouble because they can
4283 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
4284 be empty, which causes an array index out of bounds.
4285 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
4286 instead of crashes.
4287
4288 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4289
4290 * sem_util.adb (Is_CCT_Instance): allow use in
4291 the context of protected types.
4292
4293 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4294
4295 * a-tigeli.adb: minor remove extra whitespace.
4296
4297 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4298
4299 * par-ch4.adb: Reformatting of an error message.
4300
4301 2017-09-08 Javier Miranda <miranda@adacore.com>
4302
4303 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4304 identifiers to ensure their correct decoration of names on
4305 aspect expressions.
4306
4307 2017-09-08 Yannick Moy <moy@adacore.com>
4308
4309 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4310 not skip a loop coming from source which is rewritten into a loop.
4311
4312 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4313
4314 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4315 wrapper has convention Ada, to prevent spurious warnings on
4316 unconstrained array parameters.
4317
4318 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4319
4320 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4321 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4322
4323 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4324
4325 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4326
4327 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4328
4329 * exp_intr.adb (Append_Entity_Name): Move to ...
4330 * sem_util.ads, sem_util.adb: ... here to share it.
4331 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4332 subprogram/entity.
4333 * errutil.adb (Error_Msg): Fill new field Node.
4334 * erroutc.ads (Subprogram_Name_Ptr): New.
4335 (Error_Msg_Object): New field Node.
4336 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4337 * errout.adb (Error_Msg): New variant with node id parameter.
4338 Fill new parameter Node when emitting messages. Revert previous
4339 changes for Include_Subprogram_In_Messages.
4340 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4341 generating warning message.
4342
4343 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4344
4345 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4346 under -gnat2020 flag, given that it is a future feature of
4347 the language.
4348 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4349 defining identifier as referenced to prevent spurious warnings:
4350 corresponding loop is expanded into one or more loops whose
4351 variable has the same name, and the expression uses those names
4352 and not the original one.
4353
4354 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4355
4356 * sem_elab.adb (Check_A_Call): Do not consider
4357 references to internal variables for SPARK semantics.
4358
4359 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4360
4361 * inline.adb (In_Package_Spec): refine type of
4362 the parameter from Node_Id to Entity_Id.
4363
4364 2017-09-08 Justin Squirek <squirek@adacore.com>
4365
4366 * exp_ch5.adb (Expand_Formal_Container_Loop):
4367 Reset the scope of the loop parameter after it is reanalyzed.
4368
4369 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4370
4371 * sem_util.ads (Set_Rep_Info): New inline procedure.
4372 * sem_util.adb (Set_Rep_Info): Implement it.
4373 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4374 always copy the representation aspects onto the subtype.
4375
4376 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4377
4378 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4379 Correction of the return type from access type to option type.
4380 (Simple_HTable): Moving the Instance_Data to ads file.
4381
4382 2017-09-08 Yannick Moy <moy@adacore.com>
4383
4384 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4385
4386 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4387
4388 * opt.ads (Include_Subprogram_In_Messages): New variable.
4389 * errout.ads (Current_Subprogram_Ptr): New variable.
4390 * errout.adb (Error_Msg): Prepend current subprogram info
4391 in messages if Include_Subprogram_In_Messages is set.
4392 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4393 Current_Subprogram.
4394 * gnat1drv.adb (Adjust_Global_Switches): Set
4395 Include_Subprogram_In_Messages when -gnatdJ is set.
4396 * debug.adb: Document and reserve -gnatdJ.
4397
4398 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4399
4400 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4401 functions to iterate over simple hastables.
4402 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4403
4404 2017-09-08 Javier Miranda <miranda@adacore.com>
4405
4406 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4407 missing checks on the presence of Entity() before checking the
4408 entity attributes.
4409
4410 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4411
4412 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4413 statements, use local variable and remove unnecessary processing.
4414
4415 2017-09-08 Javier Miranda <miranda@adacore.com>
4416
4417 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4418 subprogram.
4419 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): 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_ch6.adb (Replace_Renaming_Declaration_Id): New
4424 subprogram containing code that was previously inside
4425 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4426 required for one of the new subprograms.
4427 (Expand_Actuals):
4428 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4429 (Expand_N_Extended_Return_Statement): Extend the
4430 cases covered by an assertion on expected BIP object
4431 declarations.
4432 (Make_Build_In_Place_Call_In_Assignment):
4433 Removing unused code; found working on this ticket.
4434 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4435 that replaces the internal name of the renaming declaration
4436 into the new subprogram Replace_Renaming_Declaration_Id.
4437 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4438 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4439 New subprogram.
4440 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4441 subprogram.
4442 (Unqual_BIP_Iface_Function_Call): New subprogram.
4443 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4444 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4445 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4446 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4447 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4448 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4449 (Expand_N_Indexed_Component): Invoke the new subprogram
4450 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4451 (Expand_N_Selected_Component): Invoke the new subprogram
4452 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4453 (Expand_N_Slice): Invoke the new subprogram
4454 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4455 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4456 Invoke the new subprogram
4457 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4458
4459 2017-09-08 Javier Miranda <miranda@adacore.com>
4460
4461 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4462 access to interface types. Remove also the accessibility check.
4463
4464 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4465
4466 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4467 all the types that are referenced by the expression.
4468 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4469 a completion instead of manually freezing the type of the
4470 expression.
4471 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4472
4473 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4474
4475 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4476 New procedure, auxiliary to Expand_Pragma_Check, to handle
4477 references to the discriminants of a protected type within a
4478 precondition of a protected operation. This is needed because
4479 the original precondition has been analyzed in the context of
4480 the protected declaration, but in the body of the operation
4481 references to the discriminants have been replaved by references
4482 to the discriminants of the target object, and these references
4483 are only created when expanding the protected body.
4484
4485 2017-09-08 Yannick Moy <moy@adacore.com>
4486
4487 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4488 Loop_Variant.
4489
4490 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4491
4492 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4493 unchecked union, do not emit checks for its (non-existent)
4494 discriminants, or for variant parts that depend on them.
4495
4496 2017-09-08 Justin Squirek <squirek@adacore.com>
4497
4498 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4499 Find_Comparison_Type.Try_One_Interp): Add check for generic
4500 instances.
4501
4502 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4503
4504 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4505 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4506 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4507 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4508 remaining references to AAMP_On_Target.
4509
4510 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4511
4512 * style.adb: Fix typo.
4513
4514 2017-09-08 Javier Miranda <miranda@adacore.com>
4515
4516 * einfo.adb (Underlying_Type): Add missing support for class-wide
4517 types that come from the limited view.
4518 * exp_attr.adb (Attribute_Address): Check class-wide type
4519 interfaces using the underlying type to handle limited-withed
4520 types.
4521 (Attribute_Tag): Check class-wide type interfaces using
4522 the underlying type to handle limited-withed types.
4523
4524 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4525
4526 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4527 over a subtype of a type with a static predicate, taking into
4528 account the predicate function of the parent type and the bounds
4529 given in the loop specification.
4530 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4531 a loop specification that is a subtype indication whose type mark
4532 is a type with a static predicate, inherit predicate function,
4533 used to build case statement for rewritten loop.
4534
4535 2017-09-08 Justin Squirek <squirek@adacore.com>
4536
4537 * lib-load.adb: Modify printing of error message to exclude file
4538 line number.
4539
4540 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4541
4542 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4543 don't inline subprograms declared in both visible and private
4544 parts of a package.
4545 (In_Package_Spec): previously In_Package_Visible_Spec; now
4546 detects subprograms declared both in visible and private parts
4547 of a package spec.
4548
4549 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4550
4551 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4552 the type is an anonymous array in an object declaration, whose
4553 component type has an invariant, use the object declaration
4554 as the insertion point for the invariant procedure, given that
4555 there is no explicit type declaration for an anonymous array type.
4556
4557 2017-09-08 Bob Duff <duff@adacore.com>
4558
4559 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4560
4561 2017-09-08 Bob Duff <duff@adacore.com>
4562
4563 * a-strfix.adb (Trim): Compute Low and High only if needed.
4564
4565 2017-09-08 Justin Squirek <squirek@adacore.com>
4566
4567 * lib-load.adb (Load_Main_Source): Add error output in the case a
4568 source file is missing.
4569
4570 2017-09-08 Bob Duff <duff@adacore.com>
4571
4572 PR ada/80888
4573 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4574 Default_WCEM by default (i.e. if the encoding is not specified
4575 by the Form string).
4576
4577 2017-09-08 Bob Duff <duff@adacore.com>
4578
4579 * s-trasym.ads (Hexa_Traceback): If
4580 Suppress_Hex is True, print "..." instead of a hexadecimal
4581 address.
4582 * s-trasym.adb: Ignore No_Hex in this version.
4583 Misc cleanup.
4584
4585 2017-09-08 Bob Duff <duff@adacore.com>
4586
4587 * debug.adb: Minor reformatting.
4588
4589 2017-09-08 Bob Duff <duff@adacore.com>
4590
4591 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4592 code so it doesn't trigger an "uninit var" warning.
4593
4594 2017-09-08 Nicolas Roche <roche@adacore.com>
4595
4596 * s-hibaen.ads: Remove obsolete file.
4597
4598 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4599
4600 * a-locale.ads: Add comment explaining the state of this package.
4601
4602 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4603
4604 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4605 of packages.
4606 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4607 allow calls in the context of package spec (for pragma
4608 Initializes) and bodies (for pragma Refined_State).
4609
4610 2017-09-08 Bob Duff <duff@adacore.com>
4611
4612 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4613 new Exp.
4614
4615 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4616
4617 * debug.adb (dA): Adjust comment.
4618 * gnat1drv.adb (Gnat1drv): Likewise.
4619 * opt.ads (List_Representation_Info_Extended): New variable.
4620 * repinfo.adb (List_Record_Info): Split implementation into...
4621 (Compute_Max_Length): ...this. Recurse on records if requested.
4622 (List_Record_Layout): Likewise.
4623 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4624 statement, accept '0' and set List_Representation_Info_Extended
4625 on 'e'.
4626 * usage.adb (Usage): Document new -gnatRe variant.
4627
4628 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4629
4630 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4631 Do not save the given entity in the global variable Default_Pool
4632 if the pragma appears within a generic unit.
4633
4634 2017-09-08 Bob Duff <duff@adacore.com>
4635
4636 * errout.adb (Delete_Warning): Do not
4637 decrement Warnings_Treated_As_Errors. This is called before
4638 Warnings_Treated_As_Errors has been incremented to account for
4639 this warning. Decrementing it here can lead to negative values
4640 of Warnings_Treated_As_Errors, raising Constraint_Error in
4641 checks-on builds, and causing the compiler to return an error
4642 code in checks-off builds.
4643
4644 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4645
4646 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4647 entities of named concurrent types as Ref_Id and not of anonymous
4648 concurrent objects (because callers already know when a conversion
4649 is necessary and can easily do it); also, do not expect protected
4650 types or protected objects as Context_Id (because no flow-related
4651 SPARK pragmas are attached there); reflect these changes in a
4652 more precise comment.
4653
4654 2017-09-08 Olivier Hainque <hainque@adacore.com>
4655
4656 * g-altive.ads: Add documentation.
4657
4658 2017-09-08 Bob Duff <duff@adacore.com>
4659
4660 * sem_util.ads, debug.adb: Minor comment fix.
4661 * erroutc.ads: Comment fix.
4662
4663 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4664
4665 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4666 for compatibility of component types of formal and actual in an
4667 instantiation of a child unit, when the component type of the
4668 formal is itself a formal of an enclosing generic.
4669
4670 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4671
4672 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4673 sem_prag.adb to make it available for GNATprove; for concurrent
4674 types replace custom scope climbing with Scope_Same_Or_Within; for
4675 single concurrent objects add scope climbing (with Scope_Within),
4676 which was not there (that's the primary semantic change of this
4677 commit); also, when comparing a single concurrent object with
4678 its corresponding concurrent type rely on equality of types,
4679 not of objects (because that's simpler to code).
4680 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4681 (Analyze_Global_Item): adjust special-casing of references to the
4682 current instance of a concurrent unit in the Global contracts
4683 of task types and single tasks objects; similar for references
4684 in the protected operations and entries of protected types and
4685 single protected objects (in all these cases the current instance
4686 behaves as an implicit parameter and must not be mentioned in
4687 the Global contract).
4688
4689 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4690
4691 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4692 function calls returning a record within a subprogram call,
4693 for C generation.
4694
4695 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4696
4697 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4698 name that designates the current instance of a child unit in its
4699 own body and appears as the prefix of a reference to an entity
4700 local to the child unit.
4701 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4702 Minor reformatting.
4703
4704 2017-09-08 Yannick Moy <moy@adacore.com>
4705
4706 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4707 may be intentional.
4708
4709 2017-09-08 Tristan Gingold <gingold@adacore.com>
4710
4711 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4712 warnings on internal units in configurable run time mode.
4713
4714 2017-09-08 Bob Duff <duff@adacore.com>
4715
4716 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4717 representation items from interfaces that the derived type
4718 implements, not just from the parent type.
4719 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4720 this to return an empty list when there are no interfaces.
4721 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4722 * sem_attr.adb: Minor comment fix.
4723
4724 2017-09-08 Doug Rupp <rupp@adacore.com>
4725
4726 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4727 x86-vx7.
4728
4729 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4730
4731 * exp_ch4.adb (Expand_N_Allocator): Generate a
4732 call to Allocate_Any_Controlled when the allocation does not
4733 require any initialization.
4734
4735 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4736
4737 * sem_util.adb (Copy_Node_With_Replacement):
4738 Update the Renamed_Object field of a replicated object renaming
4739 declaration.
4740
4741 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4742
4743 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4744 conversions and components of objects. Simplified the detection
4745 of the Count attribute by identifying the corresponding run-time
4746 calls.
4747
4748 2017-09-08 Yannick Moy <moy@adacore.com>
4749
4750 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4751 sem_type.adb, sinfo.ads: Minor reformatting.
4752
4753 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4754
4755 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4756 of Freeze_Profile, used to inhibit the freezing of the profile
4757 of an expression function declared within a nested package, when
4758 some type in the profile depends on a private type declared in
4759 an enclosing package.
4760
4761 2017-09-08 Bob Duff <duff@adacore.com>
4762
4763 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4764 the subunit case. It's still OK to set it in the "missing subunits"
4765 case, because that won't cause the obsolete .ali files that cause
4766 confusion.
4767
4768 2017-09-08 Bob Duff <duff@adacore.com>
4769
4770 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4771 unclear why this didn't cause a warning.
4772 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4773 pragmas. It's unclear why this didn't cause an error.
4774
4775 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4776
4777 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4778 Reimplemented.
4779 (Expand_SPARK_Potential_Renaming): Code clean up.
4780 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4781 the item does not have a proper entity.
4782 (Analyze_Input_Item): Add a guard in case the item does not have a
4783 proper entity.
4784 (Collect_States_And_Objects): Include object renamings in the
4785 items being collected.
4786 (Resolve_State): Update the documentation of this routine.
4787 * sem_util.adb (Entity_Of): Add circuitry to handle
4788 renamings of function results.
4789 (Remove_Entity): New routine.
4790 (Remove_Overloaded_Entity): Take advantage of factorization.
4791 * sem_util.ads (Entity_Of): Update the documentation
4792 of this routine.
4793 (Remove_Entity): New routine.
4794 (Remove_Overloaded_Entity): Update the documentation of this
4795 routine.
4796
4797 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4798
4799 * repinfo.adb (List_Record_Info): During first loop,
4800 do not override the normalized position and first bit
4801 if they have already been set. Move fallback code
4802 for the packed case to the case where it belongs.
4803 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4804 Also adjust the normalized position of components.
4805 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4806
4807 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4808
4809 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4810 the placement of a primitive operation O that renames an operation
4811 R declared in an inner package, and which is thus not a primitive
4812 of the dispatching type of O. In this case O is a new primitive
4813 and does not inherit its dispatch table position from R (which
4814 has none).
4815
4816 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4817
4818 * sem_dim.adb (Analyze_Dimension_If_Expression,
4819 Analyze_Dimension_Case_Expression): new subprograms to verify
4820 the dimensional correctness of Ada2012 conditional expressions,
4821 and set properly the dimensions of the construct.
4822 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4823 call Analyze_Dimension.
4824
4825 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4826
4827 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4828 loop on an interface declared as a private extension of another
4829 synchronized interface.
4830
4831 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4832
4833 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4834 Analyze_Associations, to handle actual packages that depend on
4835 previous instances. If a package IAP that is an instantiation is
4836 used as an actual in a subsequent instantiation SI in the same
4837 scope, and IAP has a body, IAP must be frozen before SI. If
4838 the generic parent of IAP is itself declared in a previous
4839 instantiation in the same scope, that instantiation must also
4840 be frozen before SI.
4841 (Install_Body): Prevent double insertion of freeze node for
4842 instance.
4843
4844 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4845
4846 * sem_prag.adb (Resolve_State): Update the
4847 comment on documentation. Generate a reference to the state once
4848 resolution takes place.
4849
4850 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4851
4852 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4853 Linker_Section): If the aspect applies to an object declaration
4854 with explicit initialization, do not delay the freezing of the
4855 object, to prevent access-before-elaboration in the generated
4856 initialization code.
4857
4858 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4859
4860 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4861 (Integer_Value (Item)) when the size of the fixed decimal type
4862 is larger than Integer.
4863
4864 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4865
4866 PR ada/82127
4867 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4868 in order of increasing position in more cases.
4869
4870 2017-09-07 Yannick Moy <moy@adacore.com>
4871
4872 * a-exetim-mingw.ads: Add contract Global=>null
4873 on all operations that are modeled as having no read or write
4874 of global variables in SPARK.
4875
4876 2017-09-07 Raphael Amiard <amiard@adacore.com>
4877
4878 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4879 to Hmaps.Generic_Ops.
4880 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4881 cursors.
4882 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4883 cursors.
4884 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4885 position in cursors.
4886
4887 2017-09-07 Javier Miranda <miranda@adacore.com>
4888
4889 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4890 allow disabling the generation of implicit pragma Elaborate_All
4891 on task bodies.
4892
4893 2017-09-07 Javier Miranda <miranda@adacore.com>
4894
4895 * exp_disp.adb (Make_Tags): Avoid suffix counter
4896 in the external name of the elaboration flag. Required to fix
4897 the regressions introduced by the initial version of this patch.
4898
4899 2017-09-07 Bob Duff <duff@adacore.com>
4900
4901 * sem_ch6.adb (Analyze_Function_Return): Do not
4902 insert an explicit conversion to force the displacement of the
4903 "this" pointer to reference the secondary dispatch table in the
4904 case where the return statement is returning a raise expression,
4905 as in "return raise ...".
4906
4907 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4908
4909 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4910 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4911 procedure from sem_disp.adb.
4912 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4913 with Unit.
4914 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4915 return the instantiation node for subprograms. Update references
4916 to Get_Unit_Instantiation_Node.
4917 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4918 reference to Get_Unit_Instantiation_Node.
4919 * exp_dist.adb (Build_Package_Stubs): update reference to
4920 Get_Unit_Instantiation_Node.
4921 * sem_ch9.adb: minor typo in comment.
4922 * lib-xref-spark_specific.adb
4923 (Traverse_Declaration_Or_Statement): traverse into task type
4924 definition.
4925
4926 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4927
4928 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4929 to handle properly various cases of type conversions where the
4930 target type and/or the expression carry dimension information.
4931 (Dimension_System_Root); If a subtype carries dimension
4932 information, obtain the source parent type that carries the
4933 Dimension aspect.
4934
4935 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4936
4937 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4938
4939 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4940
4941 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4942 If the prefix is a reference to an object, rewrite it as an
4943 explicit dereference, as required by 3.7.2 (2) and as is done
4944 with most other attributes whose prefix is an access value.
4945
4946 2017-09-07 Bob Duff <duff@adacore.com>
4947
4948 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4949 Refined_Depends aspect.
4950 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4951 Refined_Depends pragma.
4952 * scans.ads: Fix documentation of Inside_Depends flag.
4953 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4954
4955 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4956
4957 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4958 Account for the case where the are no lists to insert, but the
4959 secondary stack still requires management.
4960 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4961 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4962 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4963 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4964 Minor reformatting.
4965
4966 2017-09-07 Vincent Celier <celier@adacore.com>
4967
4968 * clean.adb: Do not get the target parameters before calling
4969 gprclean.
4970
4971 2017-09-07 Nicolas Roche <roche@adacore.com>
4972
4973 * s-osinte-solaris-posix.ads: Removed.
4974
4975 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4976
4977 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4978 single concurrent objects.
4979
4980 2017-09-07 Javier Miranda <miranda@adacore.com>
4981
4982 * s-regexp.ads: Fix documentation of the globbing grammar.
4983
4984 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4985
4986 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4987
4988 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4989
4990 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4991 in CodePeer mode, to support more legacy code automatically.
4992
4993 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4994
4995 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4996 and thus not a controlling argument, preserve its type after
4997 rewriting because it may appear in an nested call with a classwide
4998 parameter.
4999
5000 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5001
5002 * comperr.adb (Delete_SCIL_Files): Handle case of
5003 N_Package_Instantiation.
5004
5005 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5006
5007 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
5008 clause for a unit U appears in a context that includes a regular
5009 with_clause on U, rewrite the redundant private clause into a null
5010 statement, rather than removing it altogether from the context,
5011 so that ASIS tools can reconstruct the original source.
5012
5013 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5014
5015 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
5016 for aspect Small can be of any real type (not only a universal
5017 real literal) as long as it is a static constant.
5018
5019 2017-09-07 Thomas Quinot <quinot@adacore.com>
5020
5021 * par_sco.adb: Minor reformatting.
5022
5023 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5024
5025 * s-parame-ae653.ads: Removed.
5026
5027 2017-09-07 Nicolas Roche <roche@adacore.com>
5028
5029 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
5030 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
5031 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
5032 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
5033 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
5034 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
5035
5036 2017-09-07 Yannick Moy <moy@adacore.com>
5037
5038 * a-ngelfu.ads Add preconditions to all functions
5039 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
5040
5041 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5042
5043 * lib-xref.adb (Generate_Reference): ignore
5044 references to entities which are Part_Of single concurrent
5045 objects.
5046
5047 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5048
5049 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
5050 comment.
5051
5052 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5053
5054 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
5055 Null_Task_Id is passed.
5056
5057 2017-09-07 Javier Miranda <miranda@adacore.com>
5058
5059 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
5060 attribute. Defined for record types and subtypes.
5061 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
5062 (Init_Tags_List) to facilitate generating separate code in the
5063 IP routine to initialize the object components and for completing
5064 the elaboration of dispatch tables.
5065 * exp_ch3.adb (Build_Init_Procedure): Improve the code
5066 generated in the IP routines by means of keeping separate
5067 the initialization of the object components from the
5068 initialization of its dispatch tables. (Init_Secondary_Tags):
5069 Adding new formal (Init_Tags_List) and adjusting calls to
5070 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
5071 adjusting also calls to Ada.Tags.Register_Interface_Offset
5072 because the type of one of its formals has been changed.
5073 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
5074 modified. Instead of receiving a pointer to an object this
5075 routine receives now a primary tag.
5076 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
5077 additional formal: the tag of the primary dispatch table.
5078 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
5079 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
5080 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
5081 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
5082 formal in calls to Init_Secondary_Tags.
5083
5084 2017-09-07 Javier Miranda <miranda@adacore.com>
5085
5086 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
5087 subprogram.
5088 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
5089 applied to generic subprograms.
5090
5091 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5092
5093 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
5094 (because it refers to the anonymous concurrent object, not its type);
5095 fix condition for emitting error message about task/protected type,
5096
5097 2017-09-07 Bob Duff <duff@adacore.com>
5098
5099 * binde.adb (Debug_Flag_Old): If both -do and -dp
5100 are specified, behave as if just -do was specified, rather than
5101 using a mixture.
5102
5103 2017-09-07 Nicolas Roche <roche@adacore.com>
5104
5105 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
5106 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
5107
5108 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5109
5110 * sem_prag.adb (Find_Role): The Global_Seen flag
5111 is now consulted not only for abstract states and variables,
5112 but for all kinds of items.
5113 (Collect_Subprogram_Inputs_Outputs): Do not process formal
5114 generic parameters, because unlike ordinary formal parameters,
5115 generic formals only act as input/ outputs if they are explicitly
5116 mentioned in a Global contract.
5117
5118 2017-09-07 Yannick Moy <moy@adacore.com>
5119
5120 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
5121 predicate procedure. Check predicate pragma/aspect with Ghost entity.
5122 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
5123 reformatting.
5124
5125 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5126
5127 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
5128 (code cleanup);
5129 * sem_ch3.adb (Build_Derived_Record_Type):i Call
5130 Copy_Dimensions_Of_Components after creating the copy of the
5131 record declaration.
5132 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
5133 derived recor type, copy the dikensions if any of each component
5134 of the parent record to the corresponding component declarations
5135 of the derived record. These expressions are used among other
5136 things as default values in aggregates with box associations.
5137 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
5138 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
5139 Minor reformatting.
5140
5141 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5142
5143 * sem_util.adb: Remove extra space after THEN.
5144
5145 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5146
5147 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
5148 also mark the renamed subprogram as referenced.
5149
5150 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5151
5152 * par-ch6.adb (P_Subprogram): Improve error message on null
5153 procedure with misplaced aspect specification, which the parser
5154 first attempts to interpret as a malformed expression function.
5155
5156 2017-09-07 Gary Dismukes <dismukes@adacore.com>
5157
5158 * sem_attr.adb (Analyze_Attribute_Old_Result):
5159 Allow attributes Result and Old in the case of an expression
5160 function.
5161
5162 2017-09-07 Justin Squirek <squirek@adacore.com>
5163
5164 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
5165 Volatile to subcomponents.
5166
5167 2017-09-07 Bob Duff <duff@adacore.com>
5168
5169 * exp_ch7.adb (Find_Last_Init): Check for the
5170 case where a build-in-place function call has been replaced by a
5171 'Reference attribute reference.
5172
5173 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5174
5175 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
5176 nodes.
5177
5178 2017-09-07 Bob Duff <duff@adacore.com>
5179
5180 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
5181 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
5182 secondary stack for all functions that return limited tagged
5183 types -- just do it for dispatching calls. Misc cleanup.
5184 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
5185 remove qualifications and type conversions. Fix various bugs
5186 where only a single level of qualification or conversion was
5187 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
5188 instead of "X".
5189 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
5190 cleanup.
5191
5192 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5193
5194 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
5195 do not create actual subtypes that may generate further predicate
5196 functions.
5197 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
5198 of body is a predicate function as well.
5199 (Resolve_Aspect_Expressions, Resolve_Name): For a component
5200 association, only the expression needs resolution, not the name.
5201 (Resolve_Aspect_Expressions, case Predicates): Construct and
5202 analyze the predicate function declaration in the scope of the
5203 type, before making the type and its discriminants visible.
5204
5205 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5206
5207 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
5208 only if the record type itself comes from source.
5209
5210 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5211
5212 * sem_ch5.adb: Minor reformatting and a typo fix
5213
5214 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5215
5216 * sinput-l.ads: minor remove extra period at the end of comment
5217
5218 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5219
5220 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
5221 E_Discriminant.
5222 (Find_Role): remove support for E_Discriminant.
5223
5224 2017-09-06 Javier Miranda <miranda@adacore.com>
5225
5226 * exp_ch6.adb (Expand_Simple_Function_Return):
5227 Add missing implicit type conversion to force displacement of the
5228 "this" pointer.
5229
5230 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5231
5232 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
5233
5234 2017-09-06 Yannick Moy <moy@adacore.com>
5235
5236 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
5237 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
5238
5239 2017-09-06 Bob Duff <duff@adacore.com>
5240
5241 * sem_ch8.adb: Change Assert to be consistent with
5242 other similar ones.
5243
5244 2017-09-06 Bob Duff <duff@adacore.com>
5245
5246 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
5247 requested. Previously, the -do switch meant "run Elab_New and
5248 Elab_Old and use the order chosen by Elab_Old, possibly with
5249 debugging printouts comparing the two orders." Now it means
5250 "do not run Elab_New." This is of use if there are bugs that
5251 cause Elab_New to crash.
5252 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
5253 type conversions.
5254 * ali.ads (Elab_Position): Change type to Nat, to avoid various
5255 type conversions.
5256
5257 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5258
5259 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
5260 reference to SPARK RM.
5261
5262 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5263
5264 * layout.adb: Use SSU short hand consistently throughout the file.
5265
5266 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5267
5268 * freeze.adb (Freeze_Record_Type)
5269 <Sized_Component_Total_Round_RM_Size>: New local variable to
5270 accumulate the rounded RM_Size of components. Update it for
5271 every component whose RM_Size is statically known. Add missing
5272 guard to check that bit packing is really required before issuing
5273 the error about packing. Swap condition for clarity's sake.
5274 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
5275
5276 2017-09-06 Fedor Rybin <frybin@adacore.com>
5277
5278 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
5279 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
5280 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5281 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
5282 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
5283 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
5284 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
5285 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
5286 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
5287 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
5288 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
5289 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
5290 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
5291 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
5292 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
5293 project manager sources.
5294
5295 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5296
5297 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
5298 entity of a mutable type and the right-hand side is a conditional
5299 expression, resolve the alternatives of the conditional using
5300 the base type of the target entity, because the alternatives
5301 may have distinct subtypes. This is particularly relevant if
5302 the alternatives are aggregates.
5303
5304 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5305
5306 * checks.adb (Apply_Predicate_Check): If the expression is an
5307 aggregate that is the RHS of an assignment, apply the check to
5308 the LHS after the assignment, rather than to the aggregate. This
5309 is more efficient than creating a temporary for the aggregate,
5310 and prevents back-end crashes when the aggregate includes a
5311 dynamic "others' association.
5312
5313 2017-09-06 Yannick Moy <moy@adacore.com>
5314
5315 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5316 Set variable to ignore SPARK_Mode in instance before the analysis
5317 of the generated package declaration.
5318
5319 2017-09-06 Yannick Moy <moy@adacore.com>
5320
5321 * sem_res.adb (Resolve_Call): Do not issue a
5322 message for calls inside expression function, unless body was
5323 seen and is candidate for inlining.
5324
5325 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5326
5327 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5328 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5329 body. do not freeze the formals of the generic unit.
5330
5331 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5332
5333 * errout.adb (Error_Msg): Separate the
5334 treatment for warning vs. style messages in inlinings and
5335 instantiations. Prevents blowups on calls to Warn_Insertion for
5336 style messages, which should not be called in that case because
5337 Warning_Msg_Char is not set.
5338
5339 2017-09-06 Justin Squirek <squirek@adacore.com>
5340
5341 * sem_prag.adb (Check_VFA_Conflicts): Created
5342 to group all Volatile_Full_Access checks relating to other
5343 representation pragmas (Mark_Component_Or_Object): Created
5344 to centeralize the flagging of attributes for the record type
5345 component case, a pragma applied individually to a component, and
5346 the object case.
5347 (Process_Atomic_Independent_Shared_Volatile):
5348 Add propagation of certain pragmas to record components and move
5349 evaluation of VFA checks
5350
5351 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5352
5353 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5354 Do not warn on conditions that are not obeyed for Inline_Always
5355 subprograms, when assertions are not enabled.
5356
5357 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5358
5359 * sem_util.adb (Unique_Entity): For abstract states return their
5360 non-limited view.
5361
5362 2017-09-06 Bob Duff <duff@adacore.com>
5363
5364 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5365 that is a proper body corresponding to a stub, we defer the
5366 adjustment of the sloc until after the correct adjustment has
5367 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5368 the adjustment, because it will be outside the range in (the old,
5369 incorrect) S_Adjustment.
5370 * inline.adb: Use named notation for readability and uniformity.
5371 * sinput-l.adb: Minor improvements to debugging output printed
5372 for Debug_Flag_L.
5373 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5374 correction.
5375
5376 2017-09-06 Vincent Celier <celier@adacore.com>
5377
5378 * make.adb: Do not invoke gprbuild for -bargs -P.
5379
5380 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5381
5382 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5383 case when Op is of kind N_Qualified_Expression. In this case,
5384 the function is called recursively on the subexpression like in
5385 other cases.
5386 * make.adb: Minor reformatting
5387
5388 2017-09-06 Justin Squirek <squirek@adacore.com>
5389
5390 * einfo.adb (Set_Linker_Section_Pragma): Modify
5391 Set_Linker_Section_Pragma to be consistant with the "getter"
5392 Linker_Section_Pragma.
5393 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5394 checking for container loops so that the index cursor is not
5395 directly changable by the user with the use of E_Loop_Parameter.
5396 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5397 * sem_warn.adb (Check_References): Revert previous change.
5398
5399 2017-09-06 Bob Duff <duff@adacore.com>
5400
5401 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5402 calls and the like.
5403
5404 2017-09-06 Yannick Moy <moy@adacore.com>
5405
5406 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5407 declarations to only consider valid uses of Global/Depends those on
5408 single concurrent objects.
5409
5410 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5411
5412 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5413 error as soon as one of the specified components overlaps the
5414 parent field.
5415
5416 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5417
5418 * sem_prag.ads: minor fix typo in comment.
5419
5420 2017-09-06 Justin Squirek <squirek@adacore.com>
5421
5422 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5423 from source before checking source references.
5424 * sem_warn.adb (Check_References): Add check for internal block
5425 before recursing.
5426
5427 2017-09-06 Vincent Celier <celier@adacore.com>
5428
5429 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5430 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5431 gnatname.adb: Remove the Project Manager from the GNAT tools.
5432 * gcc-interface/Makefile.in: ditto.
5433
5434 2017-09-06 Bob Duff <duff@adacore.com>
5435
5436 * sem_util.ads: Minor comment fix.
5437
5438 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5439
5440 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5441 Generate a freeze node for the actual of a formal package, if
5442 the actual is declared in the same unit and has a corresponding
5443 body, to prevent the current instance from being frozen before
5444 the actual is.
5445
5446 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5447
5448 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5449
5450 2017-09-06 Yannick Moy <moy@adacore.com>
5451
5452 * sem_warn.adb: Minor refactoring.
5453
5454 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5455
5456 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5457 to retrieve the inherited classwide precondition/postcondition
5458 of a subprogram.
5459 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5460 freezing a subprogram, to complete the generation of the
5461 corresponding checking code.
5462
5463 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5464
5465 * exp_util.adb (Is_Controlled_Indexing): New routine.
5466 (Is_Displace_Call): Use routine Strip to remove indirections.
5467 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5468 missing case of controlled generalized indexing.
5469 (Is_Source_Object): Use routine Strip to remove indirections.
5470 (Strip): New routine.
5471
5472 2017-09-06 Bob Duff <duff@adacore.com>
5473
5474 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5475 we include the proper header. Otherwise, we just declare the necessary
5476 things from the capabilities library. This is so we can build on
5477 machines without that library, while still enabling that library.
5478 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5479 simply return 0 if the library is not present, or not included
5480 in the link.
5481
5482 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5483
5484 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5485 for renamings that involve function calls in prefix form.
5486
5487 2017-09-06 Bob Duff <duff@adacore.com>
5488
5489 * sem_ch3.adb (Analyze_Subtype_Declaration):
5490 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5491
5492 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5493
5494 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5495 has no parameter specification and no entry index, use the entry name
5496 as the end of the generated SCO statement.
5497
5498 2017-09-06 Steve Baird <baird@adacore.com>
5499
5500 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5501 uses of 'Image and related attributes as having side effects in
5502 order to avoid replicating such uses.
5503 * pprint.ads (Expression_Image) Add new generic formal flag
5504 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5505 (eventually) override the default.
5506 * pprint.adb (Expression_Image) If the new flag is set, then
5507 suppress the ".all" suffix when displaying a dereference whose
5508 prefix is a use of a value-capturing compiler temp of the sort
5509 generated by Expr_Util.Remove_Side_Effects .
5510 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5511 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5512 Minor reformatting.
5513 * inline.adb: Minor wording change.
5514
5515 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5516
5517 * sem_ch7.adb: Update comment.
5518
5519 2017-09-06 Yannick Moy <moy@adacore.com>
5520
5521 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5522 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5523 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5524 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5525 so that applies to any entity.
5526
5527 2017-09-06 Yannick Moy <moy@adacore.com>
5528
5529 * sem_ch3.adb (Derived_Type_Declaration): Use
5530 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5531
5532 2017-09-06 Javier Miranda <miranda@adacore.com>
5533
5534 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5535 following ISO-8861.
5536
5537 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5538
5539 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5540 conversion takes its dimensions from the expression, not from
5541 the context type.
5542 (Dimensions_Of_Operand): Ditto.
5543
5544 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5545
5546 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5547 null procedures when GNAT coverage is used, so that their (empty)
5548 bodies are properly covered.
5549
5550 2017-09-06 Bob Duff <duff@adacore.com>
5551
5552 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5553 the entity is a type with discriminants, make the discriminants
5554 directly visible in aspect clauses.
5555
5556 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5557
5558 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5559 Universal_Real and the context is a floating-point type, resolve
5560 both operands to the target type.
5561
5562 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5563
5564 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5565 sem_ch3.adb, sem_util.adb: Minor reformatting.
5566
5567 2017-09-06 Yannick Moy <moy@adacore.com>
5568
5569 * freeze.adb (Check_Inherited_Conditions): Rewriting
5570 of inherited preconditions and postconditions should only occur
5571 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5572 be confused with SPARK_Mode being On.
5573
5574 2017-09-06 Yannick Moy <moy@adacore.com>
5575
5576 * sem_warn.adb (Check_References): Take into
5577 account possibility of attribute reference as original node.
5578
5579 2017-09-06 Yannick Moy <moy@adacore.com>
5580
5581 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5582 use of attribute.
5583
5584 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5585
5586 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5587 on the procedure created to encapsulate the body.
5588 * sem_ch7.adb: Add with clause for GNAT.HTable.
5589 (Entity_Table_Size): New constant.
5590 (Entity_Hash): New function.
5591 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5592 (Is_Subprogram_Ref): Rename into...
5593 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5594 the table instead of bailing out on them. Scan the value of constants
5595 if it is not known at compile time.
5596 (Contains_Subprograms_Refs): Rename into...
5597 (Scan_Subprogram_Refs): ...this.
5598 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5599 Is_Public flag on subprograms if they are not actually referenced.
5600 (Hide_Public_Entities): Beef up comment on the algorithm.
5601 Reset the table of subprograms on entry.
5602
5603 2017-09-06 Yannick Moy <moy@adacore.com>
5604
5605 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5606
5607 2017-09-06 Javier Miranda <miranda@adacore.com>
5608
5609 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5610 cannot handle a type conversion of an array as an aggregate
5611 component.
5612
5613 2017-09-06 Bob Duff <duff@adacore.com>
5614
5615 * g-comlin.adb (Try_Help): Remove ".exe" so we
5616 get the same results on windows and unix.
5617
5618 2017-09-06 Justin Squirek <squirek@adacore.com>
5619
5620 * exp_imgv.adb (Expand_Image_Attribute),
5621 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5622 Added case to handle new-style 'Image expansion
5623 (Rewrite_Object_Image): Moved from exp_attr.adb
5624 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5625 attribute cases so that the relevant subprograms in exp_imgv.adb
5626 handle all expansion.
5627 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5628 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5629 cases to call common function Analyze_Image_Attribute.
5630 (Analyze_Image_Attribute): Created as a common path for all
5631 image attributes (Check_Object_Reference_Image): Removed
5632 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5633 Removed and refactored into Is_Object_Image (Is_Object_Image):
5634 Created as a replacement for Is_Image_Applied_To_Object
5635
5636 2017-09-06 Yannick Moy <moy@adacore.com>
5637
5638 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5639 message for missing input.
5640
5641 2017-09-06 Yannick Moy <moy@adacore.com>
5642
5643 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5644 of protected subprograms and entries.
5645 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5646 New function to detect when a subprogram of entry is defined
5647 inside a protected object.
5648
5649 2017-09-06 Bob Duff <duff@adacore.com>
5650
5651 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5652 whether the current process has the CAP_SYS_NICE capability.
5653 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5654 ceiling priorities if the current process has the CAP_SYS_NICE
5655 capability.
5656
5657 2017-09-06 Bob Duff <duff@adacore.com>
5658
5659 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5660 check back to the body, because SPARK is not yet ready for
5661 "or else raise Constraint_Error".
5662
5663 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5664
5665 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5666 procedure by a single null statement, after evaluating the
5667 actuals that require it.
5668
5669 2017-09-06 Javier Miranda <miranda@adacore.com>
5670
5671 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5672 Generating C code improve the code that checks the use of nested
5673 aggregates to initialize object declarations.
5674
5675 2017-09-06 Yannick Moy <moy@adacore.com>
5676
5677 * sem_ch3.adb (Derived_Type_Declaration): Detect
5678 violations of new rule SPARK RM 3.4(1). Also refactor existing
5679 check to use the new function Find_Partial_View.
5680
5681 2017-09-06 Vincent Celier <celier@adacore.com>
5682
5683 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5684 from the Prj hierarchy has been removed from the GNAT driver.
5685
5686 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5687
5688 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5689 expression function, or within a spec expression (default value,
5690 etc) a reference to an incomplete type is legal: legality of
5691 the operation will be checked when some related entity (type,
5692 object or subprogram) is frozen.
5693
5694 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5695
5696 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5697 adjustments and a typo fix.
5698
5699 2017-09-06 Yannick Moy <moy@adacore.com>
5700
5701 * sem_res.adb (Resolve_Call): Do not issue info
5702 message about inlining of calls to functions in assertions,
5703 for functions whose body has not been seen yet.
5704
5705 2017-09-06 Bob Duff <duff@adacore.com>
5706
5707 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5708 we can use modern Ada in this package.
5709 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5710 Move Ada.Command_Line.Response_File to System.Response_File,
5711 and make Ada.Command_Line.Response_File into a rename of
5712 System.Response_File. This is to avoid having gnatbind depend
5713 Ada.Command_Line, which would damage the bootstrap process now
5714 that Ada.Command_Line contains modern Ada (the raise expression).
5715 * gnatbind.adb: Avoid dependence on
5716 Ada.Command_Line. Depend on System.Response_File instead
5717 of Ada.Command_Line.Response_File. Change one call to
5718 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5719 to Ada.Command_Line.Argument_Count to use Arg_Count.
5720 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5721
5722 2017-09-06 Bob Duff <duff@adacore.com>
5723
5724 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5725 switch, because we've already read gnat.adc by default.
5726
5727 2017-09-06 Bob Duff <duff@adacore.com>
5728
5729 * exp_ch5.adb (Get_Default_Iterator): Replace
5730 "Assert(False)" with "return Iter", because if an iterable
5731 type is derived from a noniterable one, then we won't find an
5732 overriding or inherited default iterator.
5733
5734 2017-09-06 Yannick Moy <moy@adacore.com>
5735
5736 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5737 literal index used to access a string is null or negative.
5738
5739 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5740
5741 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5742 allowed on loop parameters.
5743 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5744 on loop parameters.
5745 (Write_Field15_Name): Update the output for
5746 Status_Flag_Or_Transient_Decl.
5747 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5748 to loop parameters. Update the documentation of the attribute
5749 and the E_Loop_Parameter entity.
5750 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5751 which assumes that cursors can never be controlled.
5752 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5753 guard which assumes that cursors can never be controlled.
5754
5755 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5756
5757 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5758 sem_warn.adb: Minor reformatting.
5759
5760 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5761
5762 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5763 fix and preserve older GNAT warning on overlapping actuals that
5764 are not elementary types.
5765
5766 2017-09-06 Justin Squirek <squirek@adacore.com>
5767
5768 * sem_attr.adb: Comment correction.
5769
5770 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5771
5772 * sem_util.adb: Minor reformatting.
5773
5774 2017-09-06 Yannick Moy <moy@adacore.com>
5775
5776 * a-comlin.ads (Argument): Add precondition for analysis.
5777
5778 2017-09-06 Yannick Moy <moy@adacore.com>
5779
5780 * sem_res.adb (Resolve): Update message for function call as statement.
5781
5782 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5783
5784 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5785 generated bodies for renamings that are completions, when renamed
5786 procedure is No_Return.
5787 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5788 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5789 with No_Return, the renamed entity must be No_Return as well.
5790
5791 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5792
5793 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5794 Minor reformatting.
5795
5796 2017-09-06 Justin Squirek <squirek@adacore.com>
5797
5798 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5799 attribute cases (Rewrite_Object_Reference_Image): Created to
5800 aid the rewriting of new-style 'Image attributes.
5801 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5802 (Check_Object_Reference_Image): Created to handle verification of
5803 'Image with object-references as prefixes.
5804 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5805 Create predicate to identify cases where an 'Image attribute's
5806 prefix applies to an object reference.
5807
5808 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5809
5810 * freeze.adb (Freeze_Entity): Do not generate a freeze
5811 node for a generic unit, even if it includes delayed aspect
5812 specifications. Freeze nodes for generic entities must never
5813 appear in the tree that reaches the back-end of the compiler.
5814
5815 2017-09-06 Yannick Moy <moy@adacore.com>
5816
5817 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5818
5819 2017-09-06 Yannick Moy <moy@adacore.com>
5820
5821 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5822 to subprograms in other units as possibly inlined.
5823
5824 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5825
5826 * freeze.adb (Freeze_Entity): For a derived type that has no
5827 explicit delayed aspects but may inherit delayed aspects from its
5828 parent type, analyze aspect at freeze point for proper capture
5829 of an inherited aspect.
5830
5831 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5832
5833 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5834 renamings; also, avoid repeated calls to Renamed_Object when getting
5835 through object renamings.
5836
5837 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5838
5839 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5840 array type declaration in a private part, when an index is a
5841 subtype indication of a discrete type with a private partial view.
5842
5843 2017-09-06 Javier Miranda <miranda@adacore.com>
5844
5845 * exp_ch4.adb (Expand_Modular_Op): Force generating
5846 temporary to improve the generated code.
5847
5848 2017-09-06 Tristan Gingold <gingold@adacore.com>
5849
5850 * s-fatgen.adb: Minor typo fix in comment.
5851
5852 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5853
5854 * exp_ch5.adb (Make_Field_Assign): If the type
5855 of the right-hand side has stored constraint, use its values
5856 (except for those that are renamings of parent discriminants)
5857 to produce additional assignments for the discriminants of the
5858 left-hand side, which are invisible in the righ-hand side and
5859 not retrievable as selected components.
5860
5861 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5862
5863 * sem_util.adb (Needs_One_Formal): The first formal of such a
5864 function must be a controlling formal, so that Obj.F (X, Y)
5865 can have the interpretation F(Obj)(X, Y).
5866 * sem_util.ads: Clarify documentation.
5867
5868 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5869
5870 * table.ads, table.adb: Restore original implementation.
5871 * namet.h (Names_Ptr): Adjust back.
5872 (Name_Chars_Ptr): Likewise.
5873 * uintp.h (Uints_Ptr): Likewise.
5874 (Udigits_Ptr): Likewise.
5875 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5876 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5877 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5878 * spark_xrefs.ads: Likewise.
5879 * scos.h: Undo latest changes.
5880
5881 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5882
5883 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5884 No_Return flag to instance if pragma applies to generic unit. This
5885 must be done explicitly because the pragma does not appear
5886 directly in the generic declaration (unlike the corresponding
5887 aspect specification).
5888
5889 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5890
5891 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5892 explaining the test used to detect inlining. Use same test
5893 in second occurrence.
5894 (Analyze_Package_Body_Helper): Minor formatting fixes.
5895
5896 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5897
5898 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5899 derived type with a mixture of renamed and constrained parent
5900 discriminants, the constraint for the target must obtain the
5901 discriminant values from both the operand and from the stored
5902 constraint for it, given that the constrained discriminants are
5903 not visible in the object.
5904 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5905 side may be derived from that of the left-hand side (as in the
5906 case of an assignment with a change of representation) so the
5907 discriminant to be used in the retrieval of the value of the
5908 component must be the entity in the type of the right-hand side.
5909
5910 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5911
5912 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5913 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5914 * exp_util.adb (Is_Source_Object): Account for
5915 the cases where the source object may appear as a dereference
5916 or within a type conversion.
5917 * exp_ch6.adb: Fix missing space in error message.
5918
5919 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5920
5921 * sem_prag.adb: Update description of Eliminate.
5922
5923 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5924
5925 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5926 properly an attribute reference 'Loop_Entry that appears in the
5927 list of indices of an indexed expression, to prevent an infinite
5928 loop in the compiler.
5929
5930 2017-09-06 Bob Duff <duff@adacore.com>
5931
5932 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5933
5934 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5935
5936 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5937 in a set membership is an overloaded enumeration literal, and
5938 the type of the alternative is resolved from a previous one,
5939 replace the entity of the alternative as well as the type,
5940 to prevent inconsistencies between the entity and the type.
5941
5942 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5943
5944 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5945 (No_Component_Reordering_Specified): New switch.
5946 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5947 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5948 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5949 New check.
5950 (Check_Configuration_Consistency): Invoke it.
5951 * debug.adb (d.r): Toggle the effect of the switch.
5952 (d.v): Change to no-op.
5953 * einfo.ads (Has_Complex_Representation):
5954 Restrict to record types.
5955 (No_Reordering): New alias for Flag239.
5956 (OK_To_Reorder_Components): Delete.
5957 (No_Reordering): Declare.
5958 (Set_No_Reordering): Likewise.
5959 (OK_To_Reorder_Components): Delete.
5960 (Set_OK_To_Reorder_Components): Likewise.
5961 * einfo.adb (Has_Complex_Representation): Expect record types.
5962 (No_Reordering): New function.
5963 (OK_To_Reorder_Components): Delete.
5964 (Set_Has_Complex_Representation): Expect base record types.
5965 (Set_No_Reordering): New procedure.
5966 (Set_OK_To_Reorder_Components): Delete.
5967 (Write_Entity_Flags): Adjust to above change.
5968 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5969 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5970 OK_To_Reorder_Components on record types with convention Ada.
5971 * lib-writ.adb (Write_ALI): Deal with NC marker.
5972 * opt.ads (No_Component_Reordering): New flag.
5973 (No_Component_Reordering_Config): Likewise.
5974 (Config_Switches_Type): Add No_Component_Reordering component.
5975 * opt.adb (Register_Opt_Config_Switches): Copy
5976 No_Component_Reordering onto No_Component_Reordering_Config.
5977 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5978 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5979 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5980 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5981 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5982 No_Reordering flag from the default.
5983 (Build_Derived_Private_Type): Likewise.
5984 (Build_Derived_Record_Type): Likewise. Then inherit it
5985 for untagged types and clean up handling of similar flags.
5986 (Record_Type_Declaration): Likewise.
5987 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5988 remove redundant test on Is_Tagged_Type.
5989 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5990 (Sig_Flags): Likewise.
5991 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5992 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5993 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5994 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5995 Copy the layout of the parent type only if the No_Reordering
5996 settings match.
5997 (components_to_record): Reorder record types with
5998 convention Ada by default unless No_Reordering is set or -gnatd.r
5999 is specified and do not warn if No_Reordering is set in GNAT mode.
6000
6001 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6002
6003 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
6004 new predicate to reject declarations that can be completions,
6005 when there is a visible prior homograph that is a null procedure.
6006 * sem_ch6.adb (Analyze_Null_Procedure): use it.
6007 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
6008
6009 2017-09-06 Thomas Quinot <quinot@adacore.com>
6010
6011 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
6012 run of 253 characters or more.
6013
6014 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6015
6016 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
6017 properly incomplete subtypes that may be created by explicit or
6018 implicit declarations.
6019 (Is_Base_Type): Take E_Incomplete_Subtype into account.
6020 (Subtype_Kind): Ditto.
6021 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
6022 Ekind of a subtype of a discriminated incomplete type.
6023 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
6024 incomplete types, to preserve error reporting.
6025 (Process_Incomplete_Dependents): Do not create a subtype
6026 declaration for an incomplete subtype that is created internally.
6027 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
6028 incomplete subtypes that do not require a completion, either
6029 because they are limited views, of they are generic actuals.
6030
6031 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
6032
6033 * checks.adb (Insert_Valid_Check): Remove the
6034 suspicious manipulation of the Do_Range_Check flag as ths is
6035 no linger needed. Suppress validity check when analysing the
6036 validation variable.
6037
6038 2017-09-06 Philippe Gil <gil@adacore.com>
6039
6040 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
6041 GNATCOLL.Memory
6042
6043 2017-09-06 Bob Duff <duff@adacore.com>
6044
6045 * sem_elim.adb: Minor comment fix.
6046
6047 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6048
6049 * sem_util.adb (Is_Object_Reference): A function call is an
6050 object reference, and thus attribute references for attributes
6051 that are functions (such as Pred and Succ) as well as predefined
6052 operators are legal in contexts that require an object, such as
6053 the prefix of attribute Img and the Ada2020 version of 'Image.
6054
6055 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
6056
6057 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
6058 exp_ch3.adb, xoscons.adb: Minor reformatting.
6059
6060 2017-09-06 Raphael Amiard <amiard@adacore.com>
6061
6062 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
6063 Position parameter. If supplied, use it to provide efficient iteration.
6064 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
6065 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
6066 iteration.
6067
6068 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6069
6070 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
6071 designated type is class-wide and the expression is an unchecked
6072 conversion, preserve the conversion when checking the tag of the
6073 designated object, to prevent spurious semantic errors when the
6074 expression in the conversion has an untagged type (for example
6075 an address attribute).
6076
6077 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6078
6079 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
6080 operation is subject to a pragma Eliminate.
6081
6082 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6083
6084 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
6085
6086 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
6087
6088 * fe.h (Eliminate_Error_Msg): Remove.
6089
6090 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6091
6092 * gcc-interface/utils.c (make_packable_type): Update call to
6093 mode_for_size_tree.
6094
6095 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6096
6097 * gcc-interface/utils2.c (build_load_modify_store):
6098 Use int_mode_for_size.
6099
6100 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6101
6102 PR ada/62235
6103 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6104 for Itypes that are E_Record_Subtype with a cloned subtype.
6105 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
6106
6107 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6108
6109 * gcc-interface/trans.c (convert_with_check): Use a custom base type
6110 if the base type of the expression has a different machine mode.
6111 Rename a couple of parameters and local variable.
6112
6113 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6114
6115 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
6116 conversions around prefixes that are not references.
6117
6118 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6119
6120 * gcc-interface/utils.c (unchecked_convert): When the result type is a
6121 non-biased integral type with size 0, set the result to 0 directly.
6122
6123 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6124
6125 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
6126 (renaming_from_instantiation_p): ...this.
6127 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
6128 instead of explicit tests on kind of entities. Adjust for renaming.
6129 (gnat_to_gnu_profile_type): Likewise.
6130 (gnat_to_gnu_subprog_type): Likewise.
6131 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
6132 (Case_Statement_to_gnu): Likewise.
6133 (gnat_to_gnu): Likewise.
6134 (process_freeze_entity): Likewise.
6135 (process_type): Likewise.
6136 (add_stmt_with_node): Adjust for renaming.
6137 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
6138 (renaming_from_generic_instantiation_p): Rename to...
6139 (renaming_from_instantiation_p): ...this. Use inline predicate.
6140 (pad_type_hasher::keep_cache_entry): Fold.
6141
6142 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6143
6144 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
6145 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
6146 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
6147 (N_Slice): Likewise.
6148 (N_Selected_Component): Likewise. Do not try again to translate it.
6149 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
6150
6151 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6152
6153 * repinfo.ads: Document new treatment of dynamic values.
6154 (TCode): Bump upper bound to 29.
6155 (Dynamic_Val): New constant set to 29.
6156 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
6157 (Rep_Value) <Dynamic_Val>: Likewise.
6158 * repinfo.h (Dynamic_Val): New macro.
6159 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
6160 DECL_P nodes too.
6161 <INTEGER_CST>: Set TCODE instead of recursing.
6162 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
6163 <VAR_DECL>: New case.
6164 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
6165 <BIT_AND_EXPR>: Adjust.
6166 <CALL_EXPR>: Do not fall through.
6167
6168 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6169
6170 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
6171 there is no target, do not create a temporary for the return value for
6172 an allocator either.
6173
6174 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6175
6176 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
6177 unconstrained array type.
6178
6179 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6180 Alan Hayward <alan.hayward@arm.com>
6181 David Sherwood <david.sherwood@arm.com>
6182
6183 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
6184 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
6185
6186 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6187 Alan Hayward <alan.hayward@arm.com>
6188 David Sherwood <david.sherwood@arm.com>
6189
6190 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
6191 is_a <scalar_int_mode>.
6192 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
6193 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
6194
6195 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6196 Alan Hayward <alan.hayward@arm.com>
6197 David Sherwood <david.sherwood@arm.com>
6198
6199 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
6200 instead of mode_for_size.
6201 (gnat_to_gnu_subprog_type): Likewise.
6202 * gcc-interface/utils.c (make_type_from_size): Likewise.
6203
6204 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6205 Alan Hayward <alan.hayward@arm.com>
6206 David Sherwood <david.sherwood@arm.com>
6207
6208 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
6209 (fp_size_to_prec): Likewise.
6210
6211 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6212 Alan Hayward <alan.hayward@arm.com>
6213 David Sherwood <david.sherwood@arm.com>
6214
6215 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
6216 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
6217
6218 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6219 Alan Hayward <alan.hayward@arm.com>
6220 David Sherwood <david.sherwood@arm.com>
6221
6222 * gcc-interface/decl.c (validate_size): Update use of
6223 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
6224
6225 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6226 Alan Hayward <alan.hayward@arm.com>
6227 David Sherwood <david.sherwood@arm.com>
6228
6229 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
6230 (fp_size_to_prec): Likewise.
6231
6232 2017-08-29 Martin Liska <mliska@suse.cz>
6233
6234 PR other/39851
6235 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
6236
6237 2017-08-08 Martin Liska <mliska@suse.cz>
6238
6239 * gcc-interface/trans.c: Include header files.
6240
6241 2017-07-29 Jakub Jelinek <jakub@redhat.com>
6242
6243 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
6244 as new argument to the imported_module_or_decl debug hook.
6245
6246 2017-07-25 Javier Miranda <miranda@adacore.com>
6247
6248 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
6249 evaluated twice.
6250
6251 2017-07-19 Jakub Jelinek <jakub@redhat.com>
6252
6253 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
6254 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
6255 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
6256
6257 2017-07-18 Mike Frysinger <vapier@chromium.org>
6258
6259 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
6260 (../../gnatlink$(exeext)): Likewise.
6261
6262 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
6263
6264 PR ada/81446
6265 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
6266 (Backend_Overflow_Checks): Set to True.
6267
6268 2017-06-23 Jakub Jelinek <jakub@redhat.com>
6269
6270 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
6271
6272 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
6273
6274 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
6275 notice. New macro.
6276 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
6277 as a definition.
6278 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
6279 definition.
6280 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
6281 imported subprograms for the current compilation unit as
6282 definitions. Disable debug info for references to variables.
6283 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
6284 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
6285 not built-in functions to their binding scope.
6286 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
6287 the function as a definition. Update all callers.
6288 (gnat_write_global_declarations): Emit debug info for imported
6289 functions. Filter out external variables for which debug info
6290 is disabled.
6291
6292 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
6293
6294 PR ada/81105
6295 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
6296 (i[3456]86-pc-gnu): Likewise.
6297 (x86_64 kfreebsd): Likewise.
6298
6299 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6300
6301 PR bootstrap/80897
6302 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6303
6304 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6305
6306 PR ada/81070
6307 * s-interr-hwint.adb: Reinstate.
6308 * gcc-interface/Makefile.in (RTEMS): Use it again.
6309
6310 2017-06-08 Olivier Hainque <hainque@adacore.com>
6311
6312 * vx_crtbegin_auto.c: Update year in copyright notice.
6313 * vx_crtbegin.c: Likewise.
6314 * vx_crtbegin.inc: Likewise.
6315 * vx_crtend.c: Likewise.
6316
6317 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6318
6319 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6320 * s-tpopsp-rtems.adb: Delete.
6321
6322 2017-06-02 Olivier Hainque <hainque@adacore.com>
6323
6324 * vx_crtbegin_auto.c: New file.
6325 * vx_crtbegin.c: New file.
6326 * vx_crtbegin.inc: New file.
6327 * vx_crtend.c: New file.
6328
6329 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6330
6331 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6332 const qualifiers that cause -Wignored-qualifiers warnings.
6333
6334 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6335
6336 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6337 for Itypes that are E_Access_Subtype.
6338 <E_Access_Subtype>: Use the DECL of the base type directly.
6339
6340 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6341 Eric Botcazou <ebotcazou@adacore.com>
6342
6343 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6344 limited view may appear in the profile of a function, and a call to
6345 that function in another unit in which the full view is available must
6346 use this full view to spurious type errors at the point of call.
6347 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6348 of parent body with a with clause for the main unit.
6349 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6350 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6351 types declared in external units like types from limited with clauses.
6352 Adjust final processing of defer_limited_with_list accordingly.
6353 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6354 again to translate the prefix after the field if it is incomplete.
6355
6356 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6357
6358 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6359 alignment for simple volatile fields and remove associated errors.
6360
6361 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6362
6363 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6364 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6365
6366 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6367
6368 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6369 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6370 process Original_Node instead of expanded names.
6371
6372 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6373
6374 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6375 addressability check in the constrained case.
6376
6377 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6378
6379 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6380 types not coming from a limited context.
6381
6382 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6383
6384 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6385 the inlined list that are not public.
6386 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6387 there is a pragma Inline_Always on the subprogram.
6388
6389 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6390
6391 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6392 <N_Allocator>: Use properly typed constants.
6393 (extract_values): Move around.
6394 (pos_to_constructor): Minor tweaks.
6395 (Sloc_to_locus): Fix formatting.
6396 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6397 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6398 (Gigi_Equivalent_Type): Adjust head comment.
6399 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6400
6401 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6402
6403 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6404 is a representation clause on an extension, propagate the alignment of
6405 the parent type only if the platform requires strict alignment.
6406
6407 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6408
6409 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6410 instead of Word_Size.
6411
6412 Revert
6413 2017-03-28 Andreas Schwab <schwab@suse.de>
6414
6415 PR ada/80117
6416 * system-linux-aarch64-ilp32.ads: New file.
6417 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6418 from LIBGNAT_TARGET_PAIRS.
6419 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6420 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6421 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6422 or -mabi=ilp32, resp.
6423
6424 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6425
6426 PR ada/80626
6427 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6428 instead of Word_Size.
6429
6430 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6431
6432 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6433
6434 2017-05-02 Richard Biener <rguenther@suse.de>
6435
6436 * gcc-interface/misc.c (gnat_post_options): Do not set
6437 -fstrict-overflow.
6438
6439 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6440
6441 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6442 Corresponding_Discriminant is only called on discriminants.
6443 Skip the saving of the result only for them.
6444 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6445 <N_Unchecked_Type_Conversion>: Translate the result type first.
6446 (gigi): Set TREE_NOTHROW on Begin_Handler.
6447 (stmt_list_cannot_raise_p): New predicate.
6448 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6449 a cleanup if the statements of the handler cannot raise.
6450 (process_freeze_entity): Use Is_Record_Type.
6451 (process_type): Likewise.
6452
6453 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6454
6455 * einfo.ads (Corresponding_Record_Component): New alias
6456 for Node21 used for E_Component and E_Discriminant.
6457 * einfo.adb (Corresponding_Record_Component): New function.
6458 (Set_Corresponding_Record_Component): New procedure.
6459 (Write_Field21_Name): Handle Corresponding_Record_Component.
6460 * sem_ch3.adb (Inherit_Component): Set
6461 Corresponding_Record_Component for every component in
6462 the untagged case. Clear it afterwards for non-girder
6463 discriminants.
6464 * gcc-interface/decl.c (gnat_to_gnu_entity)
6465 <E_Record_Type>: For a derived untagged type with discriminants
6466 and constraints, apply the constraints to the layout of the
6467 parent type to deduce the layout.
6468 (field_is_aliased): Delete.
6469 (components_to_record): Test DECL_ALIASED_P directly.
6470 (annotate_rep): Check that fields are present except for
6471 an extension.
6472 (create_field_decl_from): Add DEBUG_INFO_P
6473 parameter and pass it in recursive and other calls. Add guard
6474 for the manual CSE on the size.
6475 (is_stored_discriminant): New predicate.
6476 (copy_and_substitute_in_layout): Consider only
6477 stored discriminants and check that original fields are present
6478 in the old type. Deal with derived types. Adjust call to
6479 create_variant_part_from.
6480
6481 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6482
6483 * exp_ch6.adb (Expand_Call_Helper): When locating the
6484 accessibility entity created for an access parameter, handle
6485 properly a reference to a formal of an enclosing subprogram. if
6486 the reference appears in an inherited class-wide condition, it
6487 is the rewriting of the reference in the ancestor expression,
6488 but the accessibility entity must be that of the current formal.
6489
6490 2017-05-02 Javier Miranda <miranda@adacore.com>
6491
6492 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6493 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6494 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6495 Call Expand_Non_Binary_Modular_Op.
6496
6497 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6498
6499 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6500 has discriminants, do not override the Stored_Constraint list of
6501 the full view of the derived type with that of the derived type.
6502
6503 2017-05-02 Bob Duff <duff@adacore.com>
6504
6505 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6506
6507 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6508
6509 * s-os_lib.ads: Minor typo fix.
6510
6511 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6512
6513 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6514 this deprecated dependency.
6515
6516 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6517
6518 * exp_util.ads: minor comment addition.
6519
6520 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6521
6522 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6523 pastos in part #3 of the head comment.
6524
6525 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6526
6527 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6528 procedure body for a local (sub)type declaration within a
6529 predicate function. Invariant checks do not apply to these, and
6530 the expansion of the procedure will happen in the wrong scope,
6531 leading to misplaced freeze nodes.
6532
6533 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6534
6535 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6536 to analyze generated actions. If the main unit is a body,
6537 the required scope is that of the corresponding unit declaration.
6538
6539 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6540
6541 * einfo.adb (Declaration_Node): flip branches of
6542 an IF statement to avoid repeated negations in its condition;
6543 no change in semantics, only to improve readability.
6544
6545 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6546
6547 * sem_case.adb: Remove extra spaces in parameter declarations.
6548
6549 2017-05-02 Justin Squirek <squirek@adacore.com>
6550
6551 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6552 in usage line for new -gnatwE switch.
6553
6554 2017-05-02 Claire Dross <dross@adacore.com>
6555
6556 * a-cofuve.ads (Remove): Remove unnecessary
6557 conditions in precondition.
6558
6559 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6560
6561 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6562 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6563
6564 2017-05-02 Justin Squirek <squirek@adacore.com>
6565
6566 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6567 alternative expression.
6568 * sem_res.adb (Resolve_Case_Expression): Ditto.
6569
6570 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6571
6572 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6573 Refine predicate for the case where the primitive operation
6574 is a renaming of equality. An overriding operation that is
6575 a user-defined renaming of predefined equality inherits its
6576 slot from the overridden operation. Otherwise it is treated
6577 as a predefined op and occupies the same predefined slot as
6578 equality. A call to it is transformed into a call to its alias,
6579 which is the predefined equality. A dispatching call thus uses
6580 the proper slot if operation is further inherited and called
6581 with class-wide arguments.
6582
6583 2017-05-02 Justin Squirek <squirek@adacore.com>
6584
6585 * errout.adb (Set_Msg_Text): Add a case to switch the message
6586 type when the character '[' is detected signifying a warning
6587 about a run-time exception.
6588 * opt.ads Add a new Warning_Mode value for new switch
6589 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6590 to handle new warning mode
6591 * usage.adb (Usage): Add usage entry for -gnatwE
6592 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6593
6594 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6595
6596 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6597 declaration that operates on some fixed point type.
6598
6599 2017-05-02 Justin Squirek <squirek@adacore.com>
6600
6601 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6602
6603 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6604
6605 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6606
6607 2017-05-02 Justin Squirek <squirek@adacore.com>
6608
6609 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6610 expression (Analyze_If_Expression): Add check for valid condition
6611 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6612 on case-expression
6613 * sem_res.adb (Resolve_If_Expression): Add check for valid
6614 condition and then-expression.
6615
6616 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6617
6618 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6619 statement if the initialization call is a null procedure, as
6620 can happen with a controlled type with no explicit Initialize
6621 procedure, or an array of such.
6622 * exp_ch7.adb (Process_Object_Declaration): For a type with
6623 controlled components that has a trivial Initialize procedure,
6624 insert declaration for finalization counter after object
6625 declaration itself.
6626 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6627 finalization block and attendant declarations if component has
6628 a trivial Initialize procedure.
6629 (Make_Init_Call): Do not generate a call if controlled type has
6630 a trivial Initialize procedure.
6631
6632 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6633
6634 * g-forstr.ads (Data): Move Format component last.
6635 * g-forstr.adb ("+"): Adjust for above change.
6636 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6637 * g-sechas.ads (Context): Move Key last.
6638 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6639 * s-fileio.adb (Temp_File_Record): Move Name last.
6640 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6641 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6642
6643 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6644
6645 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6646 switch introduced recently. finally not needed.
6647
6648 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6649
6650 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6651 Corresponding_Body link for a null procedure declaration.
6652
6653 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6654
6655 * atree.h (Flag290): Add missing terminating parenthesis.
6656 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6657 (Set_Is_Class_Wide_Clone): Likewise.
6658 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6659
6660 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6661
6662 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6663 parameter Array_Comp to indicate the case of an array object
6664 with null-excluding components.
6665 * checks.adb (Null_Exclusion_Static_Checks):
6666 Call Compile_Time_Constraint_Error instead of
6667 Apply_Compile_Time_Constraint_Error in the component case. Also
6668 call that when Array_Comp is True, with an appropriate warning for
6669 the array component case. Only create an explicit initialization
6670 by null in the case of an object of a null-excluding access type
6671 (and no longer do that in the component case).
6672 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6673 Array_Comp defaulted to False. Pass Empty for the Comp
6674 actual when calling Null_Exclusion_Static_Checks in the case
6675 where Comp_Decl matches Object_Decl, because we don't have a
6676 component in that case. In the case of an object or component
6677 of an array type, pass True for Array_Comp on the recursive call
6678 to Check_Component.
6679
6680 2017-05-02 Bob Duff <duff@adacore.com>
6681
6682 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6683 compute the linux priority from the Ada priority. Call this everywhere
6684 required. In particular, the previous version was not doing this
6685 computation when setting the ceiling priority in various places. It
6686 was just converting to C.int, which results in a ceiling that is off
6687 by 1.
6688
6689 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6690
6691 * sem_ch3.adb: Comment predicate inheritance.
6692
6693 2017-05-02 Tristan Gingold <gingold@adacore.com>
6694
6695 * s-trasym.ads: Add comment.
6696
6697 2017-05-02 Bob Duff <duff@adacore.com>
6698
6699 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6700 * sem_ch4.adb: Minor reformatting.
6701 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6702 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6703 * sinput.ads: Minor typo fix.
6704
6705 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6706
6707 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6708 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6709 here from exp_ch9, to recognize objects whose creation requires
6710 dynamic allocation, so that the proper warning can be emitted
6711 when restriction No_Implicit_Heap_Allocation is in effect.
6712 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6713 to emit proper warning when an object that requires dynamic
6714 allocation is declared.
6715
6716 2017-05-02 Tristan Gingold <gingold@adacore.com>
6717
6718 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6719
6720 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6721
6722 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6723 visibility rules for equality operators that apply within an
6724 instantiation apply within an inlined body.
6725 * sem_type.adb (Add_One_Interp): ditto.
6726
6727 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6728
6729 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6730 procedures.
6731
6732 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6733
6734 * snames.ads-tmpl
6735 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6736 Name_No_Tagged_Streams): Move to regular pragmas. Add
6737 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6738 and Secondary_Stack_Size.
6739 (Pragma_Id): Move Pragma_Assume,
6740 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6741 Pragma_No_Tagged_Streams to second part.
6742
6743 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6744
6745 * exp_attr.adb: Minor reformatting.
6746
6747 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6748
6749 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6750 detection for illegal references to private components or
6751 operations of a protected type in the body of the type.
6752
6753 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6754
6755 * opt.ads: Add missing GNAT markers in comments.
6756 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6757 settings of Optimize_Alignment at the end.
6758
6759 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6760
6761 * checks.adb (Apply_Constraint_Check): Do not apply
6762 a discriminant check when the associated type is a constrained
6763 subtype created for an unconstrained nominal type.
6764 * exp_attr.adb: Minor reformatting.
6765
6766 2017-05-02 Bob Duff <duff@adacore.com>
6767
6768 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6769 the N_Raise_Expression case.
6770 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6771 and add assertions.
6772
6773 2017-05-02 Yannick Moy <moy@adacore.com>
6774
6775 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6776 optimize length comparison in GNATprove mode.
6777 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6778 operator /= into negation of operator = when needed.
6779 (Expand_SPARK): Call new
6780 function to expand operator /=.
6781
6782 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6783
6784 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6785 Simplify the expression for a fixed-fixed division to remove
6786 divisions by constants whenever possible, as an optimization
6787 for restricted targets.
6788
6789 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6790
6791 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6792
6793 2017-05-02 Bob Duff <duff@adacore.com>
6794
6795 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6796 to find primitive ops, instead of using an Identifier that will
6797 later be looked up. This is necessary because these ops are not
6798 necessarily visible at all places where we need to call them.
6799 * exp_util.ads: Minor comment fix.
6800
6801 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6802
6803 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6804 references are fully conformant if they are both expansions
6805 of the discriminant of a protected type, within one of the
6806 protected operations. One occurrence may be expanded into a
6807 constant declaration while the other is an input parameter to
6808 the corresponding generated subprogram.
6809
6810 2017-05-02 Justin Squirek <squirek@adacore.com>
6811
6812 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6813 recursivly searching composite-types for null-excluding access
6814 types and verifying them.
6815 (Analyze_Object_Declaration): Add a
6816 call to Check_Null_Excluding_Components for static verification
6817 of non-initialized objects.
6818 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6819 a parameter for a composite-type's component and an extra case
6820 for printing component information.
6821
6822 2017-05-02 Yannick Moy <moy@adacore.com>
6823
6824 * sem_ch10.adb (Analyze_Subunit): Take
6825 configuration pragma into account when restoring appropriate
6826 pragma for analysis of subunit.
6827
6828 2017-05-02 Justin Squirek <squirek@adacore.com>
6829
6830 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6831 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6832 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6833 clauses from the runtime.
6834
6835 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6836
6837 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6838 array components specially.
6839
6840 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6841
6842 * sem_ch8.adb (Premature_Usage): If the premature usage of
6843 an entity is as the expression in its own object decaration,
6844 rewrite the reference as Any_Id to prevent cascaded errors or
6845 compiler loops when such an entity is used in an address clause.
6846
6847 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6848
6849 * gcc-interface/decl.c (components_to_record): Add missing guard.
6850
6851 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6852
6853 * gcc-interface/decl.c (components_to_record): Add more comments.
6854 Put back pending fields onto the regular list if the misalignment
6855 happens to cancel itself.
6856
6857 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6858
6859 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6860 controlling actual in a prefixed call, preserve the original node
6861 information if the prefix itself has been rewritten, for ASIS use.
6862
6863 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6864
6865 * exp_ch6.adb (Insert_Post_Call_Actions):
6866 Code clean up. Insert the post-call actions after an enclosing
6867 procedure call when N denotes a function call and appears as an
6868 actual parameter in the procedure call.
6869
6870 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6871
6872 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6873 for the component, also reject the attribute if the component
6874 doesn't end on a byte boundary and its scalar storage order is
6875 different from that of the enclosing record type.
6876
6877 2017-04-28 Javier Miranda <miranda@adacore.com>
6878
6879 * atree.ads (Info_Messages): Removed.
6880 (Warning_Info_Messages): New counter.
6881 (Report_Info_Messages): New counter.
6882 * err_vars.ads Update documentation.
6883 * errout.adb (Delete_Warning_And_Continuations): Update
6884 Info_Message occurrences.
6885 (Error_Msg_Internal): Update Info_Message occurrences.
6886 (Delete_Warning): Update Info_Message occurrences.
6887 (Write_Error_Summary): Update Info_Message occurrences.
6888 (Output_Messages): Update Info_Message occurrences.
6889 (To_Be_Removed): Update Info_Message occurrences.
6890 (Reset_Warnings): Update Info_Message occurrences.
6891 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6892 (Finalize): Update Info_Message occurrences.
6893 (Initialize): Update Info_Message occurrences.
6894 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6895 (Compilation_Errors): Update Info_Message_Occurences.
6896
6897 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6898
6899 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6900 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6901 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6902 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6903 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6904 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6905 Y_Size.
6906 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6907 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6908
6909 2017-04-28 Bob Duff <duff@adacore.com>
6910
6911 * sem_util.ads, sem_util.adb (Might_Raise): New function
6912 that replaces Is_Exception_Safe, but has the opposite
6913 sense. Is_Exception_Safe was missing various cases -- calls inside
6914 a pragma Debug, calls inside an 'if' or assignment statement,
6915 etc. Might_Raise now walks the entire subtree looking for things
6916 that can raise.
6917 * exp_ch9.adb (Is_Exception_Safe): Remove.
6918 (Build_Protected_Subprogram_Body): Replace call to
6919 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6920 constants where possible).
6921 * exp_ch7.adb: Rename Is_Protected_Body -->
6922 Is_Protected_Subp_Body. A protected_body is something different
6923 in the grammar.
6924
6925 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6926
6927 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6928 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6929 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6930 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6931 (P_Protected): Likewise.
6932 * sem_case.adb (Check_Duplicates):
6933 Add pragma Warnings on variable.
6934 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6935 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6936 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6937 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6938 (Analyze_Iterator_Specification): Initialize Bas variable.
6939 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6940 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6941 (Analyze_Accept_Statement): Initialize Task_Nam.
6942
6943 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6944
6945 * checks.adb (Install_Primitive_Elaboration_Check):
6946 Do not generate an elaboration check if all checks have been
6947 suppressed.
6948
6949 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6950
6951 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6952 Interrupt_Handler and Attach_Handler): Generate reference
6953 to protected operation to prevent spurious warnings about
6954 unreferenced entities. Previous scheme failed with style checks
6955 enabled.
6956
6957 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6958
6959 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6960 that follows an expression function must not be relocated to
6961 the generated body, because it applies to the code that follows.
6962
6963 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6964
6965 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6966 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6967 code that might violate the more stringent checking for 'Access
6968 introduced in Ada 2005.
6969
6970 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6971
6972 * a-cforse.adb: minor style fix in comment.
6973
6974 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6975
6976 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6977 initialize Block_Decls variable.
6978 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6979 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6980 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6981 Formal_DDT and Actual_DDT variables.
6982 (Expand_Interface_Thunk): Initialize Iface_Formal.
6983 (Make_DT): Initialize Size_Comp.
6984 (Make_Select_Specific_Data_Table): Initialize Decls.
6985 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6986 Also initialize more RPC_Receiver_* variables.
6987 (Build_To_Any_Function): Initialize Cstr_Formal.
6988 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6989
6990 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6991
6992 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6993 node between access types, freeze the designated type as well,
6994 so that dispatch table pointers are created in the proper scope,
6995 and not in the constructed body of the expression function.
6996
6997 2017-04-28 Bob Duff <duff@adacore.com>
6998
6999 * alloc.ads (Nodes_Initial): Go back to previous value. The large
7000 value makes large compilations faster, but small compilations slower.
7001
7002 2017-04-28 Arnaud Charlet <charlet@adacore.com>
7003
7004 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
7005
7006 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7007
7008 * erroutc.adb (Compilation_Errors): Do not consider info messages
7009 as suitable warnings when warnings must be treated as errors.
7010 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
7011 internally-generated packages when outputting completion
7012 information.
7013 * errout.adb (Output_Messages): Do not consider info messages as
7014 suitable warnings when warnings must be treated as errors.
7015 * errutil.adb (Finalize): Do not consider info messages as
7016 suitable warnings when warnings must be treated as errors.
7017
7018 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
7019
7020 * warnsw.ads: Minor fix for incorrect wording in comment.
7021
7022 2017-04-28 Ed Schonberg <schonberg@adacore.com>
7023
7024 * sem_res.adb (In_Instance_Code): New predicate in
7025 Valid_Conversion, to determine whether a type conversion appears
7026 as (or within) an actual for a formal object. Type conversions
7027 in instances are not rechecked in Valid_Conversion because
7028 visibility changes between generic location andi instance may
7029 lead to spurious errors, but conversions within an actual must be
7030 fully checked, and they are not fully resolved when pre-analyzing
7031 the actuals.
7032
7033 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7034
7035 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
7036 New_Copy_Tree instead of Relocate_Node as any subsequent copies
7037 of the relocated node will have mangled Parent pointers.
7038 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
7039 tables used in conjunction with entity and itype replication.
7040 (Visit_Entity): Rewrite the restriction on which entities
7041 require duplication. The restriction now includes all types.
7042
7043 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7044
7045 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
7046 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
7047 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
7048 cleanups.
7049
7050 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7051
7052 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
7053 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
7054
7055 2017-04-28 Gary Dismukes <dismukes@adacore.com>
7056
7057 * exp_util.adb: Minor reformatting.
7058
7059 2017-04-28 Ed Schonberg <schonberg@adacore.com>
7060
7061 * sem_ch4.adb: Fix copy/pasto.
7062
7063 2017-04-27 Tristan Gingold <gingold@adacore.com>
7064
7065 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
7066 raise-gcc.c. Fix include search path for raise-gcc.c
7067
7068 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7069
7070 * fe.h (Warn_On_Questionable_Layout): Declare.
7071 * warnsw.ads (Warn_On_Record_Holes): Move down.
7072 (Warn_On_Questionable_Layout): New boolean variable.
7073 (Warning_Record): Add Warn_On_Questionable_Layout field.
7074 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
7075 (Restore_Warnings): Likewise.
7076 (Save_Warnings): Likewise.
7077 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
7078 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
7079 components_to_record.
7080 (gnu_field_to_gnat): New function.
7081 (warn_on_field_placement): Likewise.
7082 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
7083 parameters. Rename local variables and adjust recursive call.
7084 Rework final scan of the field list and implement warnings on the
7085 problematic placement of specific sorts of fields.
7086
7087 2017-04-27 Bob Duff <duff@adacore.com>
7088
7089 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
7090 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
7091 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
7092 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
7093 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
7094 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
7095 For efficiency, cache results of Is_Internal_File_Name and
7096 Is_Predefined_File_Name in the Units table. This avoids a lot
7097 of repeated text processing.
7098
7099 2017-04-27 Emmanuel Briot <briot@adacore.com>
7100
7101 * g-comlin.adb (Sort_Sections): remove useless test.
7102
7103 2017-04-27 Claire Dross <dross@adacore.com>
7104
7105 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
7106 allow the use of regular equality over elements in contracts.
7107 (Formal_Model): Ghost package containing model functions that are
7108 used in subprogram contracts.
7109 (Current_To_Last): Removed, model functions should be used instead.
7110 (First_To_Previous): Removed, model functions should be used instead.
7111 (Strict_Equal): Removed, model functions should be used instead.
7112 (No_Overlap): Removed, model functions should be used instead.
7113 (Equivalent_Keys): Functions over cursors are removed. They were
7114 awkward with explicit container parameters.
7115 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
7116 allow the use of regular equality over elements in contracts.
7117 (Formal_Model): Ghost package containing model functions that
7118 are used in subprogram contracts.
7119 (Current_To_Last): Removed, model functions should be used instead.
7120 (First_To_Previous): Removed, model functions should be used instead.
7121 (Strict_Equal): Removed, model functions should be used instead.
7122 (No_Overlap): Removed, model functions should be used instead.
7123
7124 2017-04-27 Yannick Moy <moy@adacore.com>
7125
7126 * gnat1drv.adb: Code cleanup.
7127
7128 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7129
7130 * exp_util.adb (Replace_Entity): The prefix of a 'Result
7131 attribute reference in a post- condition is the subprogram to
7132 which the condition applies. If the condition is inherited
7133 by a type extension, the prefix becomes a reference to the
7134 inherited operation, but there is no need to create a wrapper
7135 for this operation, because 'Result is expanded independently
7136 when elaborating the postconditions.
7137
7138 2017-04-27 Bob Duff <duff@adacore.com>
7139
7140 * sinput.adb: Minor code cleanup.
7141 * namet.adb (Append): Create faster versions of
7142 Append(String) and Append(Name_Id) by using slice assignment
7143 instead of loops.
7144 * sem_util.adb (In_Instance): Speed this up by removing
7145 unnecessary tests; Is_Generic_Instance is defined for all
7146 entities.
7147 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
7148 Remove unused function.
7149 * alloc.ads (Nodes_Initial): Use a much larger value, because
7150 the compiler was spending a lot of time copying the nodes table
7151 when it grows. This number was chosen in 1996, so is rather out
7152 of date with current memory sizes. Anyway, it's virtual memory.
7153 Get rid of Orig_Nodes_...; use Node_... instead.
7154 * atree.adb (Lock): Do not release the Nodes tables; it's a
7155 waste of time.
7156 Orig_Nodes_ ==> Nodes_
7157 * nlists.adb: Orig_Nodes_ ==> Nodes_
7158 * g-table.adb: Remove unused "with" clause.
7159 * g-table.ads, table.ads: Remove Big_Table_Type, which should
7160 not be used by clients.
7161 * g-dyntab.adb (Last_Allocated): New function
7162 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
7163
7164 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7165
7166 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
7167 check.
7168 (Subtypes_Statically_Match): Remove duplicate check.
7169 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
7170
7171 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7172
7173 * exp_aggr.adb (Replace_Type): Remove the special processing
7174 for selected components.
7175 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
7176 processing for attributes Fixed_Value and Integer_Value.
7177 * exp_util.adb (Side_Effect_Free): Merge the processing for
7178 qualified expressions, type conversions, and unchecked type
7179 conversions.
7180 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
7181 and Optional.
7182 * par-ch3.adb (P_Declarative_Items): Merge the processing for
7183 tokens function, not, overriding, and procedure.
7184 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
7185 for qualified expressions, type conversions, and unchecked
7186 type conversions.
7187 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
7188 processing for Ada 83 and instances.
7189 (Object_Access_Level): Merge the processing for indexed components
7190 and selected components.
7191 * uname.adb (Add_Node_Name): Merge the processing for stubs.
7192
7193 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7194
7195 * checks.adb (Install_Primitive_Elaboration_Check):
7196 Do not generate the check when restriction No_Elaboration_Code
7197 is in effect.
7198
7199 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7200
7201 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
7202 of Expand_Dispatching_Call. If the denoted subprogram has a
7203 class-wide precondition, this is the only precondition that
7204 applies to the call, rather that the class-wide preconditions
7205 that may apply to the body that is executed. (This is specified
7206 in AI12-0195).
7207
7208 2017-04-27 Yannick Moy <moy@adacore.com>
7209
7210 * gnat1drv.adb (Adjust_Global_Switches): Issue
7211 a warning in GNATprove mode if the runtime library does not
7212 support IEEE-754 floats.
7213
7214 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7215
7216 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
7217 is itself inherited it does not carry any contract information,
7218 so examine its parent operation which is its Alias.
7219
7220 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7221
7222 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
7223 prefix can be an object reference in which case Obj'Image (X)
7224 can only be interpreted as an indexing of the parameterless
7225 version of the attribute.
7226 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
7227 an indexing or a slice operation if the attribute does not require
7228 parameters. In Ada2012 'Image also belongs in this category,
7229 and A'Image (lo .. hi) is legal and must be parsed as a slice.
7230
7231 2017-04-27 Yannick Moy <moy@adacore.com>
7232
7233 * exp_ch4.adb: Minor reformatting.
7234 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
7235 disable the CodePeer and C generation modes. Similar to the
7236 opposite actions done in CodePeer mode.
7237
7238 2017-04-27 Yannick Moy <moy@adacore.com>
7239
7240 * sem_res.adb: Remove duplicate code.
7241 * sem_attr.adb: Delete duplicate code.
7242
7243 2017-04-27 Bob Duff <duff@adacore.com>
7244
7245 * g-dyntab.adb: Reduce the amount of copying in
7246 Release. No need to copy items past Last.
7247
7248 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7249
7250 * checks.adb Add with and use clauses for Sem_Disp.
7251 (Install_Primitive_Elaboration_Check): New routine.
7252 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
7253 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
7254 processing of 'Elaborated.
7255 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
7256 elaboration check.
7257
7258 2017-04-27 Bob Duff <duff@adacore.com>
7259
7260 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
7261 If the table grows and then shrinks back to empty, we won't necessarily
7262 point back to the empty array. Code cleanups.
7263 * sinput.ads: Add 'Base to Size clause to match the declared
7264 component subtypes.
7265
7266 2017-04-27 Claire Dross <dross@adacore.com>
7267
7268 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
7269 allow the use of regular equality over elements in contracts.
7270 (Formal_Model): Ghost package containing model functions that
7271 are used in subprogram contracts.
7272 (Current_To_Last): Removed, model functions should be used instead.
7273 (First_To_Previous): Removed, model functions should be used instead.
7274 (Strict_Equal): Removed, model functions should be used instead.
7275 (No_Overlap): Removed, model functions should be used instead.
7276 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
7277 Boolean generic parameter to disable contracts for equivalence
7278 between keys.
7279 (Witness): Create a witness of a key that is used for handling of
7280 equivalence between keys.
7281 (Has_Witness): Check whether a witness is contained in a map.
7282 (W_Get): Get the element associated to a witness.
7283 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
7284 directly.
7285 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
7286 Boolean generic parameter to disable contracts for equivalence
7287 between keys.
7288 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
7289 of equivalence on functional maps.
7290 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
7291 of equivalence on functional maps.
7292
7293 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7294
7295 * exp_ch9.adb (Expand_Entry_Barrier): Code
7296 cleanup. Do not perform the optimization which removes the
7297 declarations of the discriminant and component renamings when
7298 validity checks on operands and attributes are in effect.
7299
7300 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7301
7302 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7303 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7304 a-cfhama.ads, a-cofove.ads: Minor reformatting.
7305
7306 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7307
7308 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7309 pointer dereference.
7310 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7311 null pointer dereference.
7312
7313 2017-04-27 Bob Duff <duff@adacore.com>
7314
7315 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7316 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7317 Free renames Init, since they do the same thing.
7318 * g-table.ads: Default for Table_Low_Bound.
7319 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7320 Table_Increment.
7321
7322 2017-04-27 Bob Duff <duff@adacore.com>
7323
7324 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7325 can reallocate.
7326 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7327 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7328 Reorder code so that above assertions do not fail.
7329 * table.ads: Remove obsolete comment on Locked.
7330
7331 2017-04-27 Claire Dross <dross@adacore.com>
7332
7333 * a-cfdlli.ads: Code cleanup.
7334
7335 2017-04-27 Yannick Moy <moy@adacore.com>
7336
7337 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7338 when needed for proof. (Expand_SPARK): Call the new procedure.
7339 * exp_util.ads Fix typo.
7340
7341 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7342
7343 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7344 fixes.
7345
7346 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7347
7348 * sem_elab.adb Add new type Visited_Element
7349 and update the contents of table Elab_Visited. Various code clean up.
7350 (Check_Elab_Call): Determine whether a prior call to
7351 the same subprogram was already examined within the same context.
7352 (Check_Internal_Call_Continue): Register the subprogram being
7353 called as examined within a particular context. Do not suppress
7354 elaboration warnings.
7355
7356 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7357
7358 * xoscons.adb, osint.ads: Minor reformatting.
7359
7360 2017-04-27 Bob Duff <duff@adacore.com>
7361
7362 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7363 Table_Count_Type --> Table_Last_Type, because the name
7364 was confusing (a "count" usually starts at zero). Add
7365 functionality supported or needed by other tables packages
7366 (Move, Release_Threshold).
7367 * g-table.ads, g-table.adb: This is now just a thin wrapper
7368 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7369 or needed by other tables packages (Save, Restore).
7370 * table.ads, table.adb: This is now just a thin wrapper around
7371 * g-table.ads/g-table.adb.
7372 * namet.h, scos.h, uintp.h: These files are reaching into the
7373 private data of some instances of g-table, whose names changed,
7374 so the above change requires some adjustment here. It now uses
7375 public interfaces.
7376
7377 2017-04-27 Bob Duff <duff@adacore.com>
7378
7379 * namet.adb, namet.ads: Minor: remove unused procedures.
7380
7381 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7382
7383 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7384 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7385 Add pragma Warnings on Rtype variable in nested block. *
7386 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7387 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7388 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7389 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7390 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7391 (Build_Finalize_Statements): Initialize Bod_Stmts.
7392 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7393
7394 2017-04-27 Claire Dross <dross@adacore.com>
7395
7396 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7397 allow the use of regular equality over elements in contracts.
7398 (Formal_Model): Ghost package containing model functions that are
7399 used in subprogram contracts.
7400 (Current_To_Last): Removed, model
7401 functions should be used instead.
7402 (First_To_Previous): Removed, model functions should be used instead.
7403 (Strict_Equal): Removed, model functions should be used instead.
7404 (No_Overlap): Removed, model functions should be used instead.
7405 (Equivalent_Keys): Functions over cursors are removed. They were
7406 awkward with explicit container parameters.
7407 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7408 (proof only) procedure to help GNATprove when equivalence over
7409 keys is not equality.
7410
7411 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7412
7413 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7414 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7415 Minor reformatting and code cleanups.
7416
7417 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7418
7419 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7420 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7421 operation whose ancestor has classwide pre/postconditions. This
7422 is used both to check the legality of the inheritance in Ada
7423 and in SPARK, and to determine whether a wrapper is needed for
7424 an inherited operation.
7425 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7426 Improve placement of error message for inherited classwide
7427 conditions that become illegal on type derivation.
7428
7429 2017-04-27 Yannick Moy <moy@adacore.com>
7430
7431 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7432 SPARK_Mode from context on generic package.
7433 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7434 useless test.
7435
7436 2017-04-27 Claire Dross <dross@adacore.com>
7437
7438 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7439 overflows in computations.
7440 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7441 overflows in computations.
7442 (Insert): Rewrite precondition to avoid overflows in computations.
7443 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7444 overflows in computations.
7445 (Insert): Rewrite precondition to avoid overflows in computations.
7446
7447 2017-04-27 Steve Baird <baird@adacore.com>
7448
7449 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7450 flag when it is declared in order to avoid confusing CodePeer about
7451 the possibility of an uninitialized variable read.
7452
7453 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7454
7455 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7456 no dimensionality error if the subtype of the expression is
7457 identical to the nominal subtype in the declaration, even though
7458 the expression itself may have been constant-folded and lack a
7459 dimension vector.
7460 * sem_dim.ads: Add comments on setting of dimension vectors and
7461 its interaction with node rewritings and side-effect removal.
7462
7463 2017-04-27 Bob Duff <duff@adacore.com>
7464
7465 * debug.adb: Minor comment correction.
7466 * sem_dim.ads: Minor reformatting and typo fixes.
7467
7468 2017-04-27 Bob Duff <duff@adacore.com>
7469
7470 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7471 Last of the tables via function calls, rather than relying on layout
7472 of data structures.
7473
7474 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7475
7476 * exp_util.adb: No wrapper in GNATprove mode.
7477
7478 2017-04-27 Yannick Moy <moy@adacore.com>
7479
7480 * sem_res.adb (Resolve_Comparison_Op): Always
7481 evaluate comparisons between values of universal types.
7482
7483 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7484
7485 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7486 an elaboration counter nor a check when in GNATprove mode.
7487 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7488 elaboration counter when in GNATprove mode.
7489
7490 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7491
7492 * freeze.adb: copy-paste typo.
7493
7494 2017-04-27 Yannick Moy <moy@adacore.com>
7495
7496 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7497 Use correct test to detect call in GNATprove mode instead of
7498 compilation.
7499
7500 2017-04-27 Claire Dross <dross@adacore.com>
7501
7502 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7503 New property function expressing that the element of a
7504 sequence are contained in the union of two sequences.
7505 (Formal_Model.M_Elements_Included): New property function
7506 expressing that the element of a sequence are another sequence.
7507 (Generic_Sorting): Use new property functions to state that
7508 elements are preserved by Sort and Merge.
7509 * a-cofove.adb, a-cofove.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 instead.
7515 (First_To_Previous): Removed, model functions should be used instead.
7516 (Append): Default parameter value replaced
7517 by new wrapper to allow more precise contracts.
7518 (Insert): Subprogram restored, it seems it was useful to users even if
7519 it is inefficient.
7520 (Delete): Subprogram restored, it seems it was useful to users even if
7521 it is inefficient.
7522 (Prepend): Subprogram restored, it seems it was useful to users even
7523 if it is inefficient.
7524 (Delete_First): Subprogram restored, it seems it
7525 was useful to users even if it is inefficient. (Delete_Last):
7526 Default parameter value replaced by new wrapper to allow more
7527 precise contracts.
7528 (Generic_Sorting.Merge): Subprogram restored.
7529 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7530 allow the use of regular equality over elements in contracts.
7531 (Formal_Model): Ghost package containing model functions
7532 that are used in subprogram contracts. (Capacity):
7533 On unbounded containers, return the maximal capacity.
7534 (Current_To_Last): Removed, model functions should be used
7535 instead.
7536 (First_To_Previous): Removed, model functions should be used instead.
7537 (Append): Default parameter value replaced
7538 by new wrapper to allow more precise contracts.
7539 (Insert): Subprogram restored, it seems it was useful to users even if
7540 it is inefficient.
7541 (Delete): Subprogram restored, it seems it was useful to users even if
7542 it is inefficient.
7543 (Prepend): Subprogram restored, it seems it was useful to users even
7544 if it is inefficient.
7545 (Delete_First): Subprogram restored, it seems it
7546 was useful to users even if it is inefficient. (Delete_Last):
7547 Default parameter value replaced by new wrapper to allow more
7548 precise contracts.
7549 (Generic_Sorting.Merge): Subprogram restored.
7550 (Vector): Do not reuse formal vectors, as it is no longer possible
7551 to supply them with an equality function over elements.
7552
7553 2017-04-27 Bob Duff <duff@adacore.com>
7554
7555 * g-dyntab.adb (Release): When allocating the new
7556 table, use the correct slice of the old table to initialize it.
7557
7558 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7559
7560 * einfo.ads: Minor fixes in comments.
7561
7562 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7563
7564 * sem_prag.adb: disable clones in SPARK_Mode.
7565
7566 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7567
7568 * sem_util.ads, contracts.adb: Minor reformatting.
7569
7570 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7571
7572 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7573 Build body of subprogram that has a class-wide condition that
7574 contains calls to other primitives.
7575 (Build_Class_Wide_Clone_Call); Build a call to the common
7576 class-wide clone of a subprogram with classwide conditions. The
7577 body of the subprogram becomes a wrapper for a call to the
7578 clone. The inherited operation becomes a similar wrapper to which
7579 modified conditions apply, and the call to the clone includes
7580 the proper conversion in a call the parent operation.
7581 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7582 subprogram that has a classwide condition that contains calls to
7583 other primitives, build an internal subprogram that is invoked
7584 through a type-specific wrapper for all inherited subprograms
7585 that may have a modified condition.
7586 * sem_prag.adb (Check_References): If subprogram has a classwide
7587 condition, create entity for corresponding clone, to be invoked
7588 through wrapper subprograns.
7589 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7590 message about placement if pragma isi internally generated.
7591 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7592 a classwide clone, build body of clone as copy of original body,
7593 and rewrite original body as a wrapper as a wrapper for a call to
7594 the clone, so that it incorporates the original pre/postconditions
7595 of the subprogram.
7596 * freeze.adb (Check_Inherited_Conditions): For an inherited
7597 subprogram that inherits a classwide condition, build spec and
7598 body of corresponding wrapper so that call to inherited operation
7599 gets the modified conditions.
7600 * contracts.adb (Analyze_Contracts): If analysis of classwide
7601 condition has created a clone for a primitive operation, analyze
7602 declaration of clone.
7603
7604 2017-04-27 Steve Baird <baird@adacore.com>
7605
7606 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7607 Add "Suppress => All_Checks" to avoid generating unnecessary
7608 checks.
7609
7610 2017-04-27 Yannick Moy <moy@adacore.com>
7611
7612 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7613 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7614 inlining body in GNATprove mode when switch -gnatdm used.
7615 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7616 in GNATprove mode when switch -gnatdm used.
7617
7618 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7619
7620 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7621 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7622 clauses, so that we keep an indication of the address clause
7623 before removing it from the tree.
7624
7625 2017-04-27 Yannick Moy <moy@adacore.com>
7626
7627 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7628 of expression being qualified, when not an object name, or else
7629 evaluate the underlying name.
7630
7631 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7632
7633 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7634
7635 2017-04-27 Justin Squirek <squirek@adacore.com>
7636
7637 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7638 Process_Component_List_For_Finalization as a local variable.
7639 (Process_Component_For_Finalize): Add an extra parameter to avoid
7640 global references.
7641 (Process_Component_List_For_Finalization): Correct calls to
7642 Process_Component_For_Finalize to take Num_Comps as a parameter.
7643
7644 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7645
7646 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7647 a use-visible entity is defined within a nested scope of an
7648 instance when giving priority to entities which were visible in
7649 the original generic.
7650 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7651
7652 2017-04-27 Tristan Gingold <gingold@adacore.com>
7653
7654 * raise-gcc.c: Don't use unwind.h while compiling
7655 for the frontend, but mimic host behavior.
7656
7657 2017-04-27 Javier Miranda <miranda@adacore.com>
7658
7659 * sem_ch3.adb (Build_Discriminated_Subtype):
7660 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7661
7662 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7663
7664 * sem_prag.adb (Analyze_Global_Item):
7665 Do not consider discriminants because they are not "entire
7666 objects". Remove the discriminant-related checks because they are
7667 obsolete.
7668 (Analyze_Input_Output): Do not consider discriminants
7669 because they are not "entire objects".
7670
7671 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7672
7673 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7674 perform check if the current scope does not come from source,
7675 as is the case for a rewritten task body, because check has
7676 been performed already, and may not be doable because of changed
7677 visibility.
7678
7679 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7680
7681 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7682 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7683 Minor reformatting.
7684
7685 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7686
7687 * sem_ch4.adb (Analyze_Call): If the return type of a function
7688 is incomplete in an context in which the full view is available,
7689 replace the type of the call by the full view, to prevent spurious
7690 type errors.
7691 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7692 abstract subprogram so that compiler does not reject a parameter
7693 of a primitive operation of a tagged type being frozen, when
7694 the untagged type of that parameter cannot be frozen.
7695
7696 2017-04-27 Bob Duff <duff@adacore.com>
7697
7698 * sem_attr.adb (Compute_Type_Key): Don't walk
7699 representation items for irrelevant types, which could be in a
7700 different source file.
7701
7702 2017-04-27 Steve Baird <baird@adacore.com>
7703
7704 * exp_attr.adb (Expand_N_Attribute_Reference):
7705 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7706 for CodePeer.
7707
7708 2017-04-27 Yannick Moy <moy@adacore.com>
7709
7710 * exp_unst.ads: Fix typos in comments.
7711
7712 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7713
7714 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7715 whose type has a defined static predicate.
7716
7717 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7718
7719 * exp_ch4.adb (Insert_Dereference_Action):
7720 Do not adjust the address of a controlled object when the
7721 associated access type is subject to pragma No_Heap_Finalization.
7722 Code reformatting.
7723
7724 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7725
7726 * gcc-interface/utils.c (gnat_type_for_size): Set
7727 TYPE_ARTIFICIAL on created types.
7728
7729 2017-04-27 Claire Dross <dross@adacore.com>
7730
7731 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7732 modifications in functional containers.
7733 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7734 to improve readablity. Subprograms are separated between basic
7735 operations, constructors and properties. Universally quantified
7736 formulas in contracts are factorized in independant functions
7737 with a name and a comment. Names of parameters are improved.
7738
7739 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7740
7741 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7742
7743 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7744
7745 * sem_res.adb (Resolve_Type_Conversion): Do not
7746 install a predicate check here since this is already done during
7747 the expansion phase. Verify whether the operand satisfies the
7748 static predicate (if any) of the target type.
7749 * sem_ch3.adb (Analyze_Object_Declaration): Do
7750 not install a predicate check if the object is initialized by
7751 means of a type conversion because the conversion is subjected
7752 to the same check.
7753
7754 2017-04-27 Tristan Gingold <gingold@adacore.com>
7755
7756 * raise.c (__gnat_builtin_longjmp): Remove.
7757 (__gnat_bracktrace):
7758 Add a dummy definition for the compiler (__gnat_eh_personality,
7759 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7760 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7761 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7762 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7763 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7764 and a-except-2005.adb.
7765 * raise-gcc.c: Allow build in compiler, compiled as a C++
7766 file.
7767 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7768 (db): Constify msg_format.
7769 (get_call_site_action_for): Don't use void arithmetic.
7770 * system.ads (Frontend_Exceptions): Set to False.
7771 (ZCX_By_Default): Set to True.
7772 (GCC_ZC_Support): Set to True.
7773 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7774 a-except.ad[sb].
7775 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7776 in gnat1 and gnatbind.
7777 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7778 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7779 * s-excmac.ads, s-excmac.adb: Copy of variants.
7780 * a-except.o: Adjust preequisites.
7781 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7782
7783 2017-04-27 Claire Dross <dross@adacore.com>
7784
7785 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7786 modifications in functional containers.
7787 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7788 to improve readablity. Subprograms are separated between basic
7789 operations, constructors and properties. Universally quantified
7790 formulas in contracts are factorized in independant functions
7791 with a name and a comment. Names of parameters are improved.
7792
7793 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7794
7795 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7796
7797 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7798
7799 * sem_res.adb (Resolve_Type_Conversion): Do not
7800 install a predicate check here since this is already done during
7801 the expansion phase. Verify whether the operand satisfies the
7802 static predicate (if any) of the target type.
7803 * sem_ch3.adb (Analyze_Object_Declaration): Do
7804 not install a predicate check if the object is initialized by
7805 means of a type conversion because the conversion is subjected
7806 to the same check.
7807
7808 2017-04-27 Tristan Gingold <gingold@adacore.com>
7809
7810 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7811 replaced by their variants).
7812
7813 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7814
7815 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7816 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7817 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7818
7819 2017-04-27 Tristan Gingold <gingold@adacore.com>
7820
7821 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7822 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7823 Ada95.
7824
7825 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7826
7827 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7828 the loop which detects potential enclosing transient scopes. The
7829 loop now terminates much earlier as transient scopes are bounded
7830 by packages and subprograms.
7831
7832 2017-04-27 Claire Dross <dross@adacore.com>
7833
7834 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7835 allow the use of regular equality over elements in contracts.
7836 (Cursor): Type is now public so that it can be used in
7837 model functions.
7838 (Formal_Model): Ghost package containing
7839 model functions that are used in subprogram contracts.
7840 (Current_To_Last): Removed, model functions should be used
7841 instead.
7842 (First_To_Previous): Removed, model functions should
7843 be used instead.
7844 (Strict_Equal): Removed, model functions
7845 should be used instead.
7846 (Append): Default parameter value
7847 replaced by new wrapper to allow more precise contracts.
7848 (Insert): Default parameter value replaced by new wrapper to
7849 allow more precise contracts.
7850 (Delete): Default parameter
7851 value replaced by new wrapper to allow more precise contracts.
7852 (Prepend): Default parameter value replaced by new wrapper to
7853 allow more precise contracts.
7854 (Delete_First): Default parameter
7855 value replaced by new wrapper to allow more precise contracts.
7856 (Delete_Last): Default parameter value replaced by new wrapper
7857 to allow more precise contracts.
7858
7859 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7860
7861 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7862 for object declarations.
7863 (Expand_SPARK_N_Object_Declaration): New routine.
7864 * sem_elab.adb (Check_A_Call): Include calls to the
7865 Default_Initial_Condition procedure of a type under the SPARK
7866 elaboration checks umbrella.
7867
7868 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7869
7870 * sem.adb (Analyze): Diagnose an illegal iterated component
7871 association.
7872 * sem_util.ads, sem_util.adb
7873 (Diagnose_Iterated_Component_Association): New routine.
7874
7875 2017-04-27 Bob Duff <duff@adacore.com>
7876
7877 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7878 getcwd fails.
7879 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7880 exception if getcwd failed.
7881
7882 2017-04-27 Yannick Moy <moy@adacore.com>
7883
7884 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7885 entities with special prefix.
7886
7887 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7888
7889 * debug.adb Change the documentation of switch -gnatd.s.
7890 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7891 to manage the secondary stack when an enclosing scope already
7892 performs this functionality (aka relaxed management). Switch
7893 -gnatd.s may be used to force strict management in which case
7894 the block will manage the secondary stack unconditionally. Add
7895 a guard to stop the traversal when encountering a package or a
7896 subprogram scope.
7897
7898 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7899
7900 * sem_res.adb (Resolve_Call): Refine further the handling of
7901 limited views of return types in function calls. If the function
7902 that returns a limited view appears in the current unit,
7903 we do not replace its type by the non-limited view because
7904 this transformation is performed int the back-end. However,
7905 the type of the call itself must be the non-limited view, to
7906 prevent spurious resolution errors.
7907
7908 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7909
7910 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7911 Removed, proposed implementation using generics for class-wide
7912 preconditions proved impractical.
7913 (Class_Wide_Clone): New attribute of subprogram. Designates
7914 subprogram created for primitive operations with class-wide
7915 pre/postconditions that contain calls to other primitives. The
7916 clone holds the body of the original primitive, but the
7917 pre/postonditions do not apply to it. The original body is
7918 rewritten as a wrapper for a call to the clone.
7919 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7920 the flag is set, no code for the corresponding pre/postconditions
7921 is inserted into its body.
7922
7923 2017-04-27 Bob Duff <duff@adacore.com>
7924
7925 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7926 Scalar_Storage_Order if -gnatI is given.
7927 * sem_prag.adb (Analyze_Pragma): Ignore
7928 Default_Scalar_Storage_Order if -gnatI is given.
7929
7930 2017-04-27 Claire Dross <dross@adacore.com>
7931
7932 * a-cofuba.ads (Add): Take as an additional input parameter
7933 the position where the element should be inserted.
7934 (Remove): New function that removes an element from the container.
7935 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7936 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7937 (Remove): New function that removes an element from a set.
7938 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7939 (Remove): New function that removes an element from a sequence.
7940 (Insert): New function that adds anywhere in a sequence.
7941
7942 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7943
7944 * checks.adb (Generate_Range_Check): Revert previous change.
7945
7946 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7947
7948 * sem_util.adb: Minor reformatting/rewording.
7949
7950 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7951
7952 * lib-xref.adb (Generate_Reference): The use
7953 of attribute 'Result is not considered a violation of pragma
7954 Unreferenced.
7955
7956 2017-04-27 Justin Squirek <squirek@adacore.com>
7957
7958 * cstand.adb (Create_Standard): Correctly set
7959 Directly_Designated_Type for Any_Access.
7960 * sem_type.adb (Covers): Minor grammar fixes.
7961
7962 2017-04-27 Bob Duff <duff@adacore.com>
7963
7964 * sem_attr.adb: Minor cleanup.
7965
7966 2017-04-27 Claire Dross <dross@adacore.com>
7967
7968 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7969 private child of Ada.Containers used to implement all functional
7970 containers.
7971 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7972 child of Ada.Containers. It provides functional indefinite unbounded
7973 maps which can be used as high level models for specification
7974 of data structures.
7975 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7976 child of Ada.Containers. It provides functional indefinite unbounded
7977 sets which can be used as high level models for specification
7978 of data structures.
7979 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7980 child of Ada.Containers. It provides functional indefinite unbounded
7981 vectors which can be used as high level models for specification
7982 of data structures.
7983 * Makefile.rtl: Add new packages.
7984 * impunit.adb: Add new packages.
7985
7986 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7987
7988 * sem_ch4.adb: Minor reformatting.
7989
7990 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7991
7992 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7993 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7994 point type actual that has user-defined arithmetic primitives,
7995 when there is a previous actual for a formal package that defines
7996 a fixed-point type with the parent user-defined operator.
7997
7998 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7999
8000 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
8001 * sem_attr.adb (Resolve_Attribute): Generate a range check when
8002 the component type allows range checks.
8003
8004 2017-04-27 Ed Schonberg <schonberg@adacore.com>
8005
8006 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
8007 corresponding declaration, because formal derived types are
8008 rewritten as private extensions.
8009
8010 2017-04-27 Ed Schonberg <schonberg@adacore.com>
8011
8012 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
8013 dimensions of operands if node has been analyzed already, because
8014 previous analysis and dimension checking will have removed the
8015 dimension information from the operands.
8016
8017 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
8018
8019 * debug.adb: Document the use of switch -gnatd.s.
8020 * einfo.ads Update the documentation on attribute
8021 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
8022 the uses of these attributes from certain entities.
8023 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
8024 which determines whether the block should continue to manage
8025 the secondary stack.
8026 (Manages_Sec_Stack): New routine.
8027
8028 2017-04-27 Bob Duff <duff@adacore.com>
8029
8030 * atree.ads: Minor edit.
8031
8032 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
8033
8034 * sinfo.ads: Update the section on Ghost mode. Add
8035 a section on SPARK mode. Update the placement of section on
8036 expression functions.
8037
8038 2017-04-27 Bob Duff <duff@adacore.com>
8039
8040 * sinput.adb (Get_Source_File_Index): Don't
8041 assert that S is in the right range in the case where this is
8042 a .dg file under construction.
8043
8044 2017-04-27 Yannick Moy <moy@adacore.com>
8045
8046 * sem_util.adb (Check_Result_And_Post_State):
8047 Handle more precisely each conjunct in expressions formed by
8048 and'ing sub-expressions.
8049
8050 2017-04-27 Gary Dismukes <dismukes@adacore.com>
8051
8052 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
8053
8054 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8055
8056 * gnat_rm.texi, gnat_ugn.texi,
8057 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
8058 doc/gnat_ugn/platform_specific_information.rst,
8059 doc/gnat_ugn/gnat_and_program_execution.rst,
8060 doc/gnat_ugn/gnat_utility_programs.rst,
8061 doc/gnat_ugn/the_gnat_compilation_model.rst,
8062 doc/gnat_rm/implementation_defined_attributes.rst,
8063 doc/gnat_rm/the_gnat_library.rst,
8064 doc/gnat_rm/implementation_defined_pragmas.rst,
8065 doc/gnat_rm/representation_clauses_and_pragmas.rst,
8066 doc/gnat_rm/implementation_of_specific_ada_features.rst,
8067 doc/gnat_rm/implementation_defined_aspects.rst,
8068 doc/gnat_rm/implementation_defined_characteristics.rst: Update
8069 documentation.
8070
8071 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8072
8073 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
8074 generating C code on complex case expressions.
8075
8076 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8077
8078 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
8079 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
8080 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
8081 Ada_2012 instead of Ada_2005 to be compatible with the above
8082 change.
8083 * bindgen.adb: Silence new warning on pragma Ada_95.
8084
8085 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8086
8087 * checks.adb (Generate_Range_Check): Revert part of previous change.
8088
8089 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8090
8091 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
8092 container indexing operation that appears as a an actual in a
8093 parameter association in a procedure call.
8094
8095 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
8096
8097 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
8098 Fix spelling mistakes.
8099
8100 2017-04-25 Bob Duff <duff@adacore.com>
8101
8102 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
8103 * sinput-p.adb: Use regular fat pointers, with bounds checking,
8104 for source buffers. Fix misc obscure bugs.
8105 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
8106 checking, for source buffers. Modify representation clause for
8107 Source_File_Record as appropriate. Move Source_File_Index_Table
8108 from spec to body, because it is not used outside the body.
8109 Move Set_Source_File_Index_Table into the private part, because
8110 it is used only in the body and in children. Use trickery to
8111 modify the dope in the generic instantiation case. It's ugly,
8112 but not as ugly as the previous method. Fix documentation.
8113 Remove obsolete code.
8114 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
8115 indexing in source buffers.
8116 * fmap.adb: Avoid conversions from one string type to another.
8117 Remove a use of global name buffer.
8118 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
8119 fixes.
8120
8121 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8122
8123 * exp_util.adb, exp_ch4.adb: Minor reformatting.
8124
8125 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8126
8127 * checks.adb: Code clean up in various routines.
8128 (Generate_Range_Check): Do not generate a range check when the
8129 expander is not active or when index/range checks are suppressed
8130 on the target type.
8131 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
8132 Remove variants that include a Supress parameter. These routines
8133 are never used, and were introduced before the current scope-based
8134 check suppression method.
8135
8136 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
8137
8138 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
8139 code and some subprogram calls that are now noop.
8140
8141 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8142
8143 * exp_ch4.adb (Expand_N_Case_Expression): Take
8144 Minimize_Expression_With_Actions into account when possible.
8145
8146 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8147
8148 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
8149 (Known_Null): Moved to Sem_Util.
8150 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
8151 (Known_Null): Moved to Sem_Util.
8152 * sem_util.adb Add new enumeration type Null_Status_Kind.
8153 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
8154 this routine is now carried out by Null_Status.
8155 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
8156 is now carried out by Null_Status.
8157 (Null_Status): New routine.
8158 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
8159 (Known_Null): Moved from Exp_Util.
8160
8161 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8162
8163 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
8164 error on the return type of an expression function that is a
8165 completion, if the type is derived from a generic formal type.
8166
8167 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8168
8169 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
8170 conversion are those of the target type.
8171
8172 2017-04-25 Bob Duff <duff@adacore.com>
8173
8174 * a-clrefi.adb: Minor cleanup.
8175
8176 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8177
8178 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
8179
8180 2017-04-25 Bob Duff <duff@adacore.com>
8181
8182 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
8183 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
8184 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
8185 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
8186 the Internal_Source buffer. This removes the incorrect call to "="
8187 the customer noticed.
8188 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
8189 eventually need to eliminate them altogether. Or else get rid
8190 of zero-origin addressing.
8191
8192 2017-04-25 Claire Dross <dross@adacore.com>
8193
8194 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
8195 function used in GNATprove to know if an expression contains
8196 non-dispatching calls on primitives of a tagged type.
8197
8198 2017-04-25 Bob Duff <duff@adacore.com>
8199
8200 * rtsfind.adb (Initialize): Initialize
8201 First_Implicit_With. Building the compiler with Normalize_Scalars
8202 and validity checking finds this being used as an uninitialized
8203 variable.
8204
8205 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8206
8207 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
8208 Add a warning about SPARK mode management. The routine now
8209 saves and restores both the mode and associated pragma.
8210 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
8211 SPARK mode management. The routine now saves and restores both
8212 the mode and associated pragma.
8213 (Analyze_Object_Contract):
8214 Add a warning about SPARK mode management. The routine
8215 now saves and restores both the mode and associated pragma.
8216 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
8217 management. The routine now saves and restores both the mode
8218 and associated pragma. (Analyze_Package_Contract): Add a warning
8219 about SPARK mode management. The routine now saves and restores
8220 both the mode and associated pragma.
8221 (Analyze_Task_Contract):
8222 Add a warning about SPARK mode management. The routine now saves
8223 and restores both the mode and associated pragma.
8224 * expander.adb (Expand): Change the way the Ghost mode is saved
8225 and restored.
8226 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
8227 saved and restored.
8228 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
8229 and restored.
8230 * exp_util.adb (Build_DIC_Procedure_Body):
8231 Change the way the Ghost mode is saved and restored.
8232 (Build_DIC_Procedure_Declaration): Change the way the Ghost
8233 mode is saved and restored.
8234 (Build_Invariant_Procedure_Body):
8235 Change the way the Ghost mode is saved and restored.
8236 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
8237 mode is saved and restored.
8238 (Make_Predicate_Call): Change the
8239 way the Ghost mode is saved and restored.
8240 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
8241 saved and restored.
8242 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8243 and its assignment.
8244 (Mark_And_Set_Ghost_Body): Remove parameter
8245 Mode and its assignment.
8246 (Mark_And_Set_Ghost_Completion):
8247 Remove parameter Mode and its assignment.
8248 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
8249 assignment.
8250 (Mark_And_Set_Ghost_Instantiation): Remove parameter
8251 Mode and its assignment.
8252 (Mark_And_Set_Ghost_Procedure_Call):
8253 Remove parameter Mode and its assignment.
8254 (Set_Ghost_Mode):
8255 Remove parameter Mode and its assignment.
8256 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8257 and update the comment on usage.
8258 (Mark_And_Set_Ghost_Body):
8259 Remove parameter Mode and update the comment on usage.
8260 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
8261 update the comment on usage.
8262 (Mark_And_Set_Ghost_Declaration):
8263 Remove parameter Mode and update the comment on usage.
8264 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
8265 update the comment on usage.
8266 (Mark_And_Set_Ghost_Procedure_Call):
8267 Remove parameter Mode and update the comment on usage.
8268 (Set_Ghost_Mode): Remove parameter Mode and update the comment
8269 on usage.
8270 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
8271 types.
8272 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
8273 of obsolete field SPARK_Mode_Pragma.
8274 (Load_Main_Source): Remove
8275 the assignment of obsolete field SPARK_Mode_Pragma.
8276 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
8277 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
8278 the assignment of obsolete field SPARK_Mode_Pragma.
8279 (Ensure_System_Dependency): Remove the assignment of obsolete
8280 field SPARK_Mode_Pragma.
8281 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
8282 mode management. Change the way Ghost and SPARK modes are saved
8283 and restored.
8284 * sem.adb (Analyze): Change the way the Ghost mode is saved
8285 and restored.
8286 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
8287 Ghost mode is saved and restored.
8288 (Process_Full_View): Change
8289 the way the Ghost mode is saved and restored.
8290 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
8291 mode is saved and restored.
8292 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
8293 mode is saved and restored.
8294 (Analyze_Subprogram_Body_Helper):
8295 Change the way the Ghost mode is saved and restored.
8296 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
8297 Ghost mode is saved and restored.
8298 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
8299 management. Save the SPARK mode-related data prior to any changes
8300 to the scope stack and contexts. The mode is then reinstalled
8301 before the subunit is analyzed in order to restore the original
8302 view of the subunit.
8303 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8304 warning on region management. Change the way the Ghost and
8305 SPARK modes are saved and restored.
8306 (Inline_Instance_Body):
8307 Add a warning about SPARK mode management. Code clean up.
8308 (Analyze_Subprogram_Instantiation): Update the warning on region
8309 management. Change the way the Ghost and SPARK modes are saved
8310 and restored.
8311 (Instantiate_Package_Body): Update the warning
8312 on region management. Change the way the Ghost and SPARK modes
8313 are saved and restored.
8314 (Instantiate_Subprogram_Body): Update
8315 the warning on region management. Change the way the Ghost and
8316 SPARK modes are saved and restored.
8317 (Set_Instance_Env): Add a
8318 warning about SPARK mode management. Change the way SPARK mode
8319 is saved and restored.
8320 * sem_ch13.adb (Build_Predicate_Functions):
8321 Change the way the Ghost mode is saved and restored.
8322 (Build_Predicate_Function_Declaration): Change the way the Ghost
8323 mode is saved and restored.
8324 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8325 mode management. Change the way SPARK mode is saved and restored.
8326 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8327 Change the way the Ghost mode is saved and restored.
8328 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8329 the Ghost mode is saved and restored.
8330 (Analyze_Pragma):
8331 Change the way the Ghost mode is saved and restored.
8332 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8333 Ghost mode is saved and restored.
8334 * sem_util.adb (Install_SPARK_Mode): New routine.
8335 (Restore_SPARK_Mode): New routine.
8336 (Save_SPARK_Mode_And_Set): Removed.
8337 (Set_SPARK_Mode): New routine.
8338 * sem_util.ads (Install_SPARK_Mode): New routine.
8339 (Restore_SPARK_Mode): New routine.
8340 (Save_SPARK_Mode_And_Set): Removed.
8341 (Set_SPARK_Mode): New routine.
8342
8343 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8344
8345 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8346 to determine whether a type is declared in a local package that
8347 has not yet been frozen.
8348 * freeze.adb (Freeze_Before): Use new predicate to determine
8349 whether a local package must be installed on the scope stack
8350 in order to evaluate in the proper scope actions generated by
8351 aspect specifications, such as Predicate
8352 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8353 using new predicate.
8354
8355 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8356
8357 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8358 comparisons between non- scalar expressions expressions because
8359 their values cannot be invalidated.
8360 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8361 comment on usage.
8362
8363 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8364
8365 * par_sco.adb: Minor reformatting.
8366
8367 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8368
8369 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8370 is a type from an unfrozen local package, install package to
8371 complete the analysis of delayed aspects of the type.
8372
8373 2017-04-25 Tristan Gingold <gingold@adacore.com>
8374
8375 * bingen.adb (System_Version_Control_Used): New variable.
8376 (Resolve_Binder_Options): Set the above variable.
8377 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8378 (Gen_Elab_Order): Emit blank line before.
8379
8380 2017-04-25 Justin Squirek <squirek@adacore.com>
8381
8382 * sem_cat.adb (Validate_RT_RAT_Component): Added
8383 an extra check to ignore incomplete types.
8384
8385 2017-04-25 Thomas Quinot <quinot@adacore.com>
8386
8387 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8388 bogus circuitry for the case where Name is Predicate.
8389
8390 2017-04-25 Thomas Quinot <quinot@adacore.com>
8391
8392 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8393 Create SCOs for Predicate aspects in disabled
8394 state initially, to be enabled later on by...
8395 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8396 SCO for predicate as enabled.
8397
8398 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8399
8400 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8401 pragmas Warnings Off / On.
8402 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8403 Warnings Off / On.
8404 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8405 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8406 consider comparisons between static expressions because their
8407 values cannot be invalidated.
8408 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8409 Warnings Off / On.
8410 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8411 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8412
8413 2017-04-25 Bob Duff <duff@adacore.com>
8414
8415 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8416 task bodies.
8417
8418 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8419
8420 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8421 typo fixes.
8422
8423 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8424
8425 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8426 On/Off to defend against a spurious warning in conditional
8427 compilation.
8428 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8429 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8430 defend against a spurious warning in conditional compilation.
8431 * output.adb Add a pair of pragma Warnings On/Off to defend
8432 against a spurious warning in conditional compilation.
8433 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8434 (Fold_General_Op): New routine.
8435 (Fold_Static_Real_Op): New routine.
8436 (Test_Comparison): New routine.
8437 * sem_eval.ads (Test_Comparison): New routine.
8438 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8439 (Warn_On_Constant_Valid_Condition): New routine.
8440 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8441 to detect a specific case.
8442 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8443 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8444 to defend against a spurious warning in conditional compilation.
8445 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8446 against a spurious warning in conditional compilation.
8447 * usage.adb Add a pair of pragma Warnings On/Off to defend
8448 against a spurious warning in conditional compilation.
8449
8450 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8451
8452 * sinfo.ads, sem_ch13.adb: Update comment.
8453
8454 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8455
8456 * sem_util.adb (Is_Post_State): A reference to a
8457 generic in out parameter is considered a change in the post-state
8458 of a subprogram.
8459
8460 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8461
8462 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8463 declaration of a subprogram instance within its wrapper package,
8464 skip over null statements that may result from the rewriting of
8465 ignored pragmas.
8466
8467 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8468
8469 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8470 If the type is an unchecked_union, replace the attribute with
8471 a Raise_Program_Error (rather than inserting such before the
8472 attribute reference) to handle properly the case where we are
8473 processing a component of a larger record, and we need to prevent
8474 further expansion for the unchecked union.
8475 (Expand_Attribute_Reference, case 'Write): If the type is
8476 an unchecked_union, check whether enclosing scope is a Write
8477 subprogram. Replace attribute with a Raise_Program_Error if the
8478 discriminants of the unchecked_union type have not default values
8479 because such a use is erroneous..
8480
8481 2017-04-25 Tristan Gingold <gingold@adacore.com>
8482
8483 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8484 Add relative_deadline to task record on edf profile.
8485 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8486 (Make_Task_Create_Call): Pass relative_deadline value.
8487 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8488 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8489 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8490 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8491 GNAT_Ravenscar_EDF (set scheduling policy).
8492 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8493 pragma.
8494 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8495 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8496 New names.
8497 (Pragma_Deadline_Floor): New pragma.
8498 * targparm.adb (Get_Target_Parameters): Recognize
8499 GNAT_Ravenscar_EDF profile.
8500
8501 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8502
8503 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8504
8505 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8506
8507 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8508 declaration to locate nearest ancestor, because derived
8509 type declarations for record types are rewritten as record
8510 declarations.
8511 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8512 properly derivations that are completions of private types.
8513 (Add_Predicates): If type is private, examine rep. items of full
8514 view, which may include inherited predicates.
8515 (Build_Predicate_Functions): Ditto.
8516
8517 2017-04-25 Javier Miranda <miranda@adacore.com>
8518
8519 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8520 to generate new entities for subtype declarations located in
8521 Expression_With_Action nodes.
8522
8523 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8524
8525 * sem_elab.adb (Check_A_Call): Remove
8526 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8527 need for Elaborate_All when SPARK elaboration checks are
8528 required. Update the checks for instances, variables, and calls
8529 to Default_Initial_Condition procedures.
8530
8531 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8532
8533 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8534 into a boolean aspect, in analogy with the Ada aspect No_Return.
8535
8536 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8537
8538 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8539
8540 2017-04-25 Bob Duff <duff@adacore.com>
8541
8542 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8543 Is_True_Constant for an array variable that is passed to a
8544 foreign function as an 'in' parameter.
8545 * debug.adb: Document -gnatd.q.
8546
8547 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8548
8549 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8550 is completion and return type is an access type do not freeze
8551 designated type: this will be done in the process of freezing
8552 the expression if needed.
8553 (Freeze_Expr_Types): Check whether type is complete before
8554 creating freeze node, to provide a better error message if
8555 reference is premature.
8556 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8557 functions created by type derivations.
8558
8559 2017-04-25 Pascal Obry <obry@adacore.com>
8560
8561 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8562
8563 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8564
8565 * sem_res.adb (Resolve_Type_Conversion):
8566 When resolving against any fixed type, set the type of the
8567 operand as universal real when the operand is a multiplication
8568 or a division where both operands are of any fixed type.
8569 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8570 placement of an error message by pointing to the operand of a
8571 type conversion rather than the conversion itself.
8572
8573 2017-04-25 Thomas Quinot <quinot@adacore.com>
8574
8575 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8576 Needs_Debug_Info when producing SCOs.
8577
8578 2017-04-25 Thomas Quinot <quinot@adacore.com>
8579
8580 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8581 Always pass a null finalization master for a library level named access
8582 type to which a pragme No_Heap_Finalization applies.
8583
8584 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8585
8586 PR ada/78845
8587
8588 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8589 set to A'First(2) and vice versa.
8590
8591 2017-04-25 Yannick Moy <moy@adacore.com>
8592
8593 * freeze.adb (Freeze_Record_Type): Remove obsolete
8594 rule on volatile tagged record restriction on SPARK code.
8595
8596 2017-04-25 Yannick Moy <moy@adacore.com>
8597
8598 * sem_prag.adb (minor) Fix SPARK RM reference.
8599
8600 2017-04-25 Yannick Moy <moy@adacore.com>
8601
8602 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8603 comment to reflect which entity is chosen as unique entity.
8604 (Unique_Entity): Return full view instead of private spec for
8605 protected type or task type. Fix possible incorrect access when
8606 called on entry.
8607
8608 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8609
8610 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8611 array types only instead of all packed array types.
8612
8613 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8614
8615 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8616 dimension system, verify that dimensions of both match.
8617 (Check_Conformance): Add error message in case of dimension
8618 mismatch.
8619 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8620 predicate.
8621
8622 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8623
8624 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8625 confusing.
8626
8627 2017-04-25 Yannick Moy <moy@adacore.com>
8628
8629 * sem_util.adb: Minor refactoring.
8630 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8631
8632 2017-04-25 Claire Dross <dross@adacore.com>
8633
8634 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8635 ultimate alias when accessing overridden operation. Indeed, if the
8636 overridden operation is itself inherited, it won't have any explicit
8637 contract.
8638
8639 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8640
8641 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8642 overlap if the two formals have different types, because formally
8643 the corresponding actuals cannot designate the same objects.
8644
8645 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8646
8647 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8648 dimensions are present from context, use them. b) If operand is
8649 a static constant rewritten as a literal, obtain the dimensions
8650 from the original declaration, otherwise use dimensions of type
8651 established from context.
8652
8653 2017-04-25 Yannick Moy <moy@adacore.com>
8654
8655 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8656 of array that is private.
8657
8658 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8659
8660 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8661 reformatting.
8662
8663 2017-04-25 Yannick Moy <moy@adacore.com>
8664
8665 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8666 on body.
8667
8668 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8669
8670 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8671 the check that recognizes a call to a private overridding and
8672 replaces the called subprogram with its alias.
8673
8674 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8675
8676 * exp_util.adb: Minor reformatting.
8677
8678 2017-04-25 Justin Squirek <squirek@adacore.com>
8679
8680 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8681 interface types as a partial view of a private type for the
8682 generation of invariant procedure bodies.
8683 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8684 Add a condition to get the Corresponding_Record_Type for
8685 concurrent types, add condition to return in the absence of a
8686 class in the pragma, remove call to Replace_Type_References,
8687 and add call to Replace_References.
8688 (Add_Interface_Invariatns),
8689 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8690 to including the working type T.
8691 (Add_Own_Invariants): Remove
8692 legacy condition for separate units, remove dispatching for ASIS
8693 and save a copy of the expression in the pragma expression.
8694 (Build_Invariant_Procedure_Body): Default initalize vars,
8695 remove return condition on interfaces, always use the
8696 private type for interfaces, and move the processing of types
8697 until after the processing of invariants for the full view.
8698 (Build_Invariant_Procedure_Declaration): Remove condition
8699 to return if an interface type is encountered and add
8700 condition to convert the formal parameter to its class-wide
8701 counterpart if Work_Typ is abstract.
8702 (Replace_Type): Add call to Remove_Controlling_Arguments.
8703 (Replace_Type_Ref): Remove class-wide dispatching for the current
8704 instance of the type.
8705 (Replace_Type_References): Remove parameter "Derived"
8706 (Remove_Controlling_Arguments): Created in order to removing
8707 the controlliong argument from calls to primitives in the case
8708 of the formal parameter being an class-wide abstract type.
8709 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8710 to the change made to Freeze_Type in exp_ch3. Add a condition
8711 to treat interface types as a partial view.
8712 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8713 to Build_Invariant_Procedure_Declaration to properly generate a
8714 "partial" invariant procedure when Typ is an interface.
8715
8716 2017-04-25 Bob Duff <duff@adacore.com>
8717
8718 * a-numeri.ads: Go back to using brackets encoding for the Greek
8719 letter pi.
8720
8721 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8722
8723 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8724 (10-15): if derived type T with progenitors is abstract,
8725 and primitive P of this type inherits non-trivial classwide
8726 preconditions from both a parent operation and from an interface
8727 operation, then the inherited operation is abstract if the parent
8728 operation is not null.
8729 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8730 with Covered_Interface_Op to yield the actual interface operation
8731 that is implemented by a given inherited operation.
8732
8733 2017-04-25 Javier Miranda <miranda@adacore.com>
8734
8735 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8736 and right operands after performing the validity checks. Required
8737 because validity checks may remove side effects from the operands.
8738
8739 2017-04-25 Javier Miranda <miranda@adacore.com>
8740
8741 * exp_attr.adb (Attribute_Unrestricted_Access):
8742 Do not disable implicit type conversion. Required to generate
8743 code that displaces the pointer to reference the secondary
8744 dispatch table.
8745
8746 2017-04-25 Pascal Obry <obry@adacore.com>
8747
8748 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8749 Required_Artifacts attribute.
8750
8751 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8752
8753 * sem_util.adb (Same_Value): String literals are compile-time
8754 values, and comparing them must use Expr_Value_S.
8755
8756 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8757
8758 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8759 dereference is introduced for the object, and the object is
8760 overloaded, do not check whether it is aliased, because it may
8761 include an implicit dereference.
8762 * sem_type.adb (Disambiguate): If two interpretations are access
8763 attribute types with the same designated type keep either of
8764 them and do not report an ambiguity. A true ambiguity will be
8765 reported elsewhere.
8766
8767 2017-04-25 Bob Duff <duff@adacore.com>
8768
8769 * a-numeri.ads: Change the encoding of Greek letter Pi from
8770 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8771 to indicate the encoding. We considered using a byte order mark
8772 (BOM), but that causes various trouble (misc software eats the
8773 BOM, if you have a patch with a BOM, then it's not at the start
8774 of the patch, so it's not a BOM, the BOM affects with-ing files,
8775 etc.).
8776 * scng.adb, s-wchcnv.adb: Minor.
8777
8778 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8779
8780 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8781 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8782
8783 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8784 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8785 Improve error message on operations that inherit non-conforming
8786 classwide preconditions from ancestor and progenitor.
8787 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8788 moved here from sem_ch3.
8789 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8790 check given in RM 6.1.1 (17) concerning renamings of overriding
8791 operations that inherits class-wide preconditions from ancestor
8792 or progenitor.
8793
8794 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8795
8796 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8797 (Build_Adjust_Statements): Code cleanup.
8798 (Build_Finalizer): Update the initialization of
8799 Exceptions_OK.
8800 (Build_Finalize_Statements): Code cleanup.
8801 (Build_Initialize_Statements): Code cleanup.
8802 (Make_Deep_Array_Body): Update the initialization of
8803 Exceptions_OK.
8804 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8805 (Process_Object_Declaration): Generate a null exception handler only
8806 when exceptions are allowed.
8807 (Process_Transients_In_Scope): Update the initialization of
8808 Exceptions_OK.
8809 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8810 routine.
8811 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8812 restrictions when the handler is internally generated and the
8813 mode is warnings.
8814
8815 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8816
8817 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8818 enforce legality rule on classwide preconditions inherited from
8819 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8820 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8821 subprogram need not be dispatching if it appears in a precondition
8822 for an abstract or null subprogram.
8823
8824 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8825
8826 * sem_ch10.adb: Minor typo fix.
8827
8828 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8829
8830 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8831
8832 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8833
8834 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8835 have a length which is a power of 2.
8836 (Is_Predefined_File_Name): Likewise. Adjust comment.
8837
8838 2017-04-25 Bob Duff <duff@adacore.com>
8839
8840 * exp_aggr.adb (Component_Count): Protect the
8841 arithmetic from attempting to convert a value >= 2**31 to Int,
8842 which would otherwise raise Constraint_Error.
8843
8844 2017-04-25 Bob Duff <duff@adacore.com>
8845
8846 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8847 first character of the policy name is not unique.
8848
8849 2017-04-25 Bob Duff <duff@adacore.com>
8850
8851 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8852 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8853 about this flag not being used. It was already used, and it is
8854 now used more.
8855
8856 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8857
8858 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8859 (Ignore_SPARK_Mode_Pragmas): New routine.
8860 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8861 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8862 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8863 related entities.
8864 (Ignore_SPARK_Mode_Pragmas): New routine
8865 along with pragma Inline.
8866 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8867 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8868 Ignore_SPARK_Mode_Pragmas_In_Instance.
8869 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8870 Save and restore the value of global flag
8871 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8872 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8873 the corresponding spec or the body must ignore all SPARK_Mode
8874 pragmas found within.
8875 (Analyze_Subprogram_Declaration): Mark
8876 the spec when it needs to ignore all SPARK_Mode pragmas found
8877 within to allow the body to infer this property in case it is
8878 instantiated or inlined later.
8879 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8880 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8881 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8882 when the corresponding spec also ignored all SPARK_Mode pragmas
8883 found within.
8884 (Analyze_Package_Declaration): Mark the spec when
8885 it needs to ignore all SPARK_Mode pragmas found within to allow
8886 the body to infer this property in case it is instantiated or
8887 inlined later.
8888 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8889 Save and restore the value of flag
8890 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8891 formal spec when it needs to ignore all SPARK_Mode
8892 pragmas found within to allow the body to infer this
8893 property in case it is instantiated or inlined later.
8894 (Analyze_Package_Instantiation): Save and restore the value
8895 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8896 the instance spec when it needs to ignore all SPARK_Mode
8897 pragmas found within to allow the body to infer this
8898 property in case it is instantiated or inlined later.
8899 (Analyze_Subprogram_Instantiation): Save and restore the value
8900 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8901 instance spec and anonymous package when they need to ignore
8902 all SPARK_Mode pragmas found within to allow the body to infer
8903 this property in case it is instantiated or inlined later.
8904 (Instantiate_Package_Body): Save and restore the value of global
8905 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8906 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8907 corresponding instance spec also ignored all SPARK_Mode pragmas
8908 found within.
8909 (Instantiate_Subprogram_Body): Save and restore the
8910 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8911 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8912 when the corresponding instance spec also ignored all SPARK_Mode
8913 pragmas found within.
8914 * sem_prag.adb (Analyze_Pragma): Update the reference to
8915 Ignore_Pragma_SPARK_Mode.
8916 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8917 all SPARK_Mode pragmas defined within yields mode "off".
8918
8919 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8920
8921 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8922
8923 2017-04-25 Bob Duff <duff@adacore.com>
8924
8925 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8926 All_Checks" to avoid generating unnecessary checks.
8927 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8928 All_Checks".
8929 * sem.ads: Fix comment.
8930 * expander.ads: Fix comment.
8931 * exp_atag.ads: Fix comment: "Index = 0" should be
8932 "Index >= 0".
8933
8934 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8935
8936 * s-taprop-linux.adb: Minor editorial fixes.
8937
8938 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8939
8940 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8941 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8942 variable and set it to True whenever the main hash table is
8943 populated. Short- circuit the Assoc function if it is false
8944 and add associated guards.
8945
8946 2017-04-25 Olivier Hainque <hainque@adacore.com>
8947
8948 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8949 specs without elaboration code that have an elaboration counter
8950 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8951 * sem_ch10.adb (Analyze_Compilation_Unit):
8952 Set_Elaboration_Entity_Required when requested to preserve
8953 control flow, to ensure the unit elaboration is materialized at
8954 bind time, resulting in the inclusion of the unit object file
8955 in the executable closure at link time.
8956
8957 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8958
8959 * exp_dbug.adb: In Debug_Renaming_Declaration,
8960 when dealing with indexed component, accept to produce a renaming
8961 symbol when the index is an IN parameter or when it is a name
8962 defined in an outer scope.
8963
8964 2017-04-25 Yannick Moy <moy@adacore.com>
8965
8966 * errout.adb (Error_Msg): Adapt continuation
8967 message in instantiations and inlined bodies for info messages.
8968
8969 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8970
8971 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8972 Use direct 4-character slice comparisons.
8973 (Has_Prefix): Add
8974 pragma Inline. (Has_Suffix): Delete.
8975 (Is_Internal_File_Name):
8976 Test Is_Predefined_File_Name first.
8977 (Is_Predefined_File_Name):
8978 Use direct slice comparisons as much as possible and limit all
8979 comparisons to at most 8 characters.
8980
8981 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8982
8983 * checks.adb (Insert_Valid_Check): Code cleanup.
8984 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8985 (Expand_Actuals): Generate proper copy-back for a validation
8986 variable when it acts as the argument of a type conversion.
8987 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8988 predicate to operate on type qualifications.
8989
8990 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8991
8992 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8993 Minor reformatting.
8994
8995 2017-04-25 Bob Duff <duff@adacore.com>
8996
8997 * sem_prag.adb (No_Return): Give an error if the pragma applies
8998 to a body. Specialize the error for the specless body case,
8999 as is done for (e.g.) pragma Convention.
9000 * debug.adb: Add switch -gnatd.J to disable the above legality
9001 checks. This is mainly for use in our test suite, to avoid
9002 rewriting a lot of illegal (but working) code. It might also
9003 be useful to customers. Under this switch, if a pragma No_Return
9004 applies to a body, and the procedure raises an exception (as it
9005 should), the pragma has no effect. If the procedure does return,
9006 execution is erroneous.
9007
9008 2017-04-25 Bob Duff <duff@adacore.com>
9009
9010 * exp_ch6.adb (Expand_Actuals): This is the
9011 root of the problem. It took N as an 'in out' parameter, and in
9012 some cases, rewrote N, but then set N to Original_Node(N). So
9013 the node returned in N had no Parent. The caller continued
9014 processing of this orphaned node. In some cases that caused a
9015 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
9016 and trips over the Empty Parent). The solution is to make N an
9017 'in' parameter. Instead of rewriting it, return the list of
9018 post-call actions, so the caller can do the rewriting later,
9019 after N has been fully processed.
9020 (Expand_Call_Helper): Move most of Expand_Call here. It has
9021 too many premature 'return' statements, and we want to do the
9022 rewriting on return.
9023 (Insert_Post_Call_Actions): New procedure to insert the post-call
9024 actions in the appropriate place. In the problematic case,
9025 that involves rewriting N as an Expression_With_Actions.
9026 (Expand_Call): Call the new procedures Expand_Call_Helper and
9027 Insert_Post_Call_Actions.
9028
9029 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9030
9031 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
9032 properly type derived from generic formal types, to handle
9033 properly modified version of ACATS 4.1B B611017.
9034
9035 2017-04-25 Javier Miranda <miranda@adacore.com>
9036
9037 * exp_unst.adb (Subp_Index): Adding missing
9038 support for renamings and functions that return a constrained
9039 array type (i.e. functions for which the frontend built a
9040 procedure with an extra out parameter).
9041
9042 2017-04-25 Pascal Obry <obry@adacore.com>
9043
9044 * s-string.adb: Minor code clean-up.
9045
9046 2017-04-25 Bob Duff <duff@adacore.com>
9047
9048 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
9049 procedure.
9050 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
9051 function for Non_Blocking_Wait_Process.
9052
9053 2017-04-25 Bob Duff <duff@adacore.com>
9054
9055 * prep.adb (Preprocess): Remove incorrect
9056 Assert. Current character can be ASCII.CR.
9057
9058 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9059
9060 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
9061 convention Stdcall, which has a number of exceptions. Convention
9062 is legal on a component declaration whose type is an anonymous
9063 access to subprogram.
9064
9065 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9066
9067 * sem_ch4.adb: sem_ch4.adb Various reformattings.
9068 (Try_One_Prefix_Interpretation): Use the base type when dealing
9069 with a subtype created for purposes of constraining a private
9070 type with discriminants.
9071
9072 2017-04-25 Javier Miranda <miranda@adacore.com>
9073
9074 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
9075 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
9076 dispatching primitives (Restore_Warnings): Restore warning on
9077 late dispatching primitives (Save_Warnings): Save warning on late
9078 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
9079 to enable/disable this warning.
9080 (WA_Warnings): Set warning on late dispatching primitives.
9081 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
9082 that its parent type has a private extension.
9083 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
9084 New subprogram.
9085 * usage.adb: Document -gnatw.j and -gnatw.J.
9086
9087 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9088
9089 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
9090 reformatting.
9091
9092 2017-04-25 Bob Duff <duff@adacore.com>
9093
9094 * binde.adb (Validate): Do not pass dynamic strings
9095 to pragma Assert, because older compilers do not support that.
9096
9097 2017-04-25 Bob Duff <duff@adacore.com>
9098
9099 * s-fileio.adb (Close): When a temp file is
9100 closed, delete it and clean up its Temp_File_Record immediately,
9101 rather than waiting until later.
9102 (Temp_File_Record): Add File
9103 component, so Close can know which Temp_File_Record corresponds
9104 to the file being closed.
9105 (Delete): Don't delete temp files,
9106 because they are deleted by Close.
9107 (Open): Set the File component
9108 of Temp_File_Record. This requires moving the creation of the
9109 Temp_File_Record to the end, after the AFCB has been created.
9110
9111 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9112
9113 * checks.adb (Insert_Valid_Check): Do not generate
9114 a validity check when inside a generic.
9115
9116 2017-04-25 Yannick Moy <moy@adacore.com>
9117
9118 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
9119
9120 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9121
9122 * snames.ads-tmpl (Snames): More names for detecting predefined
9123 potentially blocking subprograms.
9124
9125 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9126
9127 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
9128 concerning inheritance of class-wide preconditions do not apply
9129 to postconditions.
9130
9131 2017-04-25 Bob Duff <duff@adacore.com>
9132
9133 * s-ficobl.ads: Minor comment fix.
9134
9135 2017-04-25 Yannick Moy <moy@adacore.com>
9136
9137 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
9138 conversions from float to integer in GNATprove mode.
9139 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
9140 to call Apply_Type_Conversion_Checks, so that range checks
9141 are properly positioned when needed on conversions, including
9142 when converting from float to integer. (Determine_Range): In
9143 GNATprove mode, take into account the possibility of conversion
9144 from float to integer.
9145 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
9146 check on conversions from fixed-point to integer, not anymore
9147 on conversions from floating-point to integer, when in GNATprove
9148 mode.
9149
9150 2017-04-25 Yannick Moy <moy@adacore.com>
9151
9152 * checks.adb (Determine_Range_R): Special case type conversions
9153 from integer to float in order to get bounds in that case too.
9154 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
9155 mode, for computations involved in interval checking.
9156
9157 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9158
9159 * checks.adb (Insert_Valid_Check): Partially reimplement validity
9160 checks.
9161 * einfo.adb Node36 is now used as Validated_Object.
9162 (Validated_Object): New routine.
9163 (Set_Validated_Object): New routine.
9164 (Write_Field36_Name): Add an entry for Validated_Object.
9165 * einfo.ads Add new attribute Validated_Object along with
9166 usage in entities.
9167 (Validated_Object): New routine along with pragma Inline.
9168 (Set_Validated_Object): New routine along with pragma Inline.
9169 * exp_attr.adb (Make_Range_Test): Add processing for validation
9170 variables to avoid extra reads and copies of the prefix.
9171 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
9172 variables in order to reflect any changes done in the variable
9173 back into the original object.
9174 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
9175 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
9176
9177 2017-04-25 Steve Baird <baird@adacore.com>
9178
9179 * exp_ch7.adb (Build_Array_Deep_Procs,
9180 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
9181 generate Finalize_Address routines for CodePeer.
9182
9183 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9184
9185 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
9186 Analyze_Pre_Post_Condition, to implement the legality checks
9187 mandated by AI12-0131: Pre'Class shall not be specified for an
9188 overriding primitive subprogram of a tagged type T unless the
9189 Pre'Class aspect is specified for the corresponding primitive
9190 subprogram of some ancestor of T.
9191
9192 2017-04-25 Bob Duff <duff@adacore.com>
9193
9194 * sem_ch8.adb (Use_One_Type): If a use_type_clause
9195 is redundant, set its Used_Operations to empty. This is only
9196 necessary for use clauses that appear in the parent of a generic
9197 child unit, because those use clauses get reanalyzed when we
9198 instantiate the generic, and we don't want the Used_Operations
9199 carried over from the original context (where it was probably
9200 not redundant).
9201
9202 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9203
9204 * exp_ch6.adb: Minor reformatting.
9205
9206 2017-04-25 Bob Duff <duff@adacore.com>
9207
9208 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9209 Use Source_Index (Current_Sem_Unit) to find the correct casing.
9210 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
9211 (Current_Sem_Unit) to find the correct casing.
9212 * par.adb (Par): Null out Current_Source_File, to ensure that
9213 the above bugs won't rear their ugly heads again.
9214
9215 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9216
9217 * sem_ch8.adb (Find_Type): For an attribute reference
9218 'Class, if prefix type is synchronized and previous errors
9219 have suppressed the creation of the corresponding record type,
9220 create a spurious class-wide for the synchonized type itself,
9221 to catch other misuses of the attribute
9222
9223 2017-04-25 Steve Baird <baird@adacore.com>
9224
9225 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
9226 is True, then don't generate the accessibility check for the
9227 tag of a tagged result.
9228 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
9229 if CodePeer_Mode is True, then don't generate the
9230 tag checks for the result of call to an instance of
9231 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
9232 descendant of" check and the accessibility check).
9233
9234 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9235
9236 * sem_ch13.adb: Code cleanups.
9237 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
9238 * sem_ch8.ads: Minor comment fix.
9239
9240 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9241
9242 * exp_ch4.adb (Library_Level_Target): New function.
9243 (Expand_Concatenate): When optimization is enabled, also expand
9244 the operation out-of-line if the concatenation is present within
9245 the expression of the declaration of a library-level object and
9246 not only if it is the expression of the declaration.
9247
9248 2017-04-25 Bob Duff <duff@adacore.com>
9249
9250 * freeze.adb (Freeze_Object_Declaration): Do
9251 not Remove_Side_Effects if there is a pragma Linker_Section,
9252 because in that case we want static initialization in the
9253 appropriate section.
9254
9255 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9256
9257 * exp_dbug.adb: Minor rewording and reformatting.
9258
9259 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9260
9261 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
9262 handle the proposed changes to rules concerning potentially
9263 unevaluated expressions, to include selected components that
9264 do not depend on discriminants, and indexed components with
9265 static indices.
9266 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
9267 predicate in quantified expression, and fix bugs in the handling
9268 of case expressions and membership test.
9269 (Analyze_Attribute_Old_Result): use new predicate.
9270 (Analyze_Attribute, case Loop_Entry): ditto.
9271
9272 2017-04-25 Bob Duff <duff@adacore.com>
9273
9274 * s-secsta.adb (SS_Info): Add a comment
9275 explaining why we don't need to walk all the chunks in order to
9276 compute the total size.
9277
9278 2017-04-25 Bob Duff <duff@adacore.com>
9279
9280 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
9281 of the global name buffer to 4*Max_Line_Length.
9282
9283 2017-04-25 Javier Miranda <miranda@adacore.com>
9284
9285 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
9286 renaming entity for debug information, mark the entity as needing debug
9287 info if it comes from sources.
9288
9289 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9290
9291 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
9292 restriction converning the use of 'Address where the prefix is
9293 of a controlled type.
9294
9295 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
9296
9297 * exp_dbug.adb: In Debug_Renaming_Declaration,
9298 skip slices that are made redundant by an indexed component
9299 access.
9300 * atree.h: New definition for Original_Node.
9301
9302 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9303
9304 * sem_prag.adb, sem_prag.ads: Minor reformatting.
9305
9306 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9307
9308 * sem_ch3.adb (Check_Entry_Contract): Call
9309 Preanalyze_Spec_Expression so that resolution takes place as well.
9310 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9311 internal calls that appear in preconditions of protected
9312 operations, in default values for same, and in contract guards
9313 for contract cases in SPARK.
9314
9315 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9316
9317 * a-numaux.ads: Fix description of a-numaux-darwin
9318 and a-numaux-x86.
9319 (Double): Define to Long_Float.
9320 * a-numaux-vxworks.ads (Double): Likewise.
9321 * a-numaux-darwin.ads
9322 (Double): Likewise.
9323 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9324 * a-numaux-x86.ads: Fix package description.
9325 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9326 (Reduce): Adjust and complete description. Call Is_Nan instead of
9327 testing manually. Use an integer temporary to hold rounded value.
9328 * a-numaux-darwin.adb (Reduce): Likewise.
9329 (Is_Nan): New function.
9330
9331 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9332
9333 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9334 on analysis of prefix whose type is a current instance of a
9335 synchronized type, but where the prefix itself is an entity that
9336 is an object.
9337
9338 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9339
9340 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9341 the identity of callable entities therein, because they have been
9342 properly resolved, and prefixed calls may have been rewritten
9343 as normal calls.
9344
9345 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9346
9347 * exp_ch3.adb (Build_Init_Statements): Convert
9348 the expression of the pragma/aspect Secondary_Stack_Size to
9349 internal type System.Parameters.Size_Type before assigning
9350 it to the Secondary_Stack_Size component of the task type's
9351 corresponding record.
9352
9353 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9354
9355 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9356 (etc) optimizations when the type is modular and the offsets
9357 are equal.
9358
9359 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9360
9361 * s-osinte-freebsd.ads: Minor comment tweaks
9362
9363 2017-04-25 Javier Miranda <miranda@adacore.com>
9364
9365 * urealp.adb (UR_Write): Reverse previous patch
9366 adding documentation on why we generate multiplications instead
9367 of divisions (needed to avoid expressions whose computation with
9368 large numbers may cause division by 0).
9369
9370 2017-04-25 Bob Duff <duff@adacore.com>
9371
9372 * erroutc.adb (Set_Specific_Warning_Off,
9373 Set_Warnings_Mode_Off): Use the correct source file for
9374 Stop. Was using Current_Source_File, which is only valid during
9375 parsing. Current_Source_File will have a leftover value from
9376 whatever file happened to be parsed last, because of a with_clause
9377 or something.
9378
9379 2017-04-25 Bob Duff <duff@adacore.com>
9380
9381 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9382 to In_Predefined_Unit, but including GNAT units.
9383 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9384 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9385 because Should_Ignore_Pragma was not working reliably outside
9386 the parser, because Current_Source_File is not valid.
9387 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9388 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9389
9390 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9391
9392 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9393 codepeer mode.
9394
9395 2017-04-25 Javier Miranda <miranda@adacore.com>
9396
9397 * urealp.adb (UR_Write): Fix output of constants with a base other
9398 that 10.
9399
9400 2017-04-25 Justin Squirek <squirek@adacore.com>
9401
9402 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9403 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9404 Add extra parameter for Process_Interface_Name.
9405 (Process_Interface_Name): Add parameter for pragma to analyze
9406 corresponding aspect.
9407 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9408 from sem_ch13.adb
9409
9410 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9411
9412 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9413 correction.
9414
9415 2017-04-25 Yannick Moy <moy@adacore.com>
9416
9417 * sem_res.adb (Resolve_Comparison_Op): Do not
9418 attempt evaluation of relational operations inside assertions.
9419
9420 2017-04-25 Justin Squirek <squirek@adacore.com>
9421
9422 * exp_util.adb (Add_Interface_Invariants):
9423 Restored, code moved back from Build_Invariant_Procedure_Body.
9424 (Add_Parent_Invariants): Restored, code moved back from
9425 Build_Invariant_Procedure_Body.
9426 (Build_Invariant_Procedure_Body):
9427 Remove refactored calls and integrated code from
9428 Add_Parent_Invariants and Add_Interface_Invariants.
9429
9430 2017-04-25 Johannes Kanig <kanig@adacore.com>
9431
9432 * errout.adb (Output_Messages): Adjust computation of total
9433 errors
9434 * erroutc.adb (Error_Msg): In statistics counts, deal
9435 correctly with informational messages that are not warnings.
9436 * errutil.adb (Finalize): adjust computation of total errors.
9437
9438 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9439
9440 * terminals.c (__gnat_terminate_pid): New.
9441 * g-exptty.ads (Terminate_Process): New. Update comments.
9442
9443 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9444
9445 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9446
9447 2017-04-25 Justin Squirek <squirek@adacore.com>
9448
9449 * sem_ch3.adb (Analyze_Declarations): Minor
9450 correction to comments, move out large conditional and scope
9451 traversal into a predicate.
9452 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9453 logic.
9454
9455 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9456
9457 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9458 of prefix whose type is a current instance of a synchronized
9459 type. If the prefix is an object this is an external call (or
9460 requeue) that can only access public operations of the object. The
9461 previous predicate was too restrictive, and did not allow public
9462 protected operations, only task entries.
9463
9464 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9465
9466 * sem_ch5.adb, fname.adb: Minor reformatting.
9467
9468 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9469
9470 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9471 * einfo.ads Update the placement of
9472 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9473 mention the ekind.
9474 (Is_Anonymous_Access_Type): New routine.
9475 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9476 master for an access type subject to pragma No_Heap_Finalization.
9477 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9478 allocated or deallocated does not finalization actions if the
9479 associated access type is subject to pragma No_Heap_Finalization.
9480 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9481 * par-prag.adb Pragma No_Heap_Finalization does not need special
9482 processing from the parser.
9483 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9484 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9485 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9486 No_Heap_Finalization.
9487 (Analyze_Pragma): Add processing for
9488 pragma No_Heap_Finalization. Update various error messages to
9489 use Duplication_Error.
9490 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9491 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9492 and corresponding pragma id.
9493
9494 2017-04-25 Bob Duff <duff@adacore.com>
9495
9496 * freeze.adb (Freeze_Record_Type): Use the
9497 underlying type of the component type to determine whether it's
9498 elementary. For representation clause purposes, a private type
9499 should behave the same as its full type.
9500 * fname.ads, fname.adb (Is_Predefined_File_Name):
9501 Make sure things like "system.ali" are recognized as predefined.
9502
9503 2017-04-25 Javier Miranda <miranda@adacore.com>
9504
9505 * debug.adb: Update documentation of -gnatd.6.
9506
9507 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9508
9509 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9510 element iterator when the name is an overloaded function call,
9511 one of whose interpretations yields an array.
9512
9513 2017-04-25 Bob Duff <duff@adacore.com>
9514
9515 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9516 Is_Internal_Unit_Name): New functions for operating on unit
9517 names, as opposed to file names. There's some duplicated code
9518 with fname.adb, which is unfortunate, but it seems like we don't
9519 want to add dependencies here.
9520 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9521 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9522 is not a file name at all.
9523 * fname.ads, fname.adb: Document the fact that
9524 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9525 for ALI files, and fix the code so it works properly for ALI
9526 files. E.g. these should return True for "system.ali".
9527
9528 2017-04-25 Justin Squirek <squirek@adacore.com>
9529
9530 * exp_util.adb (Add_Invariant): Removed,
9531 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9532 and Add_Own_Invariant. (Add_Invariant_Check): Used
9533 for adding runtime checks from any kind of invariant.
9534 (Add_Inherited_Invariant): Generates invariant checks for
9535 class-wide invariants (Add_Interface_Invariants): Removed, code
9536 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9537 Create a types own invariant procedure (Add_Parent_Invariants):
9538 Removed, code moved to Build_Invariant_Procedure_Body
9539 (Build_Invariant_Procedure_Body): Add refactored calls
9540 and integrated code from Add_Parent_Invariants and
9541 Add_Interface_Invariants.
9542 (Process_Type): Removed, the
9543 relavant code was inlined into both Add_Own_Invariant and
9544 Add_Inherited_Invariant.
9545
9546 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9547
9548 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9549 scn.adb, osint.adb, fname.adb: Minor reformatting.
9550
9551 2017-04-25 Pascal Obry <obry@adacore.com>
9552
9553 * s-taprop-mingw.adb: Do not check for CloseHandle in
9554 Finalize_TCB.
9555
9556 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9557
9558 * sem_util.adb (Check_Part_Of_Reference):
9559 Continue to examine the context if the reference appears within
9560 an expression function.
9561
9562 2017-04-25 Justin Squirek <squirek@adacore.com>
9563
9564 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9565 and Build_Invariant_Procedure_Declaration.
9566 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9567 and Build_Invariant_Procedure_Declaration from exp_ch7
9568 and break-out Is_Untagged_Private_Derivation from
9569 Build_Invariant_Procedure_Body.
9570 (Replace_Type_References):
9571 Append an extra parameter to allow for dispatching replacements
9572 and add the corrasponding logic.
9573 (Type_Invariant): Remove
9574 Replace_Typ_Refs and replace its references with calls to
9575 Replace_Type_References.
9576 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9577
9578 2017-04-25 Bob Duff <duff@adacore.com>
9579
9580 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9581 that returns True when appropriate.
9582 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9583 when compiling predefined files.
9584 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9585 "gnat.adc" should not be considered a predefined file name.
9586 That required (or at least encouraged) a lot of cleanup of global
9587 variable usage. We shouldn't be communicating information via
9588 the global name buffer.
9589 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9590 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9591 required by the above-mentioned cleanup.
9592
9593 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9594
9595 * osint.adb (Find_File): Handle properly a request for a
9596 configuration file whose name is a directory.
9597
9598 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9599
9600 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9601
9602 2017-04-25 Bob Duff <duff@adacore.com>
9603
9604 * types.ads: Minor: Fix '???' comment.
9605 * sem_ch8.adb: Minor comment fix.
9606
9607 2017-04-25 Bob Duff <duff@adacore.com>
9608
9609 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9610 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9611 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9612 Add String_To_Name with no side effects.
9613
9614 2017-04-25 Justin Squirek <squirek@adacore.com>
9615
9616 * sem_ch3.adb (Analyze_Declarations): Add
9617 additional condition for edge case.
9618
9619 2017-04-25 Bob Duff <duff@adacore.com>
9620
9621 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9622 reserved words inside pragmas. This is necessary to allow the
9623 pragma name Interface to be used in pragma Ignore_Pragma.
9624 * par.adb: Minor comment fix.
9625
9626 2017-04-25 Javier Miranda <miranda@adacore.com>
9627
9628 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9629 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9630 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9631 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9632 occurrences of RE_Type_Is_Abstract
9633
9634 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9635
9636 * exp_util.adb (Build_Chain): Account for ancestor
9637 subtypes while traversing the derivation chain.
9638
9639 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9640
9641 * sem_attr.adb: minor reformatting.
9642
9643 2017-04-25 Doug Rupp <rupp@adacore.com>
9644
9645 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9646
9647 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9648
9649 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9650 the first pass over an assignment statement with target names,
9651 to prevent the generation of subtypes (such as discriminated
9652 record components)that may carry the target name outside of the
9653 tree for the assignment. The subtypes will be generated when
9654 the assignment is reanalyzed in full.
9655 (Analyze_Target_Name): Handle properly class-wide types.
9656
9657 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9658
9659 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9660 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9661 the purposes of freezing.
9662 * exp_util.adb Update the documentation and structure of the
9663 type map used in class-wide semantics of assertion expressions.
9664 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9665 and resolve the triaged expression because all substitutions
9666 refer to the proper entities. Update the replacement of
9667 references.
9668 (Build_DIC_Procedure_Body): Add formal parameter
9669 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9670 are now only processed when freezing occurs. Build a body only
9671 when one is needed.
9672 (Entity_Hash): Removed.
9673 (Map_Types): New routine.
9674 (Replace_Object_And_Primitive_References): Removed.
9675 (Replace_References): New routine.
9676 (Replace_Type_References): Moved to the library level of Exp_Util.
9677 (Type_Map_Hash): New routine.
9678 (Update_Primitives_Mapping): Update the mapping call.
9679 (Update_Primitives_Mapping_Of_Types): Removed.
9680 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9681 parameter For_Freeze and update the comment on usage.
9682 (Map_Types): New routine.
9683 (Replace_References): New routine.
9684 (Replace_Type_References): Moved to the library level of Exp_Util.
9685 (Update_Primitives_Mapping_Of_Types): Removed.
9686 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9687 properties of the private type to the full view in case the full
9688 view derives from a parent type and inherits a DIC pragma.
9689 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9690 DIC pragma is placed at the top of a declarative region.
9691
9692 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9693
9694 * a-tasatt.adb: Complete previous change and use an unsigned
9695 int to avoid overflow checks.
9696
9697 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9698
9699 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9700 the error message when the attribute reference is an actual in
9701 a call to a subprogram inherited from a generic formal type with
9702 unknown discriminants, which makes the subprogram and its formal
9703 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9704
9705 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9706
9707 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9708 sem_prag.adb: Minor reformatting.
9709
9710 2017-04-25 Bob Duff <duff@adacore.com>
9711
9712 * sem_attr.adb (Type_Key): Add code in the
9713 recursive Compute_Type_Key to protect against fetching the source
9714 code for Standard, in case a component of the type is declared
9715 in Standard. There was already code to do this for the original
9716 type, but not for its components.
9717
9718 2017-04-25 Javier Miranda <miranda@adacore.com>
9719
9720 * exp_ch3.adb (Build_Initialization_Call): Handle
9721 subtypes of private types when searching for the underlying full
9722 view of a private type.
9723
9724 2017-04-25 Javier Miranda <miranda@adacore.com>
9725
9726 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9727 real conditional expression can appear in a fixed-type context
9728 and must be resolved with that context to facilitate the code
9729 generation to the backend.
9730
9731 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9732
9733 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9734 to indicate whether during inline processing, when some unit U1
9735 appears in the context of a unit U2 compiled for instantiation
9736 or inlining purposes, the body of U1 needs to be compiled as well.
9737 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9738 context is a package declaration.
9739 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9740 Analyze_Generic_Package_Declaration): ditto.
9741 * inline.adb (Analyze_Inlined_Bodies): Check
9742 Body_Needed_For_Inlining.
9743
9744 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9745
9746 * par.adb (Current_Assign_Node): Global variable use to record
9747 the presence of a target_name in the right hand side of the
9748 assignment being parsed.
9749 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9750 enclosing assignment node accordingly.
9751 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9752 appropriately.
9753 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9754 analyzing RHS if the statement has target_names.
9755 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9756 properly choices that are subtype marks.
9757 * exp_ch5.adb: Code cleanup.
9758
9759 2017-04-25 Bob Duff <duff@adacore.com>
9760
9761 * s-memory.adb: Add a comment regarding efficiency.
9762 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9763 "the source has an extension if and only if the destination does."
9764 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9765
9766 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9767
9768 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9769 conversion.
9770
9771 2017-04-25 Doug Rupp <rupp@adacore.com>
9772
9773 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9774 handling for ppc64-vx7.
9775 * sigtramp-vxworks-target.inc
9776 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9777
9778 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9779
9780 * ada_get_targ.adb: New file.
9781
9782 2017-04-25 Bob Duff <duff@adacore.com>
9783
9784 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9785 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9786 (UI_GCD): Remove ??? comment involving possible efficiency
9787 improvements. This just isn't important after all these years.
9788 Also minor cleanup.
9789 * uintp.ads: Minor cleanup.
9790
9791 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9792
9793 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9794 Revert previous changes.
9795 * scng.adb: Minor reformatting.
9796 * s-stratt.ads: Fix unbalanced parens in comment.
9797
9798 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9799
9800 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9801 Minor reformatting.
9802
9803 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9804
9805 * scng.adb (Scan): Handle '@' appropriately.
9806 * sem_ch5.adb: Code cleanup.
9807
9808 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9809
9810 * freeze.adb (Check_Expression_Function): Do not check for the
9811 use of deferred constants if the freezing of the expression
9812 function is triggered by its generated body, rather than a
9813 premature use.
9814
9815 2017-04-25 Javier Miranda <miranda@adacore.com>
9816
9817 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9818 subtypes of private types when performing the view conversion.
9819
9820 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9821
9822 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9823 the purposes of freezing.
9824 * exp_util.adb Update the documentation and structure of the
9825 type map used in class-wide semantics of assertion expressions.
9826 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9827 and resolve the triaged expression because all substitutions
9828 refer to the proper entities. Update the replacement of
9829 references.
9830 (Build_DIC_Procedure_Body): Add formal parameter
9831 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9832 are now only processed when freezing occurs. Build a body only
9833 when one is needed.
9834 (Entity_Hash): Removed.
9835 (Map_Types): New routine.
9836 (Replace_Object_And_Primitive_References): Removed.
9837 (Replace_References): New routine.
9838 (Replace_Type_References): Moved to the library level of Exp_Util.
9839 (Type_Map_Hash): New routine.
9840 (Update_Primitives_Mapping): Update the mapping call.
9841 (Update_Primitives_Mapping_Of_Types): Removed.
9842 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9843 parameter For_Freeze and update the comment on usage.
9844 (Map_Types): New routine.
9845 (Replace_References): New routine.
9846 (Replace_Type_References): Moved to the library level of Exp_Util.
9847 (Update_Primitives_Mapping_Of_Types): Removed.
9848 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9849 properties of the private type to the full view in case the full
9850 view derives from a parent type and inherits a DIC pragma.
9851 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9852 DIC pragma is placed at the top of a declarative region.
9853
9854 2017-04-25 Tristan Gingold <gingold@adacore.com>
9855
9856 * s-mmap.ads (Data): Add pragma Inline.
9857
9858 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9859
9860 * checks.adb (Insert_Valid_Check): Do not use
9861 a renaming to alias a volatile name because this will lead to
9862 multiple evaluations of the volatile name. Use a constant to
9863 capture the value instead.
9864
9865 2017-04-25 Doug Rupp <rupp@adacore.com>
9866
9867 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9868
9869 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9870
9871 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9872 Add out parameter to indicate to caller that a wrapper must
9873 be constructed for an inherited primitive whose inherited
9874 pre/postcondition has called to overridden primitives.
9875 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9876 for inherited primitive that requires it.
9877 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9878 legal primitive operations and belong to the list of bodies
9879 generated after the freeze point of a type.
9880 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9881 of Build_Class_Wide_Expression.
9882 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9883 to construct the specification of the wrapper subprogram created
9884 for an inherited operation.
9885
9886 2017-04-25 Bob Duff <duff@adacore.com>
9887
9888 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9889 pthread_mutexattr_setprioceiling): Add new interfaces for these
9890 pthread operations.
9891 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9892 protocols as appropriate for Locking_Policy 'C' and 'I'.
9893 * s-taprop-posix.adb: Minor reformatting to make it more similar
9894 to s-taprop-linux.adb.
9895
9896 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9897
9898 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9899 Handle properly a multi- level derivation involving both renamed
9900 and constrained parent discriminants, when the type to be
9901 constrained has fewer discriminants that the ultimate ancestor.
9902
9903 2017-04-25 Bob Duff <duff@adacore.com>
9904
9905 * sem_util.adb (Is_Object_Reference): In the
9906 case of N_Explicit_Dereference, return False if it came from a
9907 conditional expression.
9908
9909 2017-04-25 Bob Duff <duff@adacore.com>
9910
9911 * par-ch4.adb (P_Case_Expression): If a semicolon
9912 is followed by "when", assume that ";" was meant to be ",".
9913
9914 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9915
9916 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9917 fixes.
9918
9919 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9920
9921 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9922 loading of an entity.
9923 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9924 previously repeated in the analysis.
9925 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9926 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9927 use new procedure SPARK_Implicit_Load.
9928 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9929 SPARK_Implicit_Load.
9930
9931 2017-04-25 Javier Miranda <miranda@adacore.com>
9932
9933 * sem_util.adb (New_Copy_Tree): By default
9934 copying of defining identifiers is prohibited because
9935 this would introduce an entirely new entity into the
9936 tree. This patch introduces an exception to this general
9937 rule: the declaration of constants and variables located in
9938 Expression_With_Action nodes.
9939 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9940 (In_Map): New subprogram.
9941 (Visit_Entity): New subprogram.
9942 (Visit_Node): Handle EWA_Level,
9943 EWA_Inner_Scope_Level, and take care of defining entities defined
9944 in Expression_With_Action nodes.
9945
9946 2017-04-25 Thomas Quinot <quinot@adacore.com>
9947
9948 * exp_ch6.adb: minor comment edit.
9949 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9950 procedure specifications that come from source.
9951 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9952 Null_Statement attribute.
9953 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9954 procedure, generate statement SCO for the generated NULL statement.
9955 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9956 parser, if available.
9957
9958 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9959
9960 * system-linux-s390.ads: Use Long_Integer'Size to define
9961 Memory_Size.
9962
9963 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9964
9965 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9966
9967 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9968
9969 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9970 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9971 * gnat_ugn.texi: Fix typo.
9972 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9973 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9974 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9975 * sem_util.adb (Mark_Coextensions): Likewise.
9976 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9977
9978 2017-03-28 Andreas Schwab <schwab@suse.de>
9979
9980 PR ada/80117
9981 * system-linux-aarch64-ilp32.ads: New file.
9982 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9983 from LIBGNAT_TARGET_PAIRS.
9984 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9985 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9986 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9987 or -mabi=ilp32, resp.
9988
9989 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9990
9991 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9992
9993 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9994
9995 PR ada/79903
9996 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9997
9998 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9999
10000 PR ada/79945
10001 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
10002
10003 * system-linux-arm.ads (Default_Bit_Order): Likewise.
10004 * system-linux-mips.ads (Default_Bit_Order): Likewise.
10005 * system-linux-armeb.ads: Delete.
10006 * system-linux-mipsel.ads: Likewise.
10007 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
10008 (ARM/Linux): Likewise.
10009
10010 2017-02-24 Jakub Jelinek <jakub@redhat.com>
10011
10012 PR c/79677
10013 * gcc-interface/misc.c (gnat_handle_option): Pass true to
10014 handle_generated_option GENERATED_P.
10015
10016 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10017
10018 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
10019 around a justified modular type if it doesn't have the same scalar
10020 storage order as the enclosing record type.
10021
10022 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10023
10024 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
10025 of boolean rvalues to function calls.
10026
10027 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10028
10029 * gcc-interface/utils.c (fold_bit_position): New function.
10030 (rest_of_record_type_compilation): Call it instead of bit_position to
10031 compute the field position and remove the call to remove_conversions.
10032 (compute_related_constant): Factor out the multiplication in both
10033 operands, if any, and streamline the final test.
10034
10035 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10036
10037 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
10038
10039 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10040
10041 * gcc-interface/decl.c: Include demangle.h.
10042 (is_cplusplus_method): Return again true for a primitive operation
10043 only if it is dispatching. For a subprogram with an interface name,
10044 call the demangler to get the number of C++ parameters and compare it
10045 with the number of Ada parameters.
10046
10047 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10048
10049 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
10050 there is no end label, put the location of the At_End procedure on
10051 the call to the procedure.
10052
10053 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10054
10055 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
10056 value for array types with TYPE_INDEX_TYPE set on their domain type.
10057 * gcc-interface/utils.c (max_size): For operations and expressions, do
10058 not build a new node if the operands have not changed or are missing.
10059
10060 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10061
10062 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
10063 argument when recursing on TRUTH_NOT_EXPR.
10064
10065 2017-02-12 John Marino <gnugcc@marino.st>
10066
10067 * system-freebsd-x86.ads: Rename into...
10068 * system-freebsd.ads: ...this.
10069 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
10070 * gcc-interface/Makefile.in: Support aarch64-freebsd.
10071 (x86-64/FreeBSD): Adjust to above renaming.
10072 (i386/FreeBSD): Likewise.
10073
10074 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
10075
10076 * comperr.adb: Update FSF bug reporting URL.
10077
10078 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
10079 Jakub Jelinek <jakub@redhat.com>
10080
10081 PR ada/79309
10082 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
10083
10084 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
10085
10086 PR lto/79061
10087 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
10088 to build_translation_unit_decl.
10089
10090 2017-01-23 Javier Miranda <miranda@adacore.com>
10091
10092 * sem_util.adb (New_Copy_Tree): Code cleanup:
10093 removal of the internal map (ie. variable Actual_Map, its
10094 associated local variables, and all the code handling it).
10095 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
10096 force loading of the System package when processing a task type.
10097 (Analyze_Protected_Type_Declaration): in GNATprove mode force
10098 loading of the System package when processing a protected type.
10099 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
10100 force loading of the System package when processing compilation
10101 unit with a main-like subprogram.
10102 * frontend.adb (Frontend): remove forced loading of the System
10103 package.
10104
10105 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10106
10107 * sem_prag.adb (Default_Initial_Condition): If the desired type
10108 declaration is a derived type declaration with discriminants,
10109 it is rewritten as a private type declaration.
10110 * sem_ch13.adb (Replace_Type_References_Generic,
10111 Visible_Component): A discriminated private type with descriminnts
10112 has components that must be rewritten as selected components
10113 if they appear as identifiers in an aspect expression such as
10114 a Default_Initial_Condition.
10115 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
10116 nodes.
10117
10118 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10119
10120 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
10121 * gnat1drv.adb Generate an empty object file for an ignored
10122 Ghost compilation unit.
10123 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
10124
10125 2017-01-23 Yannick Moy <moy@adacore.com>
10126
10127 * sem_ch4.adb (Analyze_Indexed_Component_Form):
10128 Adapt to inlined prefix with string literal subtype.
10129 * inline.adb (Expand_Inlined_Call): Keep unchecked
10130 conversion inside inlined call when formal type is constrained.
10131
10132 2017-01-23 Javier Miranda <miranda@adacore.com>
10133
10134 * sem_util.adb (New_Copy_Tree): Code cleanup:
10135 removal of global variables. All the global variables, global
10136 functions and tables of this subprogram are now declared locally.
10137
10138 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10139
10140 * exp_strm.ads: Minor reformatting and typo fixes.
10141
10142 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10143
10144 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
10145 exp_aggr.adb: Minor reformatting.
10146 * g-diopit.adb: minor grammar/punctuation fix in comment.
10147 * g-byorma.ads: minor fix of unbalanced parens in comment.
10148
10149 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10150
10151 * par.adb: Update the documentation of component Labl.
10152 * par-ch6.adb (P_Return_Statement): Set the expected label of
10153 an extended return statement to Error.
10154
10155 2017-01-23 Tristan Gingold <gingold@adacore.com>
10156
10157 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
10158
10159 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10160
10161 * expander.adb: Handle N_Delta_Aggregate.
10162
10163 2017-01-23 Javier Miranda <miranda@adacore.com>
10164
10165 * exp_ch6.adb (Expand_Call): Improve the code that
10166 checks if some formal of the called subprogram is a class-wide
10167 interface, to handle subtypes of class-wide interfaces.
10168
10169 2017-01-23 Javier Miranda <miranda@adacore.com>
10170
10171 * checks.adb (Apply_Parameter_Aliasing_Checks):
10172 Remove side effects of the actuals before generating the overlap
10173 check.
10174
10175 2017-01-23 Justin Squirek <squirek@adacore.com>
10176
10177 * exp_strm.ads, exp_strm.ads
10178 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
10179 as to avoid getting the underlying type by default.
10180 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
10181 underlying type in the Iiput and output attribute cases when
10182 building their respective functions.
10183
10184 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10185
10186 * scng.adb: Minor reformatting of error message.
10187
10188 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10189
10190 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
10191 to freeze the return type of an expression funxtion that is a
10192 completion, if the type is a limited view and the non-limited
10193 view is available.
10194
10195 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10196
10197 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
10198 aggregate construct.
10199 (P_Record_Or_Array_Component_Association): An array aggregate
10200 can start with an Iterated_Component_Association.
10201 * scng.adb: Modify error message on improper use of @ in earlier
10202 versions of the language.
10203 * sinfo.ads: New node kind N_Delta_Aggregate.
10204 * sinfo.adb: An N_Delta_Aggregate has component associations and
10205 an expression.
10206 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
10207 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
10208 Create a new index for each one of the choices in the association,
10209 to prevent spurious homonyms in the scope.
10210 (Resolve_Delta_Aggregate): New.
10211 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
10212 * exp_util.adb (Insert_Actions): Take into account
10213 N_Delta_Aggregate.
10214 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
10215 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
10216 and local procedures Expand_Delta_Array_Aggregate and
10217 expand_Delta_Record_Aggregate.
10218 * sprint.adb: Handle N_Delta_Aggregate.
10219
10220 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10221
10222 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
10223 empty name when the exception declaration is subject to pragma
10224 Discard_Names.
10225 (Null_String): New routine.
10226
10227 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10228
10229 * par-ch9.adb (P_Protected_Definition): Parse
10230 any optional and potentially illegal pragmas which appear in
10231 a protected operation declaration list.
10232 (P_Task_Items): Parse
10233 any optional and potentially illegal pragmas which appear in a
10234 task item list.
10235
10236 2017-01-23 Pascal Obry <obry@adacore.com>
10237
10238 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
10239 is needed when a foreign thread call a Win32 API using a thread handle
10240 like GetThreadTimes() for example.
10241
10242 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10243
10244 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10245 allow an 'Address clause to be specified on a prefix of a
10246 class-wide type.
10247
10248 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10249
10250 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10251 attribute 'Valid is a renaming of the original expression when
10252 the expression denotes a name. For all other kinds of expression,
10253 use a constant to capture the value.
10254 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10255 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10256
10257 2017-01-23 Justin Squirek <squirek@adacore.com>
10258
10259 * sem_eval.adb (Eval_Integer_Literal): Add special
10260 case to avoid optimizing out check if the literal appears in
10261 an if-expression.
10262
10263 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10264
10265 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10266 allow an 'Address clause to be specified on a prefix of a
10267 class-wide type.
10268
10269 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10270
10271 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10272 attribute 'Valid is a renaming of the original expression when
10273 the expression denotes a name. For all other kinds of expression,
10274 use a constant to capture the value.
10275 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10276 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10277
10278 2017-01-23 Justin Squirek <squirek@adacore.com>
10279
10280 * sem_eval.adb (Eval_Integer_Literal): Add special
10281 case to avoid optimizing out check if the literal appears in
10282 an if-expression.
10283
10284 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10285
10286 * sem_ch4.adb (Try_Primitive_Operations,
10287 Is_Valid_First_Argument_Of): argument is valid if it is a derived
10288 type with unknown discriminants that matches its underlying
10289 record view.
10290 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
10291 expression if its type is derived from a limited type with
10292 unknown discriminants, because the expansion (which is a call)
10293 must be expanded in the enclosing context to add the proper build-
10294 in-place parameters to the call.
10295 * lib.ads, exp_ch9.adb: Minor fixes in comments.
10296
10297 2017-01-23 Yannick Moy <moy@adacore.com>
10298
10299 * frontend.adb (Frontend): Do not load runtime
10300 unit for GNATprove when parsing failed.
10301 * exp_ch9.adb: minor removal of extra whitespace
10302 * exp_ch6.adb: minor typo in comment
10303 * sem_util.adb: Code cleanup.
10304 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10305 * a-ngcefu.adb: minor style fix in whitespace
10306
10307 2017-01-23 Thomas Quinot <quinot@adacore.com>
10308
10309 * scos.ads: Document usage of 'd' as default SCO kind for
10310 declarations.
10311 * par_sco.adb (Traverse_Declarations_Or_Statements.
10312 Traverse_Degenerate_Subprogram): New supporting routine for expression
10313 functions and null procedures.
10314 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10315 N_Expression_Function to the subprogram case; add required
10316 support for null procedures and expression functions.
10317
10318 2017-01-23 Bob Duff <duff@adacore.com>
10319
10320 * namet.ads (Bounded_String): Decrease the size of type
10321 Bounded_String to avoid running out of stack space.
10322 * namet.ads (Append): Don't ignore buffer overflow; raise
10323 Program_Error instead.
10324
10325 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10326
10327 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10328 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10329 reformatting.
10330 * exp_ch9.adb: minor style fix in comment.
10331
10332 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10333
10334 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10335 for a limited record extension with unknown discriminants whose
10336 full view has no discriminants.
10337
10338 2017-01-23 Yannick Moy <moy@adacore.com>
10339
10340 * exp_spark.adb: Alphabetize with clauses.
10341
10342 2017-01-23 Yannick Moy <moy@adacore.com>
10343
10344 * sem_util.adb (Has_Enabled_Property): Treat
10345 protected objects and variables differently from other variables.
10346
10347 2017-01-23 Thomas Quinot <quinot@adacore.com>
10348
10349 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10350 Split original Ada 95 part off into new subprogram
10351 below. Call that subprogram (instead of proceeding with
10352 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10353 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10354 * debug.adb Document new switch -gnatd.p
10355 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10356 record for reverse bit order if an error has already been posted
10357 on the record type. This avoids generating extraneous "info:"
10358 messages for illegal code.
10359
10360 2017-01-23 Justin Squirek <squirek@adacore.com>
10361
10362 * sem_ch3.adb (Analyze_Declarations): Correct comments
10363 * freeze.adb (Find_Constant): Add detection of deferred constants
10364 so they are not incorrectly flagged as premature.
10365
10366 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10367
10368 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10369 characters for future version of the language. '@' is legal name.
10370 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10371 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10372 denotes a Target_Name.
10373 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10374 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10375 (Has_Target_Names): New flag on N_Assignment_Statement, to
10376 indicate that RHS has occurrences of N_Target_Name.
10377 * sem.adb: Call Analyze_Target_Name.
10378 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10379 (urrent_LHS): Global variable that denotes LHS of assignment,
10380 used in the analysis of Target_Name nodes.
10381 * sem_res.adb (Resolve_Target_Name): New procedure.
10382 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10383 N is an assignment statement whose RHS contains occurences of @
10384 that designate the value of the LHS of the assignment. If the
10385 LHS is side-effect free the target names can be replaced with
10386 a copy of the LHS; otherwise the semantics of the assignment
10387 is described in terms of a procedure with an in-out parameter,
10388 and expanded as such.
10389 (Expand_N_Assignment_Statement): Call
10390 Expand_Assign_With_Target_Names when needed.
10391 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10392 * sprint.adb: Handle N_Target_Name.
10393
10394 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10395
10396 * checks.adb: Minor fix in comment.
10397
10398 2017-01-23 Philippe Gil <gil@adacore.com>
10399
10400 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10401 count in Sort = Memory_Usage or Allocations_Count
10402
10403 2017-01-23 Justin Squirek <squirek@adacore.com>
10404
10405 * sem_ch3.adb: Code cleanup.
10406
10407 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10408
10409 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10410 variables to the local variable section. Update the profile
10411 of various nested routine that previously had visibility
10412 of those globals. One the matching phase has completed,
10413 remove certain classes of clauses which are considered noise.
10414 (Check_Dependency_Clause): Properly detect a match between two
10415 'Result attributes. Update the various post-match cases to use
10416 Is_Already_Matched as this routine now automatically recognizes
10417 a previously matched 'Result attribute.
10418 (Is_Already_Matched): New routine.
10419 (Remove_Extra_Clauses): New routine.
10420 (Report_Extra_Clauses): Remove the detection of ... => null
10421 clauses as this is now done in Remove_Extra_Clauses.
10422
10423 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10424
10425 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10426 report on spurious overlaps between values involving a subtype
10427 with a static predicate, because the expansion of such a subtype
10428 into individual ranges in inhibited in ASIS mode.
10429
10430 2017-01-23 Justin Squirek <squirek@adacore.com>
10431
10432 * sem_ch3.adb (Analyze_Declarations): Add detection
10433 of an edge case and delay freezing if it is present.
10434
10435 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10436
10437 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10438 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10439
10440 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10441
10442 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10443 access-to-subprogram types inherit the convention of the
10444 associated subprogram. (Set_Profile_Convention): New routine.
10445 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10446 of the two entities directly, use Conventions_Match to account
10447 for anonymous access-to-subprogram and subprogram types.
10448 (Conventions_Match): New routine.
10449
10450 2017-01-23 Claire Dross <dross@adacore.com>
10451
10452 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10453 which return Universal_Integer, force the overflow check flag for
10454 Length and Range_Length for types as big as Long_Long_Integer.
10455
10456 2017-01-23 Claire Dross <dross@adacore.com>
10457
10458 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10459 attributes which return Universal_Integer, introduce a conversion
10460 to the expected type with the appropriate check flags set.
10461 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10462 base type if the range is null. It may still be invalid if it
10463 is higher than the lower bound. This is checked later in the
10464 context in which the range appears.
10465
10466 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10467
10468 * scos.ads: Introduce a constant to represent ignored
10469 dependencies in SCO_Unit_Table_Entry.
10470
10471 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10472
10473 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10474 spaces from error messages.
10475
10476 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10477
10478 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10479 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10480 an object declaration for an array type with a modular index type
10481 with the size of Long_Long_Integer. Special processing is needed
10482 in this case to compute reliably the size of the object, and
10483 eventually to raise Storage_Error, when wrap-around arithmetic
10484 might compute a meangingless size for the object.
10485
10486 2017-01-23 Justin Squirek <squirek@adacore.com>
10487
10488 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10489 sem_type.adb: Code cleanups.
10490
10491 2017-01-23 Bob Duff <duff@adacore.com>
10492
10493 * sem_res.adb (Resolve_Call): In the part of the code where
10494 it is deciding whether to turn the call into an indexed
10495 component, avoid doing so if the call is to an instance of
10496 Unchecked_Conversion. Otherwise, the compiler turns it into an
10497 indexed component, and resolution of that turns it back into a
10498 function call, and so on, resulting in infinite recursion.
10499 * sem_util.adb (Needs_One_Actual): If the first formal has a
10500 default, then return False.
10501
10502 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10503
10504 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10505 optimizations when the type is modular and the offsets are equal.
10506
10507 2017-01-20 Thomas Quinot <quinot@adacore.com>
10508
10509 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10510 message.
10511
10512 2017-01-20 Nicolas Roche <roche@adacore.com>
10513
10514 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10515
10516 2017-01-20 Bob Duff <duff@adacore.com>
10517
10518 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10519 (etc) optimizations when the type is modular.
10520
10521 2017-01-20 Yannick Moy <moy@adacore.com>
10522
10523 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10524 but copy the SPARK_Mode pragma instead of moving it.
10525 (Build_Subprogram_Declaration): Ensure that the generated spec
10526 and original body share the same SPARK_Pragma aspect/pragma.
10527 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10528 procedure to copy SPARK_Mode aspect.
10529
10530 2017-01-20 Bob Duff <duff@adacore.com>
10531
10532 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10533 even in ASIS mode.
10534 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10535 Empty even in ASIS mode.
10536
10537 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10538
10539 * exp_ch9.adb: minor style fixes in comments.
10540 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10541 relative statement introduces an implicit dependency on
10542 Ada.Real_Time.Clock_Time.
10543 * sem_util.adb: Minor reformatting.
10544
10545 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10546
10547 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10548 must be treated as delayed aspect even if the expression is
10549 a literal, because the aspect affects the freezing and the
10550 elaboration of the object to which it applies.
10551
10552 2017-01-20 Tristan Gingold <gingold@adacore.com>
10553
10554 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10555
10556 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10557
10558 * lib-xref.adb (Generate_Reference): Do not warn about the
10559 presence of a pragma Unreferenced if the entity appears as the
10560 actual in a procedure call that does not come from source.
10561
10562 2017-01-20 Pascal Obry <obry@adacore.com>
10563
10564 * expect.c, terminals.c: Fix some warnings about unused variables.
10565 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10566 of the runtime.
10567
10568 2017-01-20 Bob Duff <duff@adacore.com>
10569
10570 * exp_attr.adb (Constrained): Apply an access check (check that
10571 the prefix is not null) when the prefix denotes an object of an
10572 access type; that is, when there is an implicit dereference.
10573
10574 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10575
10576 * s-rident.ads (constant Profile_Info): Remove
10577 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10578
10579 2017-01-20 Tristan Gingold <gingold@adacore.com>
10580
10581 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10582
10583 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10584
10585 * ghost.adb (Mark_Ghost_Clause): New routine.
10586 (Prune_Node): Do not prune compilation unit nodes.
10587 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10588 This does not touch the node itself, but does prune all its fields.
10589 * ghost.ads (Mark_Ghost_Clause): New routine.
10590 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10591 package clause mentions Ghost and non-Ghost packages. Mark a
10592 use package clause as Ghost when it mentions a Ghost package.
10593 (Analyze_Use_Type): Emit an error when a use type clause mentions
10594 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10595 it mentions a Ghost type.
10596 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10597 Ghost when it withs a Ghost unit.
10598
10599 2017-01-20 Javier Miranda <miranda@adacore.com>
10600
10601 * sem_res.adb (Resolve_Call): If a function call
10602 returns a limited view of a type and at the point of the call the
10603 function is not declared in the extended main unit then replace
10604 it with the non-limited view, which must be available. If the
10605 called function is in the extended main unit then no action is
10606 needed since the back-end handles this case.
10607
10608 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10609
10610 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10611 (Contains_Subprograms_Refs): ...this. Adjust comment
10612 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10613 (Is_Subprogram_Ref): ...this.
10614 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10615 Has_Non_Subprograms_Referencer and adjust comment. Remove
10616 incorrect shortcut for package declarations and bodies.
10617
10618 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10619
10620 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10621 base type differs from that of the completion and the private
10622 subtype is an itype (created for a constraint on an access
10623 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10624 anomalies in gigi.
10625
10626 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10627
10628 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10629 When inheriting the SPARK_Mode of a prior expression function,
10630 look at the properly resolved entity rather than the initial
10631 candidate which may denote a homonym.
10632
10633 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10634
10635 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10636 Precondition or Postcondition, and the context is pragma
10637 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10638 and suggest the standard names Assertion_Policy /Pre /Post
10639 instead.
10640
10641 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10642
10643 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10644
10645 2017-01-20 Javier Miranda <miranda@adacore.com>
10646
10647 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10648 Entity attribute.
10649 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10650 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10651 malformed trees.
10652
10653 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10654
10655 * sem_ch13.adb (Analyze_Aspect_Specification, case
10656 Dynamic_Predicate): If the entity E is a subtype that inherits
10657 a static predicate for its parent P,, the inherited and the
10658 new predicate combine in the generated predicate function,
10659 and E only has a dynamic predicate.
10660
10661 2017-01-20 Tristan Gingold <gingold@adacore.com>
10662
10663 * s-boustr.ads, s-boustr.adb: New package.
10664 * Makefile.rtl: Add s-boustr.
10665
10666 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10667
10668 * inline.adb (Process_Formals): Qualify the
10669 expression of a return statement when it yields a universal type.
10670
10671 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10672
10673 * freeze.adb (Freeze_All): Freeze the default
10674 expressions of all eligible formal parameters that appear in
10675 entries, entry families, and protected subprograms.
10676
10677 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10678
10679 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10680 for illegal inherited Implicit_Dereference aspects with renamed
10681 discriminants.
10682
10683 2017-01-20 Javier Miranda <miranda@adacore.com>
10684
10685 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10686 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10687 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10688 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10689 Set_Prev, Tree_Read): Adding assertion.
10690 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10691 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10692 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10693 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10694 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10695 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10696 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10697 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10698 Set_ListN_With_Parent): Adding assertion.
10699
10700 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10701
10702 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10703 import that applies to several homograph subprograms. when one
10704 of them is declared by a subprogram body.
10705
10706 2017-01-20 Justin Squirek <squirek@adacore.com>
10707
10708 * exp_ch6.adb (Expand_Call): Remove optimization
10709 that nulls out calls to null procedures.
10710
10711 2017-01-20 Yannick Moy <moy@adacore.com>
10712
10713 * inline.adb (Expand_Inlined_Call): Keep more
10714 precise type of actual for inlining whenever possible. In
10715 particular, do not switch to the formal type in GNATprove mode in
10716 some case where the GNAT backend might require it for visibility.
10717
10718 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10719
10720 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10721 aspect Implicit_Dereference can be inherited by a full view if
10722 the partial view has no discriminants, because there is no way
10723 to apply the aspect to the partial view.
10724 (Build_Derived_Record_Type): If derived type renames discriminants
10725 of the parent, the new discriminant inherits the aspect from
10726 the old one.
10727 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10728 call through an access discriminant designating a subprogram.
10729 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10730 properly a parameterless call through an access discriminant on
10731 the left-hand side of an assignment.
10732 * sem_res.adb (resolve): If an interpreation involves a
10733 discriminant with an implicit dereference and the expression is an
10734 entity, resolution takes place later in the appropriate routine.
10735 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10736 access discriminants that designate a subprogram type.
10737
10738 2017-01-20 Pascal Obry <obry@adacore.com>
10739
10740 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10741
10742 2017-01-20 Yannick Moy <moy@adacore.com>
10743
10744 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10745 on implicitly with'ed units in GNATprove mode.
10746 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10747 with'ed units in GNATprove mode.
10748
10749 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10750
10751 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10752 unit Do not report an error on a non-static entity that appears
10753 in the context of a spec expression, such as an aspect expression.
10754
10755 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10756
10757 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10758 (Is_Underlying_Full_View): New routine.
10759 (Set_Is_Underlying_Full_View): New routine.
10760 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10761 * einfo.ads Add new attribute Is_Underlying_Full_View.
10762 (Is_Underlying_Full_View): New routine along with pragma Inline.
10763 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10764 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10765 class-wide types and underlying full views. The first subtype
10766 is used as the working type for all Itypes, not just array base types.
10767 (Build_DIC_Procedure_Declaration): Do not consider
10768 class-wide types and underlying full views. The first subtype
10769 is used as the working type for all Itypes, not just array
10770 base types.
10771 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10772 view or an underlying full view without clobbering the attributes
10773 of a previous freeze node.
10774 (Inherit_Freeze_Node): New routine.
10775 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10776 full view as such.
10777 (Build_Underlying_Full_View): Mark an underlying full view as such.
10778 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10779 full view as such.
10780
10781 2017-01-20 Yannick Moy <moy@adacore.com>
10782
10783 * sinfo.ads: Document lack of Do_Division_Check flag
10784 on float exponentiation.
10785
10786 2017-01-19 Javier Miranda <miranda@adacore.com>
10787
10788 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10789 identifier attribute of a block-statement node. Required to avoid
10790 assertion failure when building the new containers library.
10791
10792 2017-01-19 Bob Duff <duff@adacore.com>
10793
10794 * exp_ch3.adb: Update comment.
10795
10796 2017-01-19 Vincent Celier <celier@adacore.com>
10797
10798 * gprep.adb (Gnatprep): Parse the definition file without
10799 "replace in comments" even when switch -C is used.
10800
10801 2017-01-19 Justin Squirek <squirek@adacore.com>
10802
10803 * exp_ch9.adb (Is_Pure_Barrier): Create function
10804 Is_Count_Attribute to identify an expansion of the 'Count
10805 attribute.
10806
10807 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10808
10809 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10810 statements within an element iterator loop are only analyzed
10811 agter the loop is rewritten. Within a generic the analysis must
10812 be performed in any case to complete name capture.
10813
10814 2017-01-19 Bob Duff <duff@adacore.com>
10815
10816 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10817 before checking for unrecognized pragmas.
10818 Initialize Pname on its declarations; that's always good style.
10819
10820 2017-01-19 Claire Dross <dross@adacore.com>
10821
10822 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10823 body into the tree for GNATprove by setting its Parent field. The
10824 components invariants of composite types are not checked by
10825 the composite type's invariant procedure in GNATprove mode.
10826 (Build_Invariant_Procedure_Declaration): Semi-insert the
10827 declaration into the tree for GNATprove by setting its Parent
10828 field.
10829 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10830 the component invariants to the array type invariant procedure
10831 so that the procedure can be used to check the array type
10832 invariants if any.
10833 (Freeze_Record_Type): In GNATprove mode, do
10834 not add the component invariants to the record type invariant
10835 procedure so that the procedure can be used to check the record
10836 type invariants if any.
10837
10838 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10839
10840 * lib-xref-spark_specific.adb: Minor reformatting.
10841 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10842
10843 2017-01-19 Javier Miranda <miranda@adacore.com>
10844
10845 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10846 Build_Back_End_Aggregate.
10847 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10848 (Prepend_Stored_Values): Code cleanup.
10849
10850 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10851
10852 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10853 incomplete return type after attempting to freeze it, so that
10854 other freeze actiona are generated in the proper order.
10855
10856 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10857
10858 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10859 type, ie. a type whose component is a character type, and the
10860 aggregate is positional, do not convert into a string literal
10861 if the index type is not an integer type, because the original
10862 type may be required in an enclosing operation.
10863
10864 2017-01-19 Bob Duff <duff@adacore.com>
10865
10866 * binde.adb, debug.adb: Enable new elaboration order algorithm
10867 by default. -dp switch reverts to the old algorithm.
10868
10869 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10870
10871 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10872 (Analyze_Declarations): Create the DIC and Invariant
10873 procedure bodies s after all freezing has taken place.
10874 (Build_Assertion_Bodies): New routine.
10875 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10876 and Exp_Util.
10877 (Analyze_Package_Specification): Remove the
10878 generation of the DIC and Invariant procedure bodies. This is
10879 now done by Analyze_Declarations.
10880 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10881 procedures are never treated as primitives.
10882
10883 2017-01-19 Yannick Moy <moy@adacore.com>
10884
10885 * frontend.adb: Analyze inlined bodies and check elaboration
10886 rules in GNATprove mode too.
10887 * sem_elab.adb (Delay_Element): Add Boolean component to save
10888 indication that call is in SPARK code. (Check_Elab_Calls):
10889 Check elaboration rules in GNATprove mode, and correctly set
10890 the current value of SPARK_Mode.
10891 * lib-xref-spark_specific.adb
10892 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10893
10894 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10895
10896 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10897 checks on the expression for the high bound of concatenation
10898 when checks are disabled, to suppress warnings about potential
10899 constraint errors in restricted runtimes.
10900
10901 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10902
10903 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10904 representation-to-position function as inlined.
10905 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10906 the purity of an internally generated entity if it has been
10907 explicitly marked as pure for optimization purposes.
10908 * exp_aggr.adb: Minor reformatting.
10909
10910 2017-01-19 Javier Miranda <miranda@adacore.com>
10911
10912 * exp_ch6.adb (Expand_Call): Remove side effects on
10913 actuals that are allocators with qualified expression since the
10914 initialization of the object is performed by means of individual
10915 statements (and hence it must be done before the call).
10916
10917 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10918
10919 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10920 (Build_Derived_Enumeration_Type): If the derived type inherits a
10921 dynamic predicate from its parent, the bounds of the type must
10922 freeze because an explicit constraint is constructed for the
10923 type and the corresponding range is elaborated now.
10924
10925 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10926
10927 * sem_attr.ads: minor fix of inconsistent casing in comment
10928 * lib-writ.ads: minor align comments in columns
10929 * sem_ch3.adb: Minor reformatting.
10930 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10931 * table.ads: minor style fix in comment
10932 * lib-xref-spark_specific.adb
10933 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10934 * sem_ch12.adb: minor whitespace fix
10935 * freeze.adb: Add comment.
10936 * sem_util.adb (Unique_Name): for instances of
10937 generic subprograms ignore the name of the wrapper package.
10938
10939 2017-01-19 Javier Miranda <miranda@adacore.com>
10940
10941 * exp_aggr.adb (Resolve_Record_Aggregate):
10942 Factorize code needed for aggregates of limited and unlimited
10943 types in a new routine.
10944 (Pass_Aggregate_To_Back_End): New subprogram.
10945
10946 2017-01-19 Yannick Moy <moy@adacore.com>
10947
10948 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10949
10950 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10951
10952 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10953 public, for use elsewhere.
10954 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10955 an Inlined_body, recognize a call that uses object notation
10956 and has not been rewritten as a regular call because regular
10957 expansion has not taken place.
10958
10959 2017-01-19 Bob Duff <duff@adacore.com>
10960
10961 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10962 in case of generic formal discrete types, because it causes crashes in
10963 the compiler when built with assertions on.
10964
10965 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10966
10967 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10968 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10969
10970 2017-01-19 Bob Duff <duff@adacore.com>
10971
10972 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10973 Increment Warnings_Detected. It was decrementing, which is
10974 wrong since we just issued a warning message.
10975 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10976 these variables to be of subtype Nat instead of Int, because
10977 they should never be negative.
10978
10979 2017-01-19 Javier Miranda <miranda@adacore.com>
10980
10981 * contracts.adb (Build_Postconditions_Procedure): Replace
10982 Generate_C_Code by Modify_Tree_For_C.
10983 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10984 Replace Generate_C_Code by Modify_Tree_For_C.
10985 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10986 Modify_Tree_For_C.
10987 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10988 Generate_C_Code by Modify_Tree_For_C.
10989 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10990 Generate_C_Code by Modify_Tree_For_C.
10991 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10992 by Modify_Tree_For_C.
10993 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10994 Generate_C_Code by Modify_Tree_For_C.
10995 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10996 by Modify_Tree_For_C.
10997 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10998
10999 2017-01-19 Javier Miranda <miranda@adacore.com>
11000
11001 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
11002 subprogram.
11003 (Is_Inlinable_Expression_Function): New subprogram.
11004 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
11005 to Sem_Util.
11006 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
11007
11008 2017-01-19 Ed Schonberg <schonberg@adacore.com>
11009
11010 * sem_ch4.adb (Diagnose_Call): Improve error message when a
11011 selected component has a prefix that might be interpreted
11012 as a parameterless function call, but none of the candidate
11013 interpretations is parameterless, and there is a hidden homonym
11014 of the prefix that is a package.
11015 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
11016 interpreted as a parameterless function call and its analysis
11017 fails, do not call Analyze_Selected_Component.
11018
11019 2017-01-19 Steve Baird <baird@adacore.com>
11020
11021 * sem_util.ads: Add new Use_Full_View Boolean parameter to
11022 Get_Index_Bounds.
11023 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
11024 calls to a newly-defined Scalar_Range_Of_Right_View function.
11025
11026 2017-01-19 Arnaud Charlet <charlet@adacore.com>
11027
11028 * gnat1drv.adb: minor fix of unbalanced parens in comment
11029 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
11030 to visible part of the package to allow re-use in GNATprove.
11031 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
11032 from repeated code of Traverse_Compilation_Unit.
11033 (Traverse_Declaration_Or_Statement): fixed detection of
11034 generic subprograms and packages; also, iteration over case
11035 statement alternatives rewritten to avoid testing if the first
11036 alternative is present (since it must be present due to Ada
11037 syntax restrictions).
11038
11039 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
11040
11041 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
11042 returning by reference not just for subprogram body stubs,
11043 but for all subprogram cases.
11044 * sem_util.adb: Code reformatting.
11045 (Requires_Transient_Scope): Update the call to Results_Differ.
11046 (Results_Differ): Update the parameter profile and the associated
11047 comment on usage.
11048
11049 2017-01-19 Ed Schonberg <schonberg@adacore.com>
11050
11051 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
11052 identifier nodes that do not come from source, to handle properly
11053 dimensionality check within an inlined body which inclddes both
11054 original operands and rewritten operands. This removes spurious
11055 dimensionality errors in the presence of front-end inlining,
11056 as well as in SPARK mode.
11057
11058 2017-01-16 Jakub Jelinek <jakub@redhat.com>
11059
11060 PR driver/49726
11061 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
11062
11063 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11064
11065 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
11066
11067 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11068
11069 * doc/gnat_ugn/getting_started_with_gnat.rst,
11070 doc/gnat_ugn/inline_assembler.rst,
11071 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
11072 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
11073 doc/gnat_ugn/about_this_guide.rst,
11074 doc/gnat_ugn/platform_specific_information.rst,
11075 doc/gnat_ugn/example_of_binder_output.rst,
11076 doc/gnat_ugn/gnat_and_program_execution.rst,
11077 doc/gnat_ugn/gnat_utility_programs.rst,
11078 doc/gnat_ugn/the_gnat_compilation_model.rst,
11079 doc/gnat_rm/implementation_defined_attributes.rst,
11080 doc/gnat_rm/compatibility_and_porting_guide.rst,
11081 doc/gnat_rm/standard_library_routines.rst,
11082 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
11083 doc/gnat_rm/implementation_defined_pragmas.rst,
11084 doc/gnat_rm/the_gnat_library.rst,
11085 doc/gnat_rm/obsolescent_features.rst,
11086 doc/gnat_rm/about_this_guide.rst,
11087 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
11088 doc/gnat_rm/implementation_of_ada_2012_features.rst,
11089 doc/gnat_rm/interfacing_to_other_languages.rst,
11090 doc/gnat_rm/implementation_defined_aspects.rst,
11091 doc/gnat_rm.rst: Update documentation.
11092 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
11093
11094 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11095
11096 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
11097 * scil_ll.adb: Minor style fix in comment.
11098 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
11099 even if entity is already set, because the node may be renalyzed
11100 after inlining transformations.
11101
11102 2017-01-13 Javier Miranda <miranda@adacore.com>
11103
11104 * sem_res.adb (Resolve_Call): Do not establish a transient scope
11105 for a call to inlinable expression function (since the call will
11106 be replaced by its returned object).
11107 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
11108 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
11109 (Expand_Call): For inlinable expression function call replace the
11110 call by its returned object.
11111 (Is_Inlinable_Expression_Function): New subprogram.
11112
11113 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11114
11115 * checks.adb: Minor typo fix and reformatting.
11116
11117 2017-01-13 Javier Miranda <miranda@adacore.com>
11118
11119 * contracts.adb (Contract_Only_Subprograms): Remove formal.
11120 (Copy_Original_Specification): Removed.
11121 (Skip_Contract_Only_Subprogram): Move here checks previously
11122 located in the caller of this routine (to leave the code more clean).
11123 (Build_Contract_Only_Subprogram): Code cleanup.
11124 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
11125 (Get_Contract_Only_Missing_Body_Name): Removed.
11126
11127 2017-01-13 Javier Miranda <miranda@adacore.com>
11128
11129 * sem_ch6.adb (Cloned_Expression): New subprogram.
11130 (Freeze_Expr_Types): Complete previous patch since the expression
11131 of an expression-function may have iterators and loops with
11132 defining identifiers which, as part of the preanalysis of the
11133 expression, may be left decorated with itypes that will not be
11134 available in the tree passed to the backend.
11135
11136 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11137
11138 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
11139 conversion to Integer of an expression that is an attribute
11140 reference 'Pos on an enumeration type.
11141
11142 2017-01-13 Bob Duff <duff@adacore.com>
11143
11144 * atree.ads: Minor comment fix.
11145
11146 2017-01-13 Justin Squirek <squirek@adacore.com>
11147
11148 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
11149 calls in accessibility check on return statement.
11150
11151 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11152
11153 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
11154 Ensure that the input body is a subprogram body before trying to
11155 determine whether it denoted an expression function. Note that
11156 subprogram body stubs cannot denote expression functions.
11157
11158 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11159
11160 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
11161 and typo fixes.
11162
11163 2017-01-13 Javier Miranda <miranda@adacore.com>
11164
11165 * einfo.ads (Component_Bit_Offset): Fix documentation.
11166 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
11167 on record holes for components with unknown compile-time offsets.
11168
11169 2017-01-13 Bob Duff <duff@adacore.com>
11170
11171 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
11172 * g-locfil.ads: Minor comment fix.
11173
11174 2017-01-13 Bob Duff <duff@adacore.com>
11175
11176 * binde.adb (Elab_New): New elaboration order algorithm
11177 that is expected to cause fewer ABE issues. This is a work in
11178 progress. The new algorithm is currently disabled, and can be
11179 enable by the -dp switch, or by modifying the Do_Old and Do_New
11180 etc. flags and rebuilding. Experimental code is included to
11181 compare the results of the old and new algorithms.
11182 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
11183 can have multiple of these tables, so the old and new algorithms
11184 can coexist.
11185 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
11186 parameter of type array. This avoids the global variable, and
11187 allows bounds checking (which is normally defeated by the tables
11188 packages). It also ensures that the Elab_Order is read-only
11189 to Bindgen.
11190 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
11191 subprograms that need it, as above.
11192 * debug.adb: Document new -dp switch. Modify doc of old -do
11193 switch.
11194 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
11195 and Bindgen. Move writing of closure (-R and -Ra switches)
11196 to Binde; that's more convenient.
11197
11198 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11199
11200 * sem_ch6.adb (Analyze_Expression_Function): If the expression
11201 function is a completion, all entities referenced in the
11202 expression are frozen. As a consequence, a reference to an
11203 uncompleted private type from an enclosing scope is illegal.
11204
11205 2017-01-13 Javier Miranda <miranda@adacore.com>
11206
11207 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
11208 (Analyze_Subprogram_Body_Helper): At the occurrence of an
11209 expression function declaration that is a completion, its
11210 expression causes freezing (AI12-0103).
11211
11212 2017-01-13 Vadim Godunko <godunko@adacore.com>
11213
11214 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
11215 Reference functions of Ada.Containers.Indefinite_Holders.
11216
11217 2017-01-13 Bob Duff <duff@adacore.com>
11218
11219 * s-os_lib.ads: Minor comment fixes.
11220
11221 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11222
11223 * exp_ch3.adb (Default_Initialize_Object): Do not default
11224 initialize an object when it is of a task type and restriction
11225 No_Tasking is in effect because the initialization is obsolete.
11226 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
11227 restriction No_Tasking is in effect.
11228 (Build_Master_Renaming): Do not rename a master when restriction
11229 No_Tasking is in effect.
11230
11231 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11232
11233 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
11234 the legality of An others clause applies as well to a choice in
11235 an Iterated_component_ association.
11236 (Resolve_Iterated_Component_Association): An others choice
11237 is legal.
11238 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
11239 Iterated_Component_Association is not static.
11240
11241 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11242
11243 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
11244 control is passed to the expresion handler before the new mode
11245 is set.
11246 * sem_ch12.adb (Analyze_Package_Instantiation,
11247 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
11248 in case control is passed to the expresion handler before the
11249 new mode is set.
11250
11251 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11252
11253 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
11254 exp_aggr.adb: Minor reformatting.
11255
11256 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11257
11258 * inline.adb: Minor reformatting and typo fix.
11259
11260 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11261
11262 * sem_util.ads, sem_util.adb (Choice_List): Move function here
11263 from sem_aggr.adb, for use elsewhere.
11264 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
11265 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
11266 Iterated_Component_Present.
11267 * exp_aggr.adb: Use Choice_List throughout, to handle
11268 Iterated_Component_Associations.
11269 (Gen_Loop): Generate proper loop for an
11270 Iterated_Component_Association: loop variable has the identifier
11271 of the original association. Generate a loop even for a single
11272 component choice, in order to make loop parameter visible in
11273 expression.
11274 (Flatten): An Iterated_Component_Association is not static.
11275
11276 2017-01-13 Yannick Moy <moy@adacore.com>
11277
11278 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
11279 float exponentiation for statically known small negative values
11280 is the reciprocal of the exponentiation for the opposite value
11281 of the exponent.
11282 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
11283 Ensure that the value of float exponentiation for negative values
11284 is the reciprocal of the exponentiation for the opposite value
11285 of the exponent.
11286 * inline.adb (Expand_Inlined_Call): Fix the count
11287 for the number of generated gotos.
11288
11289 2017-01-13 Yannick Moy <moy@adacore.com>
11290
11291 * inline.adb: Code cleanup.
11292 * sem_util.adb (Is_OK_Volatile_Context): Add
11293 expression in delay statement as OK for volatile context.
11294
11295 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11296
11297 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
11298 mode a choice that is a subtype with a static predicate is
11299 replaced by the values it covers. This transformation must not
11300 be performed in ASIS mode, to preserve the source for analysis.
11301
11302 2017-01-13 Justin Squirek <squirek@adacore.com>
11303
11304 * nlists.ads: Correct minor typo.
11305
11306 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11307
11308 * sem_ch13.adb: Minor reformatting and typo fix.
11309
11310 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11311
11312 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11313 Iterated_Component_Association is a named association in an
11314 array aggregate.
11315 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11316 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11317 and resolve the discrete choices and the expression of the
11318 new construct.
11319 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11320 Loop_Actions and Box_Present are attributes of
11321 N_Iterated_Component_Association nodes. Box_Present is always
11322 False in this case.
11323 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11324 has a Discrete_Choices list, as specified in the RM. A
11325 Component_Association for aggregate uses instead a Choices list.
11326 We have to live with this small inconsistency because the new
11327 construct also has a defining identifier, and there is no way
11328 to merge the two node structures.
11329
11330 2017-01-13 Yannick Moy <moy@adacore.com>
11331
11332 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11333 list of pragmas to remove. Remove pragmas from the list of
11334 statements in the body to inline.
11335 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11336
11337 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11338
11339 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11340 Analyze_Declarations, to analyze and resolve the expressions of
11341 aspect specifications in the current declarative list, so that
11342 the expressions have proper entity and type info. This is needed
11343 for ASIS when there is no subsequent expansion to generate this
11344 semantic information.
11345 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11346 original expression, to suppress cascaded errors when expression
11347 has been constant-folded.
11348 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11349 ASIS mode, because there is no subsequent expansion to decorate
11350 the tree.
11351
11352 2017-01-13 Yannick Moy <moy@adacore.com>
11353
11354 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11355 New function to detect when a call may be inlined or not in
11356 GNATprove mode.
11357 (Expand_Inlined_Call): Ensure that a temporary
11358 is always created in the cases where a type conversion may be
11359 needed on an input parameter in GNATprove mode, so that GNATprove
11360 sees the check to perform.
11361 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11362 when not applicable due to actual requiring type conversion
11363 with possible check but no temporary value can be copied for
11364 GNATprove to see the check.
11365
11366 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11367
11368 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11369 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11370 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11371 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11372 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11373 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11374 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11375 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11376 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11377 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11378 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11379 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11380 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11381 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11382 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11383 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11384 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11385 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11386 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11387 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11388 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11389 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11390 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11391 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11392 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11393 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11394 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11395 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11396 statements to reflect the new style for case alternatives. Various
11397 code clean up and reformatting.
11398
11399 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11400
11401 * exp_util.adb: Minor reformatting.
11402
11403 2017-01-13 Yannick Moy <moy@adacore.com>
11404
11405 * exp_spark.adb: Code cleanup.
11406 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11407 expression so that calls are identified as such inside delay
11408 until.
11409
11410 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11411
11412 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11413 * par-ch3.adb (P_Discrete_Choice_List): An
11414 Iterated_Component_Association is an array aggregate component.
11415 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11416 (Is_Quantified_Expression): New function that performs a lookahead
11417 to distinguish quantified expressions from iterated component
11418 associations.
11419 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11420 associations.
11421 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11422 * sem.adb (Analyze): Handle Iterated_Component_Association.
11423 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11424 component associations.
11425 * sinfo.ads, sinfo.adb: Entries for for
11426 N_Iterated_Component_Association and its fields.
11427 * sprint.adb (Sprint_Node_Actual): Handle
11428 N_Iterated_Component_Association.
11429
11430 2017-01-13 Justin Squirek <squirek@adacore.com>
11431
11432 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11433 of the style check until after preanalysis of acutals.
11434
11435 2017-01-13 Yannick Moy <moy@adacore.com>
11436
11437 * sem_ch13.adb: Minor reformatting.
11438 * par-ch11.adb: minor style fix in whitespace
11439 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11440 reduced to Add_Artificial_ALI_File; style fix in declaration of
11441 Text; grammar fix in comment.
11442 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11443 * freeze.adb: Cleanup to pass pragma instead of
11444 expression to call.
11445 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11446 replace System'To_Address by equivalent call.
11447
11448 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11449
11450 * bindusg.adb: Improve usage output for -f switch.
11451
11452 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11453
11454 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11455 Minor reformatting.
11456
11457 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11458
11459 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11460 treat comparisons on strings as legal in a Static_Predicate.
11461 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11462 a function call that is the expansion of a string comparison.The
11463 function call is built when compiling the corresponding predicate
11464 function, but the expression has been found legal as a static
11465 predicate during earlier analysis.
11466 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11467 properly a function call that is the expansion of a string
11468 comparison operation, in order to recover the Static_Predicate
11469 expression and apply it to a static argument when needed.
11470
11471 2017-01-13 Tristan Gingold <gingold@adacore.com>
11472
11473 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11474 (Open_Read): Re-implement using Open_Read_No_Exception.
11475 (Open_Write): Raise exception in case of error.
11476 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11477 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11478 reaise exception.
11479 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11480
11481 2017-01-13 Yannick Moy <moy@adacore.com>
11482
11483 * checks.adb: Code cleanup.
11484
11485 2017-01-13 Yannick Moy <moy@adacore.com>
11486
11487 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11488 expression instead of unanalyzed aspect expression for checking
11489 the validity of inheriting an operation. Also copy the expression
11490 being passing it to Build_Class_Wide_Expression, as this call
11491 modifies its argument.
11492 * sem_util.ads Fix comment to reference correct function name
11493 New_Copy_Tree.
11494
11495 2017-01-13 Javier Miranda <miranda@adacore.com>
11496
11497 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11498 when we propagate information about the indexes back to the original
11499 indexing mode and the prefix of the index is a function call, do not
11500 remove any parameter from such call.
11501
11502 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11503
11504 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11505 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11506 a build-in-place function whose result type is tagged.
11507
11508 2017-01-13 Yannick Moy <moy@adacore.com>
11509
11510 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11511 Do not generate a wrapper when the only candidate is a class-wide
11512 subprogram.
11513 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11514 inside a generic context.
11515
11516 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11517
11518 * exp_util.adb (Add_Inherited_Tagged_DIC):
11519 Pass the object parameters of both the parent and the derived
11520 type DIC procedure to the reference replacement circuitry.
11521 (Find_DIC_Type): Modify the circuitry to present the partial
11522 view of a private type in case the private type defines its own
11523 DIC pragma.
11524 (Replace_Object_And_Primitive_References): Add two
11525 optional formal parameters. Update the comment on usage. Update
11526 the replacement of references to object parameters.
11527
11528 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11529
11530 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11531
11532 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11533
11534 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11535 an out parameter that is a type conversion, independently of th
11536 range check that may apply to the expression of the conversion,
11537 for use in GNATProve.
11538
11539 2017-01-13 Yannick Moy <moy@adacore.com>
11540
11541 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11542 GNATprove_Mode here to Frontend.
11543 * frontend.adb (Frontend): Move the implicit with for System
11544 in GNATprove_Mode here as it ismore correct this way; the old
11545 place only worked by chance, since there were no overloaded names.
11546 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11547 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11548 four attributes identified in SRM 9(18), add an implicit with
11549 to Ada.Task_Identification.
11550 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11551 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11552 mode.
11553 * checks.adb (Apply_Discriminant_Check,
11554 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11555 In GNATprove mode, we do not apply the checks, but we still
11556 analyze the expression to possibly issue errors on SPARK
11557 code when a run-time error can be detected at compile time.
11558 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11559 in GNATprove mode.
11560
11561 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11562
11563 * expander.adb (Expand): Add a warning about using return
11564 statements in Ghost management code.
11565 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11566 statements in Ghost management code.
11567 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11568 Build_Invariant_Procedure_Declaration): Add a warning about
11569 using return statements in Ghost management code.
11570 * exp_disp.adb (Make_DT): Add a warning about using return
11571 statements in Ghost management code.
11572 * exp_util.adb (Build_DIC_Procedure_Body,
11573 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11574 warning about using return statements in Ghost management code.
11575 * freeze.adb (Freeze_Entity): Add a warning about using return
11576 statements in Ghost management code.
11577 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11578 statements in Ghost management code.
11579 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11580 a warning about using return statements in Ghost management code.
11581 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11582 return statements in Ghost management code.
11583 * sem_ch6.adb (Analyze_Procedure_Call,
11584 Analyze_Subprogram_Body_Helper): Add a warning about using return
11585 statements in Ghost management code.
11586 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11587 using return statements in Ghost management code.
11588 * sem_ch12.adb (Analyze_Package_Instantiation,
11589 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11590 Instantiate_Subprogram_Body): Add a warning about using return
11591 statements in Ghost management code.
11592 * sem_ch13.adb (Build_Predicate_Functions,
11593 Build_Predicate_Function_Declarations): Add a warning about
11594 using return statements in Ghost management code.
11595 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11596 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11597 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11598 using return statements in Ghost management code.
11599
11600 2017-01-13 Tristan Gingold <gingold@adacore.com>
11601
11602 * s-mmosin-mingw.adb: Fix pragma import.
11603
11604 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11605
11606 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11607 codepeer mode.
11608
11609 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11610
11611 * atree.adb (Allocate_Initialize_Node): A newly created node is
11612 no longer marked as Ghost at this level.
11613 (Mark_New_Ghost_Node): New routine.
11614 (New_Copy): Mark the copy as Ghost.
11615 (New_Entity): Mark the entity as Ghost.
11616 (New_Node): Mark the node as Ghost.
11617 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11618 apply to unanalyzed entities.
11619 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11620 entities.
11621 (Set_Is_Checked_Ghost_Entity): This attribute now
11622 applies to all entities as well as unanalyzed entities.
11623 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11624 all entities as well as unanalyzed entities.
11625 * expander.adb Add with and use clauses for Ghost.
11626 (Expand): Install and revert the Ghost region associated with the node
11627 being expanded.
11628 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11629 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11630 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11631 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11632 (Freeze_Type): Install and revert the Ghost region associated
11633 with the type being frozen.
11634 * exp_ch5.adb Remove with and use clauses for Ghost.
11635 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11636 * exp_ch6.adb Remove with and use clauses for Ghost.
11637 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11638 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11639 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11640 Ghost region of the working type.
11641 (Build_Invariant_Procedure_Declaration): Install and revert
11642 the Ghost region of the working type.
11643 (Expand_N_Package_Body): Remove all Ghost-related code.
11644 * exp_ch8.adb Remove with and use clauses for Ghost.
11645 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11646 code.
11647 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11648 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11649 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11650 code.
11651 * exp_ch13.adb Remove with and use clauses for Ghost.
11652 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11653 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11654 the tagged type. Move the generation of various entities within
11655 the Ghost region of the type.
11656 * exp_prag.adb Remove with and use clauses for Ghost.
11657 (Expand_Pragma_Check): Remove all Ghost-related code.
11658 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11659 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11660 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11661 * exp_util.adb (Build_DIC_Procedure_Body): Install
11662 and revert the Ghost region of the working types.
11663 (Build_DIC_Procedure_Declaration): Install and revert the
11664 Ghost region of the working type.
11665 (Make_Invariant_Call): Install and revert the Ghost region of the
11666 associated type.
11667 (Make_Predicate_Call): Reimplemented. Install and revert the
11668 Ghost region of the associated type.
11669 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11670 of the entity being frozen.
11671 (New_Freeze_Node): Removed.
11672 * ghost.adb Remove with and use clauses for Opt.
11673 (Check_Ghost_Completion): Update the parameter profile
11674 and all references to formal parameters.
11675 (Ghost_Entity): Update the comment on usage.
11676 (Install_Ghost_Mode): New routines.
11677 (Is_Ghost_Assignment): New routine.
11678 (Is_Ghost_Declaration): New routine.
11679 (Is_Ghost_Pragma): New routine.
11680 (Is_Ghost_Procedure_Call): New routine.
11681 (Is_Ghost_Renaming): Removed.
11682 (Is_OK_Declaration): Reimplemented.
11683 (Is_OK_Pragma): Reimplemented.
11684 (Is_OK_Statement): Reimplemented.
11685 (Is_Subject_To_Ghost): Update the comment on usage.
11686 (Mark_And_Set_Ghost_Assignment): New routine.
11687 (Mark_And_Set_Ghost_Body): New routine.
11688 (Mark_And_Set_Ghost_Completion): New routine.
11689 (Mark_And_Set_Ghost_Declaration): New routine.
11690 (Mark_And_Set_Ghost_Instantiation): New routine.
11691 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11692 (Mark_Full_View_As_Ghost): Removed.
11693 (Mark_Ghost_Declaration_Or_Body): New routine.
11694 (Mark_Ghost_Pragma): New routine.
11695 (Mark_Ghost_Renaming): New routine.
11696 (Mark_Pragma_As_Ghost): Removed.
11697 (Mark_Renaming_As_Ghost): Removed.
11698 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11699 (Prune_Node): Freeze nodes no longer need special pruning, they
11700 are processed by the general ignored Ghost code mechanism.
11701 (Restore_Ghost_Mode): New routine.
11702 (Set_Ghost_Mode): Reimplemented.
11703 (Set_Ghost_Mode_From_Entity): Removed.
11704 * ghost.ads Add with and use clauses for Ghost.
11705 (Check_Ghost_Completion): Update the parameter profile
11706 along with the comment on usage.
11707 (Install_Ghost_Mode): New routine.
11708 (Is_Ghost_Assignment): New routine.
11709 (Is_Ghost_Declaration): New routine.
11710 (Is_Ghost_Pragma): New routine.
11711 (Is_Ghost_Procedure_Call): New routine.
11712 (Mark_And_Set_Ghost_Assignment): New routine.
11713 (Mark_And_Set_Ghost_Body): New routine.
11714 (Mark_And_Set_Ghost_Completion): New routine.
11715 (Mark_And_Set_Ghost_Declaration): New routine.
11716 (Mark_And_Set_Ghost_Instantiation): New routine.
11717 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11718 (Mark_Full_View_As_Ghost): Removed.
11719 (Mark_Ghost_Pragma): New routine.
11720 (Mark_Ghost_Renaming): New routine.
11721 (Mark_Pragma_As_Ghost): Removed.
11722 (Mark_Renaming_As_Ghost): Removed.
11723 (Restore_Ghost_Mode): New routine.
11724 (Set_Ghost_Mode): Redefined.
11725 (Set_Ghost_Mode_From_Entity): Removed.
11726 * sem.adb (Analyze): Install and revert the Ghost region of the
11727 node being analyzed.
11728 (Do_Analyze): Change the way a clean Ghost
11729 region is installed and reverted.
11730 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11731 all Ghost-related code.
11732 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11733 (Analyze_Number_Declaration): Remove all Ghost-related code.
11734 (Analyze_Object_Declaration): Install and revert the Ghost region of
11735 a deferred object declaration's completion.
11736 (Array_Type_Declaration): Remove all Ghost-related code.
11737 (Build_Derived_Type): Update the comment on
11738 the propagation of Ghost attributes from a parent to a derived type.
11739 (Derive_Subprogram): Remove all Ghost-related code.
11740 (Make_Class_Wide_Type): Remove all Ghost-related code.
11741 (Make_Implicit_Base): Remove all Ghost-related code.
11742 (Process_Full_View): Install and revert the Ghost region of
11743 the partial view. There is no longer need to check the Ghost
11744 completion here.
11745 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11746 region of the left hand side.
11747 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11748 all Ghost-related code.
11749 (Analyze_Expression_Function): Remove all Ghost-related code.
11750 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11751 (Analyze_Procedure_Call): Install and revert the Ghost region of
11752 the procedure being called.
11753 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11754 region of the spec or body.
11755 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11756 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11757 (Find_Corresponding_Spec): Remove all Ghost-related code.
11758 (Process_Formals): Remove all Ghost-related code.
11759 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11760 the Ghost region of the spec.
11761 (Analyze_Package_Declaration): Remove all Ghost-related code.
11762 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11763 Ghost when it aliases a Ghost entity.
11764 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11765 a Ghost entity.
11766 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11767 it aliases a Ghost entity.
11768 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11769 a Ghost entity.
11770 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11771 aliases a Ghost entity.
11772 * sem_ch11.adb Remove with and use clauses for Ghost.
11773 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11774 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11775 Ghost-related code.
11776 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11777 code.
11778 (Analyze_Package_Instantiation): Install and revert the Ghost region
11779 of the package instantiation.
11780 (Analyze_Subprogram_Instantiation): Install
11781 and revert the Ghost region of the subprogram instantiation.
11782 (Instantiate_Package_Body): Code clean up. Install and revert the
11783 Ghost region of the package body.
11784 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11785 Ghost region of the subprogram body.
11786 * sem_ch13.adb (Build_Predicate_Functions): Install
11787 and revert the Ghost region of the related type.
11788 (Build_Predicate_Function_Declaration): Code clean up. Install
11789 and rever the Ghost region of the related type.
11790 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11791 Install and revert the Ghost region of the pragma.
11792 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11793 Ghost region of the pragma.
11794 (Analyze_Pragma): Install and revert the Ghost region of various
11795 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11796 or encloses a Ghost entity.
11797 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11798 region of the pragma.
11799 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11800 Ghost region of the pragma.
11801 * sem_res.adb (Resolve): Remove all Ghost-related code.
11802 * sem_util.adb (Is_Declaration): Reimplemented.
11803 (Is_Declaration_Other_Than_Renaming): New routine.
11804 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11805 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11806 (Is_Ghost_Pragma): Removed.
11807 (Is_Ignored_Ghost_Pragma): New routine.
11808 (Set_Is_Checked_Ghost_Pragma): New routine.
11809 (Set_Is_Ghost_Pragma): Removed.
11810 (Set_Is_Ignored_Ghost_Pragma): New routine.
11811 * sinfo.ads: Update the documentation on Ghost mode and
11812 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11813 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11814 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11815 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11816 (Is_Ghost_Pragma): Removed along with pragma Inline.
11817 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11818 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11819 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11820 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11821
11822 2017-01-12 Tristan Gingold <gingold@adacore.com>
11823
11824 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11825 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11826
11827 2017-01-12 Yannick Moy <moy@adacore.com>
11828
11829 * errout.adb, errout.ads (Initialize): Factor common treatment
11830 in Reset_Warnings.
11831 (Reset_Warnings): New procedure to reset counts related to warnings.
11832 (Record_Compilation_Errors): New variable to store the presence of an
11833 error, used in gnat2why to allow changing the Warning_Mode.
11834 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11835 store the presence of an error.
11836
11837 2017-01-12 Javier Miranda <miranda@adacore.com>
11838
11839 * sem_ch13.adb (Analyze_Aspect_Specifications):
11840 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11841 internally built reference to the protected procedure as coming
11842 from sources and force its analysis.
11843
11844 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11845
11846 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11847 inherit predicates if any from the first_subtype of the parent,
11848 not from the anonymous parent type.
11849 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11850 predicate is not a static subtype.
11851
11852 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11853
11854 * freeze.adb (Check_Suspicious_Convention): New procedure
11855 performing a warning check on discriminated record types with
11856 convention C or C++. Factored out of procedure Freeze_Record_Type,
11857 and changed to only apply to base types (to avoid spurious
11858 warnings on subtypes). Minor improvement of warning messages
11859 to refer to discriminated rather than variant record types.
11860 (Freeze_Record_Type): Remove code for performing a suspicious
11861 convention check.
11862 (Freeze_Entity): Only call Freeze_Record_Type
11863 on types that aren't declared within any enclosing generic units
11864 (rather than just excluding the type when the innermost scope
11865 is generic). Call Check_Suspicious_Convention whether or not
11866 the type is declared within a generic unit.
11867 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11868 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11869 from Sem_Ch8).
11870
11871 2017-01-12 Tristan Gingold <gingold@adacore.com>
11872
11873 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11874 (__gnat_current_codepage): Renamed from CurrentCodePage
11875 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11876
11877 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11878
11879 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11880 quantified expressions, following AI12-050: the loop parameters
11881 of two quantified expressions are conformant if they have the
11882 same identifier.
11883
11884 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11885
11886 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11887
11888 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11889
11890 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11891 Hnadle properly the attribute reference when it appears as part
11892 of an expression in another loop aspect.
11893
11894 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11895
11896 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11897 subsidiary of Build_Initialization_Call, to complete generation
11898 of predicate checks on discriminants whose (sub)types have
11899 predicates, and to add checks on variants that do not have an
11900 others clause.
11901 * sem_util.adb (Gather_Components): A missing Others alternative is
11902 not an error when the type of the discriminant is a static predicate
11903 (and coverage has been checked when analyzing the case statement). A
11904 runtime check is generated to verify that a given discriminant
11905 satisfies the predicate (RM 3.8.1. (21.1/2)).
11906
11907 2017-01-12 Yannick Moy <moy@adacore.com>
11908
11909 * gnat1drv.adb (Adjust_Global_Switches): Only
11910 perform checking of exception mechanism when generating code.
11911
11912 2017-01-12 Justin Squirek <squirek@adacore.com>
11913
11914 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11915 Remove handling of access component with invariant.
11916 (Build_Invariant_Procedure_Declaration): Remove return on class
11917 wide type.
11918 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11919 conditional exception for component or array so Has_Own_Invariants
11920 flag is not falsly set.
11921 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11922 wide type to have no invariant flags.
11923
11924 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11925
11926 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11927 sem_ch13.adb: Minor reformatting.
11928
11929 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11930
11931 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11932 adjustment primitive when the ancestor type was not properly frozen.
11933 (Gen_Assign): Guard against a missing initialization
11934 primitive when the component type was not properly frozen.
11935 (Initialize_Array_Component): Guard against a missing adjustment
11936 primitive when the component type was not properly frozen.
11937 (Initialize_Record_Component): Guard against a missing adjustment
11938 primitive when the component type was not properly frozen.
11939 (Process_Transient_Component_Completion): The transient object may
11940 not be finalized when its associated type was not properly frozen.
11941 * exp_ch3.adb (Build_Assignment): Guard against a missing
11942 adjustment primitive when the component type was not properly frozen.
11943 (Build_Initialization_Call): Guard against a missing
11944 initialization primitive when the associated type was not properly
11945 frozen.
11946 (Expand_N_Object_Declaration): Guard against a missing
11947 adjustment primitive when the base type was not properly frozen.
11948 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11949 body when there is no adjustment primitive available. Create an
11950 empty Deep_Finalize body when there is no finalization primitive
11951 available.
11952 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11953 missing finalization primitive when the designated type was
11954 not properly frozen.
11955 (Expand_N_Allocator): Guard against a missing initialization primitive
11956 when the designated type was not properly frozen.
11957 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11958 only when the corresponding adjustment primitive is available.
11959 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11960 adjustment/finalization statements only when there is an available
11961 primitive to carry out the action.
11962 (Build_Initialize_Statements): Generate the initialization/finalization
11963 statements only when there is an available primitive to carry out the
11964 action.
11965 (Make_Adjust_Call): Do not generate a call when the underlying
11966 type is not present due to a possible missing full view.
11967 (Make_Final_Call): Do not generate a call when the underlying
11968 type is not present due to a possible missing full view.
11969 (Make_Finalize_Address_Stmts): Generate an empty body when the
11970 designated type lacks a finalization primitive.
11971 (Make_Init_Call): Do not generate a call when the underlying type is
11972 not present due to a possible missing full view.
11973 (Process_Component_For_Adjust): Add the adjustment call only when the
11974 corresponding adjustment primitive is available.
11975 (Process_Component_For_Finalize): Add the finalization call only when
11976 the corresponding finalization primitive is available.
11977 (Process_Object_Declaration): Use a null statement to emulate a
11978 missing call to the finalization primitive of the object type.
11979 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11980 (Make_Final_Call): Update the comment on usage.
11981 (Make_Init_Call): Update the comment on usage.
11982 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11983
11984 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11985
11986 * einfo.ads: Update documentation of Address_Taken.
11987 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11988 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11989 for subprograms when setting Address_Taken flag.
11990
11991 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11992
11993 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11994 Configurable_Run_Time_Mode off when analysing with'ed predefined
11995 libraries.
11996
11997 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11998
11999 * sem_prag.adb: Minor reformatting.
12000 * sem_util.adb (Unique_Entity): fix result for
12001 bodies of entry families.
12002
12003 2017-01-12 Justin Squirek <squirek@adacore.com>
12004
12005 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
12006 Resolve_Suppressible in the pragma Assertion_Policy case.
12007 (Resolve_Suppressible): Created this function to factor out
12008 common code used to resolve Suppress to either Ignore or Check
12009 * snames.ads-tmpl: Add name for Suppressible.
12010
12011 2017-01-12 Gary Dismukes <dismukes@adacore.com>
12012
12013 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
12014 reformatting.
12015 * debug.adb: Minor comment fixes.
12016
12017 2017-01-12 Arnaud Charlet <charlet@adacore.com>
12018
12019 * sem_util.adb (Unique_Entity): For concurrent
12020 bodies that are defined with stubs and complete a declaration
12021 of a single concurrent object return the entity of an implicit
12022 concurrent type, not the entity of the anonymous concurrent
12023 object.
12024 * debug.adb: -gnatd.J is no longer used.
12025 * make.adb (Globalize): Removed, no longer used.
12026 * sem_ch9.adb: minor typo in comment for entry index
12027
12028 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
12029
12030 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12031 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12032 the value record of a task, set its _Secondary_Stack_Size field
12033 if present.
12034 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12035 a _Secondary_Stack_Size field in the value record of
12036 the task if a Secondary_Stack_Size rep item is present.
12037 (Make_Task_Create_Call): Include secondary stack size
12038 parameter. If No_Secondary_Stack restriction is in place, passes
12039 stack size of 0.
12040 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12041 Secondary_Stack_Size.
12042 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12043 function to define the overhead of the secondary stack.
12044 * s-tarest.adb (Create_Restricted_Task,
12045 Create_Restricted_Task_Sequential): Functions now include
12046 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12047 * s-tarest.adb (Create_Restricted_Task,
12048 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
12049 include Secondary_Stack_Size parameter.
12050 (Task_Wrapper): Secondary stack now allocated to the size specified by
12051 the Secondary_Stack_Size parameter in the task's ATCB.
12052 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
12053 Secondary_Stack_Size component.
12054 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12055 Create_Restricted_Task_Sequential): Function now include
12056 Secondary_Stack_Size parameter.
12057 (Task_Wrapper): Secondary stack now allocated to the size
12058 specified by the Secondary_Stack_Size parameter in the task's
12059 ATCB.
12060 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
12061 to include Secondary_Stack_Size parameter.
12062 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
12063 Secondary_Stack_Size aspect, turning the aspect into its corresponding
12064 internal attribute.
12065 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
12066 * snames.adb-tmpl, snames.ads-tmpl: Added names
12067 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12068 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12069
12070 2017-01-12 Yannick Moy <moy@adacore.com>
12071
12072 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
12073 subtree.
12074
12075 2017-01-12 Justin Squirek <squirek@adacore.com>
12076
12077 * exp_attr.adb (Expand_N_Attribute_Reference):
12078 Fix Finalization_Size case by properly resolving the type after
12079 rewritting the node.
12080
12081 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12082
12083 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
12084 the tree.
12085 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
12086 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
12087 exp_sel.ads: Minor reformatting.
12088
12089 2017-01-12 Justin Squirek <squirek@adacore.com>
12090
12091 * exp_ch6.adb (Expand_Call): Add guard to prevent
12092 invariant checks from being created for internally generated
12093 subprograms.
12094
12095 2017-01-12 Bob Duff <duff@adacore.com>
12096
12097 * lib-writ.ads: Remove incorrect comment.
12098
12099 2017-01-12 Javier Miranda <miranda@adacore.com>
12100
12101 * debug.adb (-gnatd.K): Enable generation of contract-only
12102 procedures in CodePeer mode.
12103 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
12104 New subprogram.
12105 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
12106 set.
12107 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
12108 subprogram.
12109 (Get_Contract_Only_Missing_Body_Name): New subprogram.
12110 (Get_Contract_Only_Body): New subprogram.
12111 (Set_Contract_Only_Body): New subprogram.
12112 (Is_Contract_Only_Body): New subprogram.
12113 (Set_Is_Contract_Only_Body): New subprogram.
12114 (SCIL_Nodes): Replace table by hash-table.
12115
12116 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12117
12118 * exp_ch6.adb: Minor reformatting.
12119 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
12120
12121 2017-01-12 Bob Duff <duff@adacore.com>
12122
12123 * binde.adb (Forced): New reason for a dependence.
12124 (Force_Elab_Order): Implementation of the new switch.
12125 * binde.ads: Minor comment fixes.
12126 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
12127 long ago that is no longer supported; removed comment about that.
12128 * opt.ads (Force_Elab_Order_File): Name of file specified for
12129 -f switch.
12130 * switch-b.adb: Parse -f switch.
12131
12132 2017-01-12 Justin Squirek <squirek@adacore.com>
12133
12134 * exp_ch6.adb (Check_View_Conversion): Created this function
12135 to properly chain calls to check type invariants that may be
12136 present in a subprogram call after the subprogram.
12137 (Expand_Call): Add a conditional to identify when a view conversion
12138 needs to be checked.
12139 * nlists.adb, nlists.ads (Prepend_New): New routine.
12140 (Prepend_New_To): New routine.
12141
12142 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12143
12144 * sinfo.ads: Minor reformatting.
12145
12146 2017-01-12 Gary Dismukes <dismukes@adacore.com>
12147
12148 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
12149 reformatting.
12150
12151 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12152
12153 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
12154 variable Definite. Create a local object and pass its 'Access to the
12155 BIP function when the result type is either definite or it does not
12156 require any finalization or secondary stack management.
12157
12158 2017-01-12 Bob Duff <duff@adacore.com>
12159
12160 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
12161 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
12162 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
12163 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
12164 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
12165 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
12166 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12167 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
12168 Change name to Pragma_Name_Unmapped.
12169 (Pragma_Name_Mapped): Change name to Pragma_Name.
12170 This is because the "mapped" version should be the usual case.
12171
12172 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
12173
12174 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
12175 Is_Default_Init_Cond_Procedure, and
12176 Has_Inherited_Default_Init_Cond. Add uses of flags
12177 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
12178 (Default_Init_Cond_Procedure): Removed.
12179 (DIC_Procedure): New routine.
12180 (Has_Default_Init_Cond): Removed.
12181 (Has_DIC): New routine.
12182 (Has_Inheritable_Invariants): The attribute applies to the base type.
12183 (Has_Inherited_Default_Init_Cond): Removed.
12184 (Has_Inherited_DIC): New routine.
12185 (Has_Inherited_Invariants): The attribute applies to the base type.
12186 (Has_Own_DIC): New routine.
12187 (Has_Own_Invariants): The attribute applies to the base type.
12188 (Is_Default_Init_Cond_Procedure): Removed.
12189 (Is_DIC_Procedure): New routine.
12190 (Set_Default_Init_Cond_Procedure): Removed.
12191 (Set_DIC_Procedure): New routine.
12192 (Set_Has_Default_Init_Cond): Removed.
12193 (Set_Has_Inheritable_Invariants): The attribute applies
12194 to the base type.
12195 (Set_Has_Inherited_Default_Init_Cond): Removed.
12196 (Set_Has_Inherited_DIC): New routine.
12197 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
12198 (Set_Has_Own_DIC): New routine.
12199 (Set_Has_Own_Invariants): The attribute applies to the base type.
12200 (Set_Is_Default_Init_Cond_Procedure): Removed.
12201 (Set_Is_DIC_Procedure): New routine.
12202 (Write_Entity_Flags): Update the output of all flags related to
12203 default initial condition.
12204 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
12205 of the call to the DIC procedure.
12206 (Freeze_Type): Generate the body of the DIC procedure.
12207 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
12208 all occurrences of Create_Append with Append_New_To. Do
12209 not generate an invariant procedure for a class-wide type.
12210 The generated body acts as a freeze action of the working type.
12211 (Build_Invariant_Procedure_Declaration): Do not generate an
12212 invariant procedure for a class-wide type.
12213 (Create_Append): Removed.
12214 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
12215 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
12216 class-wide pre/postcondition description and data structures from
12217 Sem_Prag.
12218 (Build_Class_Wide_Expression): Moved from Sem_Prag.
12219 (Build_DIC_Call): New routine.
12220 (Build_DIC_Procedure_Body): New routine.
12221 (Build_DIC_Procedure_Declaration): New routine.
12222 (Entity_Hash): Moved from Sem_Prag.
12223 (Find_DIC_Type): New routine.
12224 (Update_Primitives_Mapping): Reimplemented.
12225 (Update_Primitives_Mapping_Of_Types): New routine.
12226 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
12227 (Build_DIC_Call): New routine.
12228 (Build_DIC_Procedure_Body): New routine.
12229 (Build_DIC_Procedure_Declaration): New routine.
12230 (Update_Primitives_Mapping): Moved from Sem_Prag.
12231 (Update_Primitives_Mapping_Of_Types): New routine.
12232 * nlists.adb (Append_New): New routine.
12233 (Append_New_To): New routine.
12234 * nlists.ads (Append_New): New routine.
12235 (Append_New_To): New routine.
12236 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
12237 of DIC procedures here. This is now done at the end of the
12238 visible declarations, private declarations, and at the freeze
12239 point of a type.
12240 (Analyze_Private_Extension_Declaration):
12241 A private extension inherits the DIC pragma of a parent type.
12242 (Analyze_Subtype_Declaration): No need to propagate invariant
12243 attributes to a subtype as those apply to the base type.
12244 (Build_Derived_Record_Type): No need to inherit invariants here
12245 as this is now done in Build_Derived_Type.
12246 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
12247 a parent type.
12248 (Process_Full_View): Update the propagation of DIC attributes.
12249 (Propagate_Default_Init_Cond_Attributes): Removed.
12250 * sem_ch7.adb Add with and use clauses for Exp_Util.
12251 (Analyze_Package_Specification): Create the body of the DIC
12252 procedure at the end of the visible and private declarations.
12253 (Preserve_Full_Attributes): Propagate DIC attributes.
12254 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
12255 DIC attributes.
12256 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
12257 * sem_elab.adb (Check_A_Call): Update the call to
12258 Is_Nontrivial_Default_Init_Cond_Procedure.
12259 * sem_prag.adb Remove the with and use clauses for
12260 GNAT.HTable. Move the handling of class- wide pre/postcondition
12261 description and data structures to Exp_Util.
12262 (Analyze_Pragma): Create the declaration of the DIC procedure. There
12263 is no need to propagate invariant-related attributes at this point
12264 as this is done in Build_Invariant_Procedure_Declaration.
12265 (Build_Class_Wide_Expression): Moved to Exp_Util.
12266 (Entity_Hash): Moved to Exp_Util.
12267 (Update_Primitives_Mapping): Moved to Exp_Util.
12268 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
12269 (Update_Primitives_Mapping): Moved to Exp_Util.
12270 * sem_util.adb: Remove with and use clauses for Ghost
12271 and Sem_Ch13.
12272 (Build_Default_Init_Cond_Call): Removed.
12273 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12274 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12275 (Get_Views): Reimplemented.
12276 (Has_Full_Default_Initialization): Reimplement the section on DIC.
12277 (Inherit_Default_Init_Cond_Procedure): Removed.
12278 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12279 (Is_Nontrivial_DIC_Procedure): New routine.
12280 (Is_Verifiable_DIC_Pragma): New routine.
12281 (Propagate_DIC_Attributes): New routine.
12282 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
12283 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12284 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12285 (Inherit_Default_Init_Cond_Procedure): Removed.
12286 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12287 (Is_Nontrivial_DIC_Procedure): New routine.
12288 (Is_Verifiable_DIC_Pragma): New routine.
12289 (Propagate_DIC_Attributes): New routine.
12290 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
12291 on DIC.
12292 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
12293 usage in nodes.
12294 (Expression_Copy): New routine along with pragma Inline.
12295 (Set_Expression_Copy): New routine along with pragma Inline.
12296
12297 2017-01-06 Bob Duff <duff@adacore.com>
12298
12299 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
12300 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
12301 we won't generate the call to s_stalib_adafinal when the main
12302 is not written in Ada.
12303
12304 2017-01-06 Bob Duff <duff@adacore.com>
12305
12306 * sem_prag.adb: Minor: remove pragma Warnings.
12307
12308 2017-01-06 Tristan Gingold <gingold@adacore.com>
12309
12310 * Makefile.rtl: Do not compile s-stchop by default.
12311
12312 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12313
12314 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12315 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12316 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12317 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12318 Reverted previous change for now.
12319
12320 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12321
12322 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12323 check to default discriminant value if checks are enabled.
12324 (Build_Assignment): If type of component has static predicate,
12325 apply check to its default value, if any.
12326
12327 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12328
12329 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12330 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12331 the value record of a task, set its _Secondary_Stack_Size field
12332 if present.
12333 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12334 a _Secondary_Stack_Size field in the value record of
12335 the task if a Secondary_Stack_Size rep item is present.
12336 (Make_Task_Create_Call): Include secondary stack size
12337 parameter. If No_Secondary_Stack restriction is in place, passes
12338 stack size of 0.
12339 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12340 Secondary_Stack_Size.
12341 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12342 function to define the overhead of the secondary stack.
12343 * s-tarest.adb (Create_Restricted_Task,
12344 Create_Restricted_Task_Sequential): Functions now include
12345 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12346 * s-tarest.adb (Create_Restricted_Task,
12347 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12348 now include Secondary_Stack_Size parameter.
12349 (Task_Wrapper):
12350 Secondary stack now allocated to the size specified by the
12351 Secondary_Stack_Size parameter in the task's ATCB.
12352 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12353 Secondary_Stack_Size component.
12354 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12355 Create_Restricted_Task_Sequential): Function now include
12356 Secondary_Stack_Size parameter.
12357 (Task_Wrapper): Secondary stack
12358 now allocated to the size specified by the Secondary_Stack_Size
12359 parameter in the task's ATCB.
12360 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12361 for Secondary_Stack_Size aspect, turning the aspect into its
12362 corresponding internal attribute.
12363 (Analyze_Attribute_Definition):
12364 Process Secondary_Stack_Size attribute.
12365 * snames.adb-tmpl, snames.ads-tmpl: Added names
12366 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12367 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12368
12369 2017-01-06 Pascal Obry <obry@adacore.com>
12370
12371 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12372 Sequential_IO and Direct_IO.
12373
12374 2017-01-06 Bob Duff <duff@adacore.com>
12375
12376 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12377 * par-ch2.adb: Allow the new pragma (with analysis deferred
12378 to Sem_Prag).
12379 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12380 Keep a mapping from new pragma names to old names.
12381 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12382 implement it by calling Map_Pragma_Name.
12383 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12384 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12385 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12386 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12387 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12388 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12389 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12390 as appropriate.
12391
12392 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12393
12394 * exp_ch9.adb: Minor reformatting.
12395
12396 2017-01-06 Tristan Gingold <gingold@adacore.com>
12397
12398 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12399 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12400 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12401 (unused).
12402 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12403 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12404 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12405 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12406
12407 2017-01-06 Bob Duff <duff@adacore.com>
12408
12409 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12410 dummy implementation of Map_Pragma_Name.
12411
12412 2017-01-06 Tristan Gingold <gingold@adacore.com>
12413
12414 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12415 entry_body variable constant.
12416 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12417 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12418 to constant.
12419 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12420 now access to constant.
12421
12422 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12423
12424 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12425 reformatting and typo fixes.
12426
12427 2017-01-06 Bob Duff <duff@adacore.com>
12428
12429 * snames.ads-tmpl: New names for pragma renaming.
12430 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12431 * par-prag.adb: Add new pragma name to case statement.
12432 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12433 of the pragma.
12434 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12435 Dummy implementation of Pragma_Name_Mapped.
12436
12437 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12438
12439 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12440 better detect call within an entry_wrapper.
12441 * sem_res.adb (Resolve_Call): A protected call within an
12442 entity_wrapper is analyzed in the context of the protected
12443 object but corresponds to a pre-analysis and is not an access
12444 before elaboration.
12445 * sem_attr.adb: Minor reformatting.
12446
12447 2017-01-06 Justin Squirek <squirek@adacore.com>
12448
12449 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12450 Finalization_Size to allow a prefix of any non-class-wide type.
12451 * sem_attr.ads Modify comment for Finalization_Size to include
12452 definite type use case.
12453
12454 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12455
12456 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12457 on procedures that are wrappers created for entries that have
12458 preconditions.
12459 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12460 body is an entry_wrapper, compile it in the context of the
12461 synchronized type, because a precondition may refer to funtions
12462 of the type.
12463 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12464 body entity.
12465 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12466 within an Entry_Wrapper this is an external call whose target
12467 is the synchronized object that is the actual in the call to
12468 the wrapper.
12469
12470 2017-01-06 Yannick Moy <moy@adacore.com>
12471
12472 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12473 in tree, which means not analyzing the previous prefix if the node has
12474 been rewritten into its prefix.
12475
12476 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12477
12478 * s-tpobop.adb: Minor reformatting.
12479
12480 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12481
12482 * checks.adb (Ensure_Valid): Do not generate a validity check
12483 within a generated predicate function, validity checks will have
12484 been applied earlier when required.
12485
12486 2017-01-06 Tristan Gingold <gingold@adacore.com>
12487
12488 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12489 components for performances.
12490 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12491 semantic.
12492
12493 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12494
12495 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12496 If expression is compile-time known and obeys a static predicate
12497 it must be labelled as static, to prevent spurious warnings and
12498 run-time errors, e.g. in case statements. This is relevant when
12499 the expression is the result of constant-folding a type conversion
12500 whose expression is a variable with a known static value.
12501
12502 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12503
12504 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12505
12506 2017-01-06 Justin Squirek <squirek@adacore.com>
12507
12508 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12509 expansion of Finalization_Size attribute.
12510 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12511 semantics of Finalization_Size.
12512 (Eval_Attribute): Add null entry for Finalization_Size.
12513 * sem_attr.ads: Add Finalization_Size to the implementation
12514 dependent attribute list.
12515 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12516
12517 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12518
12519 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12520 iterator specification with a serious syntactic error, transform
12521 construct into an infinite loop in order to continue analysis
12522 and prevent a compiler abort.
12523
12524 2017-01-06 Tristan Gingold <gingold@adacore.com>
12525
12526 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12527 max_queue_lengths_array if unused.
12528
12529 2017-01-06 Bob Duff <duff@adacore.com>
12530
12531 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12532 array access, in case "\" is at the end of Text.
12533 * stylesw.adb (Set_Style_Check_Options): Don't include input
12534 characters in the error message template, because they could
12535 be control characters such as "\", which Errout will try to
12536 interpret.
12537
12538 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12539
12540 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12541 For a private type examine the visible declarations that follow
12542 the partial view, not just the private declarations that follow
12543 the full view.
12544
12545 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12546
12547 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12548 code cleanup.
12549
12550 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12551
12552 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12553 alias of the inherited op is the parent iterator, no need to
12554 examine dispatch table positions which might not be established
12555 yet if type is not frozen.
12556 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12557 predicate function may be a subtype of a tagged type.
12558 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12559 of representation items for the completion of a type extension
12560 where a predicate applies to the partial view.
12561 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12562 parameter that designates function whose actual receives a
12563 predicate check, to improve warning message when the check will
12564 lead to infinite recursion.
12565 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12566 Apply_Predicate_Check.
12567
12568 2017-01-06 Tristan Gingold <gingold@adacore.com>
12569
12570 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12571 Gnat_Extended_Ravenscar.
12572 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12573
12574 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12575
12576 * sem_util.ads: Minor typo fix and reformatting.
12577
12578 2017-01-06 Yannick Moy <moy@adacore.com>
12579
12580 * ghost.adb Minor fixing of references to SPARK RM.
12581 (Check_Ghost_Context): Check whether reference is to a lvalue
12582 before issuing an error about violation of SPARK RM 6.9(13)
12583 when declaration has Ghost policy Check and reference has Ghost
12584 policy Ignore.
12585 * sem_util.adb Minor indentation.
12586 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12587 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12588 * sem_util.ads (Unique_Defining_Entity): Document the result
12589 for package body stubs.
12590
12591 2017-01-06 Tristan Gingold <gingold@adacore.com>
12592
12593 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12594 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12595 constant.
12596 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12597 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12598 values.
12599 * exp_util.adb (Corresponding_Runtime_Package): Consider
12600 Max_Queue_Length pragma.
12601
12602 2017-01-06 Justin Squirek <squirek@adacore.com>
12603
12604 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12605 Remove declaration generation in the case of
12606 System_Tasking_Protected_Objects_Single_Entry being used,
12607 and add a warning message when this is detected to occur.
12608 (Make_Initialize_Protection): Remove reference pass in the case
12609 of System_Tasking_Protected_Objects_Single_Entry.
12610 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12611 * s-tposen.adb (Initialize_Protection_Entry): Remove
12612 Entry_Queue_Max parameter.
12613 * s-tposen.ads: Remove the types use to store the entry queue
12614 maximum.
12615 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12616
12617 2017-01-06 Yannick Moy <moy@adacore.com>
12618
12619 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12620 behavior of function, to also accept out of range positions
12621 and raise Constraint_Error in such case, and to copy sloc from
12622 literal if No_Location passed as location.
12623 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12624 of functions to raise Constraint_Error in case of value not in
12625 appropriate range.
12626
12627 2017-01-06 Tristan Gingold <gingold@adacore.com>
12628
12629 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12630 Invalidate_Stack_Cache.
12631
12632 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12633
12634 * s-os_lib.adb: Minor fix to the signature of Readlink.
12635
12636 2017-01-06 Javier Miranda <miranda@adacore.com>
12637
12638 * sem_ch6.adb (Conforming_Types): Handle another
12639 confusion between views in a nested instance with an actual
12640 private type whose full view is not in scope.
12641
12642 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12643
12644 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12645 mark a rewritten if statement as explicit (Comes_From_Source).
12646
12647 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12648
12649 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12650
12651 2017-01-06 Tristan Gingold <gingold@adacore.com>
12652
12653 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12654
12655 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12656
12657 * sem_case.adb: Minor reformatting.
12658
12659 2017-01-06 Thomas Quinot <quinot@adacore.com>
12660
12661 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12662
12663 2017-01-06 Justin Squirek <squirek@adacore.com>
12664
12665 * aspects.adb: Register aspect in Canonical_Aspect.
12666 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12667 into respective tables.
12668 * einfo.ads, einfo.adb: Add a new attribute for
12669 handling the parameters for Pragma_Max_Entry_Queue
12670 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12671 for accessing and setting were added as well.
12672 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12673 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12674 declaration for pramga arguments and store them in the protected
12675 type node.
12676 (Make_Initialize_Protection): Pass a reference to
12677 the Entry_Max_Queue_Lengths_Array in the protected type node to
12678 the runtime.
12679 * rtsfind.adb: Minor grammar fix.
12680 * rtsfind.ads: Register new types taken from the
12681 runtime libraries RE_Protected_Entry_Queue_Max and
12682 RE_Protected_Entry_Queue_Max_Array
12683 * s-tposen.adb, s-tpoben.adb
12684 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12685 Add extra parameter and add assignment to local object.
12686 * s-tposen.ads, s-tpoben.ads: Add new types to
12687 store entry queue maximums and a field to the entry object record.
12688 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12689 for Aspect_Max_Queue_Length.
12690 (Check_Aspect_At_Freeze_Point):
12691 Add aspect to list of aspects that don't require delayed analysis.
12692 * sem_prag.adb (Analyze_Pragma): Add case statement for
12693 Pragma_Max_Queue_Length, check semantics, and register arugments
12694 in the respective entry nodes.
12695 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12696 and Has_Max_Queue_Length
12697 * snames.ads-tmpl: Add constant for the new aspect-name
12698 Name_Max_Queue_Length and corrasponding pragma.
12699
12700 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12701
12702 * exp_util.adb (Is_Controlled_Function_Call):
12703 Reimplemented. Consider any node which has an entity as the
12704 function call may appear in various ways.
12705
12706 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12707
12708 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12709 an unchecked type conversion when performing a view conversion
12710 to/from a private type. In all other cases use a regular type
12711 conversion to ensure that any relevant checks are properly
12712 installed.
12713
12714 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12715
12716 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12717
12718 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12719
12720 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12721 error on case expression that is an entity, when coverage is
12722 incomplete and entity has a static value obtained by local
12723 propagation.
12724 (Handle_Static_Predicate): New procedure, subsidiary of
12725 Check_Choices, to handle case alternatives that are either
12726 subtype names or subtype indications involving subtypes that
12727 have static predicates.
12728
12729 2017-01-06 Thomas Quinot <quinot@adacore.com>
12730
12731 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12732 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12733
12734 2017-01-06 Bob Duff <duff@adacore.com>
12735
12736 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12737 Elaborate_All(P) to P itself. That could happen in obscure cases,
12738 and always introduced a cycle (P body must be elaborated before
12739 P body).
12740 * lib-writ.ads: Comment clarification.
12741 * ali-util.ads: Minor comment fix.
12742 * ali.adb: Minor reformatting.
12743
12744 2017-01-06 Tristan Gingold <gingold@adacore.com>
12745
12746 * a-exexpr-gcc.adb: Improve comment.
12747
12748 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12749
12750 * s-linux-mips.ads: Use correct signal and errno constants.
12751 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12752
12753 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12754
12755 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12756 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12757 sections.
12758
12759 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12760
12761 * gnatvsn.ads: Bump copyright year.
12762
12763 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12764
12765 * gnat_ugn.texi: Bump @copying's copyright year.
12766 * gnat_rm.texi: Likewise.
12767 \f
12768 Copyright (C) 2017 Free Software Foundation, Inc.
12769
12770 Copying and distribution of this file, with or without modification,
12771 are permitted in any medium without royalty provided the copyright
12772 notice and this notice are preserved.