exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of the innermost...
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
2
3 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of
4 the innermost array instead of Esize of its component type to exclude
5 inappropriate array types, including packed array types.
6
7 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
8
9 * sem_prag.adb (Analyze_Input_Item): Allow concurrent types to appear
10 within the input list of Initializes. Remove the uses of Input_OK.
11
12 2017-12-15 Ed Schonberg <schonberg@adacore.com>
13
14 * exp_ch4.adb (Expand_N_In): Do not replace a membership test on a
15 scalar type with a validity test when the membership appears in a
16 predicate expression, to prevent a spurious error when predicate is
17 specified static.
18 * sem_ch13.adb (Build_Predicate_Functions): Add warning if a static
19 predicate, after constant-folding, reduces to True and is this
20 redundant.
21 * par-ch4.adb: Typo fixes and minor reformattings.
22
23 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
24
25 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Mark the generated
26 with clause as being implicit for an instantiation in order to
27 circumvent an issue with 'W' and 'Z' line encodings in ALI files.
28
29 2017-12-15 Ed Schonberg <schonberg@adacore.com>
30
31 * sem_util.adb (Is_Potentially_Unevaluated): Detect further cases of
32 misuse of 'Old that appear within an expression that is potentially
33 unevaluated, when the prefix of the attribute does not statically
34 designate an object (e.g. a function call).
35
36 2017-12-15 Ed Schonberg <schonberg@adacore.com>
37
38 * sem_ch6.adb (Conformking_Types): Two incomplete types are conforming
39 when one of them is used as a generic actual, but only within an
40 instantiation.
41 * einfo.ads: Clarify use of flag Used_As_Generic_Actual.
42
43 2017-12-15 Justin Squirek <squirek@adacore.com>
44
45 * sem_attr.adb (Resolve_Attribute): Modify check for aliased view on
46 prefix to use the prefix's original node to avoid looking at expanded
47 conversions for certain array types.
48
49 2017-12-15 Ed Schonberg <schonberg@adacore.com>
50
51 * sem_res.adb (Resolve_Membership_Op): Add warning on a membership
52 operation on a scalar type for which there is a user-defined equality
53 operator.
54
55 2017-12-15 Yannick Moy <moy@adacore.com>
56
57 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Ghost assertion
58 policy.
59
60 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
61
62 * sem_prag.adb (Analyze_Initialization_Item): Remove the specialized
63 processing for a null initialization item. Such an item is always
64 illegal.
65
66 2017-12-15 Bob Duff <duff@adacore.com>
67
68 * types.ads, types.h, libgnat/a-except.adb, exp_ch11.adb
69 (PE_Build_In_Place_Mismatch): New reason code for raising when the
70 BIPalloc formal parameter is incorrect. This can happen if a compiler
71 bug causes a mismatch of build-in-place between caller and callee.
72 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
73 PE_Build_In_Place_Mismatch.
74
75 2017-12-15 Ed Schonberg <schonberg@adacore.com>
76
77 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reduction_Expression): New
78 procedure.
79 * exp_util.adb (Insert_Actions): Handle N_Reduction_Expression.
80 * expander.adb (Expand): Call Expand_N_Reduction_Expression
81 * par-ch4.adb (P_Reduction_Expression): New procedure.
82 (P_Iterated_Component_Assoc_Or_Reduction): New precedure, extension of
83 P_Iterated_Component_Association.
84 (OK_Reduction_Expression_Parameter): New procedure.
85 (P_Aggregate_Or_Paren_Expr): Improve error message for malformed delta
86 aggregate.
87 * sem.adb (Analyze): Call Analyze_Reduction_Expression and
88 Analyze_Reduction_Expression_Parameter
89 * sinfo.ads, sinfo.adb: New node kinds N_Reduction_Expression and
90 N_Reduction_Expression_Parameter.
91 * sem_ch4.ads, sem_ch4.adb (Analyze_Reduction_Expression,
92 Analyze_Reduction_Expression_Parameter): New procedures.
93 * sem_res.adb (Resolve): Handle Reduction_Expression and
94 Reduction_Expression_Parameter
95 * sem_spark.adb: Dummy entries for Reduction_Expression and
96 Reduction_Expression_Parameter
97 * sprint.adb (Sprint_Node_Actual): Print Reduction_Expression,
98 Reduction_Expression_Parameter
99
100 2017-12-15 Bob Duff <duff@adacore.com>
101
102 * einfo.ads: Comment fix.
103
104 2017-12-15 Piotr Trojanek <trojanek@adacore.com>
105
106 * s-vercon.adb: Minor style fixes.
107
108 2017-12-15 Ed Schonberg <schonberg@adacore.com>
109
110 * sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
111 itype that is the type of a discriminant-dependent component.
112
113 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
114
115 * sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
116 analysis is now directed to several specialized routines.
117 (Check_Part_Of_Abstract_State): New routine.
118 (Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
119 involving the item, the single concurrent type, and their respective
120 contexts.
121 * sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
122 concurrent type are now recorded regardless of the SPARK mode.
123 * sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
124 individual predicates. A Part_Of reference is legal when it appears
125 within the statement list of the object's immediately enclosing
126 package.
127 (Is_Enclosing_Package_Body): New routine.
128 (Is_Internal_Declaration_Or_Body): New routine.
129 (Is_Single_Declaration_Or_Body): New routine.
130 (Is_Single_Task_Pragma): New routine.
131
132 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
133
134 * gnat_ugn.texi: Regenerate.
135
136 2017-12-15 Bob Duff <duff@adacore.com>
137
138 * gnatvsn.ads: Minor comment fixes.
139
140 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
141
142 * doc/gnat_ugn/gnat_and_program_execution.rst: Update section "Dynamic
143 Stack Usage Analysis" to include more details about GNAT_STACK_LIMIT.
144
145 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
146
147 * exp_util.adb (Add_Own_DIC): Ensure that the expression of the pragma
148 is available (Is_Verifiable_DIC_Pragma): Moved from Sem_Util.
149 * sem_util.adb (Has_Full_Default_Initialization):
150 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
151 whether a type has full default initialization due to pragma
152 Default_Initial_Condition.
153 (Has_Fully_Default_Initializing_DIC_Pragma): New routine.
154 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
155 * sem_util.ads (Has_Fully_Default_Initializing_DIC_Pragma): New
156 routine.
157 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
158 * sem_warn.adb (Is_OK_Fully_Initialized):
159 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
160 whether a type has full default initialization due to pragma
161 Default_Initial_Condition.
162
163 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
164
165 * sem_prag.adb (Match_Constituent): Do not quietly accept constants as
166 suitable constituents.
167 * exp_util.adb: Minor reformatting.
168
169 2017-12-15 Ed Schonberg <schonberg@adacore.com>
170
171 * exp_aggr.adb (In_Place_Assign_OK): Extend the predicate to recognize
172 an array aggregate in an allocator, when the designated type is
173 unconstrained and the upper bound of the aggregate belongs to the base
174 type of the index.
175
176 2017-12-15 Bob Duff <duff@adacore.com>
177
178 * exp_ch6.adb (Expand_N_Extended_Return_Statement,
179 Expand_Simple_Function_Return): Assert that the b-i-p-ness of the
180 caller and callee match. Otherwise, we would need some substantial
181 changes to allow b-i-p calls non-b-i-p, and vice versa.
182
183 2017-12-15 Ed Schonberg <schonberg@adacore.com>
184
185 * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
186 a generic package body. Unnesting is only an issue when generating
187 code, and if the main unit is generic then nested instance bodies have
188 not been created and analyzed, and unnesting will crash in the absence
189 of those bodies,
190
191 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
192
193 * inline.adb (Add_Inlined_Body): Do not add a function which is
194 completed by an expression function defined in the same context as the
195 initial declaration because the completing body is not in a package
196 body.
197 (Is_Non_Loading_Expression_Function): New routine.
198
199 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
200
201 * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
202 the behavior of -gnatdL from before revision 255412.
203 * sem_elab.adb: Update the section of compiler switches.
204 (Build_Call_Marker): Do not create a marker for a call which originates
205 from an expanded spec or body of an instantiated gener, does not invoke
206 a generic formal subprogram, the target is external to the instance,
207 and -gnatdL is in effect.
208 (In_External_Context): New routine.
209 (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
210 and associated flag.
211 (Process_Conditional_ABE_Call): Update the uses of -gnatdL and
212 associated flag.
213 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
214 -gnatd_i.
215 * exp_unst.adb: Minor typo fixes and edits.
216
217 2017-12-15 Ed Schonberg <schonberg@adacore.com>
218
219 * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
220 subprogram instantiation, now that the enclosing wrapper package
221 carries an explicit freeze node. THis prevents freeze nodes for the
222 subprogram for appearing in the wrong scope. This is relevant when the
223 generic subprogram has a private or incomplete formal type and the
224 instance appears within a package that declares the actual type for the
225 instantiation, and that type has itself a delayed freeze.
226
227 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
228
229 * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
230 the environment variable GNAT_STACK_LIMIT from the Stack Overflow
231 Checking section as it is no longer used by any of our supported
232 targets.
233
234 2017-12-15 Bob Duff <duff@adacore.com>
235
236 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
237 Init_Assignment is rewritten, we need to set Assignment_OK on the new
238 node. Otherwise, we will get spurious errors when initializing via
239 assignment statement.
240
241 2017-12-15 Arnaud Charlet <charlet@adacore.com>
242
243 * exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
244 relevant nodes.
245 (Has_Non_Null_Statements): Moved to sem_util for later reuse.
246
247 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
248
249 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
250 * libgnat/s-fatgen.adb (Model): Use Machine attribute.
251 (Truncation): Likewise.
252
253 2017-12-15 Bob Duff <duff@adacore.com>
254
255 * exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
256 statement sequence generated for certain extended return statements
257 have a Sloc that is not No_Location. Otherwise, the back end doesn't
258 set any location and ends up reading uninitialized variables.
259
260 2017-12-15 Bob Duff <duff@adacore.com>
261
262 * types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
263 r255414, committed by mistake.
264
265 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
266
267 * gcc-interface/Makefile.in: Generalize support for symbolic traces.
268
269 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
270
271 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
272
273 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
274
275 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
276 to 0 on the callee if the call is recursive.
277
278 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
279
280 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
281 of the enclosing record type if it is not already set.
282
283 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
284
285 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
287 a padding type for the alignment before validating the size.
288 Flip conditional construct and add a comment.
289 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
290 apply the exception for padded objects to the type of the object.
291 * gcc-interface/utils.c (hash_pad_type): New static function.
292 (lookup_and_insert_pad_type): Rename into...
293 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
294 lookup with insertion and always return the canonical type.
295 (maybe_pad_type): Adjust to above changes. Set debug type later.
296 (pad_type_has_rm_size): New predicate.
297 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
298
299 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
300
301 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
302
303 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
304
305 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
306 package without body.
307
308 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
309
310 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
311 descendant of System.Address.
312 (gnat_to_gnu_subprog_type): Likewise.
313
314 2017-12-08 Jakub Jelinek <jakub@redhat.com>
315
316 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
317 exclusions to the comment.
318
319 2017-12-07 Martin Sebor <msebor@redhat.com>
320
321 PR c/81544
322 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
323 new member of struct attribute_spec.
324
325 2017-12-06 Simon Wright <simon@pushface.org>
326
327 PR ada/66205
328 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
329 set, generate a null body.
330
331 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
332
333 * sem_util.adb (Contains_Refined_State): Remove.
334
335 2017-12-05 Ed Schonberg <schonberg@adacore.com>
336
337 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
338 predicate cannot apply to a formal type.
339
340 2017-12-05 Arnaud Charlet <charlet@adacore.com>
341
342 * exp_unst.ads: Fix typos.
343
344 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
345
346 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
347 QNX. At startup, the first mutex created has a non-zero ceiling
348 priority whatever its actual policy. This makes some tests fail
349 (c940013 for example).
350
351 2017-12-05 Bob Duff <duff@adacore.com>
352
353 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
354 Expand_Cleanup_Actions for N_Extended_Return_Statement.
355 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
356 N_Extended_Return_Statement by transforming the statements into a
357 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
358 It's too hard for Expand_Cleanup_Actions to operate directly on the
359 N_Extended_Return_Statement, because it has a different structure than
360 the other node kinds that Expand_Cleanup_Actions.
361 * exp_util.adb (Requires_Cleanup_Actions): Add support for
362 N_Extended_Return_Statement. Change "when others => return False;" to
363 "when others => raise ...;" so it's clear what nodes this function
364 handles. Use named notation where appropriate.
365 * exp_util.ads: Mark incorrect comment with ???.
366
367 2017-12-05 Javier Miranda <miranda@adacore.com>
368
369 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
370 Debug_Info_Needed decoration of internally generated discriminal
371 renaming declaration.
372
373 2017-12-05 Arnaud Charlet <charlet@adacore.com>
374
375 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
376 nested subprograms.
377
378 2017-12-05 Sergey Rybin <rybin@adacore.com>
379
380 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
381 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
382
383 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
384
385 * sem_util.adb (Contains_Refined_State): Remove.
386
387 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
388
389 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
390 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
391 Ada.Calendar.Clock_Time).
392
393 2017-12-05 Ed Schonberg <schonberg@adacore.com>
394
395 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
396 subprogram is overloaded, scan the list of homonyms in the same
397 scope, to find the inherited operation that may be overridden
398 by the candidate.
399 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
400
401 2017-12-05 Bob Duff <duff@adacore.com>
402
403 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
404 Init_Assignment is rewritten, we need to set Assignment_OK on the new
405 node. Otherwise, we will get spurious errors when initializing via
406 assignment statement.
407
408 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
409
410 * sem_elab.adb: Update the terminology and switch sections.
411 (Check_SPARK_Model_In_Effect): New routine.
412 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
413 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
414 SPARK.
415 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
416 effect for SPARK.
417 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
418 in effect for SPARK.
419
420 2017-12-05 Nicolas Setton <setton@adacore.com>
421
422 * terminals.c (__gnat_setup_child_communication): As documented,
423 __gnat_setup_child_communication should not terminate - it is intended
424 to be used as the child process of a call to fork(). However, execvp
425 might actually return in some cases, for instance when attempting to
426 run a 32-bit binary on a 64-bit Linux distribution when the
427 compatibility packages are not installed. In these cases, exit the
428 program to conform to the documentation.
429
430 2017-12-05 Olivier Hainque <hainque@adacore.com>
431
432 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
433 update.
434
435 2017-12-05 Gary Dismukes <dismukes@adacore.com>
436
437 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
438 and reformatting.
439 * gnat_ugn.texi: Regenerate.
440
441 2017-12-05 Olivier Hainque <hainque@adacore.com>
442
443 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
444 on access to subprogram types with foreign convention.
445
446 2017-12-05 Yannick Moy <moy@adacore.com>
447
448 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
449 Guide description of default settings of warnings.
450
451 2017-12-05 Olivier Hainque <hainque@adacore.com>
452
453 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
454 of section. Add comments explaining the rationale of the computation.
455
456 2017-12-05 Bob Duff <duff@adacore.com>
457
458 * exp_ch11.adb: Minor refactoring.
459
460 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
461
462 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
463 documentation.
464 (Set_Underscored_Debug_Flag): New routine.
465 * debug.ads: Add the flags for all underscore switches.
466 (Set_Underscored_Debug_Flag): New routine.
467 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
468 (Suppress_Elaboration_Warnings): New routine.
469 (Set_Suppress_Elaboration_Warnings): New routine.
470 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
471 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
472 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
473 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
474 Inline.
475 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
476 legacy elaboration model.
477 (Default_Initialize_Object): Restore the behavior of the legacy
478 elaboration model.
479 * exp_ch9.adb: Add with and use clause for Sem_Elab.
480 (Build_Task_Activation_Call): Restore the behavior of the legacy
481 elaboration model.
482 * frontend.adb (Frontend): Restore the behavior of the legacy
483 elaboration model.
484 * opt.ads: Add new flags Legacy_Elaboration_Checks and
485 Relaxed_Elaboration_Checks, along with documentation.
486 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
487 legacy elaboration model.
488 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
489 elaboration model.
490 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
491 the legacy elaboration model.
492 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
493 elaboration model.
494 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
495 of the legacy elaboration model.
496 (Analyze_Package_Instantiation): Restore the behavior of the legacy
497 elaboration model.
498 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
499 elaboration model.
500 * sem_elab.adb: Update the documentation of the Processing phase.
501 Update the documentation on elaboration-related compilation
502 switches. Update the documentation on adding a new target. Add
503 Processing_Attributes which represent the state of the Processing
504 phase. Resurrect the previous elaboration model as "legacy elaboration
505 model".
506 (Build_Call_Marker): This routine does not function when the legacy
507 elaboration model is in effect. Do not consider entry calls and requeue
508 statements when debug flag d_e is in effect. Do not consider calls to
509 subprograms which verify the runtime semantics of certain assertion
510 pragmas when debug flag d_p is in effect.
511 (Build_Variable_Reference_Marker): This routine does not function when
512 the legacy elaboration model is in effect.
513 (Check_Elaboration_Scenarios): This routine does not function when the
514 legacy elaboration model is in effect.
515 (Ensure_Prior_Elaboration): The various flags have now been replaced
516 with a state. Do not generate implicit Elaborate[_All] pragmas when
517 their creation has been suppressed.
518 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
519 the requested pragma, not on the nature of the scenario.
520 (In_External_Context): Removed.
521 (Is_Assertion_Pragma_Target): New routine.
522 (Is_Potential_Scenario): Stop the traversal of a task body when
523 reaching an accept or select statement, and debug switch d_a is in
524 effect.
525 (Kill_Elaboration_Scenario): This routine does not function when the
526 legacy elaboration model is in effect.
527 (Process_Activation_Generic): The various flags have now been replaced
528 with a state.
529 (Process_Conditional_ABE): The various flags have now been replaced
530 with a state.
531 (Process_Conditional_ABE_Access): The various flags have now been
532 replaced with a state.
533 (Process_Conditional_ABE_Activation_Impl): The various flags have now
534 been replaced with a state. Do not process an activation call which
535 activates a task whose type is defined in an external instance, and
536 debug switch dL is in effect. Suppress the generation of implicit
537 Elaborate[_All] pragmas once a conditional ABE check has been
538 installed.
539 (Process_Conditional_ABE_Call): The various flags have now been
540 replaced with a state. Do not process a call which invokes a subprogram
541 defined in an external instance, and debug switch dL is in effect.
542 (Process_Conditional_ABE_Call_Ada): The various flags have now been
543 replaced with a state. Suppress the generation of implicit
544 Elaborate[_All] pragmas once a conditional ABE check has been
545 installed.
546 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
547 replaced with a state.
548 (Process_Conditional_ABE_Instantiation): The various flags have now
549 been replaced with a state.
550 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
551 been replaced with a state. Suppress the generation of implicit
552 Elaborate[_All] pragmas once a conditional ABE check has been
553 installed.
554 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
555 now been replaced with a state.
556 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
557 been replaced with a state.
558 (Process_Single_Activation): The various flags have now been replaced
559 with a state.
560 (Record_Elaboration_Scenario): This routine does not function when the
561 legacy elaboration model is in effect.
562 (Traverse_Body): The various flags have now been replaced with a state.
563 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
564 elaboration model".
565 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
566 elaboration model.
567 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
568 elaboration model.
569 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
570 model.
571 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
572 function when the legacy elaboration model is in effect.
573 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
574 (No_Elaboration_Check): New routine.
575 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
576 (Set_No_Elaboration_Check): New routine.
577 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
578 along with occurrences in nodes. Add new flag No_Elaboration_Check
579 along with occurrences in nodes.
580 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
581 switches with underscores. Add processing for switches -gnatH and
582 -gnatJ.
583 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
584 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
585 documentation to include the legacy and relaxed elaboration models.
586 * gnat_ugn.texi: Regenerate.
587
588 2017-12-05 Arnaud Charlet <charlet@adacore.com>
589
590 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
591 Improve doc on required packages for linux 32bits.
592
593 2017-12-05 Doug Rupp <rupp@adacore.com>
594
595 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
596
597 2017-12-05 Javier Miranda <miranda@adacore.com>
598
599 * checks.adb (Generate_Range_Check): Force evaluation of the node in
600 more cases. This patch was written to improve the code generated by
601 the CCG compiler but it is enabled for all targets since double
602 evaluation is always a potential source of inefficiency.
603
604 2017-12-05 Gary Dismukes <dismukes@adacore.com>
605
606 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
607 -fdump-xref switch.
608
609 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
610
611 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
612 iteration scheme throughout, except for the new loop statement(s).
613
614 2017-12-05 Ed Schonberg <schonberg@adacore.com>
615
616 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
617 assignment if it is part of an Iterated_Component_Association: the
618 analysis needs to take place once the loop structure is analyzed and
619 the loop parameter made visible, because references to it typically
620 appear in the corresponding expression. This is necessary if the
621 expression is an aggregate, because previous pre-analysis of the
622 expression does not handle nested aggregates properly.
623
624 2017-12-05 Bob Duff <duff@adacore.com>
625
626 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
627 allocator that is the expansion of a build-in-place function call.
628
629 2017-12-05 Olivier Hainque <hainque@adacore.com>
630
631 libgnat/
632 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
633 possibly adjusting the lookup address by a load address, expect
634 a extra argument through which the load address can be conveyed
635 separately.
636 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
637 retrieved load address to Init_Module.
638 * s-tsmona__linux.adb (Get): Honor the new interface.
639 * s-tsmona__mingw.adb (Get): Likewise.
640 * s-dwalin.ads: Adjust comments to be explicit about which
641 addresses are from module info and which are run-time addresses,
642 offsetted by the module load address.
643 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
644 Do not alter the module Low and High (relative) addresses.
645 (Is_Inside): Improve documentation regarding the kinds of addresses
646 at hand and correct the test.
647 (Symbolic_Traceback): Use separate variables with explicit names
648 for the address in traceback (run-time value) and the address to
649 lookup within the shared object (module-relative). Adjust the
650 computation of address passed to Symbolic_Address for symbolization.
651
652 2017-12-05 Arnaud Charlet <charlet@adacore.com>
653
654 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
655 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
656 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
657 other back-ends can also benefit from the front-end expansion. Remove
658 test for Modify_Tree_For_C in all callers to better share code.
659 * gnat1drv.adb (Adjust_Global_Switches): Set
660 Expand_Nonbinary_Modular_Ops when generating C code.
661
662 2017-12-05 Ed Schonberg <schonberg@adacore.com>
663
664 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
665 parameter becomes invisible after analyzing the loop, which has been
666 rewritten as a while-loop.
667
668 2017-12-05 Doug Rupp <rupp@adacore.com>
669
670 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
671 and update for 64bit ports.
672
673 2017-12-05 Bob Duff <duff@adacore.com>
674
675 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
676 instead of the full name.
677 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
678 in the case of an instance of a generic.
679
680 2017-12-05 Arnaud Charlet <charlet@adacore.com>
681
682 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
683 pragma Annotate.
684
685 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
686
687 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
688
689 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
690
691 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
692 * libgnat/s-osprim__rtems.adb: New file.
693 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
694 (pthread_mutexattr_t): Likewise.
695 (pthread_rwlockattr_t): Likewise.
696 (pthread_rwlock_t): Likewise.
697 (time_t): Use 64-bit integer.
698
699 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
700
701 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
702 alignment.
703 (pthread_mutex_t): Likewise.
704 (pthread_rwlock_t): Likewise.
705
706 2017-11-28 Jakub Jelinek <jakub@redhat.com>
707
708 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
709 using build2 instead of build3.
710
711 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
712
713 PR ada/83091
714 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
715 type for the implementation type of a packed array.
716
717 2017-11-23 Mike Stump <mikestump@comcast.net>
718 Eric Botcazou <ebotcazou@adacore.com>
719
720 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
721 operand to ANNOTATE_EXPR and also pass unrolling hints.
722
723 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
724
725 PR ada/83016
726 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
727 (Usage): Adjust.
728 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
729 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
730 the invocations of $(GNATLINK).
731 (../../gnatdll$(exeext)): Likewise.
732 (../../vxaddr2line$(exeext)): Likewise.
733 (gnatmake-re): Likewise.
734 (gnatlink-re): Likewise.
735
736 2017-11-16 Doug Rupp <rupp@adacore.com>
737
738 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
739
740 2017-11-16 Steve Baird <baird@adacore.com>
741
742 * debug.adb: Update another comment to indicate gnat2scil's use of the
743 -gnatd.7 switch.
744
745 2017-11-16 Bob Duff <duff@adacore.com>
746
747 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
748 the case of nested build-in-place calls.
749
750 2017-11-16 Joel Brobecker <brobecker@adacore.com>
751
752 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
753 available in gnatsymbolize.
754
755 2017-11-16 Steve Baird <baird@adacore.com>
756
757 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
758 switch.
759
760 2017-11-16 Gary Dismukes <dismukes@adacore.com>
761
762 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
763 sem_elab.adb: Minor editorial corrections.
764 * gnat_ugn.texi: Regenerate.
765
766 2017-11-16 Joel Brobecker <brobecker@adacore.com>
767
768 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
769 gnatsymbolize documentation.
770 * gnat_ugn.texi: Regenerate.
771
772 2017-11-16 Steve Baird <baird@adacore.com>
773
774 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
775 "Scope (Parent_Type)" with "Scope (Parent_Base)".
776
777 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
778
779 * opt.ads: Elaboration warnings are now on by default. Add a comment
780 explaining why this is needed.
781 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
782 warnings.
783 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
784 elaboration warnings.
785 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
786 warnings.
787 * sem_elab.adb: Update the structure of Call_Attributes and
788 Instantiation_Attributes.
789 (Build_Call_Marker): Propagate the status of elaboration warnings from
790 the call to the marker.
791 (Extract_Call_Attributes): Extract the status of elaboration warnings.
792 (Extract_Instantiation_Attributes): Extract the status of elaboration
793 warnings.
794 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
795 now dependent on the status of elaboration warnings.
796 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
797 dependent on the status of elaboration warnings.
798 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
799 are now dependent on the status of elaboration warnings.
800 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
801 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
802 status of elaboration warnings.
803 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
804 dependent on the status of elaboration warnings.
805 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
806 dependent on the status of elaboration warnings.
807 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
808 concerning pragma Elaborate.
809 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
810 warnings.
811 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
812 from the procedure call to the entry call.
813 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
814 Warnings.
815 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
816 warnings
817 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
818 Warnings. Update the comment on usage.
819 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
820 (Is_Elaboration_Warnings_OK_Node): New routine.
821 (Set_Is_Dispatching_Call): Update to use Flag6.
822 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
823 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
824 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
825 in nodes.
826 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
827 Inline.
828 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
829 Inline.
830 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
831 sections to indicate how to suppress elaboration warnings. Document
832 switches -gnatwl and -gnatwL.
833 * gnat_ugn.texi: Regenerate.
834
835 2017-11-16 Sylvain Dailler <dailler@adacore.com>
836
837 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
838 lower than 0.
839
840 2017-11-16 Bob Duff <duff@adacore.com>
841
842 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
843 System'To_Address.
844
845 2017-11-16 Yannick Moy <moy@adacore.com>
846
847 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
848
849 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
850
851 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
852 Context_Id denotes a record type.
853
854 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
855
856 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
857 instantiations.
858
859 2017-11-16 Doug Rupp <rupp@adacore.com>
860
861 Initial gnat port to aarch64-wrs-vxworks7
862 * libgnarl/s-vxwork__aarch64.ads,
863 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
864 libgnat/system-vxworks7-aarch64.ads: New files
865 * sigtramp-vxworks-target.inc (aarch64): New section.
866 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
867
868 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
869
870 * sem_elab.adb (Include): Including a node which is also a compilation
871 unit terminates the search because there are no more lists to examine.
872
873 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
874
875 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
876 declaration does not define a primitive operation of a tagged type for
877 SPARK.
878 (Check_SPARK_Primitive_Operation): New routine.
879
880 2017-11-16 Arnaud Charlet <charlet@adacore.com>
881
882 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
883 message when using -E binder switch.
884
885 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
886
887 * errout.ads: Fix minor typo in comment.
888
889 2017-11-16 Ed Schonberg <schonberg@adacore.com>
890
891 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
892 syntactically denote a type, return Any_Type to prevent subsequent
893 compiler crashes or infinite loops.
894
895 2017-11-16 Steve Baird <baird@adacore.com>
896
897 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
898 cases when writing out a .ali file when a Rename_Pragma pragma is in
899 effect.
900 * lib-writ.adb (Write_Unit_Information): Replace call to
901 Pragma_Name_Unmapped with call to Pragma_Name.
902
903 2017-11-16 Gary Dismukes <dismukes@adacore.com>
904
905 * sem_elab.adb: Minor typo fixes.
906
907 2017-11-16 Justin Squirek <squirek@adacore.com>
908
909 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
910 them more explicit.
911
912 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
913
914 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
915 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
916 the elaboration flag as elaboration code.
917 * einfo.adb (Contract): Update the comments.
918 (Ignore_SPARK_Mode_Pragmas): Update the comments.
919 (SPARK_Aux_Pragma): Update the comments.
920 (SPARK_Aux_Pragma_Inherited): Update the comments.
921 (SPARK_Pragma): Update the comments. The attribute now applies
922 to all types and abstract states.
923 (SPARK_Pragma_Inherited): Update the comments. The attribute now
924 applies to all types and abstract states.
925 (Set_Contract): Update the comments.
926 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
927 (Set_SPARK_Aux_Pragma): Update the comments.
928 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
929 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
930 all types and abstract states.
931 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
932 applies to all types and abstract states.
933 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
934 type and abstract states.
935 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
936 SPARK_Pragma_Inherited. Both of them now apply to all types and
937 abstract states.
938 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
939 elaboration flag as elaboration code.
940 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
941 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
942 a derived type for later processing by the ABE mechanism.
943 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
944 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
945 type.
946 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
947 the type.
948 * sem_elab.adb: Define the term "early call region". Update the
949 terminology for "scenario" and "target". Update the architecture of
950 the ABE mechanism. Update the steps which must be taken when adding a
951 new scenario. Update the section on debugging ABE issues. Add new
952 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
953 table SPARK_Scenarios. Hash table Elaboration_Context is now
954 Elaboration_Statuses. The majority of Process_xxx routines have been
955 updated to better reflect their role.
956 (Add_Unit): Reimplemented.
957 (Check_Elaboration_Constituent): New routine.
958 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
959 conditional ABE issues. Verify previously recorded SPARK scenarios.
960 (Check_SPARK_Derived_Type): New routine.
961 (Check_SPARK_Instantiation): New routine.
962 (Check_SPARK_Scenario): New routine.
963 (Check_SPARK_Refined_State_Pragma): New routine.
964 (Early_Call_Region): New routine.
965 (Elaboration_Status): New routine.
966 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
967 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
968 (Find_Early_Call_Region): New routine.
969 (Info_Scenario): Add output for refinement constituents.
970 (Is_Recorded_SPARK_Scenario): New routine.
971 (Is_Suitable_SPARK_Derived_Type): New routine.
972 (Is_Suitable_SPARK_Instantiation): New routine.
973 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
974 (Is_Visited_Body): New routine.
975 (Kill_Elaboration_Scenario): Reimplemented.
976 (Output_Active_Scenarios): Add output for pragma Refined_State.
977 (Output_SPARK_Refined_State_Pragma): New routine.
978 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
979 is now achieved by different means.
980 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
981 the subprogram body appears within the early call region of the body.
982 Either ensure the prior elaboration of external subprograms or verify
983 that the context meets the suitable elaboration requirement.
984 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
985 (Record_Elaboration_Scenario): Reimplement the portion which enforces
986 the level restrictions of the static model. Add support for SPARK
987 scenarios.
988 (Record_SPARK_Elaboration_Scenario): New routine.
989 (Reset_Visited_Bodies): New routine.
990 (Set_Early_Call_Region): New routine.
991 (Set_Elaboration_Status): New routine.
992 (Set_Is_Recorded_SPARK_Scenario): New routine.
993 (Update_Elaboration_Scenario): Reimplemented.
994 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
995 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
996 for examination by the ABE Processing phase.
997 (Create_Abstract_State): Save the SPARK_Mode from the context.
998 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
999 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
1000 * sinfo.adb (Is_Elaboration_Code): New routine.
1001 (Set_Is_Elaboration_Code): New routine.
1002 (Nkind_In): Add 10 and 11 parameter versions.
1003 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
1004 occurrences in nodes.
1005 (Is_Elaboration_Code): New routine along with pragma Inline.
1006 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
1007 (Nkind_In): Add 10 and 11 parameter versions.
1008
1009 2017-11-16 Justin Squirek <squirek@adacore.com>
1010
1011 * sem.adb (Analyze): Remove requirement that the original node of N be
1012 an operator in the case that analysis on the node yields the relevant
1013 operator - so prefer it instead.
1014
1015 2017-11-16 Bob Duff <duff@adacore.com>
1016
1017 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
1018 formal must not have a designated type that is the full view coming
1019 from a limited-with'ed package.
1020 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
1021 function called from sem_ch6.
1022 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
1023 specially for b-i-p cases.
1024
1025 2017-11-10 Martin Sebor <msebor@redhat.com>
1026
1027 PR c/81117
1028 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
1029 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
1030
1031 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
1032
1033 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
1034 not fall through to the next case.
1035 <ARRAY_TYPE>: Deal specially with a dereference from another array
1036 type with the same element type.
1037
1038 2017-11-09 Gary Dismukes <dismukes@adacore.com>
1039
1040 * exp_util.adb, freeze.adb: Minor reformatting.
1041
1042 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1043
1044 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
1045
1046 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1047
1048 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
1049 N_Variable_Reference_Marker nodes.
1050
1051 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1052
1053 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
1054 the pragma Compile_Time_Error when it appears in a generic package
1055 declaration and uses an expanded name to denote the current unit.
1056
1057 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1058
1059 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
1060 * tracebak.c: Add support for tracebacks in QNX.
1061
1062 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1063
1064 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
1065
1066 2017-11-09 Yannick Moy <moy@adacore.com>
1067
1068 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
1069 justification.
1070
1071 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1072
1073 * doc/gnat_ugn/platform_specific_information.rst: Document packages
1074 needed on GNU/Linux by GNAT.
1075 * gnat_ugn.texi: Regenerate.
1076
1077 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1078
1079 * contracts.adb (Analyze_Contracts): Remove the three parameter
1080 version. This routine now only analyzes contracts and does not perform
1081 any freezing actions.
1082 (Analyze_Previous_Contracts): Removed.
1083 (Freeze_Previous_Contracts): New routine.
1084 * contracts.ads (Analyze_Previous_Contracts): Removed.
1085 (Freeze_Previous_Contracts): New routine.
1086 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
1087 enclosing package spec regardless of whether the list denotes the
1088 visible or private declarations. Fix the removal of partial state
1089 refinements when the context is a package spec.
1090 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
1091 contracts.
1092 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
1093 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
1094 (Analyze_Protected_Body): Freeze previous contracts.
1095 (Analyze_Task_Body): Freeze previous contracts.
1096 * sem_prag.adb: Comment reformatting.
1097
1098 2017-11-09 Bob Duff <duff@adacore.com>
1099
1100 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
1101 Export this so users can use it without importing
1102 System.Tasking.Utilities.
1103 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
1104 that fails when Make_Independent is called on a user task.
1105 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
1106 capitalization style ((style) bad casing of "Master_of_Task").
1107
1108 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1109
1110 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
1111 uninitialized variable uncovered by Codepeer.
1112
1113 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1114
1115 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
1116
1117 2017-11-09 Javier Miranda <miranda@adacore.com>
1118
1119 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1120 (Static_Dispatch_Tables): Minor rewording.
1121 * gnat_rm.texi: Regenerate.
1122
1123 2017-11-09 Justin Squirek <squirek@adacore.com>
1124
1125 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
1126 use_clauses within instances.
1127 (Use_One_Package): Add condition to check for "hidden" open scopes to
1128 avoid skipping over packages that have not been properly installed even
1129 though they are visible.
1130
1131 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1132
1133 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
1134 private operation of a protected type, when the type has no visible
1135 operations.
1136
1137 2017-11-09 Javier Miranda <miranda@adacore.com>
1138
1139 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
1140 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
1141 if available.
1142
1143 2017-11-09 Bob Duff <duff@adacore.com>
1144
1145 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
1146 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
1147 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
1148 variables.
1149
1150 2017-11-09 Yannick Moy <moy@adacore.com>
1151
1152 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
1153 Ifaces_Comp_List.
1154
1155 2017-11-09 Pascal Obry <obry@adacore.com>
1156
1157 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
1158 only for foreign threads. We initialize the thread handle only if not
1159 yet initialized. This happens in Enter_Task for foreign threads only.
1160 But for native threads (Ada tasking) we do want to keep the real
1161 handle (from Create_Task) to be able to free the corresponding
1162 resources in Finalize_TCB (CloseHandle).
1163
1164 2017-11-09 Yannick Moy <moy@adacore.com>
1165
1166 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
1167 P_Base_Type.
1168 (Error_Attr_P): Fix name in pragma No_Return.
1169 (Unexpected_Argument): Add pragma No_Return.
1170 (Placement_Error): Add pragma No_Return.
1171
1172 2017-11-09 Javier Miranda <miranda@adacore.com>
1173
1174 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
1175 dispatch table is statically built.
1176 (Make_DT): Declare constant the Interface_Table object associated with
1177 an statically built dispatch table. For this purpose the Offset_To_Top
1178 value of each interface is computed using the dummy object.
1179 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
1180 the Offset_To_Top field of secondary dispatch tables when the dispatch
1181 table is statically built.
1182 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
1183 when the dispatch table is statically built.
1184 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1185 Document the new GNAT restriction Static_Dispatch_Tables.
1186 * gnat_rm.texi: Regenerate.
1187
1188 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1189
1190 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
1191 to avoid a dormant bug.
1192
1193 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1194
1195 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
1196 as such capability is not available on the OS.
1197 * link.c: Make sure linker options for QNX are correct.
1198 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
1199 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
1200 in particular a workaround with locks priority ceiling where a higher
1201 priority task is allowed to lock a lower ceiling priority lock. This
1202 also fixes the scheduling of FIFO tasks when the priority of a task is
1203 lowered.
1204 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
1205
1206 2017-11-09 Yannick Moy <moy@adacore.com>
1207
1208 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
1209 message.
1210 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
1211 condition.
1212 * namet.adb (Copy_One_Character): Add assumption for static analysis,
1213 as knowledge that Hex(2) is in the range 0..255 is too complex for
1214 CodePeer.
1215 (Finalize): Add assumption for static analysis, as the fact that there
1216 are symbols in the table depends on a global invariant at this point in
1217 the program.
1218 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
1219 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
1220 true.
1221
1222 2017-11-09 Javier Miranda <miranda@adacore.com>
1223
1224 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
1225 * exp_disp.adb (Building_Static_DT): Check restriction.
1226 (Building_Static_Secondary_DT): Check restriction.
1227 (Make_DT): Initialize the HT_Link to No_Tag.
1228 * opt.ads (Static_Dispatch_Tables): Rename flag...
1229 (Building_Static_Dispatch_Tables): ... into this. This will avoid
1230 conflict with the restriction name.
1231 * gnat1drv.adb: Update.
1232 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
1233 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
1234
1235 2017-11-09 Pascal Obry <obry@adacore.com>
1236
1237 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
1238 named number.
1239
1240 2017-11-09 Yannick Moy <moy@adacore.com>
1241
1242 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
1243 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
1244 use. Default initialize Hi, Lo.
1245 (Selected_Range_Checks): Retype Num_Checks more precisely.
1246 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
1247 Lo_Right.
1248 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
1249 Unmodified.
1250 (Process_Postconditions): Mark parameter Stmts as Unmodified.
1251 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
1252 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
1253 (Expand_Concatenate): Default initialize High_Bound.
1254 (Optimize_Length_Comparison): Default initialize Ent, Index.
1255 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
1256 L_Lo.
1257 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
1258 Return_Stmt.
1259 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
1260 remove pragma Warnings(Off).
1261 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
1262 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
1263 * freeze.adb (Check_Component_Storage_Order): Default initialize
1264 Comp_Byte_Aligned rather than silencing messages with pragma
1265 Warnings(Off), which does not work for CodePeer initialization
1266 messages, and given that here the possible read of an unitialized value
1267 depends on a proper use of parameters by the caller.
1268 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1269 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1270 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1271 Implicit_Base.
1272 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1273 pragma Warnings(Off).
1274 (Analyze_Case_Expression): Rescope checking block within branch where
1275 Others_Present is set by the call to Check_Choices.
1276 * sem_ch5.adb (Analyze_Assignment): Default initialize
1277 Save_Full_Analysis.
1278 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1279 and restructure code to defend against previous errors, so that, in
1280 that case, control does not flow to the elsif condition which read an
1281 uninitialized Obj_Decl.
1282 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1283 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1284 which seem to be left uninitialized and possibly read in some cases.
1285 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1286 precisely. This requires to exchange the test for exiting in case of
1287 too many positions and the increment to Position, inside the loop.
1288 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1289 which cannot be read uninitialized, but the reasons for that are quite
1290 subtle.
1291 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1292 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1293 Spec_Id.
1294 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1295 and test for presence of non-null Opnd_Type before testing its scope,
1296 in a test which would read its value uninitialized, and is very rarely
1297 exercized (it depends on the presence of an extension of System).
1298 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1299 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1300 Test_Result.
1301 * set_targ.adb (FailN): Mark procedure with No_Return.
1302 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1303 initialize all array Options to white space, as there is already code
1304 doing the same for the remaining positions in Options at the end of the
1305 procedure.
1306
1307 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1308
1309 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1310 generic instantiations either.
1311
1312 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1313
1314 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1315 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1316 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1317 mode.
1318
1319 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1320
1321 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1322 a limited view of a type T declared in unit U1, when the function is
1323 declared in another unit U2 and the call appears in a procedure within
1324 another unit.
1325
1326 2017-11-09 Justin Squirek <squirek@adacore.com>
1327
1328 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1329 when processing generic instances.
1330
1331 2017-11-09 Bob Duff <duff@adacore.com>
1332
1333 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1334 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1335 objects can have those special values. Valid_Name_Id could usefully be
1336 used all over the compiler front end, but that's too much trouble for
1337 now. If we did that, we might want to rename:
1338 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1339 For parameters of type Valid_Name_Id, remove some redundant tests,
1340 including the ones found by CodePeer. Use Is_Valid_Name instead of
1341 membership test when appropriate.
1342 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1343 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1344 "in Error_Name_Or_No_Name".
1345 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1346 Error_Name_Or_No_Name".
1347
1348 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1349
1350 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1351 mode here unless -gnateC is specified.
1352 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1353 -gnatC here.
1354
1355 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1356
1357 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1358 part of the ALI writing; they are now processed directly from memory
1359 when requested by the backend.
1360 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1361 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1362 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1363 (Add_SPARK_File): Remove.
1364 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1365 that are trivially uninteresting to the SPARK backend.
1366 * spark_xrefs.ads: Remove code that is no longer needed.
1367 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1368
1369 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1370
1371 * sem_elab.adb: Update the documentation on adding a new elaboration
1372 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1373 (Is_Check_Emitting_Scenario): Removed.
1374 (Is_Recorded_Top_Level_Scenario): New routine.
1375 (Kill_Elaboration_Scenario): Reimplemented.
1376 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1377 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1378 (Update_Elaboration_Scenario): Reimplemented.
1379 * sinfo.adb (Is_Recorded_Scenario): Removed.
1380 (Set_Is_Recorded_Scenario): Removed.
1381 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1382 occurrences in nodes.
1383 (Is_Recorded_Scenario): Removed along with pragma Inline.
1384 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1385
1386 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1387
1388 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1389 error message.
1390
1391 2017-11-09 Justin Squirek <squirek@adacore.com>
1392
1393 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1394 to the allocation of an anonymous access-to-controlled object.
1395
1396 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1397
1398 * sigtramp-qnx.c: Fix obvious typo.
1399
1400 2017-11-09 Doug Rupp <rupp@adacore.com>
1401
1402 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1403
1404 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1405
1406 * sem_res.adb (Resolve): If expression is an entity whose type has
1407 implicit dereference, generate reference to it, because no reference is
1408 generated for an overloaded entity during analysis, given that its
1409 identity may not be known.
1410
1411 2017-11-09 Javier Miranda <miranda@adacore.com>
1412
1413 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1414 offset-to-top field by addition.
1415 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1416 offset.
1417 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1418 return a negative offset-to-top value.
1419 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1420 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1421 initialize also the offset-to-top field with a negative offset.
1422 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1423 an addition since the offset-to-top field is now a negative value.
1424 (Displace): Displace the pointer to the object means of a substraction
1425 since it is now a negative value.
1426 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1427 means of a substraction since it is now a negative value.
1428
1429 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1430
1431 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1432 before Errout.Output_Messages also in the case of compilation errors.
1433
1434 2017-11-09 Javier Miranda <miranda@adacore.com>
1435
1436 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1437 the Class Level): Fix error interfacing with C strings.
1438 * gnat_ugn.texi: Regenerate.
1439
1440 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1441
1442 * system-qnx-aarch64.ads: Fix the priority constants.
1443 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1444 and scheduling.
1445 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1446 corresponds to an idle priority on QNX.
1447
1448 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1449
1450 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1451 comments.
1452
1453 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1454
1455 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1456 in expression funtions that are expanded into variables.
1457
1458 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1459
1460 * sem_util.adb: Minor whitespace cleanup.
1461
1462 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1463
1464 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1465 s-taprop version rather than a custom one.
1466 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1467
1468 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1469
1470 * lib-xref.ads, lib-xref-spark_specific.adb
1471 (Traverse_Compilation_Unit): Move declaration to package body.
1472
1473 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1474
1475 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1476 the type of the renaming from its defining entity, rather then the
1477 subtype mark as there may not be a subtype mark.
1478
1479 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1480
1481 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1482 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1483 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1484 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1485 terminals.c: Initial port of GNAT for aarch64-qnx
1486
1487 2017-11-08 Elisa Barboni <barboni@adacore.com>
1488
1489 * exp_util.adb (Find_DIC_Type): Move...
1490 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1491
1492 2017-11-08 Justin Squirek <squirek@adacore.com>
1493
1494 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1495 the owner and corresponding coextension.
1496
1497 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1498
1499 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1500 following separate procedures.
1501 (Resolve_Delta_Array_Aggregate): Previous code form
1502 Resolve_Delta_Aggregate.
1503 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1504 ARG decisions on the legality rules for delta aggregates for records:
1505 in the case of a variant record, components from different variants
1506 cannot be specified in the delta aggregate, and this must be checked
1507 statically.
1508
1509 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1510
1511 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1512 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1513 removed component.
1514
1515 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1516
1517 * sem_ch4.adb: Minor typo fix.
1518
1519 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1520
1521 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1522 Spec_Scope_Num components.
1523 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1524 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1525 removed components.
1526 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1527 components.
1528
1529 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1530
1531 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1532 name is a discriminant in check for unconditional accessibility
1533 violation within instances.
1534
1535 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1536
1537 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1538 for constants (with variable input).
1539 (Is_Constant_Object_Without_Variable_Input): Remove.
1540
1541 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1542
1543 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1544
1545 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1546
1547 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1548 cross-references.
1549 (dspark): Remove hardcoded table bound.
1550
1551 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1552
1553 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1554 the type of the base of the construct to determine the type (or
1555 candidate interpretations) of the delta aggregate. This allows the
1556 construct to appear in a context that expects a private extension.
1557 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1558 overloaded base.
1559
1560 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1561
1562 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1563 with Entity_Id of the reference.
1564 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1565 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1566 reference, not the file and scope indices.
1567
1568 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1569
1570 * errout.ads (Current_Node): New.
1571 * errout.adb (Error_Msg): Use Current_Node.
1572 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1573 when relevant.
1574 * style.adb: Call Error_Msg_N when possible.
1575
1576 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1577
1578 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1579 Entity.
1580 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1581 the Scope_Id record component.
1582
1583 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1584
1585 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1586 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1587 SPARK_File_Record components.
1588 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1589 representation of files/units.
1590
1591 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1592
1593 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1594 Remove Inside_Stubs parameter.
1595
1596 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1597
1598 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1599 represented by Entity_Id.
1600 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1601 represented by Entity_Id; this information is not repeated as
1602 Scope_Entity.
1603 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1604 Name_Of_Heap_Variable.
1605 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1606 data types.
1607 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1608 scope and xrefs tables to above changes in data types.
1609
1610 2017-11-08 Justin Squirek <squirek@adacore.com>
1611
1612 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1613 primitives of generic actuals.
1614 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1615 base type clauses as per ARM 8.4 (8.2/3).
1616
1617 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1618
1619 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1620 categorization dependency of the body, as is done for non-generic
1621 units.
1622 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1623 through declarations (Simple optimization, no behavior change).
1624
1625 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1626
1627 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1628 (SPARK_Scope_Record): Remove inessential components.
1629 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1630 components.
1631 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1632 removed record components.
1633 (Add_SPARK_Xrefs): Remove setting of removed record components.
1634
1635 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1636
1637 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1638 empty entities.
1639
1640 2017-11-08 Javier Miranda <miranda@adacore.com>
1641
1642 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1643 functionality of this routine to handle multiple levels of derivations.
1644
1645 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1646
1647 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1648 (Nested_Scenarios): New routine.
1649 (Set_Nested_Scenarios): New routine.
1650 (Write_Field36_Name): New routine.
1651 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1652 in entities.
1653 (Nested_Scenarios): New routine along with pragma Inline.
1654 (Set_Nested_Scenarios): New routine along with pragma Inline.
1655 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1656 (Process_Nested_Scenarios): New routine.
1657 (Traverse_Body): When a subprogram body is traversed for the first
1658 time, find, save, and process all suitable scenarios found within.
1659 Subsequent traversals of the same subprogram body utilize the saved
1660 scenarios.
1661
1662 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1663
1664 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1665 protected operations.
1666 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1667 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1668 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1669 reading and testing SPARK cross-references stored in the ALI files.
1670 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1671 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1672 ALI file.
1673 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1674 with description of the SPARK xrefs ALI format.
1675 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1676 and put_spark_refs.o.
1677
1678 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1679
1680 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1681 when the associated access type is subject to pragma
1682 No_Heap_Finalization.
1683 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1684 designated type in case it comes from a limited withed unit.
1685
1686 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1687
1688 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1689 SPARK-related flags. Add ??? comment.
1690 * exp_util.adb (Insert_Actions): Add an entry for node
1691 N_Variable_Reference_Marker.
1692 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1693 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1694 and record a variable reference marker for the current name.
1695 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1696 a variable reference marker for the current name.
1697 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1698 (Extract_Variable_Reference_Attributes): Reimplemented.
1699 (Info_Scenario): Add output for variable references and remove output
1700 for variable reads.
1701 (Info_Variable_Read): Removed.
1702 (Info_Variable_Reference): New routine.
1703 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1704 while variable reads are not.
1705 (Output_Active_Scenarios): Add output for variable references and
1706 remove output for variable reads.
1707 (Output_Variable_Read): Removed.
1708 (Output_Variable_Reference): New routine.
1709 (Process_Variable_Read): Removed.
1710 (Process_Variable_Reference): New routine.
1711 (Process_Variable_Reference_Read): New routine.
1712 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1713 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1714 marker for the current actual.
1715 * sem_spark.adb (Check_Node): Add an entry for node
1716 N_Variable_Reference_Marker.
1717 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1718 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1719 * sinfo.adb (Is_Read): New routine.
1720 (Is_Write): New routine.
1721 (Target): Updated to handle variable reference markers.
1722 (Set_Is_Read): New routine.
1723 (Set_Is_Write): New routine.
1724 (Set_Target): Updated to handle variable reference markers.
1725 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1726 occurrences in nodes. Update attribute Target. Add new node
1727 kind N_Variable_Reference_Marker.
1728 (Is_Read): New routine along with pragma Inline.
1729 (Is_Write): New routine along with pragma Inline.
1730 (Set_Is_Read): New routine along with pragma Inline.
1731 (Set_Is_Write): New routine along with pragma Inline.
1732 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1733 N_Variable_Reference_Marker.
1734
1735 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1736
1737 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1738 subprograms.
1739
1740 2017-11-08 Yannick Moy <moy@adacore.com>
1741
1742 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1743 about unused use-type or use-package clauses inside inlined bodies.
1744
1745 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1746
1747 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1748 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1749 prior elaboration of a unit when the need came from a partial
1750 finalization context.
1751 (In_Initialization_Context): Relocated to Process_Call.
1752 (Is_Partial_Finalization_Proc): New routine.
1753 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1754 on its usage.
1755 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1756 a comment on its usage.
1757 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1758 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1759 diagnostics when the activation occurs in a partial finalization
1760 context.
1761 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1762 In_Partial_Fin along with a comment on its usage.
1763 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1764 on its usage. A call is within a partial finalization context when it
1765 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1766 in initialization actions. Pass this information down to the recursive
1767 steps of the Processing phase.
1768 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1769 comment on its usage. Remove the guard which suppresses the generation
1770 of implicit Elaborate[_All] pragmas. This is now done in
1771 Ensure_Prior_Elaboration.
1772 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1773 with a comment on its usage. Do not emit any ABE diagnostics when the
1774 call occurs in a partial finalization context.
1775 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1776 comment on its usage.
1777 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1778 comment on its usage.
1779 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1780 with a comment on its usage.
1781 (Process_Instantiation_Conditional_ABE): Add new parameter
1782 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1783 diagnostics when the instantiation occurs in a partial finalization
1784 context.
1785 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1786 with a comment on its usage.
1787 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1788 comment on its usage.
1789 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1790 with a comment on its usage.
1791 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1792 on its usage.
1793
1794 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1795
1796 * sem_ch13.adb: Add optional parameter to Error_Msg.
1797
1798 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1799
1800 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1801 for the Interfaces.* hierarchy as longer unit names are now allowed.
1802
1803 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1804
1805 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1806 subprogram as well. Support more cases of entities.
1807 (Append_Entity_Name): Add some defensive code.
1808
1809 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1810
1811 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1812
1813 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1814
1815 PR ada/82785
1816 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1817
1818 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1819
1820 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1821
1822 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1823
1824 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1825 (convert): Do not use an unchecked conversion for converting from a
1826 type to another type padding it.
1827
1828 2017-10-20 Doug Rupp <rupp@adacore.com>
1829
1830 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1831 needed for using monotonic clock.
1832 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1833 changes.
1834 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1835 out monotonic clock related functions body.
1836 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1837 Compute_Deadline): Move to...
1838 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1839
1840 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1841
1842 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1843 case where the controlling formal is an anonymous access to interface
1844 type.
1845 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1846 access type, handle properly the the constructed dereference that
1847 designates the object used in the rewritten synchronized call.
1848 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1849 generated declaration in the parameter block does not need an
1850 initialization even if the type is a null-excluding access type,
1851 because it will be initialized with the value of the actual later on.
1852 (Parameter_Block_Pack): Do not add controlling actual to parameter
1853 block when its type is by-copy.
1854
1855 2017-10-20 Justin Squirek <squirek@adacore.com>
1856
1857 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1858 scope stack traversal into the context clause.
1859
1860 2017-10-20 Bob Duff <duff@adacore.com>
1861
1862 * sinfo.ads: Fix a comment typo.
1863
1864 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1865
1866 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1867 warning against usage in conjunction with -gnatn.
1868 (-fdump-xref): Delete entry.
1869 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1870 -fdump-xref switch.
1871 * gnat_ugn.texi: Regenerate.
1872
1873 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1874
1875 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1876 Minor reformatting.
1877
1878 2017-10-20 Yannick Moy <moy@adacore.com>
1879
1880 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1881 compare a dimensioned expression with a literal.
1882 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1883 special value zero.
1884 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1885 dimensionality system in GNAT.
1886 * gnat_ugn.texi: Regenerate.
1887
1888 2017-10-20 Yannick Moy <moy@adacore.com>
1889
1890 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1891 inadequate silencing of errors.
1892 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1893 checking the subprogram body generated from an expression function,
1894 when this is done as part of the preanalysis done on expression
1895 functions, as the subprogram body may not yet be attached in the AST.
1896 The error if any will be issued later during the analysis of the body.
1897 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1898
1899 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1900
1901 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1902 warning on ineffective use clause.
1903
1904 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1905
1906 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1907 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1908 to issue the warning on the absence of local raise.
1909 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1910 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1911 absence of local raise.
1912 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1913 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1914 where a scenario could give rise to raising Program_Error.
1915 * sem_elab.adb: Typo fixes.
1916 * fe.h (Warn_If_No_Local_Raise): Declare.
1917 * gcc-interface/gigi.h (get_exception_label): Change return type.
1918 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1919 simple vector of Entity_Id.
1920 (gnu_storage_error_label_stack): Likewise.
1921 (gnu_program_error_label_stack): Likewise.
1922 (gigi): Adjust to above changes.
1923 (Raise_Error_to_gnu): Likewise.
1924 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1925 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1926 (N_Push_Storage_Error_Label): Likewise.
1927 (N_Push_Program_Error_Label): Likewise.
1928 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1929 a warning on the absence of local raise.
1930 (N_Pop_Storage_Error_Label): Likewise.
1931 (N_Pop_Program_Error_Label): Likewise.
1932 (push_exception_label_stack): Delete.
1933 (get_exception_label): Change return type to Entity_Id and adjust.
1934 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1935 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1936 (build_call_raise): Adjust calls to get_exception_label and also
1937 build_goto_raise.
1938 (build_call_raise_column): Likewise.
1939 (build_call_raise_range): Likewise.
1940 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1941 Document actual default behavior.
1942
1943 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1944
1945 * einfo.ads: Minor consistent punctuation in comment. All numbered
1946 items in the comment of Is_Internal are now terminated with a period.
1947
1948 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1949
1950 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1951 internal.
1952
1953 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1954
1955 * sem_type.adb (In_Generic_Actual): Simplified.
1956
1957 2017-10-20 Justin Squirek <squirek@adacore.com>
1958
1959 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1960 verify a renaming exists for a generic formal before comparing it to
1961 the actual as defaulted formals will not have a renamed_object.
1962
1963 2017-10-20 Javier Miranda <miranda@adacore.com>
1964
1965 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1966 N_Block_Statement nodes.
1967
1968 2017-10-20 Bob Duff <duff@adacore.com>
1969
1970 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1971 component of an array aggregate if it is initialized by a
1972 build-in-place function call.
1973 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1974 bip for nonlimited types.
1975 * debug.adb: Document -gnatd.9.
1976
1977 2017-10-20 Bob Duff <duff@adacore.com>
1978
1979 * sem_ch12.adb: Remove redundant setting of Parent.
1980
1981 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1982
1983 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1984 of the operands is a string literal.
1985
1986 2017-10-20 Bob Duff <duff@adacore.com>
1987
1988 * einfo.ads: Comment fix.
1989
1990 2017-10-20 Clement Fumex <fumex@adacore.com>
1991
1992 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1993
1994 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1995
1996 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1997 non-negative integers when the dimensioned base type is an Integer
1998 type.
1999
2000 2017-10-20 Bob Duff <duff@adacore.com>
2001
2002 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
2003 that an allocator came from a b-i-p return statement.
2004 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
2005 object of a nonlimited build-in-place function call.
2006 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
2007 Alloc_For_BIP_Return flag on generated allocators.
2008 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
2009 If the N_Assignment_Statement has been transformed into something else,
2010 then Should_Transform_BIP_Assignment won't work.
2011 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
2012 "Remove Adjust if we're building the return object of an extended
2013 return statement in place." Back out that part of the change, because
2014 the Alloc_For_BIP_Return flag is now used for that.
2015
2016 2017-10-19 Bob Duff <duff@adacore.com>
2017
2018 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
2019 should be "T". Handle case of a subtype of a class-wide type.
2020
2021 2017-10-19 Bob Duff <duff@adacore.com>
2022
2023 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
2024 which node kinds can legitimately be ignored, and raise Program_Error
2025 for others.
2026
2027 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
2028
2029 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
2030 instantiation that acts as a compilation unit.
2031 (Find_Code_Unit): Reimplemented.
2032 (Find_Top_Unit): Reimplemented.
2033 (Find_Unit_Entity): New routine.
2034 (Process_Instantiation_SPARK): Correct the elaboration requirement a
2035 package instantiation imposes on a unit.
2036
2037 2017-10-19 Bob Duff <duff@adacore.com>
2038
2039 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
2040 for a narrow set of controlled types.
2041
2042 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2043
2044 * sinput.ads (Line_Start): Add pragma Inline.
2045 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
2046
2047 2017-10-19 Bob Duff <duff@adacore.com>
2048
2049 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
2050 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
2051 build-in-place function call so that the temp is declared in the right
2052 place.
2053
2054 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
2055
2056 * gcc-interface/misc.c (gnat_tree_size): Move around.
2057
2058 * gcc-interface/utils.c (max_size): Deal with SSA names.
2059
2060 2017-10-17 Jakub Jelinek <jakub@redhat.com>
2061
2062 * gcc-interface/misc.c (gnat_tree_size): New function.
2063 (LANG_HOOKS_TREE_SIZE): Redefine.
2064
2065 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2066
2067 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
2068 Remote_Call_Interface is not a suitable preelaboratd context when the
2069 call appears in the package body.
2070
2071 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2072
2073 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
2074 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
2075 alignment for consistency. If Align is non-zero, use the minimum of
2076 Align and M for the alignment.
2077 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
2078 setting the alignment directly.
2079
2080 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2081
2082 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
2083 optional string in an Assert pragma until the expansion of the pragma
2084 has rewritten it as a conditional statement, so that the string
2085 argument is only evaluaed if the assertion fails. This is mandated by
2086 RM 11.4.2.
2087
2088 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2089
2090 * debug.adb: Switch -gnatd.v and associated flag are now used to
2091 enforce the SPARK rules for elaboration in SPARK code.
2092 * sem_elab.adb: Describe switch -gnatd.v.
2093 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
2094 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
2095 in effect.
2096 (Process_Variable_Assignment): Clarify why variable assignments are
2097 processed reglardless of whether -gnatd.v is in effect.
2098 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
2099 sections on elaboration code and compilation switches.
2100 * gnat_ugn.texi: Regenerate.
2101
2102 2017-10-14 Gary Dismukes <dismukes@adacore.com>
2103
2104 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
2105 sem_warn.adb: Minor reformattings.
2106
2107 2017-10-14 Ed Schonberg <schonberg@adacore.com>
2108
2109 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
2110 for reverse iteration over formal containers.
2111 * gnat_rm.texi: Regenerate.
2112
2113 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2114
2115 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
2116 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
2117 (Ensure_Static_Prior_Elaboration): Renamed to
2118 Ensure_Prior_Elaboration_Static for consistency reasons.
2119 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
2120 reflect its new purpose.
2121 (Is_Initialized): New routine.
2122 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
2123 in order to reflect its new purpose.
2124 (Is_Variable_Read): New routine.
2125 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
2126 to reflect its new purpose.
2127 (Process_Variable_Assignment): This routine now acts as a top level
2128 dispatcher for variable assignments.
2129 (Process_Variable_Assignment_Ada): New routine.
2130 (Process_Variable_Assignment_SPARK): New routine.
2131 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
2132 to reflects its new purpose. A reference to a variable is now suitable
2133 for ABE processing only when it is a read. The logic in the routine now
2134 reflects the latest SPARK elaboration rules.
2135
2136 2017-10-14 Justin Squirek <squirek@adacore.com>
2137
2138 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
2139 triggers marking on formal subprograms.
2140
2141 2017-10-14 Javier Miranda <miranda@adacore.com>
2142
2143 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
2144 renamings of objects that come from the sources.
2145
2146 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2147
2148 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
2149 parameter and set the alignment of the type to Align.
2150 (Copy_Float_Type): Adjust call to Build_Float_Type.
2151 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
2152 call to Build_Float_Type and do not set RM_Size and Alignment.
2153
2154 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2155
2156 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
2157 GNATRTL_NONTASKING_OBJ.
2158
2159 2017-10-14 Bob Duff <duff@adacore.com>
2160
2161 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
2162 enabling b-i-p for nonlimited controlled types (but disabled).
2163
2164 2017-10-14 Justin Squirek <squirek@adacore.com>
2165
2166 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
2167 Has_Warnings_Off with Warnings_Off.
2168
2169 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
2170
2171 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2172
2173 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2174
2175 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
2176 enclosing package at the end of the visible declarations.
2177 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
2178 an initialization item which is undefined due to some illegality.
2179
2180 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2181
2182 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
2183 within each unit that require a default-sized primary and secondary
2184 stack to be generated by the binder.
2185 (Scan_ALI): Scan new 'T' lines.
2186 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
2187 * bindgen.adb (Gen_Output_File): Count the number of default-sized
2188 stacks within the closure that are to be created by the binder.
2189 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
2190 stacks and record these in System.Secodnary_Stack.
2191 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
2192 closure of the program being bound.
2193 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
2194 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
2195 (Expand_N_Object_Declaration): Count the number of default-sized stacks
2196 used by task objects contained within the object whose declaration is
2197 being expanded. Only performed when either the restrictions
2198 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
2199 effect.
2200 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
2201 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
2202 the expansion of a task type if the size of the stack is known at
2203 run-time and the restrictions No_Implicit_Heap_Allocations or
2204 No_Implicit_Task_Allocations are in effect.
2205 (Make_Task_Create_Call): If using a restricted profile provide
2206 secondary stack parameter: either the statically created stack or null.
2207 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
2208 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
2209 Unit_Record initialization expressions.
2210 * lib-writ.adb (Add_Preprocessing_Dependency,
2211 Ensure_System_Dependency): Include Primary_Stack_Count and
2212 Sec_Stack_Count in Unit_Record initialization expression.
2213 (Write_ALI): Write T lines.
2214 (Write_Unit_Information): Do not output 'T' lines if there are no
2215 stacks for the binder to generate.
2216 * lib-writ.ads: Updated library information documentation to include
2217 new T line entry.
2218 * lib.adb (Increment_Primary_Stack_Count): New routine.
2219 (Increment_Sec_Stack_Count): New routine.
2220 (Primary_Stack_Count): New routine.
2221 (Sec_Stack_Count): New routine.
2222 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
2223 Unit_Record and updated documentation.
2224 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
2225 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
2226 (Primary_Stack_Count): New routine along with pragma Inline.
2227 (Sec_Stack_Count): New routine along with pragma Inline.
2228 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
2229 redefined. New flag Default_Sec_Stack_Size and
2230 Quantity_Of_Default_Size_Sec_Stacks.
2231 * rtfinal.c Fixed erroneous comment.
2232 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
2233 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
2234 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
2235 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
2236 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
2237 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
2238 (Set_Sec_Stack_Addr): Removed routine.
2239 (Get_Sec_Stack): New routine.
2240 (Set_Sec_Stack): New routine.
2241 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
2242 reflect new procedure and global names.
2243 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
2244 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
2245 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
2246 parameter profile to allow the secondary stack size to be specified.
2247 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
2248 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
2249 call to remove Secondary_Stack_Size reference. Add secondary stack
2250 address and size to SSL.Create_TSD call.
2251 (Task_Wrapper): Remove secondary stack creation.
2252 * libgnarl/s-tarest.ads (Create_Restricted_Task,
2253 Create_Restricted_Task_Sequential): Update parameter profile to include
2254 Sec_Stack_Address and clarify the Size parameter.
2255 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
2256 from profile and body.
2257 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
2258 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
2259 Common_ATCB.
2260 (Initialize_ATCB): Update the parameter profile to remove
2261 Secondary_Stack_Size.
2262 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
2263 call to Initialize_ATCB. Add secondary stack address and size to
2264 SSL.Create_TSD call, and catch any storage exception from the call.
2265 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2266 new subprogram and component names.
2267 (Task_Wrapper): Remove secondary stack creation.
2268 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2269 * libgnarl/s-tassta.ads: Reformat comments.
2270 (Create_Task): Update parameter profile.
2271 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2272 profile to include secondary stack size. Remove secondary size
2273 parameter from Initialize_ATCB call and add it to Create_TSD call.
2274 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2275 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2276 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2277 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2278 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2279 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2280 Sec_Stack_Dynamic.
2281 (Default_Sec_Stack_Size): New routine.
2282 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2283 now Preelaborate.
2284 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2285 System.Soft_Links.Initialize to initialize non-tasking TSD.
2286 (Create_TSD): Update parameter profile. Initialize the TSD and
2287 unconditionally call SS_Init.
2288 (Destroy_TSD): Update SST.SS_Free call.
2289 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2290 Set_Sec_Stack_Addr_Soft): Remove routines.
2291 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2292 Set_Sec_Stack_Soft): Add routines.
2293 (NT_TSD): Move to private part of package specification.
2294 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2295 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2296 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2297 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2298 (Create_TSD): Update parameter profile.
2299 (NT_TSD): Move to private section from body.
2300 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2301 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2302 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2303 Remove routine.
2304 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2305 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2306 System.Secondary_Stack.
2307 (Init_RTS): Update body for new System.Soft_Links names.
2308 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2309 s-soliin.o.
2310
2311 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2312
2313 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2314 operating on trees as wide_ints.
2315
2316 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2317
2318 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2319 as a scoping construct when it is byproduct of exception handling.
2320
2321 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2322
2323 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2324 semantic field Target of node N_Call_Marker.
2325
2326 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2327
2328 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2329 attempts to copy a limited value, when the allocator is the expression
2330 in an expression function.
2331
2332 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2333
2334 * doc/share/conf.py: Tell the style checker that this is a Python
2335 fragment, and therefore that pyflakes should not be run to validate
2336 this file.
2337
2338 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2339
2340 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2341 (Is_Entity_Name): Likewise.
2342 (Is_String_Type): Likewise.
2343 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2344 and remove useless comparisons on the base types.
2345 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2346 on T2. Always test Is_Private_Type before Full_View_Covers.
2347
2348 2017-10-09 Bob Duff <duff@adacore.com>
2349
2350 * exp_ch4.adb: Minor refactoring.
2351
2352 2017-10-09 Javier Miranda <miranda@adacore.com>
2353
2354 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2355 not components.
2356
2357 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2358
2359 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2360 are verified only in the static model.
2361
2362 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2363
2364 * sem_ch5.adb (Analyze_Iterator_Specification,
2365 Check_Reverse_Iteration): Check that the domain of iteration supports
2366 reverse iteration when it is a formal container. This requires the
2367 presence of a Previous primitive in the Iterable aspect.
2368 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2369 primitives Last and Previous to support reverse iteration over formal
2370 containers.
2371 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2372 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2373 for reverse iteration using primitives Last and Previous in generated
2374 loop.
2375
2376 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2377
2378 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2379 of the Defining_Program_Unit_Name, which is an identifier, in order to
2380 construct the string for the fully qualified name.
2381
2382 2017-10-09 Justin Squirek <squirek@adacore.com>
2383
2384 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2385 Contains_Lib_Incomplete_Type.
2386
2387 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2388
2389 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2390 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2391 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2392 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2393 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2394
2395 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2396
2397 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2398 in the static model.
2399 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2400 in the static model.
2401 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2402 the static model.
2403
2404 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2405
2406 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2407 expressions when the enclosing scope is a subprogram body and the next
2408 declaration is a body that freezes entities previously declared in the
2409 scope.
2410
2411 2017-10-09 Justin Squirek <squirek@adacore.com>
2412
2413 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2414 ghost packages and living packages in use clauses.
2415 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2416
2417 2017-10-09 Justin Squirek <squirek@adacore.com>
2418
2419 * osint.ads: Document new parameter FD for Read_Source_File.
2420
2421 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2422
2423 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2424 which the predicate check applies is tagged, convert the expression to
2425 that type. This is in most cases a no-op, but is relevant if the
2426 expression is clas-swide, because the predicate function being invoked
2427 is not a primitive of the type and cannot take a class-wide actual.
2428
2429 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2430
2431 * exp_disp.adb: Minor reformatting.
2432
2433 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2434
2435 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2436
2437 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2438
2439 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2440 GNATprove.
2441 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2442
2443 2017-10-09 Bob Duff <duff@adacore.com>
2444
2445 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2446 immediately if the call has already been processed (by a previous call
2447 to Make_Build_In_Place_Call_In_Anonymous_Context).
2448 * sem_elab.adb: Minor typo fixes.
2449
2450 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2451
2452 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2453 predicate, do not replace an identifier that matches the type if the
2454 identifier is a selector in a selected component, because this
2455 indicates a reference to some homograph of the type itself, and not to
2456 the current occurence in the predicate.
2457
2458 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2459
2460 * repinfo.adb (List_Record_Layout): Tweak formatting.
2461 (Write_Val): Remove superfluous spaces in back-end layout mode.
2462
2463 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2464
2465 * sem_res.adb (Property_Error): Remove.
2466 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2467 current wording of the rule.
2468
2469 2017-10-09 Justin Squirek <squirek@adacore.com>
2470
2471 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2472 before analyzing a given scope due to an expression function.
2473 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2474
2475 2017-10-09 Bob Duff <duff@adacore.com>
2476
2477 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2478 Defining_Identifier (Obj_Decl) in two places, because it might have
2479 changed.
2480 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2481 involving 'Input on (not visibly) derived types.
2482
2483 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2484
2485 * atree.adb: Add new soft link Rewriting_Proc.
2486 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2487 (Set_Rewriting_Proc): New routine.
2488 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2489 (Set_Rewriting_Proc): New routine.
2490 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2491 for *E*laboration flag to maintain consistency with other elaboration
2492 flag generating subprograms.
2493 * debug.adb: Document the new usage of flag -gnatdL.
2494 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2495 as Protected_Subprogram. Flag148 is now used as
2496 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2497 Is_Initial_Condition_Procedure.
2498 (Is_Elaboration_Checks_OK_Id): New routine.
2499 (Is_Initial_Condition_Procedure): New routine.
2500 (Protected_Subprogram): New routine.
2501 (Receiving_Entry): New routine.
2502 (SPARK_Pragma): Update assertion.
2503 (SPARK_Pragma_Inherited): Update assertion.
2504 (Suppress_Elaboration_Warnings): Removed.
2505 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2506 (Set_Is_Initial_Condition_Procedure): New routine.
2507 (Set_Protected_Subprogram): New routine.
2508 (Set_Receiving_Entry): New routine.
2509 (Set_SPARK_Pragma): Update assertion.
2510 (Set_SPARK_Pragma_Inherited): Update assertion.
2511 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2512 (Write_Field19_Name): Add output for Receiving_Entry.
2513 (Write_Field39_Name): Add output for Protected_Subprogram.
2514 (Write_Field40_Name): Update the output for SPARK_Pragma.
2515 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2516 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2517 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2518 of various entities.
2519 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2520 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2521 (Protected_Subprogram): New routine along with pragma Inline.
2522 (Receiving_Entry): New routine along with pragma Inline.
2523 (Suppress_Elaboration_Warnings): Removed.
2524 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2525 Inline.
2526 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2527 Inline.
2528 (Set_Protected_Subprogram): New routine along with pragma Inline.
2529 (Set_Receiving_Entry): New routine along with pragma Inline.
2530 (Set_Suppress_Elaboration_Warnings): Removed.
2531 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2532 consistency with other finalizer generating subprograms.
2533 (Default_Initialize_Object): Mark the block which wraps the call to
2534 finalize as being part of initialization.
2535 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2536 Initial_Condition.
2537 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2538 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2539 markers generated by the ABE mechanism.
2540 * exp_ch9.adb (Activation_Call_Loc): New routine.
2541 (Add_Accept): Link the accept procedure to the original entry.
2542 (Build_Protected_Sub_Specification): Link the protected or unprotected
2543 version to the original subprogram.
2544 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2545 is very close to the "begin" or "end" keywords when generating the
2546 activation call.
2547 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2548 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2549 process loops.
2550 (Expand_SPARK_N_Loop_Statement): New routine.
2551 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2552 call to the Default_Initial_Condition procedure.
2553 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2554 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2555 effect.
2556 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2557 (Insert_Actions): Add processing for N_Call_Marker.
2558 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2559 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2560 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2561 elaboration scenarios for ABE issues.
2562 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2563 nodes.
2564 * lib.adb (Earlier_In_Extended_Unit): New variant.
2565 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2566 (Preanalysis_Active): New routine.
2567 * sem.ads (Preanalysis_Active): New routine.
2568 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2569 elaboration-related attributes. Save the scenario for ABE processing.
2570 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2571 effect. Save certain elaboration-related attributes.
2572 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2573 attributes. Save the scenario for ABE processing.
2574 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2575 mode in effect. Save certain elaboration-related attributes.
2576 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2577 locating the first real statement.
2578 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2579 certain elaboration-related attributes.
2580 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2581 elaboration warnings.
2582 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2583 generated for purposes of wrapping an attribute used as a generic
2584 actual.
2585 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2586 the scenario for ABE processing.
2587 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2588 the scenario for ABE processing.
2589 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2590 elaboration-related attributes.
2591 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2592 the scenario for ABE processing.
2593 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2594 attributes.
2595 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2596 attributes.
2597 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2598 elaboration-related attributes.
2599 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2600 effect. Save certain elaboration-related attributes.
2601 (Analyze_Package_Instantiation): Save certain elaboration-related
2602 attributes. Save the scenario for ABE processing. Create completing
2603 bodies in case the instantiation results in a guaranteed ABE.
2604 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2605 attributes Save the scenario for ABE processing. Create a completing
2606 body in case the instantiation results in a guaranteed ABE.
2607 (Provide_Completing_Bodies): New routine.
2608 * sem_elab.ads: Brand new implementation.
2609 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2610 Elaborate_Body): Do not suppress elaboration warnings.
2611 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2612 operator.
2613 (Resolve_Call): Save certain elaboration-related attributes. Save the
2614 scenario for ABE processing.
2615 (Resolve_Entity_Name): Do not perform any ABE processing here.
2616 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2617 * sem_util.adb (Begin_Keyword_Location): New routine.
2618 (Defining_Entity): Update the parameter profile. Add processing for
2619 concurrent subunits that are rewritten as null statements.
2620 (End_Keyword_Location): New routine.
2621 (Find_Enclosing_Scope): New routine.
2622 (In_Instance_Visible_Part): Code cleanup.
2623 (In_Subtree): Update the parameter profile. Add new version.
2624 (Is_Preelaborable_Aggregate): New routine.
2625 (Is_Preelaborable_Construct): New routine.
2626 (Mark_Elaboration_Attributes): New routine.
2627 (Scope_Within): Update the parameter profile.
2628 (Scope_Within_Or_Same): Update the parameter profile.
2629 * sem_util.ads (Begin_Keyword_Location): New routine.
2630 (Defining_Entity): Update the parameter profile and the comment on
2631 usage.
2632 (End_Keyword_Location): New routine.
2633 (Find_Enclosing_Scope): New routine.
2634 (In_Instance_Visible_Part): Update the parameter profile.
2635 (In_Subtree): Update the parameter profile. Add new version.
2636 (Is_Preelaborable_Aggregate): New routine.
2637 (Is_Preelaborable_Construct): New routine.
2638 (Mark_Elaboration_Attributes): New routine.
2639 (Scope_Within): Update the parameter profile and the comment on usage.
2640 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2641 usage.
2642 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2643 to determine whether a loop has meaningful condition actions.
2644 (Has_Condition_Actions): New routine.
2645 * sinfo.adb (ABE_Is_Certain): Removed.
2646 (Is_Declaration_Level_Node): New routine.
2647 (Is_Dispatching_Call): New routine.
2648 (Is_Elaboration_Checks_OK_Node): New routine.
2649 (Is_Initialization_Block): New routine.
2650 (Is_Known_Guaranteed_ABE): New routine.
2651 (Is_Recorded_Scenario): New routine.
2652 (Is_Source_Call): New routine.
2653 (Is_SPARK_Mode_On_Node): New routine.
2654 (No_Elaboration_Check): Removed.
2655 (Target): New routine.
2656 (Was_Attribute_Reference): New routine.
2657 (Set_ABE_Is_Certain): Removed.
2658 (Set_Is_Declaration_Level_Node): New routine.
2659 (Set_Is_Dispatching_Call): New routine.
2660 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2661 (Set_Is_Initialization_Block): New routine.
2662 (Set_Is_Known_Guaranteed_ABE): New routine.
2663 (Set_Is_Recorded_Scenario): New routine.
2664 (Set_Is_Source_Call): New routine.
2665 (Set_Is_SPARK_Mode_On_Node): New routine.
2666 (Set_No_Elaboration_Check): Removed.
2667 (Set_Target): New routine.
2668 (Set_Was_Attribute_Reference): New routine.
2669 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2670 Do_Discriminant_Check now utilizes Flag3. Attribute
2671 No_Side_Effect_Removal now utilizes Flag17. Add new node
2672 N_Call_Marker. Update the structure of various nodes.
2673 (ABE_Is_Certain): Removed along with pragma Inline.
2674 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2675 (Is_Dispatching_Call): New routine along with pragma Inline.
2676 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2677 (Is_Initialization_Block): New routine along with pragma Inline.
2678 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2679 (Is_Recorded_Scenario): New routine along with pragma Inline.
2680 (Is_Source_Call): New routine along with pragma Inline.
2681 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2682 (No_Elaboration_Check): Removed along with pragma Inline.
2683 (Target): New routine along with pragma Inline.
2684 (Was_Attribute_Reference): New routine along with pragma Inline.
2685 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2686 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2687 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2688 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2689 Inline.
2690 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2691 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2692 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2693 (Set_Is_Source_Call): New routine along with pragma Inline.
2694 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2695 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2696 (Set_Target): New routine along with pragma Inline.
2697 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2698 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2699
2700 2017-10-09 Bob Duff <duff@adacore.com>
2701
2702 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2703
2704 2017-10-09 Bob Duff <duff@adacore.com>
2705
2706 * freeze.ads: Minor comment fixed.
2707
2708 2017-10-09 Bob Duff <duff@adacore.com>
2709
2710 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2711 care of unchecked conversions in addition to regular conversions. This
2712 takes care of a case where a type is derived from a private untagged
2713 type that is completed by a tagged controlled type.
2714
2715 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2716
2717 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2718 rewriting a class-wide condition, handle properly the case where the
2719 controlling argument of the operation to which the condition applies is
2720 an access to a tagged type, and the condition includes a dispatching
2721 call with an implicit dereference.
2722
2723 2017-10-09 Bob Duff <duff@adacore.com>
2724
2725 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2726 the code at the end of this procedure that was setting the type of a
2727 class-wide object to the specific type returned by a function call.
2728 Treat this case as indefinite instead.
2729
2730 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2731
2732 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2733 Suppress spurious ambiguity error when two traversals of the homonym
2734 chain (first directly, and then through an examination of relevant
2735 interfaces) retrieve the same operation, when other irrelevant homonyms
2736 of the operatioh are also present.
2737
2738 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2739
2740 * sem_util.adb (Object_Access_Level): If the object is the return
2741 statement of an expression function, return the level of the function.
2742 This is relevant when the object involves an implicit conversion
2743 between access types and the expression function is a completion, which
2744 forces the analysis of the expression before rewriting it as a body, so
2745 that freeze nodes can appear in the proper scope.
2746
2747 2017-10-09 Bob Duff <duff@adacore.com>
2748
2749 * atree.adb: Make nnd apply to everything "interesting", including
2750 Rewrite. Remove rrd.
2751
2752 2017-10-09 Javier Miranda <miranda@adacore.com>
2753
2754 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2755 processing the declaration of the dummy object internally created by
2756 Make_DT to compute the offset to the top of components referencing
2757 secondary dispatch tables.
2758 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2759 been initialized initialized.
2760 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2761 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2762 (Make_DT): Create a dummy constant object if we can statically build
2763 secondary dispatch tables.
2764 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2765 use the dummy object to compute the offset-to-top field value by means
2766 of the attribute 'Position.
2767
2768 2017-10-09 Bob Duff <duff@adacore.com>
2769
2770 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2771 code so if BIPAlloc is not passed in, it will likely raise
2772 Program_Error instead of cause miscellaneous chaos.
2773 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2774 as for the other Is_B-I-P... functions.
2775 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2776 aggregate whose ancestor part is a build-in-place call returning a
2777 nonlimited type, transform the assignment to the ancestor part to use a
2778 temp.
2779 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2780 creating an Itype for a library unit entity.
2781 (Check_Initialization): Avoid spurious error message on
2782 internally-generated call.
2783 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2784 right-hand side is a build-in-place call. This didn't happen when b-i-p
2785 was only for limited types.
2786 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2787 implies >= Ada 2005.
2788 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2789 repeatedly.
2790 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2791
2792 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2793
2794 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2795
2796 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2797
2798 * libgnarl/s-taprob.adb: Minor whitespace fix.
2799
2800 2017-10-09 Bob Duff <duff@adacore.com>
2801
2802 * namet.ads: Minor comment fix.
2803
2804 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2805
2806 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2807 just like other program units listed in Ada RM 10.1(1).
2808
2809 2017-10-09 Justin Squirek <squirek@adacore.com>
2810
2811 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2812
2813 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2814
2815 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2816 actual for a formal package is an instantiation of a child unit, create
2817 a freeze node for the instance of the parent if it appears in the same
2818 scope and is not frozen yet.
2819
2820 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2821
2822 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2823 in-source documentation for tagged types's Offset_To_Top.
2824
2825 2017-10-09 Bob Duff <duff@adacore.com>
2826
2827 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2828 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2829 limited. This is for the case of a function call that occurs as the
2830 default for a record component.
2831 (Expand_N_Object_Declaration): Deal with the case where expansion has
2832 created an object declaration initialized with something like
2833 F(...)'Reference.
2834 * exp_ch3.adb: Minor reformatting.
2835
2836 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2837
2838 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2839 the attribute is an object, but it may appear within a conversion. The
2840 object itself must be retrieved when generating the range test that
2841 implements the validity check on a scalar type.
2842
2843 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2844
2845 PR ada/82393
2846 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2847 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2848
2849 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2850 Pierre-Marie de Rodat <derodat@adacore.com>
2851
2852 PR ada/82384
2853 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2854 (time_t): Change from derived type to subtype.
2855 (timeval): Use suseconds_t for tv_usec.
2856 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2857
2858 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2859
2860 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2861 handling the form (plus/mult (convert @0) @1).
2862
2863 2017-09-29 Bob Duff <duff@adacore.com>
2864
2865 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2866 what we had before.
2867 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2868 change. Set the Etype in the class-wide case. This fixes a regression
2869 in the libadalang test suite.
2870
2871 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2872
2873 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2874 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2875 in comment markup.
2876 * gnat_ugn.texi: Regenerate.
2877
2878 2017-09-29 Justin Squirek <squirek@adacore.com>
2879
2880 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2881 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2882 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2883 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2884 for checking source file status and error message and/or call to
2885 Read_Source_File.
2886 * libgnat/s-os_lib.ads: Add new potential value constant for
2887 uninitialized file descriptors.
2888 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2889 return result of IO to encompass a read access failure in addition to a
2890 file-not-found error.
2891
2892 2017-09-29 Bob Duff <duff@adacore.com>
2893
2894 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2895 functions returning nonlimited types. Allow for qualified expressions
2896 and type conversions.
2897 (Expand_N_Extended_Return_Statement): Correct the computation of
2898 Func_Bod to allow for child units.
2899 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2900 limited (initialization of In_Place_Expansion), and implies >= Ada
2901 2005.
2902 (Is_Build_In_Place_Result_Type): New function to accompany
2903 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2904 sometimes we just have the type on our hands, not the function. For
2905 now, does the same thing as the old version, so build-in-place is
2906 disabled for nonlimited types, except that you can use -gnatd.9 to
2907 enable it.
2908 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2909 accompany Is_Build_In_Place_Function and
2910 Is_Build_In_Place_Function_Call, because sometimes we just have the
2911 type on our hands, not the function.
2912 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2913 cases.
2914 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2915 questionable code at the end that was setting the Etype.
2916 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2917 determine whether "return (...agg...);" is returning from a
2918 build-in-place function.
2919 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2920 Remove assumption that b-i-p implies limited (initialization of
2921 In_Place_Expansion).
2922 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2923 an unchecked conversion. Add assertions.
2924 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2925 secondary stack here, just because the type needs finalization. That
2926 code is obsolete.
2927 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2928 For "return (...agg...);" don't assume b-i-p implies limited.
2929 Needs_Finalization does not imply secondary stack.
2930 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2931 Component_OK_For_Backend -- more readability with fewer double
2932 negatives.
2933 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2934 b-i-p implies >= Ada 2005.
2935 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2936 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2937 object of an extended return statement in place.
2938 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2939 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2940 b-i-p implies >= Ada 2005.
2941 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2942 b-i-p implies >= Ada 2005.
2943 * exp_ch7.adb: Comment fix.
2944 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2945 assumptions that b-i-p implies >= Ada 2005.
2946 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2947 b-i-p implies >= Ada 2005.
2948 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2949 (Expr), in case Pool_Id is not set.
2950 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2951 qualified or converted.
2952 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2953 (Param)) = N_Identifier; that's all it could be.
2954 * sinfo.ads: Comment fixes.
2955 * snames.ads-tmpl: Comment fixes.
2956 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2957
2958 2017-09-29 Justin Squirek <squirek@adacore.com>
2959
2960 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2961 all cases related to marking entity identifiers.
2962
2963 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2964
2965 * adaint.c (win32_wait): Properly handle error and take into account
2966 the WIN32 limitation on the number of simultaneous wait objects.
2967
2968 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2969
2970 * cal.c: Minor proofreading.
2971
2972 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2973
2974 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2975 * gnat_ugn.texi: Regenerate.
2976
2977 2017-09-29 Bob Duff <duff@adacore.com>
2978
2979 * lib-xref.ads: Comment fix.
2980
2981 2017-09-29 Bob Duff <duff@adacore.com>
2982
2983 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2984 Discriminants can't need finalization.
2985
2986 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2987
2988 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2989 for types in expression if the function is within a generic unit.
2990 * sem_res.adb (Resolve): In a generic context do not freeze an
2991 expression, unless it is an entity. This exception is solely for the
2992 purpose of detecting illegal uses of deferred constants in generic
2993 units.
2994 * sem_res.adb: Minor reformatting.
2995
2996 2017-09-29 Justin Squirek <squirek@adacore.com>
2997
2998 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2999 redundant warnings.
3000
3001 2017-09-29 Yannick Moy <moy@adacore.com>
3002
3003 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
3004
3005 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3006
3007 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
3008 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
3009 Document the effect of pragma Optimize_Alignment (Space) on non-packed
3010 record types.
3011 * gnat_rm.texi: Regenerate.
3012
3013 2017-09-25 Justin Squirek <squirek@adacore.com>
3014
3015 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
3016 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
3017 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
3018 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
3019 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
3020 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
3021 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
3022 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
3023 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
3024 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
3025 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
3026 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
3027 Removal of ineffective use-clauses.
3028 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
3029 constant folded barriers.
3030 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
3031 Subtype_Marks and Names list in use-clause nodes to their new singular
3032 counterparts (e.g. Subtype_Mark, Name).
3033 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
3034 Prev_Ids and More_Ids in use-clause nodes.
3035 (P_Use_Clause): Modify to take a list as a parameter.
3036 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
3037 subtype_marks within an aggregate use-clauses into individual clauses.
3038 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
3039 P_Use_Clause to match its new behavior.
3040 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
3041 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
3042 errors.
3043 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
3044 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
3045 the declarative region.
3046 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
3047 after analysis (Analyze_Package_Specification): Update use clause chain
3048 when there is no body.
3049 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
3050 parameter to determine weither the installation of scopes should also
3051 propagate on the use-clause "chain".
3052 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
3053 what constitutes a valid "use" of a clause.
3054 (Update_Use_Clause_Chain): Created to aggregate common machinary used
3055 to clean up use-clause chains (and warn on ineffectiveness) at the end
3056 of declaritive regions.
3057 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
3058 package name from a use-package clause.
3059 (Analyze_Package_Name_List): Created to perform analysis on a list of
3060 package names (similar to Analyze_Package_Name).
3061 (Find_Most_Prev): Created to traverse to the beginning of a given
3062 use-clause chain.
3063 (Most_Decendant_Use_Clause): Create to identify which clause from a
3064 given set is highest in scope (not always the most prev).
3065 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
3066 handle the new chaining algorithm, also many changes related to
3067 redundant clauses. A new parameter has also been added to force
3068 installation to handle certain cases.
3069 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
3070 Analyze_Task_Body): Mark use clauses on relevant entities.
3071 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
3072 Install_Parents): Add parameter to determine weither the installation
3073 of scopes should also propagate on the use-clause "chain".
3074 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
3075 Install_Context to avoid redundant chaining of use-clauses.
3076 * sem_ch13.adb: Minor reformatting.
3077 * sem_res.adb (Resolve): Mark use clauses on operators.
3078 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
3079 entities.
3080 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
3081 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
3082 represent any given clause's usage/reference/necessity.
3083 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
3084 nodes to allow loose chaining of redundant clauses.
3085 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
3086 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
3087 reorganization in node fields.
3088 * types.ads (Source_File_Index): Adjust index bounds.
3089 (No_Access_To_Source_File): New constant.
3090
3091 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3092
3093 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
3094 the expression to be used in the generated attribute specification
3095 (rather than relocating it) to avoid resolving a potentially malformed
3096 tree when the expression is resolved through an ASIS-specific call to
3097 Resolve_Aspect_Expressions. This manifests itself as a crash on a
3098 function with parameter associations.
3099
3100 2017-09-25 Yannick Moy <moy@adacore.com>
3101
3102 * exp_spark.adb (Expand_SPARK_Indexed_Component,
3103 Expand_SPARK_Selected_Component): New procedures to insert explicit
3104 dereference if required.
3105 (Expand_SPARK): Call the new procedures.
3106
3107 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
3108
3109 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
3110 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
3111 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
3112 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
3113 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
3114
3115 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
3116
3117 * adaint.c (win32_wait): Properly handle error and take into account
3118 the WIN32 limitation on the number of simultaneous wait objects.
3119
3120 2017-09-25 Yannick Moy <moy@adacore.com>
3121
3122 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
3123 invariant procedure in GNATprove mode.
3124 * sem_ch5.adb (Analyze_Assignment): Likewise.
3125
3126 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3127
3128 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
3129 "back-end" in comments.
3130
3131 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3132
3133 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
3134 call that appears in a classwide precondition and that mentions an
3135 access formal of the subprogram, must use the accessibility level of
3136 the actual in the call. This is one case in which a reference to a
3137 formal parameter appears outside of the body of the subprogram.
3138
3139 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3140
3141 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
3142 for GNATprove.
3143 (Resolve_Entry): Clean up predicate
3144
3145 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3146
3147 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
3148 than Program_Error because U_E is more in line with respect to the
3149 intended behavior.
3150
3151 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3152
3153 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
3154 Storage_Size does not freeze, and thus can include references to
3155 deferred constants.
3156
3157 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3158
3159 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
3160 reference when it appears within a pragma of no significance to SPARK.
3161 (In_Insignificant_Pragma): New routine.
3162 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
3163
3164 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3165
3166 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
3167 actual is a renaming, indicate that it is the renamed package that must
3168 be frozen before the instantiation.
3169
3170 2017-09-25 Yannick Moy <moy@adacore.com>
3171
3172 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
3173 of dimensionality system in GNAT UG.
3174 * gnat_ugn.texi: Regenerate.
3175
3176 2017-09-25 Yannick Moy <moy@adacore.com>
3177
3178 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
3179 GNATprove_Mode when switch -gnatdF used.
3180
3181 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3182
3183 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
3184 the backend.
3185
3186 2017-09-25 Javier Miranda <miranda@adacore.com>
3187
3188 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
3189 expansion of user-defined enumeration types when the generation of
3190 names for enumeration literals is suppressed.
3191
3192 2017-09-25 Gary Dismukes <dismukes@adacore.com>
3193
3194 * libgnarl/s-taprop__linux.adb: Minor reformatting.
3195
3196 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3197
3198 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
3199 that appear as selector names of parameter associations, as these are
3200 never resolved by visibility.
3201
3202 2017-09-25 Justin Squirek <squirek@adacore.com>
3203
3204 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
3205
3206 2017-09-25 Doug Rupp <rupp@adacore.com>
3207
3208 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
3209
3210 2017-09-25 Javier Miranda <miranda@adacore.com>
3211
3212 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
3213 (Expand_User_Defined_Enumeration_Image): New subprogram.
3214 (Expand_Image_Attribute): Enable speed-optimized expansion of
3215 user-defined enumeration types when we are compiling with optimizations
3216 enabled.
3217
3218 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3219
3220 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
3221 routine is already provided by Einfo.
3222 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
3223 Sem_Util, which had better comments and avoided double calls to
3224 Abstract_State.
3225
3226 2017-09-25 Bob Duff <duff@adacore.com>
3227
3228 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
3229
3230 2017-09-25 Doug Rupp <rupp@adacore.com>
3231
3232 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
3233 (Compute_Base_Monotonic_Clock): New function.
3234 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
3235 (Timed_Delay): Likewise.
3236 (Monotonic_Clock): Likewise.
3237 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
3238
3239 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3240
3241 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
3242 previous change.
3243
3244 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3245
3246 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
3247 Minor reformatting.
3248
3249 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3250
3251 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
3252
3253 2017-09-18 Bob Duff <duff@adacore.com>
3254
3255 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
3256 reference types in the access-to-access case.
3257
3258 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3259
3260 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
3261 of the "aliased" keyword on the prefix from here to...
3262 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
3263 to Check_No_Implicit_Aliasing.
3264 * sinfo.ads (Non_Aliased_Prefix): Delete.
3265 (Set_Non_Aliased_Prefix): Likewise.
3266 * sinfo.adb (Non_Aliased_Prefix): Delete.
3267 (Set_Non_Aliased_Prefix): Likewise.
3268
3269 2017-09-18 Bob Duff <duff@adacore.com>
3270
3271 * exp_ch5.adb (Build_Formal_Container_Iteration,
3272 Expand_Formal_Container_Element_Loop): Convert the container to the
3273 root type before passing it to the iteration operations, so it will be
3274 of the right type.
3275
3276 2017-09-18 Bob Duff <duff@adacore.com>
3277
3278 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3279
3280 2017-09-18 Bob Duff <duff@adacore.com>
3281
3282 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3283 and it's a bit-packed array, pass False to the Consider_IS parameter of
3284 Needs_Simple_Initialization.
3285
3286 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3287
3288 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3289 the preexisting body.
3290 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3291 (Process_Inline): Verify the placement of pragma Inline_Always. The
3292 pragma must now appear on the initial declaration of the related
3293 subprogram.
3294
3295 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3296
3297 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3298 declarative list in a subprogram body, analyze aspext specifications to
3299 provide basic semantic information, because otherwise the aspect
3300 specifications might only be snalyzed during expansion, when related
3301 subprograms are generated.
3302
3303 2017-09-18 Bob Duff <duff@adacore.com>
3304
3305 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3306 validity checks have rewritten the tree.
3307
3308 2017-09-18 Bob Duff <duff@adacore.com>
3309
3310 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3311
3312 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3313
3314 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3315 qualified exxpression for an aggregate in a generic unit, verify that
3316 the scope of the type is itself visible and not hidden, so that the
3317 qualified expression is correctly resolved in any instance.
3318
3319 2017-09-18 Bob Duff <duff@adacore.com>
3320
3321 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3322 mark refers to the current instance. Set the type to Any_Type in that
3323 case, to avoid later crashes.
3324
3325 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3326
3327 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3328 subsidiary of Build_Assignment, used to handle the initialization code
3329 for a mutable record component whose default value is an aggregate that
3330 sets the values of the discriminants of the components.
3331
3332 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3333
3334 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3335 the entity as being volatile for an overlay that toggles the scalar
3336 storage order.
3337
3338 2017-09-18 Fedor Rybin <frybin@adacore.com>
3339
3340 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3341 options -U main and --harness-only are not compatible.
3342
3343 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3344
3345 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3346
3347 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3348
3349 * einfo.ads (Is_Imported): Update comment, as this
3350 routine also applies to constants.
3351
3352 2017-09-18 Yannick Moy <moy@adacore.com>
3353
3354 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3355 holding state.
3356
3357 2017-09-18 Justin Squirek <squirek@adacore.com>
3358
3359 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3360 constant indication for Pragma_Linker_Section.
3361
3362 2017-09-18 Bob Duff <duff@adacore.com>
3363
3364 Alternate fix for PR ada/71358
3365 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3366 Instead, make a local copy of Config, and if it's null, allocate an
3367 empty Command_Line_Configuration_Record, so we won't crash on null
3368 pointer dereference.
3369
3370 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3371
3372 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3373 * libgnarl/s-interr__hwint.adb: Likewise.
3374 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3375 * libgnarl/s-osinte__rtems.adb: Likewise.
3376 * libgnarl/s-osinte__rtems.ads: Likewise.
3377
3378 2017-09-13 Nicolas Roche <roche@adacore.com>
3379
3380 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3381 file and try to guess the locations of dependencies.
3382
3383 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3384
3385 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3386 the suppression status of Alignment_Check on the current scope.
3387 (Alignment_Checks_Suppressed): New function to use the saved instead of
3388 the current suppression status of Alignment_Check.
3389 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3390 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3391 the table, call Register_Address_Clause_Check.
3392 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3393 recorded address clause instead of its entity.
3394
3395 2017-09-13 Jerome Guitton <guitton@adacore.com>
3396
3397 * libgnarl/s-tpopsp__vxworks-tls.adb,
3398 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3399 (Self): Register thread if task id is null.
3400
3401 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3402
3403 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3404
3405 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3406
3407 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3408 from an entity to only scope index, as a mapping from an entity to the
3409 same entity was useless.
3410 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3411 to E.
3412 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3413 to E.
3414 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3415 variable, just use return statements.
3416
3417 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3418
3419 * libgnarl/s-vxwext__kernel-smp.adb,
3420 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3421 New file.
3422
3423 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3424
3425 * einfo.adb: Flag42 is now Is_Controlled_Active.
3426 (Is_Controlled): This attribute is now synthesized.
3427 (Is_Controlled_Active): This attribute is now an explicit flag rather
3428 than a synthesized attribute. (Set_Is_Controlled): Removed.
3429 (Set_Is_Controlled_Active): New routine.
3430 (Write_Entity_Flags): Update the output for Flag42.
3431 * einfo.ads: Update the documentation of the following attributes:
3432 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3433 and Is_Controlled_Active have swapped their functionality.
3434 (Is_Controlled): Renamed to Is_Controlled_Active.
3435 (Is_Controlled_Active): Renamed to Is_Controlled.
3436 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3437 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3438 Is_Controlled.
3439 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3440 (Needs_Finalization): Code clean up. Remove the tests for
3441 Disable_Controlled because a) they were incorrect as they would reject
3442 a type which is sublect to the aspect, but may contain controlled
3443 components, and b) they are no longer necessary.
3444 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3445 * freeze.adb (Freeze_Array_Type): Restore the original use of
3446 Is_Controlled.
3447 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3448 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3449 Is_Controlled.
3450 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3451 (Build_Derived_Private_Type): Restore the original use of
3452 Is_Controlled.
3453 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3454 type derived from Ada.Finalization.[Limited_]Controlled.
3455 (Build_Derived_Type): Restore the original use of Is_Controlled.
3456 (Record_Type_Definition): Restore the original use of Is_Controlled.
3457 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3458 Is_Controlled.
3459 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3460 (Analyze_Aspect_Specifications): Use routine
3461 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3462
3463 2017-09-13 Vincent Celier <celier@adacore.com>
3464
3465 * clean.adb (Gnatclean): Fix error when looking for target
3466 of <target>-gnatclean
3467
3468 2017-09-13 Javier Miranda <miranda@adacore.com>
3469 Ed Schonberg <schonberg@adacore.com>
3470
3471 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3472 expanded name that designates the current instance of a child unit in
3473 its own body and appears as the prefix of a reference to an entity
3474 local to the child unit.
3475
3476 2017-09-12 Bob Duff <duff@adacore.com>
3477
3478 * sem_warn.adb: Minor comment.
3479
3480 2017-09-12 Bob Duff <duff@adacore.com>
3481
3482 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3483 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3484 be Default_Initialized_Item, and apply pragma Unmodified to it,
3485 to suppress the warning.
3486
3487 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3488
3489 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3490 for access types.
3491
3492 2017-09-12 Yannick Moy <moy@adacore.com>
3493
3494 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3495 together with Global when ignoring one in CodePeer mode.
3496
3497 2017-09-12 Javier Miranda <miranda@adacore.com>
3498
3499 * sem_ch3.adb (Analyze_Declarations): In nested
3500 package declarations that have a private part enable missing check
3501 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3502 resolved at the end of the immediately enclosing declaration list.
3503
3504 2017-09-12 Bob Duff <duff@adacore.com>
3505
3506 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3507 Empty.
3508
3509 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3510
3511 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3512 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3513 dF flag.
3514 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3515 in preparation for the evolution of the SPARK language that
3516 includes a pointer analysis for checking non-aliasing of access
3517 types. The Check_Safe_Pointers function is the entry point, and
3518 will traverse the AST and raise compile-time errors everytime
3519 it detects non-begign aliasing. Detailed comments are present
3520 in the sem_spark.ads file.
3521 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3522 functions to iterate over the list of globals of a subprogram.
3523 * libgnat/system.ads: Add restriction No_Finalization.
3524 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3525 dependency on g-dynhta.adb.
3526
3527 2017-09-12 Bob Duff <duff@adacore.com>
3528
3529 * sem_ch6.adb (Analyze_Expression_Function): Call
3530 Check_Dynamically_Tagged_Expression.
3531 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3532 "and then Is_Tagged_Type (Typ)" because there is an earlier
3533 "Assert (Is_Tagged_Type (Typ))".
3534
3535 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3536
3537 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3538
3539 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3540
3541 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3542 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3543 for no longer supported platforms.
3544 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3545 description of the semantics for dimensionality analysis.
3546 * gnat_ugn.texi: Regenerated.
3547
3548 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3549
3550 * freeze.adb (Has_Incomplete_Compoent): Delete.
3551 (Freeze_Profile):
3552 Do not inhibit the freezing of the profile of an expression
3553 function here.
3554 (Freeze_Subprogram): Do not re-create extra formals.
3555 * sem_ch6.adb (Analyze_Expression_Function): Always
3556 pre-analyze the expression if the function is not a completion.
3557 (Analyze_Subprogram_Body_Helper): For the body generated
3558 from an expression function that is not a completion, do
3559 not freeze the profile and temporary mask the types declared
3560 outside the expression that are not yet frozen.
3561 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3562 during the pre-analysis of an expression function.
3563
3564 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3565
3566 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3567 (gigi): Likewise.
3568
3569 2017-09-11 Yannick Moy <moy@adacore.com>
3570
3571 * lib-xref-spark_specific.adb: Minor rewrite.
3572
3573 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3574
3575 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3576 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3577 renaming into account.
3578
3579 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3580
3581 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3582 * gcc-interface/Makefile.in: Take this renaming into account.
3583
3584 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3585
3586 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3587 longer used.
3588
3589 2017-09-11 Yannick Moy <moy@adacore.com>
3590
3591 * sem_util.adb (Check_Result_And_Post_State):
3592 Do not issue a warning about missing reference to an outcome if
3593 the subprogram is ghost and has no outputs.
3594 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3595 reformatting.
3596
3597 2017-09-11 Yannick Moy <moy@adacore.com>
3598
3599 * gnat1drv.adb (Adjust_Global_Switches): Set
3600 Check_Validity_Of_Parameters to False in GNATprove mode.
3601 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3602 set option.
3603
3604 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3605
3606 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3607 generate debug info for inner record types if -fgnat-encodings=minimal.
3608 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3609 type as the debug type.
3610
3611 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3612
3613 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3614 packed record types if pragma Optimize_Alignment (Space) is enabled.
3615
3616 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3617
3618 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3619 limits for expression functions.
3620 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3621
3622 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3623
3624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3625 layout of the record from the parent type only if both are or are not
3626 unchecked unions.
3627 (is_stored_discriminant): Return false for an unchecked union.
3628
3629 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3630
3631 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3632 return NULL_EXPR.
3633
3634 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3635
3636 * gcc-interface/decl.c (promote_object_alignment): New function taken
3637 from...
3638 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3639 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3640 create a padding type on success before doing the atomic check.
3641
3642 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3643
3644 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3645 promotion to static memory earlier in the processing.
3646
3647 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3648
3649 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3650 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3651 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3652 Consider all kinds of entities.
3653
3654 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3655
3656 * gcc-interface/utils.c (convert): When converting to a padding type,
3657 reuse an existing CONSTRUCTOR if it has got the right size.
3658
3659 2017-09-08 Nicolas Roche <roche@adacore.com>
3660
3661 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3662 source in libgnat/
3663 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3664 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3665 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3666 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3667 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3668 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3669 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3670 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3671 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3672 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3673 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3674 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3675 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3676 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3677 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3678 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3679 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3680 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3681 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3682 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3683 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3684 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3685 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3686 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3687 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3688 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3689 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3690 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3691 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3692 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3693 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3694 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3695 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3696 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3697 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3698 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3699 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3700 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3701 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3702 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3703 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3704 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3705 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3706 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3707 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3708 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3709 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3710 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3711 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3712 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3713 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3714 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3715 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3716 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3717 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3718 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3719 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3720 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3721 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3722 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3723 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3724 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3725 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3726 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3727 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3728 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3729 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3730 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3731 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3732 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3733 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3734 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3735 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3736 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3737 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3738 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3739 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3740 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3741 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3742 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3743 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3744 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3745 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3746 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3747 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3748 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3749 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3750 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3751 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3752 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3753 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3754 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3755 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3756 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3757 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3758 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3759 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3760 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3761 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3762 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3763 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3764 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3765 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3766 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3767 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3768 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3769 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3770 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3771 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3772 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3773 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3774 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3775 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3776 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3777 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3778 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3779 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3780 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3781 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3782 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3783 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3784 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3785 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3786 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3787 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3788 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3789 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3790 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3791 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3792 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3793 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3794 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3795 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3796 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3797 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3798 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3799 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3800 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3801 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3802 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3803 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3804 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3805 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3806 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3807 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3808 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3809 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3810 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3811 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3812 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3813 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3814 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3815 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3816 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3817 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3818 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3819 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3820 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3821 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3822 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3823 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3824 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3825 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3826 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3827 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3828 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3829 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3830 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3831 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3832 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3833 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3834 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3835 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3836 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3837 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3838 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3839 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3840 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3841 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3842 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3843 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3844 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3845 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3846 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3847 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3848 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3849 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3850 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3851 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3852 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3853 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3854 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3855 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3856 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3857 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3858 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3859 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3860 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3861 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3862 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3863 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3864 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3865 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3866 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3867 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3868 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3869 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3870 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3871 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3872 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3873 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3874 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3875 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3876 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3877 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3878 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3879 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3880 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3881 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3882 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3883 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3884 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3885 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3886 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3887 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3888 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3889 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3890 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3891 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3892 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3893 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3894 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3895 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3896 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3897 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3898 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3899 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3900 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3901 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3902 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3903 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3904 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3905 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3906 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3907 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3908 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3909 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3910 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3911 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3912 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3913 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3914 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3915 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3916 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3917 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3918 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3919 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3920 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3921 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3922 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3923 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3924 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3925 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3926 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3927 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3928 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3929 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3930 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3931 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3932 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3933 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3934 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3935 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3936 to libgnat subdirectory.
3937
3938 2017-09-08 Yannick Moy <moy@adacore.com>
3939
3940 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3941 return the entity associated with the call.
3942 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3943 Replace the internal Get_Function_Id with the new
3944 Sem_Aux.Get_Called_Entity.
3945 (Iterate_Call_Parameters): New
3946 procedure to iterate on formals and actuals at the same time.
3947 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3948 Set SPARK_Mode from spec when set, for analysis
3949 of instance. Restore after analysis of instance.
3950 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3951 set, for analysis of body instance. Restored automatically at
3952 the end of the subprogram.
3953 * gnat1drv.adb (Adjust_Global_Switches): Set
3954 Check_Validity_Of_Parameters to False in GNATprove mode.
3955 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3956 set option.
3957
3958 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3959
3960 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3961 (New_Copy_Tree): ...there. Reset the hash tables only if they
3962 were used in the previous invocation.
3963 * s-htable.adb: Fix typo.
3964
3965 2017-09-08 Bob Duff <duff@adacore.com>
3966
3967 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3968
3969 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3970
3971 * sem_aggr.adb: minor style fix.
3972
3973 2017-09-08 Bob Duff <duff@adacore.com>
3974
3975 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3976 no current source file.
3977 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3978 Print something helpful in case N is invalid.
3979 * sprint.ads: Minor comment fix.
3980
3981 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3982
3983 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3984 access types.
3985
3986 2017-09-08 Bob Duff <duff@adacore.com>
3987
3988 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3989 Ada_2020, along the same lines as the other Ada version pragmas.
3990
3991 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3992
3993 * sem_ch12.adb: Minor typo fixes and reformatting.
3994
3995 2017-09-08 Yannick Moy <moy@adacore.com>
3996
3997 * sem_aggr.adb (Resolve_Record_Aggregate):
3998 Rewrite bounds of aggregate subexpressions which may depend on
3999 discriminants of the enclosing aggregate.
4000
4001 2017-09-08 Yannick Moy <moy@adacore.com>
4002
4003 * sem_ch5.adb: Prevent assertion failure on illegal code.
4004
4005 2017-09-08 Yannick Moy <moy@adacore.com>
4006
4007 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
4008 calling Renamed_Entity on an entity which cannot be a renaming.
4009
4010 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4011
4012 * exp_aggr.adb: Add with & use clause for Urealp.
4013 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
4014 elementary types instead of just discrete types.
4015 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
4016 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
4017 Be prepared for the FP zero value in the memset case. Add small
4018 guard.
4019
4020 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4021
4022 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
4023 of loop.
4024
4025 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4026
4027 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
4028 of New_Copy because the latter leaves the syntactic structure of
4029 the tree inconsistent (a child is accessible through two parents)
4030 and prevents proper replication of itypes by subsequent calls
4031 to New_Copy_Tree.
4032 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
4033 New_Copy because the latter leaves the syntactic structure of the
4034 tree inconsistent (a child is accessible through two parents)
4035 and prevents proper replication of itypes by subsequent calls
4036 to New_Copy_Tree.
4037 * sem_util.adb (In_Subtree): New routine.
4038 (New_Copy_Tree): Reimplemented.
4039 * sem_util.ads (In_Subtree): New routine.
4040 (New_Copy_Tree): Reimplemented.
4041
4042 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4043
4044 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
4045 for aspect Default_Value is a static scalar value, but it does
4046 not freeze the type. Yhis allows for subsequent representation
4047 clauses for the type.
4048
4049 2017-09-08 Javier Miranda <miranda@adacore.com>
4050
4051 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
4052 not add entries into the undefined reference table when we are
4053 compiling with errors ignored.
4054
4055 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4056
4057 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
4058 check if the instance is within an enclosing instance body. The
4059 formal package was legal in the enclosing generic, and is
4060 legal in the enclosing instantiation. This optimisation may be
4061 applicable elsewhere, and it also removes spurious errors that
4062 may arise with on-the-fly processing of instantiations that
4063 contain Inline_Always subprograms.
4064
4065 2017-09-08 Vincent Celier <celier@adacore.com>
4066
4067 * gnatcmd.adb: Disregard empty argument of GNAT driver.
4068
4069 2017-09-08 Justin Squirek <squirek@adacore.com>
4070
4071 * checks.adb (Insert_Valid_Check): Manually decorate
4072 the generated temporary for range valdity checks.
4073
4074 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4075
4076 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
4077
4078 2017-09-08 Justin Squirek <squirek@adacore.com>
4079
4080 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
4081 case to handle underscore flags.
4082 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
4083 new procedure to handle underscores.
4084
4085 2017-09-08 Javier Miranda <miranda@adacore.com>
4086
4087 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
4088 divisions with fixed point results to avoid generating twice
4089 the runtime check on divide by zero.
4090 * checks.adb (Apply_Divide_Checks): Ensure that operands are
4091 not evaluated twice (once for their runtime checks and once for
4092 their regular computation).
4093
4094 2017-09-08 Yannick Moy <moy@adacore.com>
4095
4096 * sem_prag.adb (Analyze_Part_Of): Add missing
4097 return statements after issuing errors. Add detection of
4098 out-of-order item and single concurrent type.
4099
4100 2017-09-08 Nicolas Roche <roche@adacore.com>
4101
4102 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
4103 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
4104 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
4105 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
4106 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
4107 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
4108 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
4109 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
4110 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
4111 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
4112 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
4113 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
4114 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
4115 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
4116 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
4117 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
4118 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
4119 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
4120 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
4121 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
4122 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
4123 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
4124 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
4125 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
4126 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
4127 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
4128 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
4129 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
4130 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
4131 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
4132 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
4133 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
4134 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
4135 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
4136 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
4137 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
4138 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
4139 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
4140 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
4141 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
4142 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
4143 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
4144 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
4145 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
4146 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
4147 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
4148 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
4149 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
4150 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
4151 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
4152 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
4153 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
4154 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
4155 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
4156
4157 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4158
4159 * doc/share/conf.py, doc/share/latex_elements.py,
4160 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
4161 highlighting.
4162
4163 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4164
4165 * gnat_rm.texi, gnat_ugn.texi,
4166 doc/gnat_ugn/the_gnat_compilation_model.rst,
4167 doc/gnat_ugn/getting_started_with_gnat.rst,
4168 doc/gnat_ugn/inline_assembler.rst,
4169 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4170 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
4171 doc/gnat_ugn/about_this_guide.rst,
4172 doc/gnat_ugn/platform_specific_information.rst,
4173 doc/gnat_ugn/example_of_binder_output.rst,
4174 doc/gnat_ugn/gnat_and_program_execution.rst,
4175 doc/gnat_ugn/gnat_utility_programs.rst,
4176 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4177 doc/gnat_rm/interfacing_to_other_languages.rst,
4178 doc/gnat_rm/implementation_defined_aspects.rst,
4179 doc/gnat_rm/intrinsic_subprograms.rst,
4180 doc/gnat_rm/implementation_defined_characteristics.rst,
4181 doc/gnat_rm/implementation_advice.rst,
4182 doc/gnat_rm/implementation_defined_attributes.rst,
4183 doc/gnat_rm/compatibility_and_porting_guide.rst,
4184 doc/gnat_rm/standard_library_routines.rst,
4185 doc/gnat_rm/the_gnat_library.rst,
4186 doc/gnat_rm/implementation_defined_pragmas.rst,
4187 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4188 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4189 doc/gnat_rm/obsolescent_features.rst,
4190 doc/gnat_rm/about_this_guide.rst,
4191 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4192 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4193 doc/gnat_ugn.rst,
4194 doc/gnat_rm.rst: Update documentation.
4195
4196 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4197
4198 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
4199 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
4200 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
4201
4202 2017-09-08 Bob Duff <duff@adacore.com>
4203
4204 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
4205 New routine to read the Tag robustly.
4206 * exp_attr.adb (Input): Change the expansion of 'Input,
4207 in the class-wide case, to call String_Input_Tag instead of
4208 String_Input_Blk_IO.
4209
4210 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4211
4212 * s-rident.ads (Restriction_Id): reorder enum
4213 literals, so that Pure_Barriers is no longer in range of the
4214 Cunit_Boolean_Restrictions subtype.
4215
4216 2017-09-08 Nicolas Roche <roche@adacore.com>
4217
4218 * a-taster.ads, a-taster.adb: Move to libgnarl
4219 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
4220 Add support for files in libgnarl.
4221
4222 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4223
4224 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
4225 accessibility check to an interface conversion, whose purpose
4226 is to perform a pointer adjustment in a dispatching call.
4227 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
4228 when the actual is a construct that involves a dereference of an
4229 expression that includes a formal of the enclosing subprogram,
4230 In such cases, the accessibility level of the actual is that of
4231 the corresponding formal, which is passed in as an additional
4232 actual in the outer call.
4233
4234 2017-09-08 Bob Duff <duff@adacore.com>
4235
4236 * exp_intr.adb (Add_Source_Info): Do not decode
4237 file names; they were not encoded in the first place.
4238
4239 2017-09-08 Bob Duff <duff@adacore.com>
4240
4241 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
4242 exceptions instead of crashes. Check for absurdly long strings
4243 and empty strings. Empty strings cause trouble because they can
4244 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
4245 be empty, which causes an array index out of bounds.
4246 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
4247 instead of crashes.
4248
4249 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4250
4251 * sem_util.adb (Is_CCT_Instance): allow use in
4252 the context of protected types.
4253
4254 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4255
4256 * a-tigeli.adb: minor remove extra whitespace.
4257
4258 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4259
4260 * par-ch4.adb: Reformatting of an error message.
4261
4262 2017-09-08 Javier Miranda <miranda@adacore.com>
4263
4264 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4265 identifiers to ensure their correct decoration of names on
4266 aspect expressions.
4267
4268 2017-09-08 Yannick Moy <moy@adacore.com>
4269
4270 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4271 not skip a loop coming from source which is rewritten into a loop.
4272
4273 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4274
4275 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4276 wrapper has convention Ada, to prevent spurious warnings on
4277 unconstrained array parameters.
4278
4279 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4280
4281 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4282 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4283
4284 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4285
4286 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4287
4288 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4289
4290 * exp_intr.adb (Append_Entity_Name): Move to ...
4291 * sem_util.ads, sem_util.adb: ... here to share it.
4292 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4293 subprogram/entity.
4294 * errutil.adb (Error_Msg): Fill new field Node.
4295 * erroutc.ads (Subprogram_Name_Ptr): New.
4296 (Error_Msg_Object): New field Node.
4297 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4298 * errout.adb (Error_Msg): New variant with node id parameter.
4299 Fill new parameter Node when emitting messages. Revert previous
4300 changes for Include_Subprogram_In_Messages.
4301 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4302 generating warning message.
4303
4304 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4305
4306 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4307 under -gnat2020 flag, given that it is a future feature of
4308 the language.
4309 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4310 defining identifier as referenced to prevent spurious warnings:
4311 corresponding loop is expanded into one or more loops whose
4312 variable has the same name, and the expression uses those names
4313 and not the original one.
4314
4315 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4316
4317 * sem_elab.adb (Check_A_Call): Do not consider
4318 references to internal variables for SPARK semantics.
4319
4320 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4321
4322 * inline.adb (In_Package_Spec): refine type of
4323 the parameter from Node_Id to Entity_Id.
4324
4325 2017-09-08 Justin Squirek <squirek@adacore.com>
4326
4327 * exp_ch5.adb (Expand_Formal_Container_Loop):
4328 Reset the scope of the loop parameter after it is reanalyzed.
4329
4330 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4331
4332 * sem_util.ads (Set_Rep_Info): New inline procedure.
4333 * sem_util.adb (Set_Rep_Info): Implement it.
4334 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4335 always copy the representation aspects onto the subtype.
4336
4337 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4338
4339 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4340 Correction of the return type from access type to option type.
4341 (Simple_HTable): Moving the Instance_Data to ads file.
4342
4343 2017-09-08 Yannick Moy <moy@adacore.com>
4344
4345 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4346
4347 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4348
4349 * opt.ads (Include_Subprogram_In_Messages): New variable.
4350 * errout.ads (Current_Subprogram_Ptr): New variable.
4351 * errout.adb (Error_Msg): Prepend current subprogram info
4352 in messages if Include_Subprogram_In_Messages is set.
4353 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4354 Current_Subprogram.
4355 * gnat1drv.adb (Adjust_Global_Switches): Set
4356 Include_Subprogram_In_Messages when -gnatdJ is set.
4357 * debug.adb: Document and reserve -gnatdJ.
4358
4359 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4360
4361 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4362 functions to iterate over simple hastables.
4363 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4364
4365 2017-09-08 Javier Miranda <miranda@adacore.com>
4366
4367 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4368 missing checks on the presence of Entity() before checking the
4369 entity attributes.
4370
4371 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4372
4373 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4374 statements, use local variable and remove unnecessary processing.
4375
4376 2017-09-08 Javier Miranda <miranda@adacore.com>
4377
4378 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4379 subprogram.
4380 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4381 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4382 subprogram.
4383 (Unqual_BIP_Iface_Function_Call): New subprogram.
4384 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4385 subprogram containing code that was previously inside
4386 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4387 required for one of the new subprograms.
4388 (Expand_Actuals):
4389 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4390 (Expand_N_Extended_Return_Statement): Extend the
4391 cases covered by an assertion on expected BIP object
4392 declarations.
4393 (Make_Build_In_Place_Call_In_Assignment):
4394 Removing unused code; found working on this ticket.
4395 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4396 that replaces the internal name of the renaming declaration
4397 into the new subprogram Replace_Renaming_Declaration_Id.
4398 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4399 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4400 New subprogram.
4401 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4402 subprogram.
4403 (Unqual_BIP_Iface_Function_Call): New subprogram.
4404 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4405 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4406 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4407 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4408 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4409 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4410 (Expand_N_Indexed_Component): Invoke the new subprogram
4411 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4412 (Expand_N_Selected_Component): Invoke the new subprogram
4413 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4414 (Expand_N_Slice): Invoke the new subprogram
4415 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4416 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4417 Invoke the new subprogram
4418 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4419
4420 2017-09-08 Javier Miranda <miranda@adacore.com>
4421
4422 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4423 access to interface types. Remove also the accessibility check.
4424
4425 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4426
4427 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4428 all the types that are referenced by the expression.
4429 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4430 a completion instead of manually freezing the type of the
4431 expression.
4432 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4433
4434 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4435
4436 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4437 New procedure, auxiliary to Expand_Pragma_Check, to handle
4438 references to the discriminants of a protected type within a
4439 precondition of a protected operation. This is needed because
4440 the original precondition has been analyzed in the context of
4441 the protected declaration, but in the body of the operation
4442 references to the discriminants have been replaved by references
4443 to the discriminants of the target object, and these references
4444 are only created when expanding the protected body.
4445
4446 2017-09-08 Yannick Moy <moy@adacore.com>
4447
4448 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4449 Loop_Variant.
4450
4451 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4452
4453 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4454 unchecked union, do not emit checks for its (non-existent)
4455 discriminants, or for variant parts that depend on them.
4456
4457 2017-09-08 Justin Squirek <squirek@adacore.com>
4458
4459 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4460 Find_Comparison_Type.Try_One_Interp): Add check for generic
4461 instances.
4462
4463 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4464
4465 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4466 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4467 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4468 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4469 remaining references to AAMP_On_Target.
4470
4471 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4472
4473 * style.adb: Fix typo.
4474
4475 2017-09-08 Javier Miranda <miranda@adacore.com>
4476
4477 * einfo.adb (Underlying_Type): Add missing support for class-wide
4478 types that come from the limited view.
4479 * exp_attr.adb (Attribute_Address): Check class-wide type
4480 interfaces using the underlying type to handle limited-withed
4481 types.
4482 (Attribute_Tag): Check class-wide type interfaces using
4483 the underlying type to handle limited-withed types.
4484
4485 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4486
4487 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4488 over a subtype of a type with a static predicate, taking into
4489 account the predicate function of the parent type and the bounds
4490 given in the loop specification.
4491 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4492 a loop specification that is a subtype indication whose type mark
4493 is a type with a static predicate, inherit predicate function,
4494 used to build case statement for rewritten loop.
4495
4496 2017-09-08 Justin Squirek <squirek@adacore.com>
4497
4498 * lib-load.adb: Modify printing of error message to exclude file
4499 line number.
4500
4501 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4502
4503 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4504 don't inline subprograms declared in both visible and private
4505 parts of a package.
4506 (In_Package_Spec): previously In_Package_Visible_Spec; now
4507 detects subprograms declared both in visible and private parts
4508 of a package spec.
4509
4510 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4511
4512 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4513 the type is an anonymous array in an object declaration, whose
4514 component type has an invariant, use the object declaration
4515 as the insertion point for the invariant procedure, given that
4516 there is no explicit type declaration for an anonymous array type.
4517
4518 2017-09-08 Bob Duff <duff@adacore.com>
4519
4520 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4521
4522 2017-09-08 Bob Duff <duff@adacore.com>
4523
4524 * a-strfix.adb (Trim): Compute Low and High only if needed.
4525
4526 2017-09-08 Justin Squirek <squirek@adacore.com>
4527
4528 * lib-load.adb (Load_Main_Source): Add error output in the case a
4529 source file is missing.
4530
4531 2017-09-08 Bob Duff <duff@adacore.com>
4532
4533 PR ada/80888
4534 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4535 Default_WCEM by default (i.e. if the encoding is not specified
4536 by the Form string).
4537
4538 2017-09-08 Bob Duff <duff@adacore.com>
4539
4540 * s-trasym.ads (Hexa_Traceback): If
4541 Suppress_Hex is True, print "..." instead of a hexadecimal
4542 address.
4543 * s-trasym.adb: Ignore No_Hex in this version.
4544 Misc cleanup.
4545
4546 2017-09-08 Bob Duff <duff@adacore.com>
4547
4548 * debug.adb: Minor reformatting.
4549
4550 2017-09-08 Bob Duff <duff@adacore.com>
4551
4552 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4553 code so it doesn't trigger an "uninit var" warning.
4554
4555 2017-09-08 Nicolas Roche <roche@adacore.com>
4556
4557 * s-hibaen.ads: Remove obsolete file.
4558
4559 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4560
4561 * a-locale.ads: Add comment explaining the state of this package.
4562
4563 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4564
4565 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4566 of packages.
4567 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4568 allow calls in the context of package spec (for pragma
4569 Initializes) and bodies (for pragma Refined_State).
4570
4571 2017-09-08 Bob Duff <duff@adacore.com>
4572
4573 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4574 new Exp.
4575
4576 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * debug.adb (dA): Adjust comment.
4579 * gnat1drv.adb (Gnat1drv): Likewise.
4580 * opt.ads (List_Representation_Info_Extended): New variable.
4581 * repinfo.adb (List_Record_Info): Split implementation into...
4582 (Compute_Max_Length): ...this. Recurse on records if requested.
4583 (List_Record_Layout): Likewise.
4584 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4585 statement, accept '0' and set List_Representation_Info_Extended
4586 on 'e'.
4587 * usage.adb (Usage): Document new -gnatRe variant.
4588
4589 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4590
4591 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4592 Do not save the given entity in the global variable Default_Pool
4593 if the pragma appears within a generic unit.
4594
4595 2017-09-08 Bob Duff <duff@adacore.com>
4596
4597 * errout.adb (Delete_Warning): Do not
4598 decrement Warnings_Treated_As_Errors. This is called before
4599 Warnings_Treated_As_Errors has been incremented to account for
4600 this warning. Decrementing it here can lead to negative values
4601 of Warnings_Treated_As_Errors, raising Constraint_Error in
4602 checks-on builds, and causing the compiler to return an error
4603 code in checks-off builds.
4604
4605 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4606
4607 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4608 entities of named concurrent types as Ref_Id and not of anonymous
4609 concurrent objects (because callers already know when a conversion
4610 is necessary and can easily do it); also, do not expect protected
4611 types or protected objects as Context_Id (because no flow-related
4612 SPARK pragmas are attached there); reflect these changes in a
4613 more precise comment.
4614
4615 2017-09-08 Olivier Hainque <hainque@adacore.com>
4616
4617 * g-altive.ads: Add documentation.
4618
4619 2017-09-08 Bob Duff <duff@adacore.com>
4620
4621 * sem_util.ads, debug.adb: Minor comment fix.
4622 * erroutc.ads: Comment fix.
4623
4624 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4625
4626 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4627 for compatibility of component types of formal and actual in an
4628 instantiation of a child unit, when the component type of the
4629 formal is itself a formal of an enclosing generic.
4630
4631 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4632
4633 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4634 sem_prag.adb to make it available for GNATprove; for concurrent
4635 types replace custom scope climbing with Scope_Same_Or_Within; for
4636 single concurrent objects add scope climbing (with Scope_Within),
4637 which was not there (that's the primary semantic change of this
4638 commit); also, when comparing a single concurrent object with
4639 its corresponding concurrent type rely on equality of types,
4640 not of objects (because that's simpler to code).
4641 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4642 (Analyze_Global_Item): adjust special-casing of references to the
4643 current instance of a concurrent unit in the Global contracts
4644 of task types and single tasks objects; similar for references
4645 in the protected operations and entries of protected types and
4646 single protected objects (in all these cases the current instance
4647 behaves as an implicit parameter and must not be mentioned in
4648 the Global contract).
4649
4650 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4651
4652 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4653 function calls returning a record within a subprogram call,
4654 for C generation.
4655
4656 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4657
4658 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4659 name that designates the current instance of a child unit in its
4660 own body and appears as the prefix of a reference to an entity
4661 local to the child unit.
4662 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4663 Minor reformatting.
4664
4665 2017-09-08 Yannick Moy <moy@adacore.com>
4666
4667 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4668 may be intentional.
4669
4670 2017-09-08 Tristan Gingold <gingold@adacore.com>
4671
4672 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4673 warnings on internal units in configurable run time mode.
4674
4675 2017-09-08 Bob Duff <duff@adacore.com>
4676
4677 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4678 representation items from interfaces that the derived type
4679 implements, not just from the parent type.
4680 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4681 this to return an empty list when there are no interfaces.
4682 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4683 * sem_attr.adb: Minor comment fix.
4684
4685 2017-09-08 Doug Rupp <rupp@adacore.com>
4686
4687 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4688 x86-vx7.
4689
4690 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4691
4692 * exp_ch4.adb (Expand_N_Allocator): Generate a
4693 call to Allocate_Any_Controlled when the allocation does not
4694 require any initialization.
4695
4696 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4697
4698 * sem_util.adb (Copy_Node_With_Replacement):
4699 Update the Renamed_Object field of a replicated object renaming
4700 declaration.
4701
4702 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4703
4704 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4705 conversions and components of objects. Simplified the detection
4706 of the Count attribute by identifying the corresponding run-time
4707 calls.
4708
4709 2017-09-08 Yannick Moy <moy@adacore.com>
4710
4711 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4712 sem_type.adb, sinfo.ads: Minor reformatting.
4713
4714 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4715
4716 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4717 of Freeze_Profile, used to inhibit the freezing of the profile
4718 of an expression function declared within a nested package, when
4719 some type in the profile depends on a private type declared in
4720 an enclosing package.
4721
4722 2017-09-08 Bob Duff <duff@adacore.com>
4723
4724 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4725 the subunit case. It's still OK to set it in the "missing subunits"
4726 case, because that won't cause the obsolete .ali files that cause
4727 confusion.
4728
4729 2017-09-08 Bob Duff <duff@adacore.com>
4730
4731 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4732 unclear why this didn't cause a warning.
4733 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4734 pragmas. It's unclear why this didn't cause an error.
4735
4736 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4737
4738 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4739 Reimplemented.
4740 (Expand_SPARK_Potential_Renaming): Code clean up.
4741 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4742 the item does not have a proper entity.
4743 (Analyze_Input_Item): Add a guard in case the item does not have a
4744 proper entity.
4745 (Collect_States_And_Objects): Include object renamings in the
4746 items being collected.
4747 (Resolve_State): Update the documentation of this routine.
4748 * sem_util.adb (Entity_Of): Add circuitry to handle
4749 renamings of function results.
4750 (Remove_Entity): New routine.
4751 (Remove_Overloaded_Entity): Take advantage of factorization.
4752 * sem_util.ads (Entity_Of): Update the documentation
4753 of this routine.
4754 (Remove_Entity): New routine.
4755 (Remove_Overloaded_Entity): Update the documentation of this
4756 routine.
4757
4758 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4759
4760 * repinfo.adb (List_Record_Info): During first loop,
4761 do not override the normalized position and first bit
4762 if they have already been set. Move fallback code
4763 for the packed case to the case where it belongs.
4764 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4765 Also adjust the normalized position of components.
4766 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4767
4768 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4769
4770 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4771 the placement of a primitive operation O that renames an operation
4772 R declared in an inner package, and which is thus not a primitive
4773 of the dispatching type of O. In this case O is a new primitive
4774 and does not inherit its dispatch table position from R (which
4775 has none).
4776
4777 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4778
4779 * sem_dim.adb (Analyze_Dimension_If_Expression,
4780 Analyze_Dimension_Case_Expression): new subprograms to verify
4781 the dimensional correctness of Ada2012 conditional expressions,
4782 and set properly the dimensions of the construct.
4783 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4784 call Analyze_Dimension.
4785
4786 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4787
4788 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4789 loop on an interface declared as a private extension of another
4790 synchronized interface.
4791
4792 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4793
4794 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4795 Analyze_Associations, to handle actual packages that depend on
4796 previous instances. If a package IAP that is an instantiation is
4797 used as an actual in a subsequent instantiation SI in the same
4798 scope, and IAP has a body, IAP must be frozen before SI. If
4799 the generic parent of IAP is itself declared in a previous
4800 instantiation in the same scope, that instantiation must also
4801 be frozen before SI.
4802 (Install_Body): Prevent double insertion of freeze node for
4803 instance.
4804
4805 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4806
4807 * sem_prag.adb (Resolve_State): Update the
4808 comment on documentation. Generate a reference to the state once
4809 resolution takes place.
4810
4811 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4812
4813 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4814 Linker_Section): If the aspect applies to an object declaration
4815 with explicit initialization, do not delay the freezing of the
4816 object, to prevent access-before-elaboration in the generated
4817 initialization code.
4818
4819 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4820
4821 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4822 (Integer_Value (Item)) when the size of the fixed decimal type
4823 is larger than Integer.
4824
4825 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4826
4827 PR ada/82127
4828 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4829 in order of increasing position in more cases.
4830
4831 2017-09-07 Yannick Moy <moy@adacore.com>
4832
4833 * a-exetim-mingw.ads: Add contract Global=>null
4834 on all operations that are modeled as having no read or write
4835 of global variables in SPARK.
4836
4837 2017-09-07 Raphael Amiard <amiard@adacore.com>
4838
4839 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4840 to Hmaps.Generic_Ops.
4841 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4842 cursors.
4843 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4844 cursors.
4845 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4846 position in cursors.
4847
4848 2017-09-07 Javier Miranda <miranda@adacore.com>
4849
4850 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4851 allow disabling the generation of implicit pragma Elaborate_All
4852 on task bodies.
4853
4854 2017-09-07 Javier Miranda <miranda@adacore.com>
4855
4856 * exp_disp.adb (Make_Tags): Avoid suffix counter
4857 in the external name of the elaboration flag. Required to fix
4858 the regressions introduced by the initial version of this patch.
4859
4860 2017-09-07 Bob Duff <duff@adacore.com>
4861
4862 * sem_ch6.adb (Analyze_Function_Return): Do not
4863 insert an explicit conversion to force the displacement of the
4864 "this" pointer to reference the secondary dispatch table in the
4865 case where the return statement is returning a raise expression,
4866 as in "return raise ...".
4867
4868 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4869
4870 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4871 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4872 procedure from sem_disp.adb.
4873 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4874 with Unit.
4875 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4876 return the instantiation node for subprograms. Update references
4877 to Get_Unit_Instantiation_Node.
4878 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4879 reference to Get_Unit_Instantiation_Node.
4880 * exp_dist.adb (Build_Package_Stubs): update reference to
4881 Get_Unit_Instantiation_Node.
4882 * sem_ch9.adb: minor typo in comment.
4883 * lib-xref-spark_specific.adb
4884 (Traverse_Declaration_Or_Statement): traverse into task type
4885 definition.
4886
4887 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4888
4889 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4890 to handle properly various cases of type conversions where the
4891 target type and/or the expression carry dimension information.
4892 (Dimension_System_Root); If a subtype carries dimension
4893 information, obtain the source parent type that carries the
4894 Dimension aspect.
4895
4896 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4897
4898 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4899
4900 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4901
4902 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4903 If the prefix is a reference to an object, rewrite it as an
4904 explicit dereference, as required by 3.7.2 (2) and as is done
4905 with most other attributes whose prefix is an access value.
4906
4907 2017-09-07 Bob Duff <duff@adacore.com>
4908
4909 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4910 Refined_Depends aspect.
4911 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4912 Refined_Depends pragma.
4913 * scans.ads: Fix documentation of Inside_Depends flag.
4914 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4915
4916 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4917
4918 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4919 Account for the case where the are no lists to insert, but the
4920 secondary stack still requires management.
4921 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4922 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4923 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4924 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4925 Minor reformatting.
4926
4927 2017-09-07 Vincent Celier <celier@adacore.com>
4928
4929 * clean.adb: Do not get the target parameters before calling
4930 gprclean.
4931
4932 2017-09-07 Nicolas Roche <roche@adacore.com>
4933
4934 * s-osinte-solaris-posix.ads: Removed.
4935
4936 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4937
4938 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4939 single concurrent objects.
4940
4941 2017-09-07 Javier Miranda <miranda@adacore.com>
4942
4943 * s-regexp.ads: Fix documentation of the globbing grammar.
4944
4945 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4946
4947 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4948
4949 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4950
4951 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4952 in CodePeer mode, to support more legacy code automatically.
4953
4954 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4955
4956 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4957 and thus not a controlling argument, preserve its type after
4958 rewriting because it may appear in an nested call with a classwide
4959 parameter.
4960
4961 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4962
4963 * comperr.adb (Delete_SCIL_Files): Handle case of
4964 N_Package_Instantiation.
4965
4966 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4967
4968 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4969 clause for a unit U appears in a context that includes a regular
4970 with_clause on U, rewrite the redundant private clause into a null
4971 statement, rather than removing it altogether from the context,
4972 so that ASIS tools can reconstruct the original source.
4973
4974 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4975
4976 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4977 for aspect Small can be of any real type (not only a universal
4978 real literal) as long as it is a static constant.
4979
4980 2017-09-07 Thomas Quinot <quinot@adacore.com>
4981
4982 * par_sco.adb: Minor reformatting.
4983
4984 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4985
4986 * s-parame-ae653.ads: Removed.
4987
4988 2017-09-07 Nicolas Roche <roche@adacore.com>
4989
4990 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4991 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4992 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4993 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4994 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4995 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4996
4997 2017-09-07 Yannick Moy <moy@adacore.com>
4998
4999 * a-ngelfu.ads Add preconditions to all functions
5000 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
5001
5002 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5003
5004 * lib-xref.adb (Generate_Reference): ignore
5005 references to entities which are Part_Of single concurrent
5006 objects.
5007
5008 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5009
5010 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
5011 comment.
5012
5013 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5014
5015 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
5016 Null_Task_Id is passed.
5017
5018 2017-09-07 Javier Miranda <miranda@adacore.com>
5019
5020 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
5021 attribute. Defined for record types and subtypes.
5022 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
5023 (Init_Tags_List) to facilitate generating separate code in the
5024 IP routine to initialize the object components and for completing
5025 the elaboration of dispatch tables.
5026 * exp_ch3.adb (Build_Init_Procedure): Improve the code
5027 generated in the IP routines by means of keeping separate
5028 the initialization of the object components from the
5029 initialization of its dispatch tables. (Init_Secondary_Tags):
5030 Adding new formal (Init_Tags_List) and adjusting calls to
5031 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
5032 adjusting also calls to Ada.Tags.Register_Interface_Offset
5033 because the type of one of its formals has been changed.
5034 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
5035 modified. Instead of receiving a pointer to an object this
5036 routine receives now a primary tag.
5037 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
5038 additional formal: the tag of the primary dispatch table.
5039 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
5040 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
5041 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
5042 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
5043 formal in calls to Init_Secondary_Tags.
5044
5045 2017-09-07 Javier Miranda <miranda@adacore.com>
5046
5047 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
5048 subprogram.
5049 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
5050 applied to generic subprograms.
5051
5052 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5053
5054 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
5055 (because it refers to the anonymous concurrent object, not its type);
5056 fix condition for emitting error message about task/protected type,
5057
5058 2017-09-07 Bob Duff <duff@adacore.com>
5059
5060 * binde.adb (Debug_Flag_Old): If both -do and -dp
5061 are specified, behave as if just -do was specified, rather than
5062 using a mixture.
5063
5064 2017-09-07 Nicolas Roche <roche@adacore.com>
5065
5066 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
5067 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
5068
5069 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5070
5071 * sem_prag.adb (Find_Role): The Global_Seen flag
5072 is now consulted not only for abstract states and variables,
5073 but for all kinds of items.
5074 (Collect_Subprogram_Inputs_Outputs): Do not process formal
5075 generic parameters, because unlike ordinary formal parameters,
5076 generic formals only act as input/ outputs if they are explicitly
5077 mentioned in a Global contract.
5078
5079 2017-09-07 Yannick Moy <moy@adacore.com>
5080
5081 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
5082 predicate procedure. Check predicate pragma/aspect with Ghost entity.
5083 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
5084 reformatting.
5085
5086 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5087
5088 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
5089 (code cleanup);
5090 * sem_ch3.adb (Build_Derived_Record_Type):i Call
5091 Copy_Dimensions_Of_Components after creating the copy of the
5092 record declaration.
5093 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
5094 derived recor type, copy the dikensions if any of each component
5095 of the parent record to the corresponding component declarations
5096 of the derived record. These expressions are used among other
5097 things as default values in aggregates with box associations.
5098 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
5099 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
5100 Minor reformatting.
5101
5102 2017-09-07 Arnaud Charlet <charlet@adacore.com>
5103
5104 * sem_util.adb: Remove extra space after THEN.
5105
5106 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5107
5108 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
5109 also mark the renamed subprogram as referenced.
5110
5111 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5112
5113 * par-ch6.adb (P_Subprogram): Improve error message on null
5114 procedure with misplaced aspect specification, which the parser
5115 first attempts to interpret as a malformed expression function.
5116
5117 2017-09-07 Gary Dismukes <dismukes@adacore.com>
5118
5119 * sem_attr.adb (Analyze_Attribute_Old_Result):
5120 Allow attributes Result and Old in the case of an expression
5121 function.
5122
5123 2017-09-07 Justin Squirek <squirek@adacore.com>
5124
5125 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
5126 Volatile to subcomponents.
5127
5128 2017-09-07 Bob Duff <duff@adacore.com>
5129
5130 * exp_ch7.adb (Find_Last_Init): Check for the
5131 case where a build-in-place function call has been replaced by a
5132 'Reference attribute reference.
5133
5134 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
5135
5136 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
5137 nodes.
5138
5139 2017-09-07 Bob Duff <duff@adacore.com>
5140
5141 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
5142 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
5143 secondary stack for all functions that return limited tagged
5144 types -- just do it for dispatching calls. Misc cleanup.
5145 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
5146 remove qualifications and type conversions. Fix various bugs
5147 where only a single level of qualification or conversion was
5148 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
5149 instead of "X".
5150 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
5151 cleanup.
5152
5153 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5154
5155 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
5156 do not create actual subtypes that may generate further predicate
5157 functions.
5158 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
5159 of body is a predicate function as well.
5160 (Resolve_Aspect_Expressions, Resolve_Name): For a component
5161 association, only the expression needs resolution, not the name.
5162 (Resolve_Aspect_Expressions, case Predicates): Construct and
5163 analyze the predicate function declaration in the scope of the
5164 type, before making the type and its discriminants visible.
5165
5166 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5167
5168 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
5169 only if the record type itself comes from source.
5170
5171 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5172
5173 * sem_ch5.adb: Minor reformatting and a typo fix
5174
5175 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5176
5177 * sinput-l.ads: minor remove extra period at the end of comment
5178
5179 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5180
5181 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
5182 E_Discriminant.
5183 (Find_Role): remove support for E_Discriminant.
5184
5185 2017-09-06 Javier Miranda <miranda@adacore.com>
5186
5187 * exp_ch6.adb (Expand_Simple_Function_Return):
5188 Add missing implicit type conversion to force displacement of the
5189 "this" pointer.
5190
5191 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5192
5193 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
5194
5195 2017-09-06 Yannick Moy <moy@adacore.com>
5196
5197 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
5198 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
5199
5200 2017-09-06 Bob Duff <duff@adacore.com>
5201
5202 * sem_ch8.adb: Change Assert to be consistent with
5203 other similar ones.
5204
5205 2017-09-06 Bob Duff <duff@adacore.com>
5206
5207 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
5208 requested. Previously, the -do switch meant "run Elab_New and
5209 Elab_Old and use the order chosen by Elab_Old, possibly with
5210 debugging printouts comparing the two orders." Now it means
5211 "do not run Elab_New." This is of use if there are bugs that
5212 cause Elab_New to crash.
5213 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
5214 type conversions.
5215 * ali.ads (Elab_Position): Change type to Nat, to avoid various
5216 type conversions.
5217
5218 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5219
5220 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
5221 reference to SPARK RM.
5222
5223 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5224
5225 * layout.adb: Use SSU short hand consistently throughout the file.
5226
5227 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5228
5229 * freeze.adb (Freeze_Record_Type)
5230 <Sized_Component_Total_Round_RM_Size>: New local variable to
5231 accumulate the rounded RM_Size of components. Update it for
5232 every component whose RM_Size is statically known. Add missing
5233 guard to check that bit packing is really required before issuing
5234 the error about packing. Swap condition for clarity's sake.
5235 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
5236
5237 2017-09-06 Fedor Rybin <frybin@adacore.com>
5238
5239 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
5240 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
5241 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5242 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
5243 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
5244 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
5245 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
5246 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
5247 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
5248 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
5249 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
5250 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
5251 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
5252 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
5253 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
5254 project manager sources.
5255
5256 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5257
5258 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
5259 entity of a mutable type and the right-hand side is a conditional
5260 expression, resolve the alternatives of the conditional using
5261 the base type of the target entity, because the alternatives
5262 may have distinct subtypes. This is particularly relevant if
5263 the alternatives are aggregates.
5264
5265 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5266
5267 * checks.adb (Apply_Predicate_Check): If the expression is an
5268 aggregate that is the RHS of an assignment, apply the check to
5269 the LHS after the assignment, rather than to the aggregate. This
5270 is more efficient than creating a temporary for the aggregate,
5271 and prevents back-end crashes when the aggregate includes a
5272 dynamic "others' association.
5273
5274 2017-09-06 Yannick Moy <moy@adacore.com>
5275
5276 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5277 Set variable to ignore SPARK_Mode in instance before the analysis
5278 of the generated package declaration.
5279
5280 2017-09-06 Yannick Moy <moy@adacore.com>
5281
5282 * sem_res.adb (Resolve_Call): Do not issue a
5283 message for calls inside expression function, unless body was
5284 seen and is candidate for inlining.
5285
5286 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5287
5288 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5289 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5290 body. do not freeze the formals of the generic unit.
5291
5292 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5293
5294 * errout.adb (Error_Msg): Separate the
5295 treatment for warning vs. style messages in inlinings and
5296 instantiations. Prevents blowups on calls to Warn_Insertion for
5297 style messages, which should not be called in that case because
5298 Warning_Msg_Char is not set.
5299
5300 2017-09-06 Justin Squirek <squirek@adacore.com>
5301
5302 * sem_prag.adb (Check_VFA_Conflicts): Created
5303 to group all Volatile_Full_Access checks relating to other
5304 representation pragmas (Mark_Component_Or_Object): Created
5305 to centeralize the flagging of attributes for the record type
5306 component case, a pragma applied individually to a component, and
5307 the object case.
5308 (Process_Atomic_Independent_Shared_Volatile):
5309 Add propagation of certain pragmas to record components and move
5310 evaluation of VFA checks
5311
5312 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5313
5314 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5315 Do not warn on conditions that are not obeyed for Inline_Always
5316 subprograms, when assertions are not enabled.
5317
5318 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5319
5320 * sem_util.adb (Unique_Entity): For abstract states return their
5321 non-limited view.
5322
5323 2017-09-06 Bob Duff <duff@adacore.com>
5324
5325 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5326 that is a proper body corresponding to a stub, we defer the
5327 adjustment of the sloc until after the correct adjustment has
5328 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5329 the adjustment, because it will be outside the range in (the old,
5330 incorrect) S_Adjustment.
5331 * inline.adb: Use named notation for readability and uniformity.
5332 * sinput-l.adb: Minor improvements to debugging output printed
5333 for Debug_Flag_L.
5334 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5335 correction.
5336
5337 2017-09-06 Vincent Celier <celier@adacore.com>
5338
5339 * make.adb: Do not invoke gprbuild for -bargs -P.
5340
5341 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5342
5343 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5344 case when Op is of kind N_Qualified_Expression. In this case,
5345 the function is called recursively on the subexpression like in
5346 other cases.
5347 * make.adb: Minor reformatting
5348
5349 2017-09-06 Justin Squirek <squirek@adacore.com>
5350
5351 * einfo.adb (Set_Linker_Section_Pragma): Modify
5352 Set_Linker_Section_Pragma to be consistant with the "getter"
5353 Linker_Section_Pragma.
5354 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5355 checking for container loops so that the index cursor is not
5356 directly changable by the user with the use of E_Loop_Parameter.
5357 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5358 * sem_warn.adb (Check_References): Revert previous change.
5359
5360 2017-09-06 Bob Duff <duff@adacore.com>
5361
5362 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5363 calls and the like.
5364
5365 2017-09-06 Yannick Moy <moy@adacore.com>
5366
5367 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5368 declarations to only consider valid uses of Global/Depends those on
5369 single concurrent objects.
5370
5371 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5372
5373 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5374 error as soon as one of the specified components overlaps the
5375 parent field.
5376
5377 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5378
5379 * sem_prag.ads: minor fix typo in comment.
5380
5381 2017-09-06 Justin Squirek <squirek@adacore.com>
5382
5383 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5384 from source before checking source references.
5385 * sem_warn.adb (Check_References): Add check for internal block
5386 before recursing.
5387
5388 2017-09-06 Vincent Celier <celier@adacore.com>
5389
5390 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5391 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5392 gnatname.adb: Remove the Project Manager from the GNAT tools.
5393 * gcc-interface/Makefile.in: ditto.
5394
5395 2017-09-06 Bob Duff <duff@adacore.com>
5396
5397 * sem_util.ads: Minor comment fix.
5398
5399 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5400
5401 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5402 Generate a freeze node for the actual of a formal package, if
5403 the actual is declared in the same unit and has a corresponding
5404 body, to prevent the current instance from being frozen before
5405 the actual is.
5406
5407 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5408
5409 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5410
5411 2017-09-06 Yannick Moy <moy@adacore.com>
5412
5413 * sem_warn.adb: Minor refactoring.
5414
5415 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5416
5417 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5418 to retrieve the inherited classwide precondition/postcondition
5419 of a subprogram.
5420 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5421 freezing a subprogram, to complete the generation of the
5422 corresponding checking code.
5423
5424 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5425
5426 * exp_util.adb (Is_Controlled_Indexing): New routine.
5427 (Is_Displace_Call): Use routine Strip to remove indirections.
5428 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5429 missing case of controlled generalized indexing.
5430 (Is_Source_Object): Use routine Strip to remove indirections.
5431 (Strip): New routine.
5432
5433 2017-09-06 Bob Duff <duff@adacore.com>
5434
5435 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5436 we include the proper header. Otherwise, we just declare the necessary
5437 things from the capabilities library. This is so we can build on
5438 machines without that library, while still enabling that library.
5439 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5440 simply return 0 if the library is not present, or not included
5441 in the link.
5442
5443 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5444
5445 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5446 for renamings that involve function calls in prefix form.
5447
5448 2017-09-06 Bob Duff <duff@adacore.com>
5449
5450 * sem_ch3.adb (Analyze_Subtype_Declaration):
5451 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5452
5453 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5454
5455 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5456 has no parameter specification and no entry index, use the entry name
5457 as the end of the generated SCO statement.
5458
5459 2017-09-06 Steve Baird <baird@adacore.com>
5460
5461 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5462 uses of 'Image and related attributes as having side effects in
5463 order to avoid replicating such uses.
5464 * pprint.ads (Expression_Image) Add new generic formal flag
5465 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5466 (eventually) override the default.
5467 * pprint.adb (Expression_Image) If the new flag is set, then
5468 suppress the ".all" suffix when displaying a dereference whose
5469 prefix is a use of a value-capturing compiler temp of the sort
5470 generated by Expr_Util.Remove_Side_Effects .
5471 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5472 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5473 Minor reformatting.
5474 * inline.adb: Minor wording change.
5475
5476 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5477
5478 * sem_ch7.adb: Update comment.
5479
5480 2017-09-06 Yannick Moy <moy@adacore.com>
5481
5482 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5483 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5484 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5485 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5486 so that applies to any entity.
5487
5488 2017-09-06 Yannick Moy <moy@adacore.com>
5489
5490 * sem_ch3.adb (Derived_Type_Declaration): Use
5491 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5492
5493 2017-09-06 Javier Miranda <miranda@adacore.com>
5494
5495 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5496 following ISO-8861.
5497
5498 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5499
5500 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5501 conversion takes its dimensions from the expression, not from
5502 the context type.
5503 (Dimensions_Of_Operand): Ditto.
5504
5505 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5506
5507 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5508 null procedures when GNAT coverage is used, so that their (empty)
5509 bodies are properly covered.
5510
5511 2017-09-06 Bob Duff <duff@adacore.com>
5512
5513 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5514 the entity is a type with discriminants, make the discriminants
5515 directly visible in aspect clauses.
5516
5517 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5518
5519 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5520 Universal_Real and the context is a floating-point type, resolve
5521 both operands to the target type.
5522
5523 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5524
5525 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5526 sem_ch3.adb, sem_util.adb: Minor reformatting.
5527
5528 2017-09-06 Yannick Moy <moy@adacore.com>
5529
5530 * freeze.adb (Check_Inherited_Conditions): Rewriting
5531 of inherited preconditions and postconditions should only occur
5532 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5533 be confused with SPARK_Mode being On.
5534
5535 2017-09-06 Yannick Moy <moy@adacore.com>
5536
5537 * sem_warn.adb (Check_References): Take into
5538 account possibility of attribute reference as original node.
5539
5540 2017-09-06 Yannick Moy <moy@adacore.com>
5541
5542 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5543 use of attribute.
5544
5545 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5546
5547 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5548 on the procedure created to encapsulate the body.
5549 * sem_ch7.adb: Add with clause for GNAT.HTable.
5550 (Entity_Table_Size): New constant.
5551 (Entity_Hash): New function.
5552 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5553 (Is_Subprogram_Ref): Rename into...
5554 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5555 the table instead of bailing out on them. Scan the value of constants
5556 if it is not known at compile time.
5557 (Contains_Subprograms_Refs): Rename into...
5558 (Scan_Subprogram_Refs): ...this.
5559 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5560 Is_Public flag on subprograms if they are not actually referenced.
5561 (Hide_Public_Entities): Beef up comment on the algorithm.
5562 Reset the table of subprograms on entry.
5563
5564 2017-09-06 Yannick Moy <moy@adacore.com>
5565
5566 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5567
5568 2017-09-06 Javier Miranda <miranda@adacore.com>
5569
5570 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5571 cannot handle a type conversion of an array as an aggregate
5572 component.
5573
5574 2017-09-06 Bob Duff <duff@adacore.com>
5575
5576 * g-comlin.adb (Try_Help): Remove ".exe" so we
5577 get the same results on windows and unix.
5578
5579 2017-09-06 Justin Squirek <squirek@adacore.com>
5580
5581 * exp_imgv.adb (Expand_Image_Attribute),
5582 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5583 Added case to handle new-style 'Image expansion
5584 (Rewrite_Object_Image): Moved from exp_attr.adb
5585 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5586 attribute cases so that the relevant subprograms in exp_imgv.adb
5587 handle all expansion.
5588 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5589 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5590 cases to call common function Analyze_Image_Attribute.
5591 (Analyze_Image_Attribute): Created as a common path for all
5592 image attributes (Check_Object_Reference_Image): Removed
5593 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5594 Removed and refactored into Is_Object_Image (Is_Object_Image):
5595 Created as a replacement for Is_Image_Applied_To_Object
5596
5597 2017-09-06 Yannick Moy <moy@adacore.com>
5598
5599 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5600 message for missing input.
5601
5602 2017-09-06 Yannick Moy <moy@adacore.com>
5603
5604 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5605 of protected subprograms and entries.
5606 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5607 New function to detect when a subprogram of entry is defined
5608 inside a protected object.
5609
5610 2017-09-06 Bob Duff <duff@adacore.com>
5611
5612 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5613 whether the current process has the CAP_SYS_NICE capability.
5614 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5615 ceiling priorities if the current process has the CAP_SYS_NICE
5616 capability.
5617
5618 2017-09-06 Bob Duff <duff@adacore.com>
5619
5620 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5621 check back to the body, because SPARK is not yet ready for
5622 "or else raise Constraint_Error".
5623
5624 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5625
5626 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5627 procedure by a single null statement, after evaluating the
5628 actuals that require it.
5629
5630 2017-09-06 Javier Miranda <miranda@adacore.com>
5631
5632 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5633 Generating C code improve the code that checks the use of nested
5634 aggregates to initialize object declarations.
5635
5636 2017-09-06 Yannick Moy <moy@adacore.com>
5637
5638 * sem_ch3.adb (Derived_Type_Declaration): Detect
5639 violations of new rule SPARK RM 3.4(1). Also refactor existing
5640 check to use the new function Find_Partial_View.
5641
5642 2017-09-06 Vincent Celier <celier@adacore.com>
5643
5644 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5645 from the Prj hierarchy has been removed from the GNAT driver.
5646
5647 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5648
5649 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5650 expression function, or within a spec expression (default value,
5651 etc) a reference to an incomplete type is legal: legality of
5652 the operation will be checked when some related entity (type,
5653 object or subprogram) is frozen.
5654
5655 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5656
5657 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5658 adjustments and a typo fix.
5659
5660 2017-09-06 Yannick Moy <moy@adacore.com>
5661
5662 * sem_res.adb (Resolve_Call): Do not issue info
5663 message about inlining of calls to functions in assertions,
5664 for functions whose body has not been seen yet.
5665
5666 2017-09-06 Bob Duff <duff@adacore.com>
5667
5668 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5669 we can use modern Ada in this package.
5670 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5671 Move Ada.Command_Line.Response_File to System.Response_File,
5672 and make Ada.Command_Line.Response_File into a rename of
5673 System.Response_File. This is to avoid having gnatbind depend
5674 Ada.Command_Line, which would damage the bootstrap process now
5675 that Ada.Command_Line contains modern Ada (the raise expression).
5676 * gnatbind.adb: Avoid dependence on
5677 Ada.Command_Line. Depend on System.Response_File instead
5678 of Ada.Command_Line.Response_File. Change one call to
5679 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5680 to Ada.Command_Line.Argument_Count to use Arg_Count.
5681 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5682
5683 2017-09-06 Bob Duff <duff@adacore.com>
5684
5685 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5686 switch, because we've already read gnat.adc by default.
5687
5688 2017-09-06 Bob Duff <duff@adacore.com>
5689
5690 * exp_ch5.adb (Get_Default_Iterator): Replace
5691 "Assert(False)" with "return Iter", because if an iterable
5692 type is derived from a noniterable one, then we won't find an
5693 overriding or inherited default iterator.
5694
5695 2017-09-06 Yannick Moy <moy@adacore.com>
5696
5697 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5698 literal index used to access a string is null or negative.
5699
5700 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5701
5702 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5703 allowed on loop parameters.
5704 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5705 on loop parameters.
5706 (Write_Field15_Name): Update the output for
5707 Status_Flag_Or_Transient_Decl.
5708 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5709 to loop parameters. Update the documentation of the attribute
5710 and the E_Loop_Parameter entity.
5711 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5712 which assumes that cursors can never be controlled.
5713 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5714 guard which assumes that cursors can never be controlled.
5715
5716 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5717
5718 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5719 sem_warn.adb: Minor reformatting.
5720
5721 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5722
5723 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5724 fix and preserve older GNAT warning on overlapping actuals that
5725 are not elementary types.
5726
5727 2017-09-06 Justin Squirek <squirek@adacore.com>
5728
5729 * sem_attr.adb: Comment correction.
5730
5731 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5732
5733 * sem_util.adb: Minor reformatting.
5734
5735 2017-09-06 Yannick Moy <moy@adacore.com>
5736
5737 * a-comlin.ads (Argument): Add precondition for analysis.
5738
5739 2017-09-06 Yannick Moy <moy@adacore.com>
5740
5741 * sem_res.adb (Resolve): Update message for function call as statement.
5742
5743 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5744
5745 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5746 generated bodies for renamings that are completions, when renamed
5747 procedure is No_Return.
5748 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5749 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5750 with No_Return, the renamed entity must be No_Return as well.
5751
5752 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5753
5754 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5755 Minor reformatting.
5756
5757 2017-09-06 Justin Squirek <squirek@adacore.com>
5758
5759 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5760 attribute cases (Rewrite_Object_Reference_Image): Created to
5761 aid the rewriting of new-style 'Image attributes.
5762 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5763 (Check_Object_Reference_Image): Created to handle verification of
5764 'Image with object-references as prefixes.
5765 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5766 Create predicate to identify cases where an 'Image attribute's
5767 prefix applies to an object reference.
5768
5769 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5770
5771 * freeze.adb (Freeze_Entity): Do not generate a freeze
5772 node for a generic unit, even if it includes delayed aspect
5773 specifications. Freeze nodes for generic entities must never
5774 appear in the tree that reaches the back-end of the compiler.
5775
5776 2017-09-06 Yannick Moy <moy@adacore.com>
5777
5778 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5779
5780 2017-09-06 Yannick Moy <moy@adacore.com>
5781
5782 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5783 to subprograms in other units as possibly inlined.
5784
5785 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5786
5787 * freeze.adb (Freeze_Entity): For a derived type that has no
5788 explicit delayed aspects but may inherit delayed aspects from its
5789 parent type, analyze aspect at freeze point for proper capture
5790 of an inherited aspect.
5791
5792 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5793
5794 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5795 renamings; also, avoid repeated calls to Renamed_Object when getting
5796 through object renamings.
5797
5798 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5799
5800 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5801 array type declaration in a private part, when an index is a
5802 subtype indication of a discrete type with a private partial view.
5803
5804 2017-09-06 Javier Miranda <miranda@adacore.com>
5805
5806 * exp_ch4.adb (Expand_Modular_Op): Force generating
5807 temporary to improve the generated code.
5808
5809 2017-09-06 Tristan Gingold <gingold@adacore.com>
5810
5811 * s-fatgen.adb: Minor typo fix in comment.
5812
5813 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5814
5815 * exp_ch5.adb (Make_Field_Assign): If the type
5816 of the right-hand side has stored constraint, use its values
5817 (except for those that are renamings of parent discriminants)
5818 to produce additional assignments for the discriminants of the
5819 left-hand side, which are invisible in the righ-hand side and
5820 not retrievable as selected components.
5821
5822 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5823
5824 * sem_util.adb (Needs_One_Formal): The first formal of such a
5825 function must be a controlling formal, so that Obj.F (X, Y)
5826 can have the interpretation F(Obj)(X, Y).
5827 * sem_util.ads: Clarify documentation.
5828
5829 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5830
5831 * table.ads, table.adb: Restore original implementation.
5832 * namet.h (Names_Ptr): Adjust back.
5833 (Name_Chars_Ptr): Likewise.
5834 * uintp.h (Uints_Ptr): Likewise.
5835 (Udigits_Ptr): Likewise.
5836 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5837 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5838 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5839 * spark_xrefs.ads: Likewise.
5840 * scos.h: Undo latest changes.
5841
5842 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5843
5844 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5845 No_Return flag to instance if pragma applies to generic unit. This
5846 must be done explicitly because the pragma does not appear
5847 directly in the generic declaration (unlike the corresponding
5848 aspect specification).
5849
5850 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5851
5852 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5853 explaining the test used to detect inlining. Use same test
5854 in second occurrence.
5855 (Analyze_Package_Body_Helper): Minor formatting fixes.
5856
5857 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5858
5859 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5860 derived type with a mixture of renamed and constrained parent
5861 discriminants, the constraint for the target must obtain the
5862 discriminant values from both the operand and from the stored
5863 constraint for it, given that the constrained discriminants are
5864 not visible in the object.
5865 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5866 side may be derived from that of the left-hand side (as in the
5867 case of an assignment with a change of representation) so the
5868 discriminant to be used in the retrieval of the value of the
5869 component must be the entity in the type of the right-hand side.
5870
5871 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5872
5873 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5874 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5875 * exp_util.adb (Is_Source_Object): Account for
5876 the cases where the source object may appear as a dereference
5877 or within a type conversion.
5878 * exp_ch6.adb: Fix missing space in error message.
5879
5880 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5881
5882 * sem_prag.adb: Update description of Eliminate.
5883
5884 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5885
5886 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5887 properly an attribute reference 'Loop_Entry that appears in the
5888 list of indices of an indexed expression, to prevent an infinite
5889 loop in the compiler.
5890
5891 2017-09-06 Bob Duff <duff@adacore.com>
5892
5893 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5894
5895 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5896
5897 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5898 in a set membership is an overloaded enumeration literal, and
5899 the type of the alternative is resolved from a previous one,
5900 replace the entity of the alternative as well as the type,
5901 to prevent inconsistencies between the entity and the type.
5902
5903 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5904
5905 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5906 (No_Component_Reordering_Specified): New switch.
5907 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5908 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5909 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5910 New check.
5911 (Check_Configuration_Consistency): Invoke it.
5912 * debug.adb (d.r): Toggle the effect of the switch.
5913 (d.v): Change to no-op.
5914 * einfo.ads (Has_Complex_Representation):
5915 Restrict to record types.
5916 (No_Reordering): New alias for Flag239.
5917 (OK_To_Reorder_Components): Delete.
5918 (No_Reordering): Declare.
5919 (Set_No_Reordering): Likewise.
5920 (OK_To_Reorder_Components): Delete.
5921 (Set_OK_To_Reorder_Components): Likewise.
5922 * einfo.adb (Has_Complex_Representation): Expect record types.
5923 (No_Reordering): New function.
5924 (OK_To_Reorder_Components): Delete.
5925 (Set_Has_Complex_Representation): Expect base record types.
5926 (Set_No_Reordering): New procedure.
5927 (Set_OK_To_Reorder_Components): Delete.
5928 (Write_Entity_Flags): Adjust to above change.
5929 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5930 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5931 OK_To_Reorder_Components on record types with convention Ada.
5932 * lib-writ.adb (Write_ALI): Deal with NC marker.
5933 * opt.ads (No_Component_Reordering): New flag.
5934 (No_Component_Reordering_Config): Likewise.
5935 (Config_Switches_Type): Add No_Component_Reordering component.
5936 * opt.adb (Register_Opt_Config_Switches): Copy
5937 No_Component_Reordering onto No_Component_Reordering_Config.
5938 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5939 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5940 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5941 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5942 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5943 No_Reordering flag from the default.
5944 (Build_Derived_Private_Type): Likewise.
5945 (Build_Derived_Record_Type): Likewise. Then inherit it
5946 for untagged types and clean up handling of similar flags.
5947 (Record_Type_Declaration): Likewise.
5948 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5949 remove redundant test on Is_Tagged_Type.
5950 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5951 (Sig_Flags): Likewise.
5952 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5953 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5954 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5955 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5956 Copy the layout of the parent type only if the No_Reordering
5957 settings match.
5958 (components_to_record): Reorder record types with
5959 convention Ada by default unless No_Reordering is set or -gnatd.r
5960 is specified and do not warn if No_Reordering is set in GNAT mode.
5961
5962 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5963
5964 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5965 new predicate to reject declarations that can be completions,
5966 when there is a visible prior homograph that is a null procedure.
5967 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5968 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5969
5970 2017-09-06 Thomas Quinot <quinot@adacore.com>
5971
5972 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5973 run of 253 characters or more.
5974
5975 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5976
5977 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5978 properly incomplete subtypes that may be created by explicit or
5979 implicit declarations.
5980 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5981 (Subtype_Kind): Ditto.
5982 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5983 Ekind of a subtype of a discriminated incomplete type.
5984 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5985 incomplete types, to preserve error reporting.
5986 (Process_Incomplete_Dependents): Do not create a subtype
5987 declaration for an incomplete subtype that is created internally.
5988 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5989 incomplete subtypes that do not require a completion, either
5990 because they are limited views, of they are generic actuals.
5991
5992 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5993
5994 * checks.adb (Insert_Valid_Check): Remove the
5995 suspicious manipulation of the Do_Range_Check flag as ths is
5996 no linger needed. Suppress validity check when analysing the
5997 validation variable.
5998
5999 2017-09-06 Philippe Gil <gil@adacore.com>
6000
6001 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
6002 GNATCOLL.Memory
6003
6004 2017-09-06 Bob Duff <duff@adacore.com>
6005
6006 * sem_elim.adb: Minor comment fix.
6007
6008 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6009
6010 * sem_util.adb (Is_Object_Reference): A function call is an
6011 object reference, and thus attribute references for attributes
6012 that are functions (such as Pred and Succ) as well as predefined
6013 operators are legal in contexts that require an object, such as
6014 the prefix of attribute Img and the Ada2020 version of 'Image.
6015
6016 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
6017
6018 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
6019 exp_ch3.adb, xoscons.adb: Minor reformatting.
6020
6021 2017-09-06 Raphael Amiard <amiard@adacore.com>
6022
6023 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
6024 Position parameter. If supplied, use it to provide efficient iteration.
6025 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
6026 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
6027 iteration.
6028
6029 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6030
6031 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
6032 designated type is class-wide and the expression is an unchecked
6033 conversion, preserve the conversion when checking the tag of the
6034 designated object, to prevent spurious semantic errors when the
6035 expression in the conversion has an untagged type (for example
6036 an address attribute).
6037
6038 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6039
6040 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
6041 operation is subject to a pragma Eliminate.
6042
6043 2017-09-06 Ed Schonberg <schonberg@adacore.com>
6044
6045 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
6046
6047 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
6048
6049 * fe.h (Eliminate_Error_Msg): Remove.
6050
6051 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6052
6053 * gcc-interface/utils.c (make_packable_type): Update call to
6054 mode_for_size_tree.
6055
6056 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
6057
6058 * gcc-interface/utils2.c (build_load_modify_store):
6059 Use int_mode_for_size.
6060
6061 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6062
6063 PR ada/62235
6064 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6065 for Itypes that are E_Record_Subtype with a cloned subtype.
6066 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
6067
6068 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6069
6070 * gcc-interface/trans.c (convert_with_check): Use a custom base type
6071 if the base type of the expression has a different machine mode.
6072 Rename a couple of parameters and local variable.
6073
6074 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6075
6076 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
6077 conversions around prefixes that are not references.
6078
6079 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6080
6081 * gcc-interface/utils.c (unchecked_convert): When the result type is a
6082 non-biased integral type with size 0, set the result to 0 directly.
6083
6084 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6085
6086 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
6087 (renaming_from_instantiation_p): ...this.
6088 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
6089 instead of explicit tests on kind of entities. Adjust for renaming.
6090 (gnat_to_gnu_profile_type): Likewise.
6091 (gnat_to_gnu_subprog_type): Likewise.
6092 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
6093 (Case_Statement_to_gnu): Likewise.
6094 (gnat_to_gnu): Likewise.
6095 (process_freeze_entity): Likewise.
6096 (process_type): Likewise.
6097 (add_stmt_with_node): Adjust for renaming.
6098 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
6099 (renaming_from_generic_instantiation_p): Rename to...
6100 (renaming_from_instantiation_p): ...this. Use inline predicate.
6101 (pad_type_hasher::keep_cache_entry): Fold.
6102
6103 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6104
6105 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
6106 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
6107 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
6108 (N_Slice): Likewise.
6109 (N_Selected_Component): Likewise. Do not try again to translate it.
6110 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
6111
6112 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6113
6114 * repinfo.ads: Document new treatment of dynamic values.
6115 (TCode): Bump upper bound to 29.
6116 (Dynamic_Val): New constant set to 29.
6117 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
6118 (Rep_Value) <Dynamic_Val>: Likewise.
6119 * repinfo.h (Dynamic_Val): New macro.
6120 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
6121 DECL_P nodes too.
6122 <INTEGER_CST>: Set TCODE instead of recursing.
6123 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
6124 <VAR_DECL>: New case.
6125 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
6126 <BIT_AND_EXPR>: Adjust.
6127 <CALL_EXPR>: Do not fall through.
6128
6129 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6130
6131 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
6132 there is no target, do not create a temporary for the return value for
6133 an allocator either.
6134
6135 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
6136
6137 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
6138 unconstrained array type.
6139
6140 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6141 Alan Hayward <alan.hayward@arm.com>
6142 David Sherwood <david.sherwood@arm.com>
6143
6144 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
6145 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
6146
6147 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6148 Alan Hayward <alan.hayward@arm.com>
6149 David Sherwood <david.sherwood@arm.com>
6150
6151 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
6152 is_a <scalar_int_mode>.
6153 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
6154 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
6155
6156 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6157 Alan Hayward <alan.hayward@arm.com>
6158 David Sherwood <david.sherwood@arm.com>
6159
6160 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
6161 instead of mode_for_size.
6162 (gnat_to_gnu_subprog_type): Likewise.
6163 * gcc-interface/utils.c (make_type_from_size): Likewise.
6164
6165 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6166 Alan Hayward <alan.hayward@arm.com>
6167 David Sherwood <david.sherwood@arm.com>
6168
6169 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
6170 (fp_size_to_prec): Likewise.
6171
6172 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6173 Alan Hayward <alan.hayward@arm.com>
6174 David Sherwood <david.sherwood@arm.com>
6175
6176 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
6177 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
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): Update use of
6184 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
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/misc.c (fp_prec_to_size): Use new mode iterators.
6191 (fp_size_to_prec): Likewise.
6192
6193 2017-08-29 Martin Liska <mliska@suse.cz>
6194
6195 PR other/39851
6196 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
6197
6198 2017-08-08 Martin Liska <mliska@suse.cz>
6199
6200 * gcc-interface/trans.c: Include header files.
6201
6202 2017-07-29 Jakub Jelinek <jakub@redhat.com>
6203
6204 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
6205 as new argument to the imported_module_or_decl debug hook.
6206
6207 2017-07-25 Javier Miranda <miranda@adacore.com>
6208
6209 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
6210 evaluated twice.
6211
6212 2017-07-19 Jakub Jelinek <jakub@redhat.com>
6213
6214 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
6215 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
6216 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
6217
6218 2017-07-18 Mike Frysinger <vapier@chromium.org>
6219
6220 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
6221 (../../gnatlink$(exeext)): Likewise.
6222
6223 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
6224
6225 PR ada/81446
6226 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
6227 (Backend_Overflow_Checks): Set to True.
6228
6229 2017-06-23 Jakub Jelinek <jakub@redhat.com>
6230
6231 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
6232
6233 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
6234
6235 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
6236 notice. New macro.
6237 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
6238 as a definition.
6239 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
6240 definition.
6241 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
6242 imported subprograms for the current compilation unit as
6243 definitions. Disable debug info for references to variables.
6244 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
6245 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
6246 not built-in functions to their binding scope.
6247 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
6248 the function as a definition. Update all callers.
6249 (gnat_write_global_declarations): Emit debug info for imported
6250 functions. Filter out external variables for which debug info
6251 is disabled.
6252
6253 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
6254
6255 PR ada/81105
6256 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
6257 (i[3456]86-pc-gnu): Likewise.
6258 (x86_64 kfreebsd): Likewise.
6259
6260 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6261
6262 PR bootstrap/80897
6263 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6264
6265 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6266
6267 PR ada/81070
6268 * s-interr-hwint.adb: Reinstate.
6269 * gcc-interface/Makefile.in (RTEMS): Use it again.
6270
6271 2017-06-08 Olivier Hainque <hainque@adacore.com>
6272
6273 * vx_crtbegin_auto.c: Update year in copyright notice.
6274 * vx_crtbegin.c: Likewise.
6275 * vx_crtbegin.inc: Likewise.
6276 * vx_crtend.c: Likewise.
6277
6278 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6279
6280 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6281 * s-tpopsp-rtems.adb: Delete.
6282
6283 2017-06-02 Olivier Hainque <hainque@adacore.com>
6284
6285 * vx_crtbegin_auto.c: New file.
6286 * vx_crtbegin.c: New file.
6287 * vx_crtbegin.inc: New file.
6288 * vx_crtend.c: New file.
6289
6290 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6291
6292 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6293 const qualifiers that cause -Wignored-qualifiers warnings.
6294
6295 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6296
6297 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6298 for Itypes that are E_Access_Subtype.
6299 <E_Access_Subtype>: Use the DECL of the base type directly.
6300
6301 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6302 Eric Botcazou <ebotcazou@adacore.com>
6303
6304 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6305 limited view may appear in the profile of a function, and a call to
6306 that function in another unit in which the full view is available must
6307 use this full view to spurious type errors at the point of call.
6308 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6309 of parent body with a with clause for the main unit.
6310 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6311 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6312 types declared in external units like types from limited with clauses.
6313 Adjust final processing of defer_limited_with_list accordingly.
6314 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6315 again to translate the prefix after the field if it is incomplete.
6316
6317 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6318
6319 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6320 alignment for simple volatile fields and remove associated errors.
6321
6322 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6323
6324 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6325 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6326
6327 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6328
6329 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6330 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6331 process Original_Node instead of expanded names.
6332
6333 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6334
6335 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6336 addressability check in the constrained case.
6337
6338 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6339
6340 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6341 types not coming from a limited context.
6342
6343 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6344
6345 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6346 the inlined list that are not public.
6347 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6348 there is a pragma Inline_Always on the subprogram.
6349
6350 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6351
6352 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6353 <N_Allocator>: Use properly typed constants.
6354 (extract_values): Move around.
6355 (pos_to_constructor): Minor tweaks.
6356 (Sloc_to_locus): Fix formatting.
6357 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6358 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6359 (Gigi_Equivalent_Type): Adjust head comment.
6360 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6361
6362 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6363
6364 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6365 is a representation clause on an extension, propagate the alignment of
6366 the parent type only if the platform requires strict alignment.
6367
6368 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6369
6370 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6371 instead of Word_Size.
6372
6373 Revert
6374 2017-03-28 Andreas Schwab <schwab@suse.de>
6375
6376 PR ada/80117
6377 * system-linux-aarch64-ilp32.ads: New file.
6378 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6379 from LIBGNAT_TARGET_PAIRS.
6380 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6381 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6382 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6383 or -mabi=ilp32, resp.
6384
6385 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6386
6387 PR ada/80626
6388 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6389 instead of Word_Size.
6390
6391 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6392
6393 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6394
6395 2017-05-02 Richard Biener <rguenther@suse.de>
6396
6397 * gcc-interface/misc.c (gnat_post_options): Do not set
6398 -fstrict-overflow.
6399
6400 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6401
6402 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6403 Corresponding_Discriminant is only called on discriminants.
6404 Skip the saving of the result only for them.
6405 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6406 <N_Unchecked_Type_Conversion>: Translate the result type first.
6407 (gigi): Set TREE_NOTHROW on Begin_Handler.
6408 (stmt_list_cannot_raise_p): New predicate.
6409 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6410 a cleanup if the statements of the handler cannot raise.
6411 (process_freeze_entity): Use Is_Record_Type.
6412 (process_type): Likewise.
6413
6414 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6415
6416 * einfo.ads (Corresponding_Record_Component): New alias
6417 for Node21 used for E_Component and E_Discriminant.
6418 * einfo.adb (Corresponding_Record_Component): New function.
6419 (Set_Corresponding_Record_Component): New procedure.
6420 (Write_Field21_Name): Handle Corresponding_Record_Component.
6421 * sem_ch3.adb (Inherit_Component): Set
6422 Corresponding_Record_Component for every component in
6423 the untagged case. Clear it afterwards for non-girder
6424 discriminants.
6425 * gcc-interface/decl.c (gnat_to_gnu_entity)
6426 <E_Record_Type>: For a derived untagged type with discriminants
6427 and constraints, apply the constraints to the layout of the
6428 parent type to deduce the layout.
6429 (field_is_aliased): Delete.
6430 (components_to_record): Test DECL_ALIASED_P directly.
6431 (annotate_rep): Check that fields are present except for
6432 an extension.
6433 (create_field_decl_from): Add DEBUG_INFO_P
6434 parameter and pass it in recursive and other calls. Add guard
6435 for the manual CSE on the size.
6436 (is_stored_discriminant): New predicate.
6437 (copy_and_substitute_in_layout): Consider only
6438 stored discriminants and check that original fields are present
6439 in the old type. Deal with derived types. Adjust call to
6440 create_variant_part_from.
6441
6442 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6443
6444 * exp_ch6.adb (Expand_Call_Helper): When locating the
6445 accessibility entity created for an access parameter, handle
6446 properly a reference to a formal of an enclosing subprogram. if
6447 the reference appears in an inherited class-wide condition, it
6448 is the rewriting of the reference in the ancestor expression,
6449 but the accessibility entity must be that of the current formal.
6450
6451 2017-05-02 Javier Miranda <miranda@adacore.com>
6452
6453 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6454 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6455 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6456 Call Expand_Non_Binary_Modular_Op.
6457
6458 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6459
6460 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6461 has discriminants, do not override the Stored_Constraint list of
6462 the full view of the derived type with that of the derived type.
6463
6464 2017-05-02 Bob Duff <duff@adacore.com>
6465
6466 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6467
6468 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6469
6470 * s-os_lib.ads: Minor typo fix.
6471
6472 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6473
6474 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6475 this deprecated dependency.
6476
6477 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6478
6479 * exp_util.ads: minor comment addition.
6480
6481 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6482
6483 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6484 pastos in part #3 of the head comment.
6485
6486 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6487
6488 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6489 procedure body for a local (sub)type declaration within a
6490 predicate function. Invariant checks do not apply to these, and
6491 the expansion of the procedure will happen in the wrong scope,
6492 leading to misplaced freeze nodes.
6493
6494 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6495
6496 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6497 to analyze generated actions. If the main unit is a body,
6498 the required scope is that of the corresponding unit declaration.
6499
6500 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6501
6502 * einfo.adb (Declaration_Node): flip branches of
6503 an IF statement to avoid repeated negations in its condition;
6504 no change in semantics, only to improve readability.
6505
6506 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6507
6508 * sem_case.adb: Remove extra spaces in parameter declarations.
6509
6510 2017-05-02 Justin Squirek <squirek@adacore.com>
6511
6512 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6513 in usage line for new -gnatwE switch.
6514
6515 2017-05-02 Claire Dross <dross@adacore.com>
6516
6517 * a-cofuve.ads (Remove): Remove unnecessary
6518 conditions in precondition.
6519
6520 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6521
6522 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6523 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6524
6525 2017-05-02 Justin Squirek <squirek@adacore.com>
6526
6527 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6528 alternative expression.
6529 * sem_res.adb (Resolve_Case_Expression): Ditto.
6530
6531 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6532
6533 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6534 Refine predicate for the case where the primitive operation
6535 is a renaming of equality. An overriding operation that is
6536 a user-defined renaming of predefined equality inherits its
6537 slot from the overridden operation. Otherwise it is treated
6538 as a predefined op and occupies the same predefined slot as
6539 equality. A call to it is transformed into a call to its alias,
6540 which is the predefined equality. A dispatching call thus uses
6541 the proper slot if operation is further inherited and called
6542 with class-wide arguments.
6543
6544 2017-05-02 Justin Squirek <squirek@adacore.com>
6545
6546 * errout.adb (Set_Msg_Text): Add a case to switch the message
6547 type when the character '[' is detected signifying a warning
6548 about a run-time exception.
6549 * opt.ads Add a new Warning_Mode value for new switch
6550 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6551 to handle new warning mode
6552 * usage.adb (Usage): Add usage entry for -gnatwE
6553 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6554
6555 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6556
6557 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6558 declaration that operates on some fixed point type.
6559
6560 2017-05-02 Justin Squirek <squirek@adacore.com>
6561
6562 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6563
6564 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6565
6566 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6567
6568 2017-05-02 Justin Squirek <squirek@adacore.com>
6569
6570 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6571 expression (Analyze_If_Expression): Add check for valid condition
6572 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6573 on case-expression
6574 * sem_res.adb (Resolve_If_Expression): Add check for valid
6575 condition and then-expression.
6576
6577 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6578
6579 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6580 statement if the initialization call is a null procedure, as
6581 can happen with a controlled type with no explicit Initialize
6582 procedure, or an array of such.
6583 * exp_ch7.adb (Process_Object_Declaration): For a type with
6584 controlled components that has a trivial Initialize procedure,
6585 insert declaration for finalization counter after object
6586 declaration itself.
6587 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6588 finalization block and attendant declarations if component has
6589 a trivial Initialize procedure.
6590 (Make_Init_Call): Do not generate a call if controlled type has
6591 a trivial Initialize procedure.
6592
6593 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6594
6595 * g-forstr.ads (Data): Move Format component last.
6596 * g-forstr.adb ("+"): Adjust for above change.
6597 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6598 * g-sechas.ads (Context): Move Key last.
6599 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6600 * s-fileio.adb (Temp_File_Record): Move Name last.
6601 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6602 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6603
6604 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6605
6606 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6607 switch introduced recently. finally not needed.
6608
6609 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6610
6611 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6612 Corresponding_Body link for a null procedure declaration.
6613
6614 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6615
6616 * atree.h (Flag290): Add missing terminating parenthesis.
6617 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6618 (Set_Is_Class_Wide_Clone): Likewise.
6619 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6620
6621 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6622
6623 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6624 parameter Array_Comp to indicate the case of an array object
6625 with null-excluding components.
6626 * checks.adb (Null_Exclusion_Static_Checks):
6627 Call Compile_Time_Constraint_Error instead of
6628 Apply_Compile_Time_Constraint_Error in the component case. Also
6629 call that when Array_Comp is True, with an appropriate warning for
6630 the array component case. Only create an explicit initialization
6631 by null in the case of an object of a null-excluding access type
6632 (and no longer do that in the component case).
6633 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6634 Array_Comp defaulted to False. Pass Empty for the Comp
6635 actual when calling Null_Exclusion_Static_Checks in the case
6636 where Comp_Decl matches Object_Decl, because we don't have a
6637 component in that case. In the case of an object or component
6638 of an array type, pass True for Array_Comp on the recursive call
6639 to Check_Component.
6640
6641 2017-05-02 Bob Duff <duff@adacore.com>
6642
6643 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6644 compute the linux priority from the Ada priority. Call this everywhere
6645 required. In particular, the previous version was not doing this
6646 computation when setting the ceiling priority in various places. It
6647 was just converting to C.int, which results in a ceiling that is off
6648 by 1.
6649
6650 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6651
6652 * sem_ch3.adb: Comment predicate inheritance.
6653
6654 2017-05-02 Tristan Gingold <gingold@adacore.com>
6655
6656 * s-trasym.ads: Add comment.
6657
6658 2017-05-02 Bob Duff <duff@adacore.com>
6659
6660 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6661 * sem_ch4.adb: Minor reformatting.
6662 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6663 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6664 * sinput.ads: Minor typo fix.
6665
6666 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6667
6668 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6669 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6670 here from exp_ch9, to recognize objects whose creation requires
6671 dynamic allocation, so that the proper warning can be emitted
6672 when restriction No_Implicit_Heap_Allocation is in effect.
6673 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6674 to emit proper warning when an object that requires dynamic
6675 allocation is declared.
6676
6677 2017-05-02 Tristan Gingold <gingold@adacore.com>
6678
6679 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6680
6681 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6682
6683 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6684 visibility rules for equality operators that apply within an
6685 instantiation apply within an inlined body.
6686 * sem_type.adb (Add_One_Interp): ditto.
6687
6688 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6689
6690 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6691 procedures.
6692
6693 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6694
6695 * snames.ads-tmpl
6696 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6697 Name_No_Tagged_Streams): Move to regular pragmas. Add
6698 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6699 and Secondary_Stack_Size.
6700 (Pragma_Id): Move Pragma_Assume,
6701 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6702 Pragma_No_Tagged_Streams to second part.
6703
6704 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6705
6706 * exp_attr.adb: Minor reformatting.
6707
6708 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6709
6710 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6711 detection for illegal references to private components or
6712 operations of a protected type in the body of the type.
6713
6714 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6715
6716 * opt.ads: Add missing GNAT markers in comments.
6717 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6718 settings of Optimize_Alignment at the end.
6719
6720 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6721
6722 * checks.adb (Apply_Constraint_Check): Do not apply
6723 a discriminant check when the associated type is a constrained
6724 subtype created for an unconstrained nominal type.
6725 * exp_attr.adb: Minor reformatting.
6726
6727 2017-05-02 Bob Duff <duff@adacore.com>
6728
6729 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6730 the N_Raise_Expression case.
6731 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6732 and add assertions.
6733
6734 2017-05-02 Yannick Moy <moy@adacore.com>
6735
6736 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6737 optimize length comparison in GNATprove mode.
6738 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6739 operator /= into negation of operator = when needed.
6740 (Expand_SPARK): Call new
6741 function to expand operator /=.
6742
6743 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6744
6745 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6746 Simplify the expression for a fixed-fixed division to remove
6747 divisions by constants whenever possible, as an optimization
6748 for restricted targets.
6749
6750 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6751
6752 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6753
6754 2017-05-02 Bob Duff <duff@adacore.com>
6755
6756 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6757 to find primitive ops, instead of using an Identifier that will
6758 later be looked up. This is necessary because these ops are not
6759 necessarily visible at all places where we need to call them.
6760 * exp_util.ads: Minor comment fix.
6761
6762 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6763
6764 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6765 references are fully conformant if they are both expansions
6766 of the discriminant of a protected type, within one of the
6767 protected operations. One occurrence may be expanded into a
6768 constant declaration while the other is an input parameter to
6769 the corresponding generated subprogram.
6770
6771 2017-05-02 Justin Squirek <squirek@adacore.com>
6772
6773 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6774 recursivly searching composite-types for null-excluding access
6775 types and verifying them.
6776 (Analyze_Object_Declaration): Add a
6777 call to Check_Null_Excluding_Components for static verification
6778 of non-initialized objects.
6779 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6780 a parameter for a composite-type's component and an extra case
6781 for printing component information.
6782
6783 2017-05-02 Yannick Moy <moy@adacore.com>
6784
6785 * sem_ch10.adb (Analyze_Subunit): Take
6786 configuration pragma into account when restoring appropriate
6787 pragma for analysis of subunit.
6788
6789 2017-05-02 Justin Squirek <squirek@adacore.com>
6790
6791 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6792 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6793 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6794 clauses from the runtime.
6795
6796 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6797
6798 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6799 array components specially.
6800
6801 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6802
6803 * sem_ch8.adb (Premature_Usage): If the premature usage of
6804 an entity is as the expression in its own object decaration,
6805 rewrite the reference as Any_Id to prevent cascaded errors or
6806 compiler loops when such an entity is used in an address clause.
6807
6808 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6809
6810 * gcc-interface/decl.c (components_to_record): Add missing guard.
6811
6812 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6813
6814 * gcc-interface/decl.c (components_to_record): Add more comments.
6815 Put back pending fields onto the regular list if the misalignment
6816 happens to cancel itself.
6817
6818 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6819
6820 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6821 controlling actual in a prefixed call, preserve the original node
6822 information if the prefix itself has been rewritten, for ASIS use.
6823
6824 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6825
6826 * exp_ch6.adb (Insert_Post_Call_Actions):
6827 Code clean up. Insert the post-call actions after an enclosing
6828 procedure call when N denotes a function call and appears as an
6829 actual parameter in the procedure call.
6830
6831 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6832
6833 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6834 for the component, also reject the attribute if the component
6835 doesn't end on a byte boundary and its scalar storage order is
6836 different from that of the enclosing record type.
6837
6838 2017-04-28 Javier Miranda <miranda@adacore.com>
6839
6840 * atree.ads (Info_Messages): Removed.
6841 (Warning_Info_Messages): New counter.
6842 (Report_Info_Messages): New counter.
6843 * err_vars.ads Update documentation.
6844 * errout.adb (Delete_Warning_And_Continuations): Update
6845 Info_Message occurrences.
6846 (Error_Msg_Internal): Update Info_Message occurrences.
6847 (Delete_Warning): Update Info_Message occurrences.
6848 (Write_Error_Summary): Update Info_Message occurrences.
6849 (Output_Messages): Update Info_Message occurrences.
6850 (To_Be_Removed): Update Info_Message occurrences.
6851 (Reset_Warnings): Update Info_Message occurrences.
6852 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6853 (Finalize): Update Info_Message occurrences.
6854 (Initialize): Update Info_Message occurrences.
6855 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6856 (Compilation_Errors): Update Info_Message_Occurences.
6857
6858 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6859
6860 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6861 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6862 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6863 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6864 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6865 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6866 Y_Size.
6867 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6868 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6869
6870 2017-04-28 Bob Duff <duff@adacore.com>
6871
6872 * sem_util.ads, sem_util.adb (Might_Raise): New function
6873 that replaces Is_Exception_Safe, but has the opposite
6874 sense. Is_Exception_Safe was missing various cases -- calls inside
6875 a pragma Debug, calls inside an 'if' or assignment statement,
6876 etc. Might_Raise now walks the entire subtree looking for things
6877 that can raise.
6878 * exp_ch9.adb (Is_Exception_Safe): Remove.
6879 (Build_Protected_Subprogram_Body): Replace call to
6880 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6881 constants where possible).
6882 * exp_ch7.adb: Rename Is_Protected_Body -->
6883 Is_Protected_Subp_Body. A protected_body is something different
6884 in the grammar.
6885
6886 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6887
6888 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6889 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6890 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6891 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6892 (P_Protected): Likewise.
6893 * sem_case.adb (Check_Duplicates):
6894 Add pragma Warnings on variable.
6895 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6896 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6897 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6898 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6899 (Analyze_Iterator_Specification): Initialize Bas variable.
6900 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6901 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6902 (Analyze_Accept_Statement): Initialize Task_Nam.
6903
6904 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6905
6906 * checks.adb (Install_Primitive_Elaboration_Check):
6907 Do not generate an elaboration check if all checks have been
6908 suppressed.
6909
6910 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6911
6912 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6913 Interrupt_Handler and Attach_Handler): Generate reference
6914 to protected operation to prevent spurious warnings about
6915 unreferenced entities. Previous scheme failed with style checks
6916 enabled.
6917
6918 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6919
6920 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6921 that follows an expression function must not be relocated to
6922 the generated body, because it applies to the code that follows.
6923
6924 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6925
6926 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6927 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6928 code that might violate the more stringent checking for 'Access
6929 introduced in Ada 2005.
6930
6931 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6932
6933 * a-cforse.adb: minor style fix in comment.
6934
6935 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6936
6937 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6938 initialize Block_Decls variable.
6939 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6940 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6941 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6942 Formal_DDT and Actual_DDT variables.
6943 (Expand_Interface_Thunk): Initialize Iface_Formal.
6944 (Make_DT): Initialize Size_Comp.
6945 (Make_Select_Specific_Data_Table): Initialize Decls.
6946 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6947 Also initialize more RPC_Receiver_* variables.
6948 (Build_To_Any_Function): Initialize Cstr_Formal.
6949 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6950
6951 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6952
6953 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6954 node between access types, freeze the designated type as well,
6955 so that dispatch table pointers are created in the proper scope,
6956 and not in the constructed body of the expression function.
6957
6958 2017-04-28 Bob Duff <duff@adacore.com>
6959
6960 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6961 value makes large compilations faster, but small compilations slower.
6962
6963 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6964
6965 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6966
6967 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6968
6969 * erroutc.adb (Compilation_Errors): Do not consider info messages
6970 as suitable warnings when warnings must be treated as errors.
6971 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6972 internally-generated packages when outputting completion
6973 information.
6974 * errout.adb (Output_Messages): Do not consider info messages as
6975 suitable warnings when warnings must be treated as errors.
6976 * errutil.adb (Finalize): Do not consider info messages as
6977 suitable warnings when warnings must be treated as errors.
6978
6979 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6980
6981 * warnsw.ads: Minor fix for incorrect wording in comment.
6982
6983 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6984
6985 * sem_res.adb (In_Instance_Code): New predicate in
6986 Valid_Conversion, to determine whether a type conversion appears
6987 as (or within) an actual for a formal object. Type conversions
6988 in instances are not rechecked in Valid_Conversion because
6989 visibility changes between generic location andi instance may
6990 lead to spurious errors, but conversions within an actual must be
6991 fully checked, and they are not fully resolved when pre-analyzing
6992 the actuals.
6993
6994 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6995
6996 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6997 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6998 of the relocated node will have mangled Parent pointers.
6999 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
7000 tables used in conjunction with entity and itype replication.
7001 (Visit_Entity): Rewrite the restriction on which entities
7002 require duplication. The restriction now includes all types.
7003
7004 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7005
7006 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
7007 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
7008 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
7009 cleanups.
7010
7011 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
7012
7013 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
7014 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
7015
7016 2017-04-28 Gary Dismukes <dismukes@adacore.com>
7017
7018 * exp_util.adb: Minor reformatting.
7019
7020 2017-04-28 Ed Schonberg <schonberg@adacore.com>
7021
7022 * sem_ch4.adb: Fix copy/pasto.
7023
7024 2017-04-27 Tristan Gingold <gingold@adacore.com>
7025
7026 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
7027 raise-gcc.c. Fix include search path for raise-gcc.c
7028
7029 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7030
7031 * fe.h (Warn_On_Questionable_Layout): Declare.
7032 * warnsw.ads (Warn_On_Record_Holes): Move down.
7033 (Warn_On_Questionable_Layout): New boolean variable.
7034 (Warning_Record): Add Warn_On_Questionable_Layout field.
7035 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
7036 (Restore_Warnings): Likewise.
7037 (Save_Warnings): Likewise.
7038 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
7039 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
7040 components_to_record.
7041 (gnu_field_to_gnat): New function.
7042 (warn_on_field_placement): Likewise.
7043 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
7044 parameters. Rename local variables and adjust recursive call.
7045 Rework final scan of the field list and implement warnings on the
7046 problematic placement of specific sorts of fields.
7047
7048 2017-04-27 Bob Duff <duff@adacore.com>
7049
7050 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
7051 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
7052 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
7053 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
7054 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
7055 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
7056 For efficiency, cache results of Is_Internal_File_Name and
7057 Is_Predefined_File_Name in the Units table. This avoids a lot
7058 of repeated text processing.
7059
7060 2017-04-27 Emmanuel Briot <briot@adacore.com>
7061
7062 * g-comlin.adb (Sort_Sections): remove useless test.
7063
7064 2017-04-27 Claire Dross <dross@adacore.com>
7065
7066 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
7067 allow the use of regular equality over elements in contracts.
7068 (Formal_Model): Ghost package containing model functions that are
7069 used in subprogram contracts.
7070 (Current_To_Last): Removed, model functions should be used instead.
7071 (First_To_Previous): Removed, model functions should be used instead.
7072 (Strict_Equal): Removed, model functions should be used instead.
7073 (No_Overlap): Removed, model functions should be used instead.
7074 (Equivalent_Keys): Functions over cursors are removed. They were
7075 awkward with explicit container parameters.
7076 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
7077 allow the use of regular equality over elements in contracts.
7078 (Formal_Model): Ghost package containing model functions that
7079 are used in subprogram contracts.
7080 (Current_To_Last): Removed, model functions should be used instead.
7081 (First_To_Previous): Removed, model functions should be used instead.
7082 (Strict_Equal): Removed, model functions should be used instead.
7083 (No_Overlap): Removed, model functions should be used instead.
7084
7085 2017-04-27 Yannick Moy <moy@adacore.com>
7086
7087 * gnat1drv.adb: Code cleanup.
7088
7089 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7090
7091 * exp_util.adb (Replace_Entity): The prefix of a 'Result
7092 attribute reference in a post- condition is the subprogram to
7093 which the condition applies. If the condition is inherited
7094 by a type extension, the prefix becomes a reference to the
7095 inherited operation, but there is no need to create a wrapper
7096 for this operation, because 'Result is expanded independently
7097 when elaborating the postconditions.
7098
7099 2017-04-27 Bob Duff <duff@adacore.com>
7100
7101 * sinput.adb: Minor code cleanup.
7102 * namet.adb (Append): Create faster versions of
7103 Append(String) and Append(Name_Id) by using slice assignment
7104 instead of loops.
7105 * sem_util.adb (In_Instance): Speed this up by removing
7106 unnecessary tests; Is_Generic_Instance is defined for all
7107 entities.
7108 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
7109 Remove unused function.
7110 * alloc.ads (Nodes_Initial): Use a much larger value, because
7111 the compiler was spending a lot of time copying the nodes table
7112 when it grows. This number was chosen in 1996, so is rather out
7113 of date with current memory sizes. Anyway, it's virtual memory.
7114 Get rid of Orig_Nodes_...; use Node_... instead.
7115 * atree.adb (Lock): Do not release the Nodes tables; it's a
7116 waste of time.
7117 Orig_Nodes_ ==> Nodes_
7118 * nlists.adb: Orig_Nodes_ ==> Nodes_
7119 * g-table.adb: Remove unused "with" clause.
7120 * g-table.ads, table.ads: Remove Big_Table_Type, which should
7121 not be used by clients.
7122 * g-dyntab.adb (Last_Allocated): New function
7123 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
7124
7125 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7126
7127 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
7128 check.
7129 (Subtypes_Statically_Match): Remove duplicate check.
7130 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
7131
7132 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7133
7134 * exp_aggr.adb (Replace_Type): Remove the special processing
7135 for selected components.
7136 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
7137 processing for attributes Fixed_Value and Integer_Value.
7138 * exp_util.adb (Side_Effect_Free): Merge the processing for
7139 qualified expressions, type conversions, and unchecked type
7140 conversions.
7141 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
7142 and Optional.
7143 * par-ch3.adb (P_Declarative_Items): Merge the processing for
7144 tokens function, not, overriding, and procedure.
7145 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
7146 for qualified expressions, type conversions, and unchecked
7147 type conversions.
7148 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
7149 processing for Ada 83 and instances.
7150 (Object_Access_Level): Merge the processing for indexed components
7151 and selected components.
7152 * uname.adb (Add_Node_Name): Merge the processing for stubs.
7153
7154 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7155
7156 * checks.adb (Install_Primitive_Elaboration_Check):
7157 Do not generate the check when restriction No_Elaboration_Code
7158 is in effect.
7159
7160 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7161
7162 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
7163 of Expand_Dispatching_Call. If the denoted subprogram has a
7164 class-wide precondition, this is the only precondition that
7165 applies to the call, rather that the class-wide preconditions
7166 that may apply to the body that is executed. (This is specified
7167 in AI12-0195).
7168
7169 2017-04-27 Yannick Moy <moy@adacore.com>
7170
7171 * gnat1drv.adb (Adjust_Global_Switches): Issue
7172 a warning in GNATprove mode if the runtime library does not
7173 support IEEE-754 floats.
7174
7175 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7176
7177 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
7178 is itself inherited it does not carry any contract information,
7179 so examine its parent operation which is its Alias.
7180
7181 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7182
7183 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
7184 prefix can be an object reference in which case Obj'Image (X)
7185 can only be interpreted as an indexing of the parameterless
7186 version of the attribute.
7187 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
7188 an indexing or a slice operation if the attribute does not require
7189 parameters. In Ada2012 'Image also belongs in this category,
7190 and A'Image (lo .. hi) is legal and must be parsed as a slice.
7191
7192 2017-04-27 Yannick Moy <moy@adacore.com>
7193
7194 * exp_ch4.adb: Minor reformatting.
7195 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
7196 disable the CodePeer and C generation modes. Similar to the
7197 opposite actions done in CodePeer mode.
7198
7199 2017-04-27 Yannick Moy <moy@adacore.com>
7200
7201 * sem_res.adb: Remove duplicate code.
7202 * sem_attr.adb: Delete duplicate code.
7203
7204 2017-04-27 Bob Duff <duff@adacore.com>
7205
7206 * g-dyntab.adb: Reduce the amount of copying in
7207 Release. No need to copy items past Last.
7208
7209 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7210
7211 * checks.adb Add with and use clauses for Sem_Disp.
7212 (Install_Primitive_Elaboration_Check): New routine.
7213 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
7214 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
7215 processing of 'Elaborated.
7216 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
7217 elaboration check.
7218
7219 2017-04-27 Bob Duff <duff@adacore.com>
7220
7221 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
7222 If the table grows and then shrinks back to empty, we won't necessarily
7223 point back to the empty array. Code cleanups.
7224 * sinput.ads: Add 'Base to Size clause to match the declared
7225 component subtypes.
7226
7227 2017-04-27 Claire Dross <dross@adacore.com>
7228
7229 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
7230 allow the use of regular equality over elements in contracts.
7231 (Formal_Model): Ghost package containing model functions that
7232 are used in subprogram contracts.
7233 (Current_To_Last): Removed, model functions should be used instead.
7234 (First_To_Previous): Removed, model functions should be used instead.
7235 (Strict_Equal): Removed, model functions should be used instead.
7236 (No_Overlap): Removed, model functions should be used instead.
7237 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
7238 Boolean generic parameter to disable contracts for equivalence
7239 between keys.
7240 (Witness): Create a witness of a key that is used for handling of
7241 equivalence between keys.
7242 (Has_Witness): Check whether a witness is contained in a map.
7243 (W_Get): Get the element associated to a witness.
7244 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
7245 directly.
7246 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
7247 Boolean generic parameter to disable contracts for equivalence
7248 between keys.
7249 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
7250 of equivalence on functional maps.
7251 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
7252 of equivalence on functional maps.
7253
7254 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7255
7256 * exp_ch9.adb (Expand_Entry_Barrier): Code
7257 cleanup. Do not perform the optimization which removes the
7258 declarations of the discriminant and component renamings when
7259 validity checks on operands and attributes are in effect.
7260
7261 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7262
7263 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7264 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7265 a-cfhama.ads, a-cofove.ads: Minor reformatting.
7266
7267 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7268
7269 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7270 pointer dereference.
7271 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7272 null pointer dereference.
7273
7274 2017-04-27 Bob Duff <duff@adacore.com>
7275
7276 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7277 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7278 Free renames Init, since they do the same thing.
7279 * g-table.ads: Default for Table_Low_Bound.
7280 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7281 Table_Increment.
7282
7283 2017-04-27 Bob Duff <duff@adacore.com>
7284
7285 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7286 can reallocate.
7287 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7288 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7289 Reorder code so that above assertions do not fail.
7290 * table.ads: Remove obsolete comment on Locked.
7291
7292 2017-04-27 Claire Dross <dross@adacore.com>
7293
7294 * a-cfdlli.ads: Code cleanup.
7295
7296 2017-04-27 Yannick Moy <moy@adacore.com>
7297
7298 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7299 when needed for proof. (Expand_SPARK): Call the new procedure.
7300 * exp_util.ads Fix typo.
7301
7302 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7303
7304 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7305 fixes.
7306
7307 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7308
7309 * sem_elab.adb Add new type Visited_Element
7310 and update the contents of table Elab_Visited. Various code clean up.
7311 (Check_Elab_Call): Determine whether a prior call to
7312 the same subprogram was already examined within the same context.
7313 (Check_Internal_Call_Continue): Register the subprogram being
7314 called as examined within a particular context. Do not suppress
7315 elaboration warnings.
7316
7317 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7318
7319 * xoscons.adb, osint.ads: Minor reformatting.
7320
7321 2017-04-27 Bob Duff <duff@adacore.com>
7322
7323 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7324 Table_Count_Type --> Table_Last_Type, because the name
7325 was confusing (a "count" usually starts at zero). Add
7326 functionality supported or needed by other tables packages
7327 (Move, Release_Threshold).
7328 * g-table.ads, g-table.adb: This is now just a thin wrapper
7329 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7330 or needed by other tables packages (Save, Restore).
7331 * table.ads, table.adb: This is now just a thin wrapper around
7332 * g-table.ads/g-table.adb.
7333 * namet.h, scos.h, uintp.h: These files are reaching into the
7334 private data of some instances of g-table, whose names changed,
7335 so the above change requires some adjustment here. It now uses
7336 public interfaces.
7337
7338 2017-04-27 Bob Duff <duff@adacore.com>
7339
7340 * namet.adb, namet.ads: Minor: remove unused procedures.
7341
7342 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7343
7344 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7345 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7346 Add pragma Warnings on Rtype variable in nested block. *
7347 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7348 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7349 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7350 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7351 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7352 (Build_Finalize_Statements): Initialize Bod_Stmts.
7353 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7354
7355 2017-04-27 Claire Dross <dross@adacore.com>
7356
7357 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7358 allow the use of regular equality over elements in contracts.
7359 (Formal_Model): Ghost package containing model functions that are
7360 used in subprogram contracts.
7361 (Current_To_Last): Removed, model
7362 functions should be used instead.
7363 (First_To_Previous): Removed, model functions should be used instead.
7364 (Strict_Equal): Removed, model functions should be used instead.
7365 (No_Overlap): Removed, model functions should be used instead.
7366 (Equivalent_Keys): Functions over cursors are removed. They were
7367 awkward with explicit container parameters.
7368 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7369 (proof only) procedure to help GNATprove when equivalence over
7370 keys is not equality.
7371
7372 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7373
7374 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7375 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7376 Minor reformatting and code cleanups.
7377
7378 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7379
7380 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7381 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7382 operation whose ancestor has classwide pre/postconditions. This
7383 is used both to check the legality of the inheritance in Ada
7384 and in SPARK, and to determine whether a wrapper is needed for
7385 an inherited operation.
7386 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7387 Improve placement of error message for inherited classwide
7388 conditions that become illegal on type derivation.
7389
7390 2017-04-27 Yannick Moy <moy@adacore.com>
7391
7392 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7393 SPARK_Mode from context on generic package.
7394 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7395 useless test.
7396
7397 2017-04-27 Claire Dross <dross@adacore.com>
7398
7399 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7400 overflows in computations.
7401 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7402 overflows in computations.
7403 (Insert): Rewrite precondition to avoid overflows in computations.
7404 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7405 overflows in computations.
7406 (Insert): Rewrite precondition to avoid overflows in computations.
7407
7408 2017-04-27 Steve Baird <baird@adacore.com>
7409
7410 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7411 flag when it is declared in order to avoid confusing CodePeer about
7412 the possibility of an uninitialized variable read.
7413
7414 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7415
7416 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7417 no dimensionality error if the subtype of the expression is
7418 identical to the nominal subtype in the declaration, even though
7419 the expression itself may have been constant-folded and lack a
7420 dimension vector.
7421 * sem_dim.ads: Add comments on setting of dimension vectors and
7422 its interaction with node rewritings and side-effect removal.
7423
7424 2017-04-27 Bob Duff <duff@adacore.com>
7425
7426 * debug.adb: Minor comment correction.
7427 * sem_dim.ads: Minor reformatting and typo fixes.
7428
7429 2017-04-27 Bob Duff <duff@adacore.com>
7430
7431 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7432 Last of the tables via function calls, rather than relying on layout
7433 of data structures.
7434
7435 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7436
7437 * exp_util.adb: No wrapper in GNATprove mode.
7438
7439 2017-04-27 Yannick Moy <moy@adacore.com>
7440
7441 * sem_res.adb (Resolve_Comparison_Op): Always
7442 evaluate comparisons between values of universal types.
7443
7444 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7445
7446 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7447 an elaboration counter nor a check when in GNATprove mode.
7448 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7449 elaboration counter when in GNATprove mode.
7450
7451 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7452
7453 * freeze.adb: copy-paste typo.
7454
7455 2017-04-27 Yannick Moy <moy@adacore.com>
7456
7457 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7458 Use correct test to detect call in GNATprove mode instead of
7459 compilation.
7460
7461 2017-04-27 Claire Dross <dross@adacore.com>
7462
7463 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7464 New property function expressing that the element of a
7465 sequence are contained in the union of two sequences.
7466 (Formal_Model.M_Elements_Included): New property function
7467 expressing that the element of a sequence are another sequence.
7468 (Generic_Sorting): Use new property functions to state that
7469 elements are preserved by Sort and Merge.
7470 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7471 allow the use of regular equality over elements in contracts.
7472 (Formal_Model): Ghost package containing model functions
7473 that are used in subprogram contracts. (Capacity):
7474 On unbounded containers, return the maximal capacity.
7475 (Current_To_Last): Removed, model functions should be used instead.
7476 (First_To_Previous): Removed, model functions should be used instead.
7477 (Append): Default parameter value replaced
7478 by new wrapper to allow more precise contracts.
7479 (Insert): Subprogram restored, it seems it was useful to users even if
7480 it is inefficient.
7481 (Delete): Subprogram restored, it seems it was useful to users even if
7482 it is inefficient.
7483 (Prepend): Subprogram restored, it seems it was useful to users even
7484 if it is inefficient.
7485 (Delete_First): Subprogram restored, it seems it
7486 was useful to users even if it is inefficient. (Delete_Last):
7487 Default parameter value replaced by new wrapper to allow more
7488 precise contracts.
7489 (Generic_Sorting.Merge): Subprogram restored.
7490 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7491 allow the use of regular equality over elements in contracts.
7492 (Formal_Model): Ghost package containing model functions
7493 that are used in subprogram contracts. (Capacity):
7494 On unbounded containers, return the maximal capacity.
7495 (Current_To_Last): Removed, model functions should be used
7496 instead.
7497 (First_To_Previous): Removed, model functions should be used instead.
7498 (Append): Default parameter value replaced
7499 by new wrapper to allow more precise contracts.
7500 (Insert): Subprogram restored, it seems it was useful to users even if
7501 it is inefficient.
7502 (Delete): Subprogram restored, it seems it was useful to users even if
7503 it is inefficient.
7504 (Prepend): Subprogram restored, it seems it was useful to users even
7505 if it is inefficient.
7506 (Delete_First): Subprogram restored, it seems it
7507 was useful to users even if it is inefficient. (Delete_Last):
7508 Default parameter value replaced by new wrapper to allow more
7509 precise contracts.
7510 (Generic_Sorting.Merge): Subprogram restored.
7511 (Vector): Do not reuse formal vectors, as it is no longer possible
7512 to supply them with an equality function over elements.
7513
7514 2017-04-27 Bob Duff <duff@adacore.com>
7515
7516 * g-dyntab.adb (Release): When allocating the new
7517 table, use the correct slice of the old table to initialize it.
7518
7519 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7520
7521 * einfo.ads: Minor fixes in comments.
7522
7523 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7524
7525 * sem_prag.adb: disable clones in SPARK_Mode.
7526
7527 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7528
7529 * sem_util.ads, contracts.adb: Minor reformatting.
7530
7531 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7532
7533 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7534 Build body of subprogram that has a class-wide condition that
7535 contains calls to other primitives.
7536 (Build_Class_Wide_Clone_Call); Build a call to the common
7537 class-wide clone of a subprogram with classwide conditions. The
7538 body of the subprogram becomes a wrapper for a call to the
7539 clone. The inherited operation becomes a similar wrapper to which
7540 modified conditions apply, and the call to the clone includes
7541 the proper conversion in a call the parent operation.
7542 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7543 subprogram that has a classwide condition that contains calls to
7544 other primitives, build an internal subprogram that is invoked
7545 through a type-specific wrapper for all inherited subprograms
7546 that may have a modified condition.
7547 * sem_prag.adb (Check_References): If subprogram has a classwide
7548 condition, create entity for corresponding clone, to be invoked
7549 through wrapper subprograns.
7550 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7551 message about placement if pragma isi internally generated.
7552 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7553 a classwide clone, build body of clone as copy of original body,
7554 and rewrite original body as a wrapper as a wrapper for a call to
7555 the clone, so that it incorporates the original pre/postconditions
7556 of the subprogram.
7557 * freeze.adb (Check_Inherited_Conditions): For an inherited
7558 subprogram that inherits a classwide condition, build spec and
7559 body of corresponding wrapper so that call to inherited operation
7560 gets the modified conditions.
7561 * contracts.adb (Analyze_Contracts): If analysis of classwide
7562 condition has created a clone for a primitive operation, analyze
7563 declaration of clone.
7564
7565 2017-04-27 Steve Baird <baird@adacore.com>
7566
7567 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7568 Add "Suppress => All_Checks" to avoid generating unnecessary
7569 checks.
7570
7571 2017-04-27 Yannick Moy <moy@adacore.com>
7572
7573 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7574 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7575 inlining body in GNATprove mode when switch -gnatdm used.
7576 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7577 in GNATprove mode when switch -gnatdm used.
7578
7579 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7580
7581 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7582 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7583 clauses, so that we keep an indication of the address clause
7584 before removing it from the tree.
7585
7586 2017-04-27 Yannick Moy <moy@adacore.com>
7587
7588 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7589 of expression being qualified, when not an object name, or else
7590 evaluate the underlying name.
7591
7592 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7593
7594 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7595
7596 2017-04-27 Justin Squirek <squirek@adacore.com>
7597
7598 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7599 Process_Component_List_For_Finalization as a local variable.
7600 (Process_Component_For_Finalize): Add an extra parameter to avoid
7601 global references.
7602 (Process_Component_List_For_Finalization): Correct calls to
7603 Process_Component_For_Finalize to take Num_Comps as a parameter.
7604
7605 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7606
7607 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7608 a use-visible entity is defined within a nested scope of an
7609 instance when giving priority to entities which were visible in
7610 the original generic.
7611 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7612
7613 2017-04-27 Tristan Gingold <gingold@adacore.com>
7614
7615 * raise-gcc.c: Don't use unwind.h while compiling
7616 for the frontend, but mimic host behavior.
7617
7618 2017-04-27 Javier Miranda <miranda@adacore.com>
7619
7620 * sem_ch3.adb (Build_Discriminated_Subtype):
7621 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7622
7623 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7624
7625 * sem_prag.adb (Analyze_Global_Item):
7626 Do not consider discriminants because they are not "entire
7627 objects". Remove the discriminant-related checks because they are
7628 obsolete.
7629 (Analyze_Input_Output): Do not consider discriminants
7630 because they are not "entire objects".
7631
7632 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7633
7634 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7635 perform check if the current scope does not come from source,
7636 as is the case for a rewritten task body, because check has
7637 been performed already, and may not be doable because of changed
7638 visibility.
7639
7640 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7641
7642 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7643 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7644 Minor reformatting.
7645
7646 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7647
7648 * sem_ch4.adb (Analyze_Call): If the return type of a function
7649 is incomplete in an context in which the full view is available,
7650 replace the type of the call by the full view, to prevent spurious
7651 type errors.
7652 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7653 abstract subprogram so that compiler does not reject a parameter
7654 of a primitive operation of a tagged type being frozen, when
7655 the untagged type of that parameter cannot be frozen.
7656
7657 2017-04-27 Bob Duff <duff@adacore.com>
7658
7659 * sem_attr.adb (Compute_Type_Key): Don't walk
7660 representation items for irrelevant types, which could be in a
7661 different source file.
7662
7663 2017-04-27 Steve Baird <baird@adacore.com>
7664
7665 * exp_attr.adb (Expand_N_Attribute_Reference):
7666 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7667 for CodePeer.
7668
7669 2017-04-27 Yannick Moy <moy@adacore.com>
7670
7671 * exp_unst.ads: Fix typos in comments.
7672
7673 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7674
7675 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7676 whose type has a defined static predicate.
7677
7678 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7679
7680 * exp_ch4.adb (Insert_Dereference_Action):
7681 Do not adjust the address of a controlled object when the
7682 associated access type is subject to pragma No_Heap_Finalization.
7683 Code reformatting.
7684
7685 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7686
7687 * gcc-interface/utils.c (gnat_type_for_size): Set
7688 TYPE_ARTIFICIAL on created types.
7689
7690 2017-04-27 Claire Dross <dross@adacore.com>
7691
7692 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7693 modifications in functional containers.
7694 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7695 to improve readablity. Subprograms are separated between basic
7696 operations, constructors and properties. Universally quantified
7697 formulas in contracts are factorized in independant functions
7698 with a name and a comment. Names of parameters are improved.
7699
7700 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7701
7702 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7703
7704 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7705
7706 * sem_res.adb (Resolve_Type_Conversion): Do not
7707 install a predicate check here since this is already done during
7708 the expansion phase. Verify whether the operand satisfies the
7709 static predicate (if any) of the target type.
7710 * sem_ch3.adb (Analyze_Object_Declaration): Do
7711 not install a predicate check if the object is initialized by
7712 means of a type conversion because the conversion is subjected
7713 to the same check.
7714
7715 2017-04-27 Tristan Gingold <gingold@adacore.com>
7716
7717 * raise.c (__gnat_builtin_longjmp): Remove.
7718 (__gnat_bracktrace):
7719 Add a dummy definition for the compiler (__gnat_eh_personality,
7720 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7721 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7722 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7723 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7724 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7725 and a-except-2005.adb.
7726 * raise-gcc.c: Allow build in compiler, compiled as a C++
7727 file.
7728 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7729 (db): Constify msg_format.
7730 (get_call_site_action_for): Don't use void arithmetic.
7731 * system.ads (Frontend_Exceptions): Set to False.
7732 (ZCX_By_Default): Set to True.
7733 (GCC_ZC_Support): Set to True.
7734 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7735 a-except.ad[sb].
7736 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7737 in gnat1 and gnatbind.
7738 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7739 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7740 * s-excmac.ads, s-excmac.adb: Copy of variants.
7741 * a-except.o: Adjust preequisites.
7742 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7743
7744 2017-04-27 Claire Dross <dross@adacore.com>
7745
7746 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7747 modifications in functional containers.
7748 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7749 to improve readablity. Subprograms are separated between basic
7750 operations, constructors and properties. Universally quantified
7751 formulas in contracts are factorized in independant functions
7752 with a name and a comment. Names of parameters are improved.
7753
7754 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7755
7756 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7757
7758 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7759
7760 * sem_res.adb (Resolve_Type_Conversion): Do not
7761 install a predicate check here since this is already done during
7762 the expansion phase. Verify whether the operand satisfies the
7763 static predicate (if any) of the target type.
7764 * sem_ch3.adb (Analyze_Object_Declaration): Do
7765 not install a predicate check if the object is initialized by
7766 means of a type conversion because the conversion is subjected
7767 to the same check.
7768
7769 2017-04-27 Tristan Gingold <gingold@adacore.com>
7770
7771 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7772 replaced by their variants).
7773
7774 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7775
7776 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7777 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7778 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7779
7780 2017-04-27 Tristan Gingold <gingold@adacore.com>
7781
7782 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7783 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7784 Ada95.
7785
7786 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7787
7788 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7789 the loop which detects potential enclosing transient scopes. The
7790 loop now terminates much earlier as transient scopes are bounded
7791 by packages and subprograms.
7792
7793 2017-04-27 Claire Dross <dross@adacore.com>
7794
7795 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7796 allow the use of regular equality over elements in contracts.
7797 (Cursor): Type is now public so that it can be used in
7798 model functions.
7799 (Formal_Model): Ghost package containing
7800 model functions that are used in subprogram contracts.
7801 (Current_To_Last): Removed, model functions should be used
7802 instead.
7803 (First_To_Previous): Removed, model functions should
7804 be used instead.
7805 (Strict_Equal): Removed, model functions
7806 should be used instead.
7807 (Append): Default parameter value
7808 replaced by new wrapper to allow more precise contracts.
7809 (Insert): Default parameter value replaced by new wrapper to
7810 allow more precise contracts.
7811 (Delete): Default parameter
7812 value replaced by new wrapper to allow more precise contracts.
7813 (Prepend): Default parameter value replaced by new wrapper to
7814 allow more precise contracts.
7815 (Delete_First): Default parameter
7816 value replaced by new wrapper to allow more precise contracts.
7817 (Delete_Last): Default parameter value replaced by new wrapper
7818 to allow more precise contracts.
7819
7820 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7821
7822 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7823 for object declarations.
7824 (Expand_SPARK_N_Object_Declaration): New routine.
7825 * sem_elab.adb (Check_A_Call): Include calls to the
7826 Default_Initial_Condition procedure of a type under the SPARK
7827 elaboration checks umbrella.
7828
7829 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7830
7831 * sem.adb (Analyze): Diagnose an illegal iterated component
7832 association.
7833 * sem_util.ads, sem_util.adb
7834 (Diagnose_Iterated_Component_Association): New routine.
7835
7836 2017-04-27 Bob Duff <duff@adacore.com>
7837
7838 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7839 getcwd fails.
7840 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7841 exception if getcwd failed.
7842
7843 2017-04-27 Yannick Moy <moy@adacore.com>
7844
7845 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7846 entities with special prefix.
7847
7848 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7849
7850 * debug.adb Change the documentation of switch -gnatd.s.
7851 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7852 to manage the secondary stack when an enclosing scope already
7853 performs this functionality (aka relaxed management). Switch
7854 -gnatd.s may be used to force strict management in which case
7855 the block will manage the secondary stack unconditionally. Add
7856 a guard to stop the traversal when encountering a package or a
7857 subprogram scope.
7858
7859 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7860
7861 * sem_res.adb (Resolve_Call): Refine further the handling of
7862 limited views of return types in function calls. If the function
7863 that returns a limited view appears in the current unit,
7864 we do not replace its type by the non-limited view because
7865 this transformation is performed int the back-end. However,
7866 the type of the call itself must be the non-limited view, to
7867 prevent spurious resolution errors.
7868
7869 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7870
7871 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7872 Removed, proposed implementation using generics for class-wide
7873 preconditions proved impractical.
7874 (Class_Wide_Clone): New attribute of subprogram. Designates
7875 subprogram created for primitive operations with class-wide
7876 pre/postconditions that contain calls to other primitives. The
7877 clone holds the body of the original primitive, but the
7878 pre/postonditions do not apply to it. The original body is
7879 rewritten as a wrapper for a call to the clone.
7880 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7881 the flag is set, no code for the corresponding pre/postconditions
7882 is inserted into its body.
7883
7884 2017-04-27 Bob Duff <duff@adacore.com>
7885
7886 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7887 Scalar_Storage_Order if -gnatI is given.
7888 * sem_prag.adb (Analyze_Pragma): Ignore
7889 Default_Scalar_Storage_Order if -gnatI is given.
7890
7891 2017-04-27 Claire Dross <dross@adacore.com>
7892
7893 * a-cofuba.ads (Add): Take as an additional input parameter
7894 the position where the element should be inserted.
7895 (Remove): New function that removes an element from the container.
7896 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7897 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7898 (Remove): New function that removes an element from a set.
7899 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7900 (Remove): New function that removes an element from a sequence.
7901 (Insert): New function that adds anywhere in a sequence.
7902
7903 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7904
7905 * checks.adb (Generate_Range_Check): Revert previous change.
7906
7907 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7908
7909 * sem_util.adb: Minor reformatting/rewording.
7910
7911 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7912
7913 * lib-xref.adb (Generate_Reference): The use
7914 of attribute 'Result is not considered a violation of pragma
7915 Unreferenced.
7916
7917 2017-04-27 Justin Squirek <squirek@adacore.com>
7918
7919 * cstand.adb (Create_Standard): Correctly set
7920 Directly_Designated_Type for Any_Access.
7921 * sem_type.adb (Covers): Minor grammar fixes.
7922
7923 2017-04-27 Bob Duff <duff@adacore.com>
7924
7925 * sem_attr.adb: Minor cleanup.
7926
7927 2017-04-27 Claire Dross <dross@adacore.com>
7928
7929 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7930 private child of Ada.Containers used to implement all functional
7931 containers.
7932 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7933 child of Ada.Containers. It provides functional indefinite unbounded
7934 maps which can be used as high level models for specification
7935 of data structures.
7936 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7937 child of Ada.Containers. It provides functional indefinite unbounded
7938 sets which can be used as high level models for specification
7939 of data structures.
7940 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7941 child of Ada.Containers. It provides functional indefinite unbounded
7942 vectors which can be used as high level models for specification
7943 of data structures.
7944 * Makefile.rtl: Add new packages.
7945 * impunit.adb: Add new packages.
7946
7947 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7948
7949 * sem_ch4.adb: Minor reformatting.
7950
7951 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7952
7953 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7954 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7955 point type actual that has user-defined arithmetic primitives,
7956 when there is a previous actual for a formal package that defines
7957 a fixed-point type with the parent user-defined operator.
7958
7959 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7960
7961 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7962 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7963 the component type allows range checks.
7964
7965 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7966
7967 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7968 corresponding declaration, because formal derived types are
7969 rewritten as private extensions.
7970
7971 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7972
7973 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7974 dimensions of operands if node has been analyzed already, because
7975 previous analysis and dimension checking will have removed the
7976 dimension information from the operands.
7977
7978 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7979
7980 * debug.adb: Document the use of switch -gnatd.s.
7981 * einfo.ads Update the documentation on attribute
7982 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7983 the uses of these attributes from certain entities.
7984 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7985 which determines whether the block should continue to manage
7986 the secondary stack.
7987 (Manages_Sec_Stack): New routine.
7988
7989 2017-04-27 Bob Duff <duff@adacore.com>
7990
7991 * atree.ads: Minor edit.
7992
7993 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7994
7995 * sinfo.ads: Update the section on Ghost mode. Add
7996 a section on SPARK mode. Update the placement of section on
7997 expression functions.
7998
7999 2017-04-27 Bob Duff <duff@adacore.com>
8000
8001 * sinput.adb (Get_Source_File_Index): Don't
8002 assert that S is in the right range in the case where this is
8003 a .dg file under construction.
8004
8005 2017-04-27 Yannick Moy <moy@adacore.com>
8006
8007 * sem_util.adb (Check_Result_And_Post_State):
8008 Handle more precisely each conjunct in expressions formed by
8009 and'ing sub-expressions.
8010
8011 2017-04-27 Gary Dismukes <dismukes@adacore.com>
8012
8013 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
8014
8015 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8016
8017 * gnat_rm.texi, gnat_ugn.texi,
8018 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
8019 doc/gnat_ugn/platform_specific_information.rst,
8020 doc/gnat_ugn/gnat_and_program_execution.rst,
8021 doc/gnat_ugn/gnat_utility_programs.rst,
8022 doc/gnat_ugn/the_gnat_compilation_model.rst,
8023 doc/gnat_rm/implementation_defined_attributes.rst,
8024 doc/gnat_rm/the_gnat_library.rst,
8025 doc/gnat_rm/implementation_defined_pragmas.rst,
8026 doc/gnat_rm/representation_clauses_and_pragmas.rst,
8027 doc/gnat_rm/implementation_of_specific_ada_features.rst,
8028 doc/gnat_rm/implementation_defined_aspects.rst,
8029 doc/gnat_rm/implementation_defined_characteristics.rst: Update
8030 documentation.
8031
8032 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8033
8034 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
8035 generating C code on complex case expressions.
8036
8037 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8038
8039 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
8040 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
8041 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
8042 Ada_2012 instead of Ada_2005 to be compatible with the above
8043 change.
8044 * bindgen.adb: Silence new warning on pragma Ada_95.
8045
8046 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8047
8048 * checks.adb (Generate_Range_Check): Revert part of previous change.
8049
8050 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8051
8052 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
8053 container indexing operation that appears as a an actual in a
8054 parameter association in a procedure call.
8055
8056 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
8057
8058 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
8059 Fix spelling mistakes.
8060
8061 2017-04-25 Bob Duff <duff@adacore.com>
8062
8063 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
8064 * sinput-p.adb: Use regular fat pointers, with bounds checking,
8065 for source buffers. Fix misc obscure bugs.
8066 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
8067 checking, for source buffers. Modify representation clause for
8068 Source_File_Record as appropriate. Move Source_File_Index_Table
8069 from spec to body, because it is not used outside the body.
8070 Move Set_Source_File_Index_Table into the private part, because
8071 it is used only in the body and in children. Use trickery to
8072 modify the dope in the generic instantiation case. It's ugly,
8073 but not as ugly as the previous method. Fix documentation.
8074 Remove obsolete code.
8075 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
8076 indexing in source buffers.
8077 * fmap.adb: Avoid conversions from one string type to another.
8078 Remove a use of global name buffer.
8079 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
8080 fixes.
8081
8082 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8083
8084 * exp_util.adb, exp_ch4.adb: Minor reformatting.
8085
8086 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8087
8088 * checks.adb: Code clean up in various routines.
8089 (Generate_Range_Check): Do not generate a range check when the
8090 expander is not active or when index/range checks are suppressed
8091 on the target type.
8092 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
8093 Remove variants that include a Supress parameter. These routines
8094 are never used, and were introduced before the current scope-based
8095 check suppression method.
8096
8097 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
8098
8099 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
8100 code and some subprogram calls that are now noop.
8101
8102 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8103
8104 * exp_ch4.adb (Expand_N_Case_Expression): Take
8105 Minimize_Expression_With_Actions into account when possible.
8106
8107 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8108
8109 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
8110 (Known_Null): Moved to Sem_Util.
8111 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
8112 (Known_Null): Moved to Sem_Util.
8113 * sem_util.adb Add new enumeration type Null_Status_Kind.
8114 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
8115 this routine is now carried out by Null_Status.
8116 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
8117 is now carried out by Null_Status.
8118 (Null_Status): New routine.
8119 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
8120 (Known_Null): Moved from Exp_Util.
8121
8122 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8123
8124 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
8125 error on the return type of an expression function that is a
8126 completion, if the type is derived from a generic formal type.
8127
8128 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8129
8130 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
8131 conversion are those of the target type.
8132
8133 2017-04-25 Bob Duff <duff@adacore.com>
8134
8135 * a-clrefi.adb: Minor cleanup.
8136
8137 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8138
8139 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
8140
8141 2017-04-25 Bob Duff <duff@adacore.com>
8142
8143 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
8144 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
8145 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
8146 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
8147 the Internal_Source buffer. This removes the incorrect call to "="
8148 the customer noticed.
8149 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
8150 eventually need to eliminate them altogether. Or else get rid
8151 of zero-origin addressing.
8152
8153 2017-04-25 Claire Dross <dross@adacore.com>
8154
8155 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
8156 function used in GNATprove to know if an expression contains
8157 non-dispatching calls on primitives of a tagged type.
8158
8159 2017-04-25 Bob Duff <duff@adacore.com>
8160
8161 * rtsfind.adb (Initialize): Initialize
8162 First_Implicit_With. Building the compiler with Normalize_Scalars
8163 and validity checking finds this being used as an uninitialized
8164 variable.
8165
8166 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8167
8168 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
8169 Add a warning about SPARK mode management. The routine now
8170 saves and restores both the mode and associated pragma.
8171 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
8172 SPARK mode management. The routine now saves and restores both
8173 the mode and associated pragma.
8174 (Analyze_Object_Contract):
8175 Add a warning about SPARK mode management. The routine
8176 now saves and restores both the mode and associated pragma.
8177 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
8178 management. The routine now saves and restores both the mode
8179 and associated pragma. (Analyze_Package_Contract): Add a warning
8180 about SPARK mode management. The routine now saves and restores
8181 both the mode and associated pragma.
8182 (Analyze_Task_Contract):
8183 Add a warning about SPARK mode management. The routine now saves
8184 and restores both the mode and associated pragma.
8185 * expander.adb (Expand): Change the way the Ghost mode is saved
8186 and restored.
8187 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
8188 saved and restored.
8189 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
8190 and restored.
8191 * exp_util.adb (Build_DIC_Procedure_Body):
8192 Change the way the Ghost mode is saved and restored.
8193 (Build_DIC_Procedure_Declaration): Change the way the Ghost
8194 mode is saved and restored.
8195 (Build_Invariant_Procedure_Body):
8196 Change the way the Ghost mode is saved and restored.
8197 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
8198 mode is saved and restored.
8199 (Make_Predicate_Call): Change the
8200 way the Ghost mode is saved and restored.
8201 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
8202 saved and restored.
8203 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8204 and its assignment.
8205 (Mark_And_Set_Ghost_Body): Remove parameter
8206 Mode and its assignment.
8207 (Mark_And_Set_Ghost_Completion):
8208 Remove parameter Mode and its assignment.
8209 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
8210 assignment.
8211 (Mark_And_Set_Ghost_Instantiation): Remove parameter
8212 Mode and its assignment.
8213 (Mark_And_Set_Ghost_Procedure_Call):
8214 Remove parameter Mode and its assignment.
8215 (Set_Ghost_Mode):
8216 Remove parameter Mode and its assignment.
8217 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8218 and update the comment on usage.
8219 (Mark_And_Set_Ghost_Body):
8220 Remove parameter Mode and update the comment on usage.
8221 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
8222 update the comment on usage.
8223 (Mark_And_Set_Ghost_Declaration):
8224 Remove parameter Mode and update the comment on usage.
8225 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
8226 update the comment on usage.
8227 (Mark_And_Set_Ghost_Procedure_Call):
8228 Remove parameter Mode and update the comment on usage.
8229 (Set_Ghost_Mode): Remove parameter Mode and update the comment
8230 on usage.
8231 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
8232 types.
8233 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
8234 of obsolete field SPARK_Mode_Pragma.
8235 (Load_Main_Source): Remove
8236 the assignment of obsolete field SPARK_Mode_Pragma.
8237 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
8238 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
8239 the assignment of obsolete field SPARK_Mode_Pragma.
8240 (Ensure_System_Dependency): Remove the assignment of obsolete
8241 field SPARK_Mode_Pragma.
8242 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
8243 mode management. Change the way Ghost and SPARK modes are saved
8244 and restored.
8245 * sem.adb (Analyze): Change the way the Ghost mode is saved
8246 and restored.
8247 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
8248 Ghost mode is saved and restored.
8249 (Process_Full_View): Change
8250 the way the Ghost mode is saved and restored.
8251 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
8252 mode is saved and restored.
8253 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
8254 mode is saved and restored.
8255 (Analyze_Subprogram_Body_Helper):
8256 Change the way the Ghost mode is saved and restored.
8257 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
8258 Ghost mode is saved and restored.
8259 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
8260 management. Save the SPARK mode-related data prior to any changes
8261 to the scope stack and contexts. The mode is then reinstalled
8262 before the subunit is analyzed in order to restore the original
8263 view of the subunit.
8264 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8265 warning on region management. Change the way the Ghost and
8266 SPARK modes are saved and restored.
8267 (Inline_Instance_Body):
8268 Add a warning about SPARK mode management. Code clean up.
8269 (Analyze_Subprogram_Instantiation): Update the warning on region
8270 management. Change the way the Ghost and SPARK modes are saved
8271 and restored.
8272 (Instantiate_Package_Body): Update the warning
8273 on region management. Change the way the Ghost and SPARK modes
8274 are saved and restored.
8275 (Instantiate_Subprogram_Body): Update
8276 the warning on region management. Change the way the Ghost and
8277 SPARK modes are saved and restored.
8278 (Set_Instance_Env): Add a
8279 warning about SPARK mode management. Change the way SPARK mode
8280 is saved and restored.
8281 * sem_ch13.adb (Build_Predicate_Functions):
8282 Change the way the Ghost mode is saved and restored.
8283 (Build_Predicate_Function_Declaration): Change the way the Ghost
8284 mode is saved and restored.
8285 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8286 mode management. Change the way SPARK mode is saved and restored.
8287 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8288 Change the way the Ghost mode is saved and restored.
8289 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8290 the Ghost mode is saved and restored.
8291 (Analyze_Pragma):
8292 Change the way the Ghost mode is saved and restored.
8293 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8294 Ghost mode is saved and restored.
8295 * sem_util.adb (Install_SPARK_Mode): New routine.
8296 (Restore_SPARK_Mode): New routine.
8297 (Save_SPARK_Mode_And_Set): Removed.
8298 (Set_SPARK_Mode): New routine.
8299 * sem_util.ads (Install_SPARK_Mode): New routine.
8300 (Restore_SPARK_Mode): New routine.
8301 (Save_SPARK_Mode_And_Set): Removed.
8302 (Set_SPARK_Mode): New routine.
8303
8304 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8305
8306 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8307 to determine whether a type is declared in a local package that
8308 has not yet been frozen.
8309 * freeze.adb (Freeze_Before): Use new predicate to determine
8310 whether a local package must be installed on the scope stack
8311 in order to evaluate in the proper scope actions generated by
8312 aspect specifications, such as Predicate
8313 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8314 using new predicate.
8315
8316 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8317
8318 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8319 comparisons between non- scalar expressions expressions because
8320 their values cannot be invalidated.
8321 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8322 comment on usage.
8323
8324 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8325
8326 * par_sco.adb: Minor reformatting.
8327
8328 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8329
8330 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8331 is a type from an unfrozen local package, install package to
8332 complete the analysis of delayed aspects of the type.
8333
8334 2017-04-25 Tristan Gingold <gingold@adacore.com>
8335
8336 * bingen.adb (System_Version_Control_Used): New variable.
8337 (Resolve_Binder_Options): Set the above variable.
8338 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8339 (Gen_Elab_Order): Emit blank line before.
8340
8341 2017-04-25 Justin Squirek <squirek@adacore.com>
8342
8343 * sem_cat.adb (Validate_RT_RAT_Component): Added
8344 an extra check to ignore incomplete types.
8345
8346 2017-04-25 Thomas Quinot <quinot@adacore.com>
8347
8348 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8349 bogus circuitry for the case where Name is Predicate.
8350
8351 2017-04-25 Thomas Quinot <quinot@adacore.com>
8352
8353 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8354 Create SCOs for Predicate aspects in disabled
8355 state initially, to be enabled later on by...
8356 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8357 SCO for predicate as enabled.
8358
8359 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8360
8361 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8362 pragmas Warnings Off / On.
8363 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8364 Warnings Off / On.
8365 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8366 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8367 consider comparisons between static expressions because their
8368 values cannot be invalidated.
8369 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8370 Warnings Off / On.
8371 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8372 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8373
8374 2017-04-25 Bob Duff <duff@adacore.com>
8375
8376 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8377 task bodies.
8378
8379 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8380
8381 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8382 typo fixes.
8383
8384 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8385
8386 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8387 On/Off to defend against a spurious warning in conditional
8388 compilation.
8389 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8390 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8391 defend against a spurious warning in conditional compilation.
8392 * output.adb Add a pair of pragma Warnings On/Off to defend
8393 against a spurious warning in conditional compilation.
8394 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8395 (Fold_General_Op): New routine.
8396 (Fold_Static_Real_Op): New routine.
8397 (Test_Comparison): New routine.
8398 * sem_eval.ads (Test_Comparison): New routine.
8399 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8400 (Warn_On_Constant_Valid_Condition): New routine.
8401 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8402 to detect a specific case.
8403 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8404 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8405 to defend against a spurious warning in conditional compilation.
8406 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8407 against a spurious warning in conditional compilation.
8408 * usage.adb Add a pair of pragma Warnings On/Off to defend
8409 against a spurious warning in conditional compilation.
8410
8411 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8412
8413 * sinfo.ads, sem_ch13.adb: Update comment.
8414
8415 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8416
8417 * sem_util.adb (Is_Post_State): A reference to a
8418 generic in out parameter is considered a change in the post-state
8419 of a subprogram.
8420
8421 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8422
8423 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8424 declaration of a subprogram instance within its wrapper package,
8425 skip over null statements that may result from the rewriting of
8426 ignored pragmas.
8427
8428 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8429
8430 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8431 If the type is an unchecked_union, replace the attribute with
8432 a Raise_Program_Error (rather than inserting such before the
8433 attribute reference) to handle properly the case where we are
8434 processing a component of a larger record, and we need to prevent
8435 further expansion for the unchecked union.
8436 (Expand_Attribute_Reference, case 'Write): If the type is
8437 an unchecked_union, check whether enclosing scope is a Write
8438 subprogram. Replace attribute with a Raise_Program_Error if the
8439 discriminants of the unchecked_union type have not default values
8440 because such a use is erroneous..
8441
8442 2017-04-25 Tristan Gingold <gingold@adacore.com>
8443
8444 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8445 Add relative_deadline to task record on edf profile.
8446 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8447 (Make_Task_Create_Call): Pass relative_deadline value.
8448 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8449 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8450 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8451 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8452 GNAT_Ravenscar_EDF (set scheduling policy).
8453 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8454 pragma.
8455 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8456 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8457 New names.
8458 (Pragma_Deadline_Floor): New pragma.
8459 * targparm.adb (Get_Target_Parameters): Recognize
8460 GNAT_Ravenscar_EDF profile.
8461
8462 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8463
8464 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8465
8466 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8467
8468 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8469 declaration to locate nearest ancestor, because derived
8470 type declarations for record types are rewritten as record
8471 declarations.
8472 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8473 properly derivations that are completions of private types.
8474 (Add_Predicates): If type is private, examine rep. items of full
8475 view, which may include inherited predicates.
8476 (Build_Predicate_Functions): Ditto.
8477
8478 2017-04-25 Javier Miranda <miranda@adacore.com>
8479
8480 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8481 to generate new entities for subtype declarations located in
8482 Expression_With_Action nodes.
8483
8484 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8485
8486 * sem_elab.adb (Check_A_Call): Remove
8487 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8488 need for Elaborate_All when SPARK elaboration checks are
8489 required. Update the checks for instances, variables, and calls
8490 to Default_Initial_Condition procedures.
8491
8492 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8493
8494 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8495 into a boolean aspect, in analogy with the Ada aspect No_Return.
8496
8497 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8498
8499 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8500
8501 2017-04-25 Bob Duff <duff@adacore.com>
8502
8503 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8504 Is_True_Constant for an array variable that is passed to a
8505 foreign function as an 'in' parameter.
8506 * debug.adb: Document -gnatd.q.
8507
8508 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8509
8510 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8511 is completion and return type is an access type do not freeze
8512 designated type: this will be done in the process of freezing
8513 the expression if needed.
8514 (Freeze_Expr_Types): Check whether type is complete before
8515 creating freeze node, to provide a better error message if
8516 reference is premature.
8517 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8518 functions created by type derivations.
8519
8520 2017-04-25 Pascal Obry <obry@adacore.com>
8521
8522 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8523
8524 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8525
8526 * sem_res.adb (Resolve_Type_Conversion):
8527 When resolving against any fixed type, set the type of the
8528 operand as universal real when the operand is a multiplication
8529 or a division where both operands are of any fixed type.
8530 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8531 placement of an error message by pointing to the operand of a
8532 type conversion rather than the conversion itself.
8533
8534 2017-04-25 Thomas Quinot <quinot@adacore.com>
8535
8536 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8537 Needs_Debug_Info when producing SCOs.
8538
8539 2017-04-25 Thomas Quinot <quinot@adacore.com>
8540
8541 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8542 Always pass a null finalization master for a library level named access
8543 type to which a pragme No_Heap_Finalization applies.
8544
8545 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8546
8547 PR ada/78845
8548
8549 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8550 set to A'First(2) and vice versa.
8551
8552 2017-04-25 Yannick Moy <moy@adacore.com>
8553
8554 * freeze.adb (Freeze_Record_Type): Remove obsolete
8555 rule on volatile tagged record restriction on SPARK code.
8556
8557 2017-04-25 Yannick Moy <moy@adacore.com>
8558
8559 * sem_prag.adb (minor) Fix SPARK RM reference.
8560
8561 2017-04-25 Yannick Moy <moy@adacore.com>
8562
8563 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8564 comment to reflect which entity is chosen as unique entity.
8565 (Unique_Entity): Return full view instead of private spec for
8566 protected type or task type. Fix possible incorrect access when
8567 called on entry.
8568
8569 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8570
8571 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8572 array types only instead of all packed array types.
8573
8574 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8575
8576 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8577 dimension system, verify that dimensions of both match.
8578 (Check_Conformance): Add error message in case of dimension
8579 mismatch.
8580 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8581 predicate.
8582
8583 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8584
8585 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8586 confusing.
8587
8588 2017-04-25 Yannick Moy <moy@adacore.com>
8589
8590 * sem_util.adb: Minor refactoring.
8591 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8592
8593 2017-04-25 Claire Dross <dross@adacore.com>
8594
8595 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8596 ultimate alias when accessing overridden operation. Indeed, if the
8597 overridden operation is itself inherited, it won't have any explicit
8598 contract.
8599
8600 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8601
8602 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8603 overlap if the two formals have different types, because formally
8604 the corresponding actuals cannot designate the same objects.
8605
8606 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8607
8608 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8609 dimensions are present from context, use them. b) If operand is
8610 a static constant rewritten as a literal, obtain the dimensions
8611 from the original declaration, otherwise use dimensions of type
8612 established from context.
8613
8614 2017-04-25 Yannick Moy <moy@adacore.com>
8615
8616 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8617 of array that is private.
8618
8619 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8620
8621 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8622 reformatting.
8623
8624 2017-04-25 Yannick Moy <moy@adacore.com>
8625
8626 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8627 on body.
8628
8629 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8630
8631 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8632 the check that recognizes a call to a private overridding and
8633 replaces the called subprogram with its alias.
8634
8635 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8636
8637 * exp_util.adb: Minor reformatting.
8638
8639 2017-04-25 Justin Squirek <squirek@adacore.com>
8640
8641 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8642 interface types as a partial view of a private type for the
8643 generation of invariant procedure bodies.
8644 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8645 Add a condition to get the Corresponding_Record_Type for
8646 concurrent types, add condition to return in the absence of a
8647 class in the pragma, remove call to Replace_Type_References,
8648 and add call to Replace_References.
8649 (Add_Interface_Invariatns),
8650 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8651 to including the working type T.
8652 (Add_Own_Invariants): Remove
8653 legacy condition for separate units, remove dispatching for ASIS
8654 and save a copy of the expression in the pragma expression.
8655 (Build_Invariant_Procedure_Body): Default initalize vars,
8656 remove return condition on interfaces, always use the
8657 private type for interfaces, and move the processing of types
8658 until after the processing of invariants for the full view.
8659 (Build_Invariant_Procedure_Declaration): Remove condition
8660 to return if an interface type is encountered and add
8661 condition to convert the formal parameter to its class-wide
8662 counterpart if Work_Typ is abstract.
8663 (Replace_Type): Add call to Remove_Controlling_Arguments.
8664 (Replace_Type_Ref): Remove class-wide dispatching for the current
8665 instance of the type.
8666 (Replace_Type_References): Remove parameter "Derived"
8667 (Remove_Controlling_Arguments): Created in order to removing
8668 the controlliong argument from calls to primitives in the case
8669 of the formal parameter being an class-wide abstract type.
8670 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8671 to the change made to Freeze_Type in exp_ch3. Add a condition
8672 to treat interface types as a partial view.
8673 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8674 to Build_Invariant_Procedure_Declaration to properly generate a
8675 "partial" invariant procedure when Typ is an interface.
8676
8677 2017-04-25 Bob Duff <duff@adacore.com>
8678
8679 * a-numeri.ads: Go back to using brackets encoding for the Greek
8680 letter pi.
8681
8682 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8683
8684 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8685 (10-15): if derived type T with progenitors is abstract,
8686 and primitive P of this type inherits non-trivial classwide
8687 preconditions from both a parent operation and from an interface
8688 operation, then the inherited operation is abstract if the parent
8689 operation is not null.
8690 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8691 with Covered_Interface_Op to yield the actual interface operation
8692 that is implemented by a given inherited operation.
8693
8694 2017-04-25 Javier Miranda <miranda@adacore.com>
8695
8696 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8697 and right operands after performing the validity checks. Required
8698 because validity checks may remove side effects from the operands.
8699
8700 2017-04-25 Javier Miranda <miranda@adacore.com>
8701
8702 * exp_attr.adb (Attribute_Unrestricted_Access):
8703 Do not disable implicit type conversion. Required to generate
8704 code that displaces the pointer to reference the secondary
8705 dispatch table.
8706
8707 2017-04-25 Pascal Obry <obry@adacore.com>
8708
8709 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8710 Required_Artifacts attribute.
8711
8712 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8713
8714 * sem_util.adb (Same_Value): String literals are compile-time
8715 values, and comparing them must use Expr_Value_S.
8716
8717 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8718
8719 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8720 dereference is introduced for the object, and the object is
8721 overloaded, do not check whether it is aliased, because it may
8722 include an implicit dereference.
8723 * sem_type.adb (Disambiguate): If two interpretations are access
8724 attribute types with the same designated type keep either of
8725 them and do not report an ambiguity. A true ambiguity will be
8726 reported elsewhere.
8727
8728 2017-04-25 Bob Duff <duff@adacore.com>
8729
8730 * a-numeri.ads: Change the encoding of Greek letter Pi from
8731 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8732 to indicate the encoding. We considered using a byte order mark
8733 (BOM), but that causes various trouble (misc software eats the
8734 BOM, if you have a patch with a BOM, then it's not at the start
8735 of the patch, so it's not a BOM, the BOM affects with-ing files,
8736 etc.).
8737 * scng.adb, s-wchcnv.adb: Minor.
8738
8739 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8740
8741 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8742 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8743
8744 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8745 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8746 Improve error message on operations that inherit non-conforming
8747 classwide preconditions from ancestor and progenitor.
8748 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8749 moved here from sem_ch3.
8750 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8751 check given in RM 6.1.1 (17) concerning renamings of overriding
8752 operations that inherits class-wide preconditions from ancestor
8753 or progenitor.
8754
8755 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8756
8757 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8758 (Build_Adjust_Statements): Code cleanup.
8759 (Build_Finalizer): Update the initialization of
8760 Exceptions_OK.
8761 (Build_Finalize_Statements): Code cleanup.
8762 (Build_Initialize_Statements): Code cleanup.
8763 (Make_Deep_Array_Body): Update the initialization of
8764 Exceptions_OK.
8765 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8766 (Process_Object_Declaration): Generate a null exception handler only
8767 when exceptions are allowed.
8768 (Process_Transients_In_Scope): Update the initialization of
8769 Exceptions_OK.
8770 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8771 routine.
8772 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8773 restrictions when the handler is internally generated and the
8774 mode is warnings.
8775
8776 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8777
8778 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8779 enforce legality rule on classwide preconditions inherited from
8780 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8781 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8782 subprogram need not be dispatching if it appears in a precondition
8783 for an abstract or null subprogram.
8784
8785 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8786
8787 * sem_ch10.adb: Minor typo fix.
8788
8789 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8790
8791 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8792
8793 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8794
8795 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8796 have a length which is a power of 2.
8797 (Is_Predefined_File_Name): Likewise. Adjust comment.
8798
8799 2017-04-25 Bob Duff <duff@adacore.com>
8800
8801 * exp_aggr.adb (Component_Count): Protect the
8802 arithmetic from attempting to convert a value >= 2**31 to Int,
8803 which would otherwise raise Constraint_Error.
8804
8805 2017-04-25 Bob Duff <duff@adacore.com>
8806
8807 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8808 first character of the policy name is not unique.
8809
8810 2017-04-25 Bob Duff <duff@adacore.com>
8811
8812 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8813 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8814 about this flag not being used. It was already used, and it is
8815 now used more.
8816
8817 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8818
8819 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8820 (Ignore_SPARK_Mode_Pragmas): New routine.
8821 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8822 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8823 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8824 related entities.
8825 (Ignore_SPARK_Mode_Pragmas): New routine
8826 along with pragma Inline.
8827 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8828 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8829 Ignore_SPARK_Mode_Pragmas_In_Instance.
8830 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8831 Save and restore the value of global flag
8832 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8833 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8834 the corresponding spec or the body must ignore all SPARK_Mode
8835 pragmas found within.
8836 (Analyze_Subprogram_Declaration): Mark
8837 the spec when it needs to ignore all SPARK_Mode pragmas found
8838 within to allow the body to infer this property in case it is
8839 instantiated or inlined later.
8840 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8841 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8842 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8843 when the corresponding spec also ignored all SPARK_Mode pragmas
8844 found within.
8845 (Analyze_Package_Declaration): Mark the spec when
8846 it needs to ignore all SPARK_Mode pragmas found within to allow
8847 the body to infer this property in case it is instantiated or
8848 inlined later.
8849 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8850 Save and restore the value of flag
8851 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8852 formal spec when it needs to ignore all SPARK_Mode
8853 pragmas found within to allow the body to infer this
8854 property in case it is instantiated or inlined later.
8855 (Analyze_Package_Instantiation): Save and restore the value
8856 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8857 the instance spec when it needs to ignore all SPARK_Mode
8858 pragmas found within to allow the body to infer this
8859 property in case it is instantiated or inlined later.
8860 (Analyze_Subprogram_Instantiation): Save and restore the value
8861 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8862 instance spec and anonymous package when they need to ignore
8863 all SPARK_Mode pragmas found within to allow the body to infer
8864 this property in case it is instantiated or inlined later.
8865 (Instantiate_Package_Body): Save and restore the value of global
8866 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8867 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8868 corresponding instance spec also ignored all SPARK_Mode pragmas
8869 found within.
8870 (Instantiate_Subprogram_Body): Save and restore the
8871 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8872 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8873 when the corresponding instance spec also ignored all SPARK_Mode
8874 pragmas found within.
8875 * sem_prag.adb (Analyze_Pragma): Update the reference to
8876 Ignore_Pragma_SPARK_Mode.
8877 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8878 all SPARK_Mode pragmas defined within yields mode "off".
8879
8880 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8881
8882 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8883
8884 2017-04-25 Bob Duff <duff@adacore.com>
8885
8886 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8887 All_Checks" to avoid generating unnecessary checks.
8888 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8889 All_Checks".
8890 * sem.ads: Fix comment.
8891 * expander.ads: Fix comment.
8892 * exp_atag.ads: Fix comment: "Index = 0" should be
8893 "Index >= 0".
8894
8895 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8896
8897 * s-taprop-linux.adb: Minor editorial fixes.
8898
8899 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8900
8901 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8902 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8903 variable and set it to True whenever the main hash table is
8904 populated. Short- circuit the Assoc function if it is false
8905 and add associated guards.
8906
8907 2017-04-25 Olivier Hainque <hainque@adacore.com>
8908
8909 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8910 specs without elaboration code that have an elaboration counter
8911 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8912 * sem_ch10.adb (Analyze_Compilation_Unit):
8913 Set_Elaboration_Entity_Required when requested to preserve
8914 control flow, to ensure the unit elaboration is materialized at
8915 bind time, resulting in the inclusion of the unit object file
8916 in the executable closure at link time.
8917
8918 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8919
8920 * exp_dbug.adb: In Debug_Renaming_Declaration,
8921 when dealing with indexed component, accept to produce a renaming
8922 symbol when the index is an IN parameter or when it is a name
8923 defined in an outer scope.
8924
8925 2017-04-25 Yannick Moy <moy@adacore.com>
8926
8927 * errout.adb (Error_Msg): Adapt continuation
8928 message in instantiations and inlined bodies for info messages.
8929
8930 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8931
8932 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8933 Use direct 4-character slice comparisons.
8934 (Has_Prefix): Add
8935 pragma Inline. (Has_Suffix): Delete.
8936 (Is_Internal_File_Name):
8937 Test Is_Predefined_File_Name first.
8938 (Is_Predefined_File_Name):
8939 Use direct slice comparisons as much as possible and limit all
8940 comparisons to at most 8 characters.
8941
8942 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8943
8944 * checks.adb (Insert_Valid_Check): Code cleanup.
8945 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8946 (Expand_Actuals): Generate proper copy-back for a validation
8947 variable when it acts as the argument of a type conversion.
8948 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8949 predicate to operate on type qualifications.
8950
8951 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8952
8953 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8954 Minor reformatting.
8955
8956 2017-04-25 Bob Duff <duff@adacore.com>
8957
8958 * sem_prag.adb (No_Return): Give an error if the pragma applies
8959 to a body. Specialize the error for the specless body case,
8960 as is done for (e.g.) pragma Convention.
8961 * debug.adb: Add switch -gnatd.J to disable the above legality
8962 checks. This is mainly for use in our test suite, to avoid
8963 rewriting a lot of illegal (but working) code. It might also
8964 be useful to customers. Under this switch, if a pragma No_Return
8965 applies to a body, and the procedure raises an exception (as it
8966 should), the pragma has no effect. If the procedure does return,
8967 execution is erroneous.
8968
8969 2017-04-25 Bob Duff <duff@adacore.com>
8970
8971 * exp_ch6.adb (Expand_Actuals): This is the
8972 root of the problem. It took N as an 'in out' parameter, and in
8973 some cases, rewrote N, but then set N to Original_Node(N). So
8974 the node returned in N had no Parent. The caller continued
8975 processing of this orphaned node. In some cases that caused a
8976 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8977 and trips over the Empty Parent). The solution is to make N an
8978 'in' parameter. Instead of rewriting it, return the list of
8979 post-call actions, so the caller can do the rewriting later,
8980 after N has been fully processed.
8981 (Expand_Call_Helper): Move most of Expand_Call here. It has
8982 too many premature 'return' statements, and we want to do the
8983 rewriting on return.
8984 (Insert_Post_Call_Actions): New procedure to insert the post-call
8985 actions in the appropriate place. In the problematic case,
8986 that involves rewriting N as an Expression_With_Actions.
8987 (Expand_Call): Call the new procedures Expand_Call_Helper and
8988 Insert_Post_Call_Actions.
8989
8990 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8991
8992 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8993 properly type derived from generic formal types, to handle
8994 properly modified version of ACATS 4.1B B611017.
8995
8996 2017-04-25 Javier Miranda <miranda@adacore.com>
8997
8998 * exp_unst.adb (Subp_Index): Adding missing
8999 support for renamings and functions that return a constrained
9000 array type (i.e. functions for which the frontend built a
9001 procedure with an extra out parameter).
9002
9003 2017-04-25 Pascal Obry <obry@adacore.com>
9004
9005 * s-string.adb: Minor code clean-up.
9006
9007 2017-04-25 Bob Duff <duff@adacore.com>
9008
9009 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
9010 procedure.
9011 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
9012 function for Non_Blocking_Wait_Process.
9013
9014 2017-04-25 Bob Duff <duff@adacore.com>
9015
9016 * prep.adb (Preprocess): Remove incorrect
9017 Assert. Current character can be ASCII.CR.
9018
9019 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9020
9021 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
9022 convention Stdcall, which has a number of exceptions. Convention
9023 is legal on a component declaration whose type is an anonymous
9024 access to subprogram.
9025
9026 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9027
9028 * sem_ch4.adb: sem_ch4.adb Various reformattings.
9029 (Try_One_Prefix_Interpretation): Use the base type when dealing
9030 with a subtype created for purposes of constraining a private
9031 type with discriminants.
9032
9033 2017-04-25 Javier Miranda <miranda@adacore.com>
9034
9035 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
9036 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
9037 dispatching primitives (Restore_Warnings): Restore warning on
9038 late dispatching primitives (Save_Warnings): Save warning on late
9039 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
9040 to enable/disable this warning.
9041 (WA_Warnings): Set warning on late dispatching primitives.
9042 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
9043 that its parent type has a private extension.
9044 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
9045 New subprogram.
9046 * usage.adb: Document -gnatw.j and -gnatw.J.
9047
9048 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9049
9050 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
9051 reformatting.
9052
9053 2017-04-25 Bob Duff <duff@adacore.com>
9054
9055 * binde.adb (Validate): Do not pass dynamic strings
9056 to pragma Assert, because older compilers do not support that.
9057
9058 2017-04-25 Bob Duff <duff@adacore.com>
9059
9060 * s-fileio.adb (Close): When a temp file is
9061 closed, delete it and clean up its Temp_File_Record immediately,
9062 rather than waiting until later.
9063 (Temp_File_Record): Add File
9064 component, so Close can know which Temp_File_Record corresponds
9065 to the file being closed.
9066 (Delete): Don't delete temp files,
9067 because they are deleted by Close.
9068 (Open): Set the File component
9069 of Temp_File_Record. This requires moving the creation of the
9070 Temp_File_Record to the end, after the AFCB has been created.
9071
9072 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9073
9074 * checks.adb (Insert_Valid_Check): Do not generate
9075 a validity check when inside a generic.
9076
9077 2017-04-25 Yannick Moy <moy@adacore.com>
9078
9079 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
9080
9081 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9082
9083 * snames.ads-tmpl (Snames): More names for detecting predefined
9084 potentially blocking subprograms.
9085
9086 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9087
9088 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
9089 concerning inheritance of class-wide preconditions do not apply
9090 to postconditions.
9091
9092 2017-04-25 Bob Duff <duff@adacore.com>
9093
9094 * s-ficobl.ads: Minor comment fix.
9095
9096 2017-04-25 Yannick Moy <moy@adacore.com>
9097
9098 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
9099 conversions from float to integer in GNATprove mode.
9100 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
9101 to call Apply_Type_Conversion_Checks, so that range checks
9102 are properly positioned when needed on conversions, including
9103 when converting from float to integer. (Determine_Range): In
9104 GNATprove mode, take into account the possibility of conversion
9105 from float to integer.
9106 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
9107 check on conversions from fixed-point to integer, not anymore
9108 on conversions from floating-point to integer, when in GNATprove
9109 mode.
9110
9111 2017-04-25 Yannick Moy <moy@adacore.com>
9112
9113 * checks.adb (Determine_Range_R): Special case type conversions
9114 from integer to float in order to get bounds in that case too.
9115 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
9116 mode, for computations involved in interval checking.
9117
9118 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9119
9120 * checks.adb (Insert_Valid_Check): Partially reimplement validity
9121 checks.
9122 * einfo.adb Node36 is now used as Validated_Object.
9123 (Validated_Object): New routine.
9124 (Set_Validated_Object): New routine.
9125 (Write_Field36_Name): Add an entry for Validated_Object.
9126 * einfo.ads Add new attribute Validated_Object along with
9127 usage in entities.
9128 (Validated_Object): New routine along with pragma Inline.
9129 (Set_Validated_Object): New routine along with pragma Inline.
9130 * exp_attr.adb (Make_Range_Test): Add processing for validation
9131 variables to avoid extra reads and copies of the prefix.
9132 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
9133 variables in order to reflect any changes done in the variable
9134 back into the original object.
9135 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
9136 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
9137
9138 2017-04-25 Steve Baird <baird@adacore.com>
9139
9140 * exp_ch7.adb (Build_Array_Deep_Procs,
9141 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
9142 generate Finalize_Address routines for CodePeer.
9143
9144 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9145
9146 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
9147 Analyze_Pre_Post_Condition, to implement the legality checks
9148 mandated by AI12-0131: Pre'Class shall not be specified for an
9149 overriding primitive subprogram of a tagged type T unless the
9150 Pre'Class aspect is specified for the corresponding primitive
9151 subprogram of some ancestor of T.
9152
9153 2017-04-25 Bob Duff <duff@adacore.com>
9154
9155 * sem_ch8.adb (Use_One_Type): If a use_type_clause
9156 is redundant, set its Used_Operations to empty. This is only
9157 necessary for use clauses that appear in the parent of a generic
9158 child unit, because those use clauses get reanalyzed when we
9159 instantiate the generic, and we don't want the Used_Operations
9160 carried over from the original context (where it was probably
9161 not redundant).
9162
9163 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9164
9165 * exp_ch6.adb: Minor reformatting.
9166
9167 2017-04-25 Bob Duff <duff@adacore.com>
9168
9169 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9170 Use Source_Index (Current_Sem_Unit) to find the correct casing.
9171 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
9172 (Current_Sem_Unit) to find the correct casing.
9173 * par.adb (Par): Null out Current_Source_File, to ensure that
9174 the above bugs won't rear their ugly heads again.
9175
9176 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9177
9178 * sem_ch8.adb (Find_Type): For an attribute reference
9179 'Class, if prefix type is synchronized and previous errors
9180 have suppressed the creation of the corresponding record type,
9181 create a spurious class-wide for the synchonized type itself,
9182 to catch other misuses of the attribute
9183
9184 2017-04-25 Steve Baird <baird@adacore.com>
9185
9186 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
9187 is True, then don't generate the accessibility check for the
9188 tag of a tagged result.
9189 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
9190 if CodePeer_Mode is True, then don't generate the
9191 tag checks for the result of call to an instance of
9192 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
9193 descendant of" check and the accessibility check).
9194
9195 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9196
9197 * sem_ch13.adb: Code cleanups.
9198 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
9199 * sem_ch8.ads: Minor comment fix.
9200
9201 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9202
9203 * exp_ch4.adb (Library_Level_Target): New function.
9204 (Expand_Concatenate): When optimization is enabled, also expand
9205 the operation out-of-line if the concatenation is present within
9206 the expression of the declaration of a library-level object and
9207 not only if it is the expression of the declaration.
9208
9209 2017-04-25 Bob Duff <duff@adacore.com>
9210
9211 * freeze.adb (Freeze_Object_Declaration): Do
9212 not Remove_Side_Effects if there is a pragma Linker_Section,
9213 because in that case we want static initialization in the
9214 appropriate section.
9215
9216 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9217
9218 * exp_dbug.adb: Minor rewording and reformatting.
9219
9220 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9221
9222 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
9223 handle the proposed changes to rules concerning potentially
9224 unevaluated expressions, to include selected components that
9225 do not depend on discriminants, and indexed components with
9226 static indices.
9227 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
9228 predicate in quantified expression, and fix bugs in the handling
9229 of case expressions and membership test.
9230 (Analyze_Attribute_Old_Result): use new predicate.
9231 (Analyze_Attribute, case Loop_Entry): ditto.
9232
9233 2017-04-25 Bob Duff <duff@adacore.com>
9234
9235 * s-secsta.adb (SS_Info): Add a comment
9236 explaining why we don't need to walk all the chunks in order to
9237 compute the total size.
9238
9239 2017-04-25 Bob Duff <duff@adacore.com>
9240
9241 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
9242 of the global name buffer to 4*Max_Line_Length.
9243
9244 2017-04-25 Javier Miranda <miranda@adacore.com>
9245
9246 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
9247 renaming entity for debug information, mark the entity as needing debug
9248 info if it comes from sources.
9249
9250 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9251
9252 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
9253 restriction converning the use of 'Address where the prefix is
9254 of a controlled type.
9255
9256 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
9257
9258 * exp_dbug.adb: In Debug_Renaming_Declaration,
9259 skip slices that are made redundant by an indexed component
9260 access.
9261 * atree.h: New definition for Original_Node.
9262
9263 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9264
9265 * sem_prag.adb, sem_prag.ads: Minor reformatting.
9266
9267 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9268
9269 * sem_ch3.adb (Check_Entry_Contract): Call
9270 Preanalyze_Spec_Expression so that resolution takes place as well.
9271 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9272 internal calls that appear in preconditions of protected
9273 operations, in default values for same, and in contract guards
9274 for contract cases in SPARK.
9275
9276 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9277
9278 * a-numaux.ads: Fix description of a-numaux-darwin
9279 and a-numaux-x86.
9280 (Double): Define to Long_Float.
9281 * a-numaux-vxworks.ads (Double): Likewise.
9282 * a-numaux-darwin.ads
9283 (Double): Likewise.
9284 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9285 * a-numaux-x86.ads: Fix package description.
9286 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9287 (Reduce): Adjust and complete description. Call Is_Nan instead of
9288 testing manually. Use an integer temporary to hold rounded value.
9289 * a-numaux-darwin.adb (Reduce): Likewise.
9290 (Is_Nan): New function.
9291
9292 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9293
9294 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9295 on analysis of prefix whose type is a current instance of a
9296 synchronized type, but where the prefix itself is an entity that
9297 is an object.
9298
9299 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9300
9301 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9302 the identity of callable entities therein, because they have been
9303 properly resolved, and prefixed calls may have been rewritten
9304 as normal calls.
9305
9306 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9307
9308 * exp_ch3.adb (Build_Init_Statements): Convert
9309 the expression of the pragma/aspect Secondary_Stack_Size to
9310 internal type System.Parameters.Size_Type before assigning
9311 it to the Secondary_Stack_Size component of the task type's
9312 corresponding record.
9313
9314 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9315
9316 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9317 (etc) optimizations when the type is modular and the offsets
9318 are equal.
9319
9320 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9321
9322 * s-osinte-freebsd.ads: Minor comment tweaks
9323
9324 2017-04-25 Javier Miranda <miranda@adacore.com>
9325
9326 * urealp.adb (UR_Write): Reverse previous patch
9327 adding documentation on why we generate multiplications instead
9328 of divisions (needed to avoid expressions whose computation with
9329 large numbers may cause division by 0).
9330
9331 2017-04-25 Bob Duff <duff@adacore.com>
9332
9333 * erroutc.adb (Set_Specific_Warning_Off,
9334 Set_Warnings_Mode_Off): Use the correct source file for
9335 Stop. Was using Current_Source_File, which is only valid during
9336 parsing. Current_Source_File will have a leftover value from
9337 whatever file happened to be parsed last, because of a with_clause
9338 or something.
9339
9340 2017-04-25 Bob Duff <duff@adacore.com>
9341
9342 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9343 to In_Predefined_Unit, but including GNAT units.
9344 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9345 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9346 because Should_Ignore_Pragma was not working reliably outside
9347 the parser, because Current_Source_File is not valid.
9348 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9349 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9350
9351 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9352
9353 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9354 codepeer mode.
9355
9356 2017-04-25 Javier Miranda <miranda@adacore.com>
9357
9358 * urealp.adb (UR_Write): Fix output of constants with a base other
9359 that 10.
9360
9361 2017-04-25 Justin Squirek <squirek@adacore.com>
9362
9363 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9364 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9365 Add extra parameter for Process_Interface_Name.
9366 (Process_Interface_Name): Add parameter for pragma to analyze
9367 corresponding aspect.
9368 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9369 from sem_ch13.adb
9370
9371 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9372
9373 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9374 correction.
9375
9376 2017-04-25 Yannick Moy <moy@adacore.com>
9377
9378 * sem_res.adb (Resolve_Comparison_Op): Do not
9379 attempt evaluation of relational operations inside assertions.
9380
9381 2017-04-25 Justin Squirek <squirek@adacore.com>
9382
9383 * exp_util.adb (Add_Interface_Invariants):
9384 Restored, code moved back from Build_Invariant_Procedure_Body.
9385 (Add_Parent_Invariants): Restored, code moved back from
9386 Build_Invariant_Procedure_Body.
9387 (Build_Invariant_Procedure_Body):
9388 Remove refactored calls and integrated code from
9389 Add_Parent_Invariants and Add_Interface_Invariants.
9390
9391 2017-04-25 Johannes Kanig <kanig@adacore.com>
9392
9393 * errout.adb (Output_Messages): Adjust computation of total
9394 errors
9395 * erroutc.adb (Error_Msg): In statistics counts, deal
9396 correctly with informational messages that are not warnings.
9397 * errutil.adb (Finalize): adjust computation of total errors.
9398
9399 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9400
9401 * terminals.c (__gnat_terminate_pid): New.
9402 * g-exptty.ads (Terminate_Process): New. Update comments.
9403
9404 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9405
9406 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9407
9408 2017-04-25 Justin Squirek <squirek@adacore.com>
9409
9410 * sem_ch3.adb (Analyze_Declarations): Minor
9411 correction to comments, move out large conditional and scope
9412 traversal into a predicate.
9413 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9414 logic.
9415
9416 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9417
9418 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9419 of prefix whose type is a current instance of a synchronized
9420 type. If the prefix is an object this is an external call (or
9421 requeue) that can only access public operations of the object. The
9422 previous predicate was too restrictive, and did not allow public
9423 protected operations, only task entries.
9424
9425 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9426
9427 * sem_ch5.adb, fname.adb: Minor reformatting.
9428
9429 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9430
9431 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9432 * einfo.ads Update the placement of
9433 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9434 mention the ekind.
9435 (Is_Anonymous_Access_Type): New routine.
9436 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9437 master for an access type subject to pragma No_Heap_Finalization.
9438 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9439 allocated or deallocated does not finalization actions if the
9440 associated access type is subject to pragma No_Heap_Finalization.
9441 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9442 * par-prag.adb Pragma No_Heap_Finalization does not need special
9443 processing from the parser.
9444 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9445 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9446 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9447 No_Heap_Finalization.
9448 (Analyze_Pragma): Add processing for
9449 pragma No_Heap_Finalization. Update various error messages to
9450 use Duplication_Error.
9451 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9452 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9453 and corresponding pragma id.
9454
9455 2017-04-25 Bob Duff <duff@adacore.com>
9456
9457 * freeze.adb (Freeze_Record_Type): Use the
9458 underlying type of the component type to determine whether it's
9459 elementary. For representation clause purposes, a private type
9460 should behave the same as its full type.
9461 * fname.ads, fname.adb (Is_Predefined_File_Name):
9462 Make sure things like "system.ali" are recognized as predefined.
9463
9464 2017-04-25 Javier Miranda <miranda@adacore.com>
9465
9466 * debug.adb: Update documentation of -gnatd.6.
9467
9468 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9469
9470 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9471 element iterator when the name is an overloaded function call,
9472 one of whose interpretations yields an array.
9473
9474 2017-04-25 Bob Duff <duff@adacore.com>
9475
9476 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9477 Is_Internal_Unit_Name): New functions for operating on unit
9478 names, as opposed to file names. There's some duplicated code
9479 with fname.adb, which is unfortunate, but it seems like we don't
9480 want to add dependencies here.
9481 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9482 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9483 is not a file name at all.
9484 * fname.ads, fname.adb: Document the fact that
9485 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9486 for ALI files, and fix the code so it works properly for ALI
9487 files. E.g. these should return True for "system.ali".
9488
9489 2017-04-25 Justin Squirek <squirek@adacore.com>
9490
9491 * exp_util.adb (Add_Invariant): Removed,
9492 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9493 and Add_Own_Invariant. (Add_Invariant_Check): Used
9494 for adding runtime checks from any kind of invariant.
9495 (Add_Inherited_Invariant): Generates invariant checks for
9496 class-wide invariants (Add_Interface_Invariants): Removed, code
9497 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9498 Create a types own invariant procedure (Add_Parent_Invariants):
9499 Removed, code moved to Build_Invariant_Procedure_Body
9500 (Build_Invariant_Procedure_Body): Add refactored calls
9501 and integrated code from Add_Parent_Invariants and
9502 Add_Interface_Invariants.
9503 (Process_Type): Removed, the
9504 relavant code was inlined into both Add_Own_Invariant and
9505 Add_Inherited_Invariant.
9506
9507 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9508
9509 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9510 scn.adb, osint.adb, fname.adb: Minor reformatting.
9511
9512 2017-04-25 Pascal Obry <obry@adacore.com>
9513
9514 * s-taprop-mingw.adb: Do not check for CloseHandle in
9515 Finalize_TCB.
9516
9517 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9518
9519 * sem_util.adb (Check_Part_Of_Reference):
9520 Continue to examine the context if the reference appears within
9521 an expression function.
9522
9523 2017-04-25 Justin Squirek <squirek@adacore.com>
9524
9525 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9526 and Build_Invariant_Procedure_Declaration.
9527 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9528 and Build_Invariant_Procedure_Declaration from exp_ch7
9529 and break-out Is_Untagged_Private_Derivation from
9530 Build_Invariant_Procedure_Body.
9531 (Replace_Type_References):
9532 Append an extra parameter to allow for dispatching replacements
9533 and add the corrasponding logic.
9534 (Type_Invariant): Remove
9535 Replace_Typ_Refs and replace its references with calls to
9536 Replace_Type_References.
9537 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9538
9539 2017-04-25 Bob Duff <duff@adacore.com>
9540
9541 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9542 that returns True when appropriate.
9543 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9544 when compiling predefined files.
9545 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9546 "gnat.adc" should not be considered a predefined file name.
9547 That required (or at least encouraged) a lot of cleanup of global
9548 variable usage. We shouldn't be communicating information via
9549 the global name buffer.
9550 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9551 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9552 required by the above-mentioned cleanup.
9553
9554 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9555
9556 * osint.adb (Find_File): Handle properly a request for a
9557 configuration file whose name is a directory.
9558
9559 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9560
9561 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9562
9563 2017-04-25 Bob Duff <duff@adacore.com>
9564
9565 * types.ads: Minor: Fix '???' comment.
9566 * sem_ch8.adb: Minor comment fix.
9567
9568 2017-04-25 Bob Duff <duff@adacore.com>
9569
9570 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9571 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9572 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9573 Add String_To_Name with no side effects.
9574
9575 2017-04-25 Justin Squirek <squirek@adacore.com>
9576
9577 * sem_ch3.adb (Analyze_Declarations): Add
9578 additional condition for edge case.
9579
9580 2017-04-25 Bob Duff <duff@adacore.com>
9581
9582 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9583 reserved words inside pragmas. This is necessary to allow the
9584 pragma name Interface to be used in pragma Ignore_Pragma.
9585 * par.adb: Minor comment fix.
9586
9587 2017-04-25 Javier Miranda <miranda@adacore.com>
9588
9589 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9590 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9591 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9592 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9593 occurrences of RE_Type_Is_Abstract
9594
9595 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9596
9597 * exp_util.adb (Build_Chain): Account for ancestor
9598 subtypes while traversing the derivation chain.
9599
9600 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9601
9602 * sem_attr.adb: minor reformatting.
9603
9604 2017-04-25 Doug Rupp <rupp@adacore.com>
9605
9606 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9607
9608 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9609
9610 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9611 the first pass over an assignment statement with target names,
9612 to prevent the generation of subtypes (such as discriminated
9613 record components)that may carry the target name outside of the
9614 tree for the assignment. The subtypes will be generated when
9615 the assignment is reanalyzed in full.
9616 (Analyze_Target_Name): Handle properly class-wide types.
9617
9618 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9619
9620 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9621 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9622 the purposes of freezing.
9623 * exp_util.adb Update the documentation and structure of the
9624 type map used in class-wide semantics of assertion expressions.
9625 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9626 and resolve the triaged expression because all substitutions
9627 refer to the proper entities. Update the replacement of
9628 references.
9629 (Build_DIC_Procedure_Body): Add formal parameter
9630 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9631 are now only processed when freezing occurs. Build a body only
9632 when one is needed.
9633 (Entity_Hash): Removed.
9634 (Map_Types): New routine.
9635 (Replace_Object_And_Primitive_References): Removed.
9636 (Replace_References): New routine.
9637 (Replace_Type_References): Moved to the library level of Exp_Util.
9638 (Type_Map_Hash): New routine.
9639 (Update_Primitives_Mapping): Update the mapping call.
9640 (Update_Primitives_Mapping_Of_Types): Removed.
9641 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9642 parameter For_Freeze and update the comment on usage.
9643 (Map_Types): New routine.
9644 (Replace_References): New routine.
9645 (Replace_Type_References): Moved to the library level of Exp_Util.
9646 (Update_Primitives_Mapping_Of_Types): Removed.
9647 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9648 properties of the private type to the full view in case the full
9649 view derives from a parent type and inherits a DIC pragma.
9650 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9651 DIC pragma is placed at the top of a declarative region.
9652
9653 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9654
9655 * a-tasatt.adb: Complete previous change and use an unsigned
9656 int to avoid overflow checks.
9657
9658 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9659
9660 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9661 the error message when the attribute reference is an actual in
9662 a call to a subprogram inherited from a generic formal type with
9663 unknown discriminants, which makes the subprogram and its formal
9664 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9665
9666 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9667
9668 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9669 sem_prag.adb: Minor reformatting.
9670
9671 2017-04-25 Bob Duff <duff@adacore.com>
9672
9673 * sem_attr.adb (Type_Key): Add code in the
9674 recursive Compute_Type_Key to protect against fetching the source
9675 code for Standard, in case a component of the type is declared
9676 in Standard. There was already code to do this for the original
9677 type, but not for its components.
9678
9679 2017-04-25 Javier Miranda <miranda@adacore.com>
9680
9681 * exp_ch3.adb (Build_Initialization_Call): Handle
9682 subtypes of private types when searching for the underlying full
9683 view of a private type.
9684
9685 2017-04-25 Javier Miranda <miranda@adacore.com>
9686
9687 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9688 real conditional expression can appear in a fixed-type context
9689 and must be resolved with that context to facilitate the code
9690 generation to the backend.
9691
9692 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9693
9694 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9695 to indicate whether during inline processing, when some unit U1
9696 appears in the context of a unit U2 compiled for instantiation
9697 or inlining purposes, the body of U1 needs to be compiled as well.
9698 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9699 context is a package declaration.
9700 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9701 Analyze_Generic_Package_Declaration): ditto.
9702 * inline.adb (Analyze_Inlined_Bodies): Check
9703 Body_Needed_For_Inlining.
9704
9705 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9706
9707 * par.adb (Current_Assign_Node): Global variable use to record
9708 the presence of a target_name in the right hand side of the
9709 assignment being parsed.
9710 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9711 enclosing assignment node accordingly.
9712 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9713 appropriately.
9714 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9715 analyzing RHS if the statement has target_names.
9716 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9717 properly choices that are subtype marks.
9718 * exp_ch5.adb: Code cleanup.
9719
9720 2017-04-25 Bob Duff <duff@adacore.com>
9721
9722 * s-memory.adb: Add a comment regarding efficiency.
9723 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9724 "the source has an extension if and only if the destination does."
9725 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9726
9727 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9728
9729 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9730 conversion.
9731
9732 2017-04-25 Doug Rupp <rupp@adacore.com>
9733
9734 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9735 handling for ppc64-vx7.
9736 * sigtramp-vxworks-target.inc
9737 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9738
9739 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9740
9741 * ada_get_targ.adb: New file.
9742
9743 2017-04-25 Bob Duff <duff@adacore.com>
9744
9745 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9746 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9747 (UI_GCD): Remove ??? comment involving possible efficiency
9748 improvements. This just isn't important after all these years.
9749 Also minor cleanup.
9750 * uintp.ads: Minor cleanup.
9751
9752 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9753
9754 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9755 Revert previous changes.
9756 * scng.adb: Minor reformatting.
9757 * s-stratt.ads: Fix unbalanced parens in comment.
9758
9759 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9760
9761 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9762 Minor reformatting.
9763
9764 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9765
9766 * scng.adb (Scan): Handle '@' appropriately.
9767 * sem_ch5.adb: Code cleanup.
9768
9769 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9770
9771 * freeze.adb (Check_Expression_Function): Do not check for the
9772 use of deferred constants if the freezing of the expression
9773 function is triggered by its generated body, rather than a
9774 premature use.
9775
9776 2017-04-25 Javier Miranda <miranda@adacore.com>
9777
9778 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9779 subtypes of private types when performing the view conversion.
9780
9781 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9782
9783 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9784 the purposes of freezing.
9785 * exp_util.adb Update the documentation and structure of the
9786 type map used in class-wide semantics of assertion expressions.
9787 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9788 and resolve the triaged expression because all substitutions
9789 refer to the proper entities. Update the replacement of
9790 references.
9791 (Build_DIC_Procedure_Body): Add formal parameter
9792 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9793 are now only processed when freezing occurs. Build a body only
9794 when one is needed.
9795 (Entity_Hash): Removed.
9796 (Map_Types): New routine.
9797 (Replace_Object_And_Primitive_References): Removed.
9798 (Replace_References): New routine.
9799 (Replace_Type_References): Moved to the library level of Exp_Util.
9800 (Type_Map_Hash): New routine.
9801 (Update_Primitives_Mapping): Update the mapping call.
9802 (Update_Primitives_Mapping_Of_Types): Removed.
9803 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9804 parameter For_Freeze and update the comment on usage.
9805 (Map_Types): New routine.
9806 (Replace_References): New routine.
9807 (Replace_Type_References): Moved to the library level of Exp_Util.
9808 (Update_Primitives_Mapping_Of_Types): Removed.
9809 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9810 properties of the private type to the full view in case the full
9811 view derives from a parent type and inherits a DIC pragma.
9812 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9813 DIC pragma is placed at the top of a declarative region.
9814
9815 2017-04-25 Tristan Gingold <gingold@adacore.com>
9816
9817 * s-mmap.ads (Data): Add pragma Inline.
9818
9819 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9820
9821 * checks.adb (Insert_Valid_Check): Do not use
9822 a renaming to alias a volatile name because this will lead to
9823 multiple evaluations of the volatile name. Use a constant to
9824 capture the value instead.
9825
9826 2017-04-25 Doug Rupp <rupp@adacore.com>
9827
9828 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9829
9830 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9831
9832 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9833 Add out parameter to indicate to caller that a wrapper must
9834 be constructed for an inherited primitive whose inherited
9835 pre/postcondition has called to overridden primitives.
9836 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9837 for inherited primitive that requires it.
9838 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9839 legal primitive operations and belong to the list of bodies
9840 generated after the freeze point of a type.
9841 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9842 of Build_Class_Wide_Expression.
9843 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9844 to construct the specification of the wrapper subprogram created
9845 for an inherited operation.
9846
9847 2017-04-25 Bob Duff <duff@adacore.com>
9848
9849 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9850 pthread_mutexattr_setprioceiling): Add new interfaces for these
9851 pthread operations.
9852 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9853 protocols as appropriate for Locking_Policy 'C' and 'I'.
9854 * s-taprop-posix.adb: Minor reformatting to make it more similar
9855 to s-taprop-linux.adb.
9856
9857 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9858
9859 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9860 Handle properly a multi- level derivation involving both renamed
9861 and constrained parent discriminants, when the type to be
9862 constrained has fewer discriminants that the ultimate ancestor.
9863
9864 2017-04-25 Bob Duff <duff@adacore.com>
9865
9866 * sem_util.adb (Is_Object_Reference): In the
9867 case of N_Explicit_Dereference, return False if it came from a
9868 conditional expression.
9869
9870 2017-04-25 Bob Duff <duff@adacore.com>
9871
9872 * par-ch4.adb (P_Case_Expression): If a semicolon
9873 is followed by "when", assume that ";" was meant to be ",".
9874
9875 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9876
9877 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9878 fixes.
9879
9880 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9881
9882 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9883 loading of an entity.
9884 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9885 previously repeated in the analysis.
9886 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9887 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9888 use new procedure SPARK_Implicit_Load.
9889 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9890 SPARK_Implicit_Load.
9891
9892 2017-04-25 Javier Miranda <miranda@adacore.com>
9893
9894 * sem_util.adb (New_Copy_Tree): By default
9895 copying of defining identifiers is prohibited because
9896 this would introduce an entirely new entity into the
9897 tree. This patch introduces an exception to this general
9898 rule: the declaration of constants and variables located in
9899 Expression_With_Action nodes.
9900 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9901 (In_Map): New subprogram.
9902 (Visit_Entity): New subprogram.
9903 (Visit_Node): Handle EWA_Level,
9904 EWA_Inner_Scope_Level, and take care of defining entities defined
9905 in Expression_With_Action nodes.
9906
9907 2017-04-25 Thomas Quinot <quinot@adacore.com>
9908
9909 * exp_ch6.adb: minor comment edit.
9910 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9911 procedure specifications that come from source.
9912 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9913 Null_Statement attribute.
9914 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9915 procedure, generate statement SCO for the generated NULL statement.
9916 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9917 parser, if available.
9918
9919 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9920
9921 * system-linux-s390.ads: Use Long_Integer'Size to define
9922 Memory_Size.
9923
9924 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9925
9926 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9927
9928 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9929
9930 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9931 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9932 * gnat_ugn.texi: Fix typo.
9933 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9934 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9935 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9936 * sem_util.adb (Mark_Coextensions): Likewise.
9937 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9938
9939 2017-03-28 Andreas Schwab <schwab@suse.de>
9940
9941 PR ada/80117
9942 * system-linux-aarch64-ilp32.ads: New file.
9943 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9944 from LIBGNAT_TARGET_PAIRS.
9945 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9946 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9947 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9948 or -mabi=ilp32, resp.
9949
9950 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9951
9952 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9953
9954 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9955
9956 PR ada/79903
9957 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9958
9959 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9960
9961 PR ada/79945
9962 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9963
9964 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9965 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9966 * system-linux-armeb.ads: Delete.
9967 * system-linux-mipsel.ads: Likewise.
9968 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9969 (ARM/Linux): Likewise.
9970
9971 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9972
9973 PR c/79677
9974 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9975 handle_generated_option GENERATED_P.
9976
9977 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9978
9979 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9980 around a justified modular type if it doesn't have the same scalar
9981 storage order as the enclosing record type.
9982
9983 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9984
9985 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9986 of boolean rvalues to function calls.
9987
9988 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9989
9990 * gcc-interface/utils.c (fold_bit_position): New function.
9991 (rest_of_record_type_compilation): Call it instead of bit_position to
9992 compute the field position and remove the call to remove_conversions.
9993 (compute_related_constant): Factor out the multiplication in both
9994 operands, if any, and streamline the final test.
9995
9996 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9997
9998 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9999
10000 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10001
10002 * gcc-interface/decl.c: Include demangle.h.
10003 (is_cplusplus_method): Return again true for a primitive operation
10004 only if it is dispatching. For a subprogram with an interface name,
10005 call the demangler to get the number of C++ parameters and compare it
10006 with the number of Ada parameters.
10007
10008 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10009
10010 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
10011 there is no end label, put the location of the At_End procedure on
10012 the call to the procedure.
10013
10014 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10015
10016 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
10017 value for array types with TYPE_INDEX_TYPE set on their domain type.
10018 * gcc-interface/utils.c (max_size): For operations and expressions, do
10019 not build a new node if the operands have not changed or are missing.
10020
10021 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
10022
10023 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
10024 argument when recursing on TRUTH_NOT_EXPR.
10025
10026 2017-02-12 John Marino <gnugcc@marino.st>
10027
10028 * system-freebsd-x86.ads: Rename into...
10029 * system-freebsd.ads: ...this.
10030 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
10031 * gcc-interface/Makefile.in: Support aarch64-freebsd.
10032 (x86-64/FreeBSD): Adjust to above renaming.
10033 (i386/FreeBSD): Likewise.
10034
10035 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
10036
10037 * comperr.adb: Update FSF bug reporting URL.
10038
10039 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
10040 Jakub Jelinek <jakub@redhat.com>
10041
10042 PR ada/79309
10043 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
10044
10045 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
10046
10047 PR lto/79061
10048 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
10049 to build_translation_unit_decl.
10050
10051 2017-01-23 Javier Miranda <miranda@adacore.com>
10052
10053 * sem_util.adb (New_Copy_Tree): Code cleanup:
10054 removal of the internal map (ie. variable Actual_Map, its
10055 associated local variables, and all the code handling it).
10056 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
10057 force loading of the System package when processing a task type.
10058 (Analyze_Protected_Type_Declaration): in GNATprove mode force
10059 loading of the System package when processing a protected type.
10060 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
10061 force loading of the System package when processing compilation
10062 unit with a main-like subprogram.
10063 * frontend.adb (Frontend): remove forced loading of the System
10064 package.
10065
10066 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10067
10068 * sem_prag.adb (Default_Initial_Condition): If the desired type
10069 declaration is a derived type declaration with discriminants,
10070 it is rewritten as a private type declaration.
10071 * sem_ch13.adb (Replace_Type_References_Generic,
10072 Visible_Component): A discriminated private type with descriminnts
10073 has components that must be rewritten as selected components
10074 if they appear as identifiers in an aspect expression such as
10075 a Default_Initial_Condition.
10076 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
10077 nodes.
10078
10079 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10080
10081 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
10082 * gnat1drv.adb Generate an empty object file for an ignored
10083 Ghost compilation unit.
10084 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
10085
10086 2017-01-23 Yannick Moy <moy@adacore.com>
10087
10088 * sem_ch4.adb (Analyze_Indexed_Component_Form):
10089 Adapt to inlined prefix with string literal subtype.
10090 * inline.adb (Expand_Inlined_Call): Keep unchecked
10091 conversion inside inlined call when formal type is constrained.
10092
10093 2017-01-23 Javier Miranda <miranda@adacore.com>
10094
10095 * sem_util.adb (New_Copy_Tree): Code cleanup:
10096 removal of global variables. All the global variables, global
10097 functions and tables of this subprogram are now declared locally.
10098
10099 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10100
10101 * exp_strm.ads: Minor reformatting and typo fixes.
10102
10103 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10104
10105 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
10106 exp_aggr.adb: Minor reformatting.
10107 * g-diopit.adb: minor grammar/punctuation fix in comment.
10108 * g-byorma.ads: minor fix of unbalanced parens in comment.
10109
10110 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10111
10112 * par.adb: Update the documentation of component Labl.
10113 * par-ch6.adb (P_Return_Statement): Set the expected label of
10114 an extended return statement to Error.
10115
10116 2017-01-23 Tristan Gingold <gingold@adacore.com>
10117
10118 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
10119
10120 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10121
10122 * expander.adb: Handle N_Delta_Aggregate.
10123
10124 2017-01-23 Javier Miranda <miranda@adacore.com>
10125
10126 * exp_ch6.adb (Expand_Call): Improve the code that
10127 checks if some formal of the called subprogram is a class-wide
10128 interface, to handle subtypes of class-wide interfaces.
10129
10130 2017-01-23 Javier Miranda <miranda@adacore.com>
10131
10132 * checks.adb (Apply_Parameter_Aliasing_Checks):
10133 Remove side effects of the actuals before generating the overlap
10134 check.
10135
10136 2017-01-23 Justin Squirek <squirek@adacore.com>
10137
10138 * exp_strm.ads, exp_strm.ads
10139 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
10140 as to avoid getting the underlying type by default.
10141 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
10142 underlying type in the Iiput and output attribute cases when
10143 building their respective functions.
10144
10145 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10146
10147 * scng.adb: Minor reformatting of error message.
10148
10149 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10150
10151 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
10152 to freeze the return type of an expression funxtion that is a
10153 completion, if the type is a limited view and the non-limited
10154 view is available.
10155
10156 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10157
10158 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
10159 aggregate construct.
10160 (P_Record_Or_Array_Component_Association): An array aggregate
10161 can start with an Iterated_Component_Association.
10162 * scng.adb: Modify error message on improper use of @ in earlier
10163 versions of the language.
10164 * sinfo.ads: New node kind N_Delta_Aggregate.
10165 * sinfo.adb: An N_Delta_Aggregate has component associations and
10166 an expression.
10167 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
10168 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
10169 Create a new index for each one of the choices in the association,
10170 to prevent spurious homonyms in the scope.
10171 (Resolve_Delta_Aggregate): New.
10172 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
10173 * exp_util.adb (Insert_Actions): Take into account
10174 N_Delta_Aggregate.
10175 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
10176 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
10177 and local procedures Expand_Delta_Array_Aggregate and
10178 expand_Delta_Record_Aggregate.
10179 * sprint.adb: Handle N_Delta_Aggregate.
10180
10181 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10182
10183 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
10184 empty name when the exception declaration is subject to pragma
10185 Discard_Names.
10186 (Null_String): New routine.
10187
10188 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10189
10190 * par-ch9.adb (P_Protected_Definition): Parse
10191 any optional and potentially illegal pragmas which appear in
10192 a protected operation declaration list.
10193 (P_Task_Items): Parse
10194 any optional and potentially illegal pragmas which appear in a
10195 task item list.
10196
10197 2017-01-23 Pascal Obry <obry@adacore.com>
10198
10199 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
10200 is needed when a foreign thread call a Win32 API using a thread handle
10201 like GetThreadTimes() for example.
10202
10203 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10204
10205 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10206 allow an 'Address clause to be specified on a prefix of a
10207 class-wide type.
10208
10209 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10210
10211 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10212 attribute 'Valid is a renaming of the original expression when
10213 the expression denotes a name. For all other kinds of expression,
10214 use a constant to capture the value.
10215 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10216 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10217
10218 2017-01-23 Justin Squirek <squirek@adacore.com>
10219
10220 * sem_eval.adb (Eval_Integer_Literal): Add special
10221 case to avoid optimizing out check if the literal appears in
10222 an if-expression.
10223
10224 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10225
10226 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10227 allow an 'Address clause to be specified on a prefix of a
10228 class-wide type.
10229
10230 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10231
10232 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10233 attribute 'Valid is a renaming of the original expression when
10234 the expression denotes a name. For all other kinds of expression,
10235 use a constant to capture the value.
10236 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10237 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10238
10239 2017-01-23 Justin Squirek <squirek@adacore.com>
10240
10241 * sem_eval.adb (Eval_Integer_Literal): Add special
10242 case to avoid optimizing out check if the literal appears in
10243 an if-expression.
10244
10245 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10246
10247 * sem_ch4.adb (Try_Primitive_Operations,
10248 Is_Valid_First_Argument_Of): argument is valid if it is a derived
10249 type with unknown discriminants that matches its underlying
10250 record view.
10251 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
10252 expression if its type is derived from a limited type with
10253 unknown discriminants, because the expansion (which is a call)
10254 must be expanded in the enclosing context to add the proper build-
10255 in-place parameters to the call.
10256 * lib.ads, exp_ch9.adb: Minor fixes in comments.
10257
10258 2017-01-23 Yannick Moy <moy@adacore.com>
10259
10260 * frontend.adb (Frontend): Do not load runtime
10261 unit for GNATprove when parsing failed.
10262 * exp_ch9.adb: minor removal of extra whitespace
10263 * exp_ch6.adb: minor typo in comment
10264 * sem_util.adb: Code cleanup.
10265 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10266 * a-ngcefu.adb: minor style fix in whitespace
10267
10268 2017-01-23 Thomas Quinot <quinot@adacore.com>
10269
10270 * scos.ads: Document usage of 'd' as default SCO kind for
10271 declarations.
10272 * par_sco.adb (Traverse_Declarations_Or_Statements.
10273 Traverse_Degenerate_Subprogram): New supporting routine for expression
10274 functions and null procedures.
10275 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10276 N_Expression_Function to the subprogram case; add required
10277 support for null procedures and expression functions.
10278
10279 2017-01-23 Bob Duff <duff@adacore.com>
10280
10281 * namet.ads (Bounded_String): Decrease the size of type
10282 Bounded_String to avoid running out of stack space.
10283 * namet.ads (Append): Don't ignore buffer overflow; raise
10284 Program_Error instead.
10285
10286 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10287
10288 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10289 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10290 reformatting.
10291 * exp_ch9.adb: minor style fix in comment.
10292
10293 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10294
10295 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10296 for a limited record extension with unknown discriminants whose
10297 full view has no discriminants.
10298
10299 2017-01-23 Yannick Moy <moy@adacore.com>
10300
10301 * exp_spark.adb: Alphabetize with clauses.
10302
10303 2017-01-23 Yannick Moy <moy@adacore.com>
10304
10305 * sem_util.adb (Has_Enabled_Property): Treat
10306 protected objects and variables differently from other variables.
10307
10308 2017-01-23 Thomas Quinot <quinot@adacore.com>
10309
10310 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10311 Split original Ada 95 part off into new subprogram
10312 below. Call that subprogram (instead of proceeding with
10313 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10314 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10315 * debug.adb Document new switch -gnatd.p
10316 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10317 record for reverse bit order if an error has already been posted
10318 on the record type. This avoids generating extraneous "info:"
10319 messages for illegal code.
10320
10321 2017-01-23 Justin Squirek <squirek@adacore.com>
10322
10323 * sem_ch3.adb (Analyze_Declarations): Correct comments
10324 * freeze.adb (Find_Constant): Add detection of deferred constants
10325 so they are not incorrectly flagged as premature.
10326
10327 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10328
10329 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10330 characters for future version of the language. '@' is legal name.
10331 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10332 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10333 denotes a Target_Name.
10334 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10335 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10336 (Has_Target_Names): New flag on N_Assignment_Statement, to
10337 indicate that RHS has occurrences of N_Target_Name.
10338 * sem.adb: Call Analyze_Target_Name.
10339 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10340 (urrent_LHS): Global variable that denotes LHS of assignment,
10341 used in the analysis of Target_Name nodes.
10342 * sem_res.adb (Resolve_Target_Name): New procedure.
10343 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10344 N is an assignment statement whose RHS contains occurences of @
10345 that designate the value of the LHS of the assignment. If the
10346 LHS is side-effect free the target names can be replaced with
10347 a copy of the LHS; otherwise the semantics of the assignment
10348 is described in terms of a procedure with an in-out parameter,
10349 and expanded as such.
10350 (Expand_N_Assignment_Statement): Call
10351 Expand_Assign_With_Target_Names when needed.
10352 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10353 * sprint.adb: Handle N_Target_Name.
10354
10355 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10356
10357 * checks.adb: Minor fix in comment.
10358
10359 2017-01-23 Philippe Gil <gil@adacore.com>
10360
10361 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10362 count in Sort = Memory_Usage or Allocations_Count
10363
10364 2017-01-23 Justin Squirek <squirek@adacore.com>
10365
10366 * sem_ch3.adb: Code cleanup.
10367
10368 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10369
10370 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10371 variables to the local variable section. Update the profile
10372 of various nested routine that previously had visibility
10373 of those globals. One the matching phase has completed,
10374 remove certain classes of clauses which are considered noise.
10375 (Check_Dependency_Clause): Properly detect a match between two
10376 'Result attributes. Update the various post-match cases to use
10377 Is_Already_Matched as this routine now automatically recognizes
10378 a previously matched 'Result attribute.
10379 (Is_Already_Matched): New routine.
10380 (Remove_Extra_Clauses): New routine.
10381 (Report_Extra_Clauses): Remove the detection of ... => null
10382 clauses as this is now done in Remove_Extra_Clauses.
10383
10384 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10385
10386 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10387 report on spurious overlaps between values involving a subtype
10388 with a static predicate, because the expansion of such a subtype
10389 into individual ranges in inhibited in ASIS mode.
10390
10391 2017-01-23 Justin Squirek <squirek@adacore.com>
10392
10393 * sem_ch3.adb (Analyze_Declarations): Add detection
10394 of an edge case and delay freezing if it is present.
10395
10396 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10397
10398 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10399 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10400
10401 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10402
10403 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10404 access-to-subprogram types inherit the convention of the
10405 associated subprogram. (Set_Profile_Convention): New routine.
10406 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10407 of the two entities directly, use Conventions_Match to account
10408 for anonymous access-to-subprogram and subprogram types.
10409 (Conventions_Match): New routine.
10410
10411 2017-01-23 Claire Dross <dross@adacore.com>
10412
10413 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10414 which return Universal_Integer, force the overflow check flag for
10415 Length and Range_Length for types as big as Long_Long_Integer.
10416
10417 2017-01-23 Claire Dross <dross@adacore.com>
10418
10419 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10420 attributes which return Universal_Integer, introduce a conversion
10421 to the expected type with the appropriate check flags set.
10422 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10423 base type if the range is null. It may still be invalid if it
10424 is higher than the lower bound. This is checked later in the
10425 context in which the range appears.
10426
10427 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10428
10429 * scos.ads: Introduce a constant to represent ignored
10430 dependencies in SCO_Unit_Table_Entry.
10431
10432 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10433
10434 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10435 spaces from error messages.
10436
10437 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10438
10439 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10440 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10441 an object declaration for an array type with a modular index type
10442 with the size of Long_Long_Integer. Special processing is needed
10443 in this case to compute reliably the size of the object, and
10444 eventually to raise Storage_Error, when wrap-around arithmetic
10445 might compute a meangingless size for the object.
10446
10447 2017-01-23 Justin Squirek <squirek@adacore.com>
10448
10449 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10450 sem_type.adb: Code cleanups.
10451
10452 2017-01-23 Bob Duff <duff@adacore.com>
10453
10454 * sem_res.adb (Resolve_Call): In the part of the code where
10455 it is deciding whether to turn the call into an indexed
10456 component, avoid doing so if the call is to an instance of
10457 Unchecked_Conversion. Otherwise, the compiler turns it into an
10458 indexed component, and resolution of that turns it back into a
10459 function call, and so on, resulting in infinite recursion.
10460 * sem_util.adb (Needs_One_Actual): If the first formal has a
10461 default, then return False.
10462
10463 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10464
10465 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10466 optimizations when the type is modular and the offsets are equal.
10467
10468 2017-01-20 Thomas Quinot <quinot@adacore.com>
10469
10470 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10471 message.
10472
10473 2017-01-20 Nicolas Roche <roche@adacore.com>
10474
10475 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10476
10477 2017-01-20 Bob Duff <duff@adacore.com>
10478
10479 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10480 (etc) optimizations when the type is modular.
10481
10482 2017-01-20 Yannick Moy <moy@adacore.com>
10483
10484 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10485 but copy the SPARK_Mode pragma instead of moving it.
10486 (Build_Subprogram_Declaration): Ensure that the generated spec
10487 and original body share the same SPARK_Pragma aspect/pragma.
10488 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10489 procedure to copy SPARK_Mode aspect.
10490
10491 2017-01-20 Bob Duff <duff@adacore.com>
10492
10493 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10494 even in ASIS mode.
10495 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10496 Empty even in ASIS mode.
10497
10498 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10499
10500 * exp_ch9.adb: minor style fixes in comments.
10501 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10502 relative statement introduces an implicit dependency on
10503 Ada.Real_Time.Clock_Time.
10504 * sem_util.adb: Minor reformatting.
10505
10506 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10507
10508 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10509 must be treated as delayed aspect even if the expression is
10510 a literal, because the aspect affects the freezing and the
10511 elaboration of the object to which it applies.
10512
10513 2017-01-20 Tristan Gingold <gingold@adacore.com>
10514
10515 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10516
10517 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10518
10519 * lib-xref.adb (Generate_Reference): Do not warn about the
10520 presence of a pragma Unreferenced if the entity appears as the
10521 actual in a procedure call that does not come from source.
10522
10523 2017-01-20 Pascal Obry <obry@adacore.com>
10524
10525 * expect.c, terminals.c: Fix some warnings about unused variables.
10526 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10527 of the runtime.
10528
10529 2017-01-20 Bob Duff <duff@adacore.com>
10530
10531 * exp_attr.adb (Constrained): Apply an access check (check that
10532 the prefix is not null) when the prefix denotes an object of an
10533 access type; that is, when there is an implicit dereference.
10534
10535 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10536
10537 * s-rident.ads (constant Profile_Info): Remove
10538 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10539
10540 2017-01-20 Tristan Gingold <gingold@adacore.com>
10541
10542 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10543
10544 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10545
10546 * ghost.adb (Mark_Ghost_Clause): New routine.
10547 (Prune_Node): Do not prune compilation unit nodes.
10548 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10549 This does not touch the node itself, but does prune all its fields.
10550 * ghost.ads (Mark_Ghost_Clause): New routine.
10551 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10552 package clause mentions Ghost and non-Ghost packages. Mark a
10553 use package clause as Ghost when it mentions a Ghost package.
10554 (Analyze_Use_Type): Emit an error when a use type clause mentions
10555 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10556 it mentions a Ghost type.
10557 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10558 Ghost when it withs a Ghost unit.
10559
10560 2017-01-20 Javier Miranda <miranda@adacore.com>
10561
10562 * sem_res.adb (Resolve_Call): If a function call
10563 returns a limited view of a type and at the point of the call the
10564 function is not declared in the extended main unit then replace
10565 it with the non-limited view, which must be available. If the
10566 called function is in the extended main unit then no action is
10567 needed since the back-end handles this case.
10568
10569 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10570
10571 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10572 (Contains_Subprograms_Refs): ...this. Adjust comment
10573 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10574 (Is_Subprogram_Ref): ...this.
10575 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10576 Has_Non_Subprograms_Referencer and adjust comment. Remove
10577 incorrect shortcut for package declarations and bodies.
10578
10579 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10580
10581 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10582 base type differs from that of the completion and the private
10583 subtype is an itype (created for a constraint on an access
10584 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10585 anomalies in gigi.
10586
10587 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10588
10589 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10590 When inheriting the SPARK_Mode of a prior expression function,
10591 look at the properly resolved entity rather than the initial
10592 candidate which may denote a homonym.
10593
10594 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10595
10596 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10597 Precondition or Postcondition, and the context is pragma
10598 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10599 and suggest the standard names Assertion_Policy /Pre /Post
10600 instead.
10601
10602 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10603
10604 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10605
10606 2017-01-20 Javier Miranda <miranda@adacore.com>
10607
10608 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10609 Entity attribute.
10610 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10611 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10612 malformed trees.
10613
10614 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10615
10616 * sem_ch13.adb (Analyze_Aspect_Specification, case
10617 Dynamic_Predicate): If the entity E is a subtype that inherits
10618 a static predicate for its parent P,, the inherited and the
10619 new predicate combine in the generated predicate function,
10620 and E only has a dynamic predicate.
10621
10622 2017-01-20 Tristan Gingold <gingold@adacore.com>
10623
10624 * s-boustr.ads, s-boustr.adb: New package.
10625 * Makefile.rtl: Add s-boustr.
10626
10627 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10628
10629 * inline.adb (Process_Formals): Qualify the
10630 expression of a return statement when it yields a universal type.
10631
10632 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10633
10634 * freeze.adb (Freeze_All): Freeze the default
10635 expressions of all eligible formal parameters that appear in
10636 entries, entry families, and protected subprograms.
10637
10638 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10639
10640 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10641 for illegal inherited Implicit_Dereference aspects with renamed
10642 discriminants.
10643
10644 2017-01-20 Javier Miranda <miranda@adacore.com>
10645
10646 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10647 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10648 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10649 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10650 Set_Prev, Tree_Read): Adding assertion.
10651 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10652 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10653 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10654 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10655 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10656 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10657 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10658 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10659 Set_ListN_With_Parent): Adding assertion.
10660
10661 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10662
10663 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10664 import that applies to several homograph subprograms. when one
10665 of them is declared by a subprogram body.
10666
10667 2017-01-20 Justin Squirek <squirek@adacore.com>
10668
10669 * exp_ch6.adb (Expand_Call): Remove optimization
10670 that nulls out calls to null procedures.
10671
10672 2017-01-20 Yannick Moy <moy@adacore.com>
10673
10674 * inline.adb (Expand_Inlined_Call): Keep more
10675 precise type of actual for inlining whenever possible. In
10676 particular, do not switch to the formal type in GNATprove mode in
10677 some case where the GNAT backend might require it for visibility.
10678
10679 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10680
10681 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10682 aspect Implicit_Dereference can be inherited by a full view if
10683 the partial view has no discriminants, because there is no way
10684 to apply the aspect to the partial view.
10685 (Build_Derived_Record_Type): If derived type renames discriminants
10686 of the parent, the new discriminant inherits the aspect from
10687 the old one.
10688 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10689 call through an access discriminant designating a subprogram.
10690 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10691 properly a parameterless call through an access discriminant on
10692 the left-hand side of an assignment.
10693 * sem_res.adb (resolve): If an interpreation involves a
10694 discriminant with an implicit dereference and the expression is an
10695 entity, resolution takes place later in the appropriate routine.
10696 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10697 access discriminants that designate a subprogram type.
10698
10699 2017-01-20 Pascal Obry <obry@adacore.com>
10700
10701 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10702
10703 2017-01-20 Yannick Moy <moy@adacore.com>
10704
10705 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10706 on implicitly with'ed units in GNATprove mode.
10707 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10708 with'ed units in GNATprove mode.
10709
10710 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10711
10712 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10713 unit Do not report an error on a non-static entity that appears
10714 in the context of a spec expression, such as an aspect expression.
10715
10716 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10717
10718 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10719 (Is_Underlying_Full_View): New routine.
10720 (Set_Is_Underlying_Full_View): New routine.
10721 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10722 * einfo.ads Add new attribute Is_Underlying_Full_View.
10723 (Is_Underlying_Full_View): New routine along with pragma Inline.
10724 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10725 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10726 class-wide types and underlying full views. The first subtype
10727 is used as the working type for all Itypes, not just array base types.
10728 (Build_DIC_Procedure_Declaration): Do not consider
10729 class-wide types and underlying full views. The first subtype
10730 is used as the working type for all Itypes, not just array
10731 base types.
10732 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10733 view or an underlying full view without clobbering the attributes
10734 of a previous freeze node.
10735 (Inherit_Freeze_Node): New routine.
10736 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10737 full view as such.
10738 (Build_Underlying_Full_View): Mark an underlying full view as such.
10739 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10740 full view as such.
10741
10742 2017-01-20 Yannick Moy <moy@adacore.com>
10743
10744 * sinfo.ads: Document lack of Do_Division_Check flag
10745 on float exponentiation.
10746
10747 2017-01-19 Javier Miranda <miranda@adacore.com>
10748
10749 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10750 identifier attribute of a block-statement node. Required to avoid
10751 assertion failure when building the new containers library.
10752
10753 2017-01-19 Bob Duff <duff@adacore.com>
10754
10755 * exp_ch3.adb: Update comment.
10756
10757 2017-01-19 Vincent Celier <celier@adacore.com>
10758
10759 * gprep.adb (Gnatprep): Parse the definition file without
10760 "replace in comments" even when switch -C is used.
10761
10762 2017-01-19 Justin Squirek <squirek@adacore.com>
10763
10764 * exp_ch9.adb (Is_Pure_Barrier): Create function
10765 Is_Count_Attribute to identify an expansion of the 'Count
10766 attribute.
10767
10768 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10769
10770 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10771 statements within an element iterator loop are only analyzed
10772 agter the loop is rewritten. Within a generic the analysis must
10773 be performed in any case to complete name capture.
10774
10775 2017-01-19 Bob Duff <duff@adacore.com>
10776
10777 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10778 before checking for unrecognized pragmas.
10779 Initialize Pname on its declarations; that's always good style.
10780
10781 2017-01-19 Claire Dross <dross@adacore.com>
10782
10783 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10784 body into the tree for GNATprove by setting its Parent field. The
10785 components invariants of composite types are not checked by
10786 the composite type's invariant procedure in GNATprove mode.
10787 (Build_Invariant_Procedure_Declaration): Semi-insert the
10788 declaration into the tree for GNATprove by setting its Parent
10789 field.
10790 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10791 the component invariants to the array type invariant procedure
10792 so that the procedure can be used to check the array type
10793 invariants if any.
10794 (Freeze_Record_Type): In GNATprove mode, do
10795 not add the component invariants to the record type invariant
10796 procedure so that the procedure can be used to check the record
10797 type invariants if any.
10798
10799 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10800
10801 * lib-xref-spark_specific.adb: Minor reformatting.
10802 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10803
10804 2017-01-19 Javier Miranda <miranda@adacore.com>
10805
10806 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10807 Build_Back_End_Aggregate.
10808 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10809 (Prepend_Stored_Values): Code cleanup.
10810
10811 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10812
10813 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10814 incomplete return type after attempting to freeze it, so that
10815 other freeze actiona are generated in the proper order.
10816
10817 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10818
10819 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10820 type, ie. a type whose component is a character type, and the
10821 aggregate is positional, do not convert into a string literal
10822 if the index type is not an integer type, because the original
10823 type may be required in an enclosing operation.
10824
10825 2017-01-19 Bob Duff <duff@adacore.com>
10826
10827 * binde.adb, debug.adb: Enable new elaboration order algorithm
10828 by default. -dp switch reverts to the old algorithm.
10829
10830 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10831
10832 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10833 (Analyze_Declarations): Create the DIC and Invariant
10834 procedure bodies s after all freezing has taken place.
10835 (Build_Assertion_Bodies): New routine.
10836 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10837 and Exp_Util.
10838 (Analyze_Package_Specification): Remove the
10839 generation of the DIC and Invariant procedure bodies. This is
10840 now done by Analyze_Declarations.
10841 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10842 procedures are never treated as primitives.
10843
10844 2017-01-19 Yannick Moy <moy@adacore.com>
10845
10846 * frontend.adb: Analyze inlined bodies and check elaboration
10847 rules in GNATprove mode too.
10848 * sem_elab.adb (Delay_Element): Add Boolean component to save
10849 indication that call is in SPARK code. (Check_Elab_Calls):
10850 Check elaboration rules in GNATprove mode, and correctly set
10851 the current value of SPARK_Mode.
10852 * lib-xref-spark_specific.adb
10853 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10854
10855 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10856
10857 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10858 checks on the expression for the high bound of concatenation
10859 when checks are disabled, to suppress warnings about potential
10860 constraint errors in restricted runtimes.
10861
10862 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10863
10864 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10865 representation-to-position function as inlined.
10866 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10867 the purity of an internally generated entity if it has been
10868 explicitly marked as pure for optimization purposes.
10869 * exp_aggr.adb: Minor reformatting.
10870
10871 2017-01-19 Javier Miranda <miranda@adacore.com>
10872
10873 * exp_ch6.adb (Expand_Call): Remove side effects on
10874 actuals that are allocators with qualified expression since the
10875 initialization of the object is performed by means of individual
10876 statements (and hence it must be done before the call).
10877
10878 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10879
10880 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10881 (Build_Derived_Enumeration_Type): If the derived type inherits a
10882 dynamic predicate from its parent, the bounds of the type must
10883 freeze because an explicit constraint is constructed for the
10884 type and the corresponding range is elaborated now.
10885
10886 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10887
10888 * sem_attr.ads: minor fix of inconsistent casing in comment
10889 * lib-writ.ads: minor align comments in columns
10890 * sem_ch3.adb: Minor reformatting.
10891 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10892 * table.ads: minor style fix in comment
10893 * lib-xref-spark_specific.adb
10894 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10895 * sem_ch12.adb: minor whitespace fix
10896 * freeze.adb: Add comment.
10897 * sem_util.adb (Unique_Name): for instances of
10898 generic subprograms ignore the name of the wrapper package.
10899
10900 2017-01-19 Javier Miranda <miranda@adacore.com>
10901
10902 * exp_aggr.adb (Resolve_Record_Aggregate):
10903 Factorize code needed for aggregates of limited and unlimited
10904 types in a new routine.
10905 (Pass_Aggregate_To_Back_End): New subprogram.
10906
10907 2017-01-19 Yannick Moy <moy@adacore.com>
10908
10909 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10910
10911 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10912
10913 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10914 public, for use elsewhere.
10915 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10916 an Inlined_body, recognize a call that uses object notation
10917 and has not been rewritten as a regular call because regular
10918 expansion has not taken place.
10919
10920 2017-01-19 Bob Duff <duff@adacore.com>
10921
10922 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10923 in case of generic formal discrete types, because it causes crashes in
10924 the compiler when built with assertions on.
10925
10926 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10927
10928 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10929 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10930
10931 2017-01-19 Bob Duff <duff@adacore.com>
10932
10933 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10934 Increment Warnings_Detected. It was decrementing, which is
10935 wrong since we just issued a warning message.
10936 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10937 these variables to be of subtype Nat instead of Int, because
10938 they should never be negative.
10939
10940 2017-01-19 Javier Miranda <miranda@adacore.com>
10941
10942 * contracts.adb (Build_Postconditions_Procedure): Replace
10943 Generate_C_Code by Modify_Tree_For_C.
10944 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10945 Replace Generate_C_Code by Modify_Tree_For_C.
10946 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10947 Modify_Tree_For_C.
10948 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10949 Generate_C_Code by Modify_Tree_For_C.
10950 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10951 Generate_C_Code by Modify_Tree_For_C.
10952 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10953 by Modify_Tree_For_C.
10954 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10955 Generate_C_Code by Modify_Tree_For_C.
10956 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10957 by Modify_Tree_For_C.
10958 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10959
10960 2017-01-19 Javier Miranda <miranda@adacore.com>
10961
10962 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10963 subprogram.
10964 (Is_Inlinable_Expression_Function): New subprogram.
10965 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10966 to Sem_Util.
10967 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10968
10969 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10970
10971 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10972 selected component has a prefix that might be interpreted
10973 as a parameterless function call, but none of the candidate
10974 interpretations is parameterless, and there is a hidden homonym
10975 of the prefix that is a package.
10976 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10977 interpreted as a parameterless function call and its analysis
10978 fails, do not call Analyze_Selected_Component.
10979
10980 2017-01-19 Steve Baird <baird@adacore.com>
10981
10982 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10983 Get_Index_Bounds.
10984 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10985 calls to a newly-defined Scalar_Range_Of_Right_View function.
10986
10987 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10988
10989 * gnat1drv.adb: minor fix of unbalanced parens in comment
10990 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10991 to visible part of the package to allow re-use in GNATprove.
10992 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10993 from repeated code of Traverse_Compilation_Unit.
10994 (Traverse_Declaration_Or_Statement): fixed detection of
10995 generic subprograms and packages; also, iteration over case
10996 statement alternatives rewritten to avoid testing if the first
10997 alternative is present (since it must be present due to Ada
10998 syntax restrictions).
10999
11000 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
11001
11002 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
11003 returning by reference not just for subprogram body stubs,
11004 but for all subprogram cases.
11005 * sem_util.adb: Code reformatting.
11006 (Requires_Transient_Scope): Update the call to Results_Differ.
11007 (Results_Differ): Update the parameter profile and the associated
11008 comment on usage.
11009
11010 2017-01-19 Ed Schonberg <schonberg@adacore.com>
11011
11012 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
11013 identifier nodes that do not come from source, to handle properly
11014 dimensionality check within an inlined body which inclddes both
11015 original operands and rewritten operands. This removes spurious
11016 dimensionality errors in the presence of front-end inlining,
11017 as well as in SPARK mode.
11018
11019 2017-01-16 Jakub Jelinek <jakub@redhat.com>
11020
11021 PR driver/49726
11022 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
11023
11024 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11025
11026 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
11027
11028 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11029
11030 * doc/gnat_ugn/getting_started_with_gnat.rst,
11031 doc/gnat_ugn/inline_assembler.rst,
11032 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
11033 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
11034 doc/gnat_ugn/about_this_guide.rst,
11035 doc/gnat_ugn/platform_specific_information.rst,
11036 doc/gnat_ugn/example_of_binder_output.rst,
11037 doc/gnat_ugn/gnat_and_program_execution.rst,
11038 doc/gnat_ugn/gnat_utility_programs.rst,
11039 doc/gnat_ugn/the_gnat_compilation_model.rst,
11040 doc/gnat_rm/implementation_defined_attributes.rst,
11041 doc/gnat_rm/compatibility_and_porting_guide.rst,
11042 doc/gnat_rm/standard_library_routines.rst,
11043 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
11044 doc/gnat_rm/implementation_defined_pragmas.rst,
11045 doc/gnat_rm/the_gnat_library.rst,
11046 doc/gnat_rm/obsolescent_features.rst,
11047 doc/gnat_rm/about_this_guide.rst,
11048 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
11049 doc/gnat_rm/implementation_of_ada_2012_features.rst,
11050 doc/gnat_rm/interfacing_to_other_languages.rst,
11051 doc/gnat_rm/implementation_defined_aspects.rst,
11052 doc/gnat_rm.rst: Update documentation.
11053 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
11054
11055 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11056
11057 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
11058 * scil_ll.adb: Minor style fix in comment.
11059 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
11060 even if entity is already set, because the node may be renalyzed
11061 after inlining transformations.
11062
11063 2017-01-13 Javier Miranda <miranda@adacore.com>
11064
11065 * sem_res.adb (Resolve_Call): Do not establish a transient scope
11066 for a call to inlinable expression function (since the call will
11067 be replaced by its returned object).
11068 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
11069 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
11070 (Expand_Call): For inlinable expression function call replace the
11071 call by its returned object.
11072 (Is_Inlinable_Expression_Function): New subprogram.
11073
11074 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11075
11076 * checks.adb: Minor typo fix and reformatting.
11077
11078 2017-01-13 Javier Miranda <miranda@adacore.com>
11079
11080 * contracts.adb (Contract_Only_Subprograms): Remove formal.
11081 (Copy_Original_Specification): Removed.
11082 (Skip_Contract_Only_Subprogram): Move here checks previously
11083 located in the caller of this routine (to leave the code more clean).
11084 (Build_Contract_Only_Subprogram): Code cleanup.
11085 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
11086 (Get_Contract_Only_Missing_Body_Name): Removed.
11087
11088 2017-01-13 Javier Miranda <miranda@adacore.com>
11089
11090 * sem_ch6.adb (Cloned_Expression): New subprogram.
11091 (Freeze_Expr_Types): Complete previous patch since the expression
11092 of an expression-function may have iterators and loops with
11093 defining identifiers which, as part of the preanalysis of the
11094 expression, may be left decorated with itypes that will not be
11095 available in the tree passed to the backend.
11096
11097 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11098
11099 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
11100 conversion to Integer of an expression that is an attribute
11101 reference 'Pos on an enumeration type.
11102
11103 2017-01-13 Bob Duff <duff@adacore.com>
11104
11105 * atree.ads: Minor comment fix.
11106
11107 2017-01-13 Justin Squirek <squirek@adacore.com>
11108
11109 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
11110 calls in accessibility check on return statement.
11111
11112 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11113
11114 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
11115 Ensure that the input body is a subprogram body before trying to
11116 determine whether it denoted an expression function. Note that
11117 subprogram body stubs cannot denote expression functions.
11118
11119 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11120
11121 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
11122 and typo fixes.
11123
11124 2017-01-13 Javier Miranda <miranda@adacore.com>
11125
11126 * einfo.ads (Component_Bit_Offset): Fix documentation.
11127 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
11128 on record holes for components with unknown compile-time offsets.
11129
11130 2017-01-13 Bob Duff <duff@adacore.com>
11131
11132 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
11133 * g-locfil.ads: Minor comment fix.
11134
11135 2017-01-13 Bob Duff <duff@adacore.com>
11136
11137 * binde.adb (Elab_New): New elaboration order algorithm
11138 that is expected to cause fewer ABE issues. This is a work in
11139 progress. The new algorithm is currently disabled, and can be
11140 enable by the -dp switch, or by modifying the Do_Old and Do_New
11141 etc. flags and rebuilding. Experimental code is included to
11142 compare the results of the old and new algorithms.
11143 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
11144 can have multiple of these tables, so the old and new algorithms
11145 can coexist.
11146 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
11147 parameter of type array. This avoids the global variable, and
11148 allows bounds checking (which is normally defeated by the tables
11149 packages). It also ensures that the Elab_Order is read-only
11150 to Bindgen.
11151 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
11152 subprograms that need it, as above.
11153 * debug.adb: Document new -dp switch. Modify doc of old -do
11154 switch.
11155 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
11156 and Bindgen. Move writing of closure (-R and -Ra switches)
11157 to Binde; that's more convenient.
11158
11159 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11160
11161 * sem_ch6.adb (Analyze_Expression_Function): If the expression
11162 function is a completion, all entities referenced in the
11163 expression are frozen. As a consequence, a reference to an
11164 uncompleted private type from an enclosing scope is illegal.
11165
11166 2017-01-13 Javier Miranda <miranda@adacore.com>
11167
11168 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
11169 (Analyze_Subprogram_Body_Helper): At the occurrence of an
11170 expression function declaration that is a completion, its
11171 expression causes freezing (AI12-0103).
11172
11173 2017-01-13 Vadim Godunko <godunko@adacore.com>
11174
11175 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
11176 Reference functions of Ada.Containers.Indefinite_Holders.
11177
11178 2017-01-13 Bob Duff <duff@adacore.com>
11179
11180 * s-os_lib.ads: Minor comment fixes.
11181
11182 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11183
11184 * exp_ch3.adb (Default_Initialize_Object): Do not default
11185 initialize an object when it is of a task type and restriction
11186 No_Tasking is in effect because the initialization is obsolete.
11187 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
11188 restriction No_Tasking is in effect.
11189 (Build_Master_Renaming): Do not rename a master when restriction
11190 No_Tasking is in effect.
11191
11192 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11193
11194 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
11195 the legality of An others clause applies as well to a choice in
11196 an Iterated_component_ association.
11197 (Resolve_Iterated_Component_Association): An others choice
11198 is legal.
11199 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
11200 Iterated_Component_Association is not static.
11201
11202 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11203
11204 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
11205 control is passed to the expresion handler before the new mode
11206 is set.
11207 * sem_ch12.adb (Analyze_Package_Instantiation,
11208 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
11209 in case control is passed to the expresion handler before the
11210 new mode is set.
11211
11212 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11213
11214 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
11215 exp_aggr.adb: Minor reformatting.
11216
11217 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11218
11219 * inline.adb: Minor reformatting and typo fix.
11220
11221 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11222
11223 * sem_util.ads, sem_util.adb (Choice_List): Move function here
11224 from sem_aggr.adb, for use elsewhere.
11225 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
11226 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
11227 Iterated_Component_Present.
11228 * exp_aggr.adb: Use Choice_List throughout, to handle
11229 Iterated_Component_Associations.
11230 (Gen_Loop): Generate proper loop for an
11231 Iterated_Component_Association: loop variable has the identifier
11232 of the original association. Generate a loop even for a single
11233 component choice, in order to make loop parameter visible in
11234 expression.
11235 (Flatten): An Iterated_Component_Association is not static.
11236
11237 2017-01-13 Yannick Moy <moy@adacore.com>
11238
11239 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
11240 float exponentiation for statically known small negative values
11241 is the reciprocal of the exponentiation for the opposite value
11242 of the exponent.
11243 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
11244 Ensure that the value of float exponentiation for negative values
11245 is the reciprocal of the exponentiation for the opposite value
11246 of the exponent.
11247 * inline.adb (Expand_Inlined_Call): Fix the count
11248 for the number of generated gotos.
11249
11250 2017-01-13 Yannick Moy <moy@adacore.com>
11251
11252 * inline.adb: Code cleanup.
11253 * sem_util.adb (Is_OK_Volatile_Context): Add
11254 expression in delay statement as OK for volatile context.
11255
11256 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11257
11258 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
11259 mode a choice that is a subtype with a static predicate is
11260 replaced by the values it covers. This transformation must not
11261 be performed in ASIS mode, to preserve the source for analysis.
11262
11263 2017-01-13 Justin Squirek <squirek@adacore.com>
11264
11265 * nlists.ads: Correct minor typo.
11266
11267 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11268
11269 * sem_ch13.adb: Minor reformatting and typo fix.
11270
11271 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11272
11273 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11274 Iterated_Component_Association is a named association in an
11275 array aggregate.
11276 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11277 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11278 and resolve the discrete choices and the expression of the
11279 new construct.
11280 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11281 Loop_Actions and Box_Present are attributes of
11282 N_Iterated_Component_Association nodes. Box_Present is always
11283 False in this case.
11284 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11285 has a Discrete_Choices list, as specified in the RM. A
11286 Component_Association for aggregate uses instead a Choices list.
11287 We have to live with this small inconsistency because the new
11288 construct also has a defining identifier, and there is no way
11289 to merge the two node structures.
11290
11291 2017-01-13 Yannick Moy <moy@adacore.com>
11292
11293 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11294 list of pragmas to remove. Remove pragmas from the list of
11295 statements in the body to inline.
11296 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11297
11298 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11299
11300 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11301 Analyze_Declarations, to analyze and resolve the expressions of
11302 aspect specifications in the current declarative list, so that
11303 the expressions have proper entity and type info. This is needed
11304 for ASIS when there is no subsequent expansion to generate this
11305 semantic information.
11306 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11307 original expression, to suppress cascaded errors when expression
11308 has been constant-folded.
11309 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11310 ASIS mode, because there is no subsequent expansion to decorate
11311 the tree.
11312
11313 2017-01-13 Yannick Moy <moy@adacore.com>
11314
11315 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11316 New function to detect when a call may be inlined or not in
11317 GNATprove mode.
11318 (Expand_Inlined_Call): Ensure that a temporary
11319 is always created in the cases where a type conversion may be
11320 needed on an input parameter in GNATprove mode, so that GNATprove
11321 sees the check to perform.
11322 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11323 when not applicable due to actual requiring type conversion
11324 with possible check but no temporary value can be copied for
11325 GNATprove to see the check.
11326
11327 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11328
11329 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11330 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11331 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11332 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11333 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11334 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11335 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11336 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11337 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11338 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11339 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11340 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11341 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11342 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11343 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11344 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11345 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11346 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11347 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11348 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11349 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11350 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11351 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11352 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11353 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11354 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11355 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11356 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11357 statements to reflect the new style for case alternatives. Various
11358 code clean up and reformatting.
11359
11360 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11361
11362 * exp_util.adb: Minor reformatting.
11363
11364 2017-01-13 Yannick Moy <moy@adacore.com>
11365
11366 * exp_spark.adb: Code cleanup.
11367 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11368 expression so that calls are identified as such inside delay
11369 until.
11370
11371 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11372
11373 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11374 * par-ch3.adb (P_Discrete_Choice_List): An
11375 Iterated_Component_Association is an array aggregate component.
11376 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11377 (Is_Quantified_Expression): New function that performs a lookahead
11378 to distinguish quantified expressions from iterated component
11379 associations.
11380 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11381 associations.
11382 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11383 * sem.adb (Analyze): Handle Iterated_Component_Association.
11384 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11385 component associations.
11386 * sinfo.ads, sinfo.adb: Entries for for
11387 N_Iterated_Component_Association and its fields.
11388 * sprint.adb (Sprint_Node_Actual): Handle
11389 N_Iterated_Component_Association.
11390
11391 2017-01-13 Justin Squirek <squirek@adacore.com>
11392
11393 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11394 of the style check until after preanalysis of acutals.
11395
11396 2017-01-13 Yannick Moy <moy@adacore.com>
11397
11398 * sem_ch13.adb: Minor reformatting.
11399 * par-ch11.adb: minor style fix in whitespace
11400 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11401 reduced to Add_Artificial_ALI_File; style fix in declaration of
11402 Text; grammar fix in comment.
11403 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11404 * freeze.adb: Cleanup to pass pragma instead of
11405 expression to call.
11406 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11407 replace System'To_Address by equivalent call.
11408
11409 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11410
11411 * bindusg.adb: Improve usage output for -f switch.
11412
11413 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11414
11415 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11416 Minor reformatting.
11417
11418 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11419
11420 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11421 treat comparisons on strings as legal in a Static_Predicate.
11422 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11423 a function call that is the expansion of a string comparison.The
11424 function call is built when compiling the corresponding predicate
11425 function, but the expression has been found legal as a static
11426 predicate during earlier analysis.
11427 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11428 properly a function call that is the expansion of a string
11429 comparison operation, in order to recover the Static_Predicate
11430 expression and apply it to a static argument when needed.
11431
11432 2017-01-13 Tristan Gingold <gingold@adacore.com>
11433
11434 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11435 (Open_Read): Re-implement using Open_Read_No_Exception.
11436 (Open_Write): Raise exception in case of error.
11437 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11438 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11439 reaise exception.
11440 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11441
11442 2017-01-13 Yannick Moy <moy@adacore.com>
11443
11444 * checks.adb: Code cleanup.
11445
11446 2017-01-13 Yannick Moy <moy@adacore.com>
11447
11448 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11449 expression instead of unanalyzed aspect expression for checking
11450 the validity of inheriting an operation. Also copy the expression
11451 being passing it to Build_Class_Wide_Expression, as this call
11452 modifies its argument.
11453 * sem_util.ads Fix comment to reference correct function name
11454 New_Copy_Tree.
11455
11456 2017-01-13 Javier Miranda <miranda@adacore.com>
11457
11458 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11459 when we propagate information about the indexes back to the original
11460 indexing mode and the prefix of the index is a function call, do not
11461 remove any parameter from such call.
11462
11463 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11464
11465 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11466 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11467 a build-in-place function whose result type is tagged.
11468
11469 2017-01-13 Yannick Moy <moy@adacore.com>
11470
11471 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11472 Do not generate a wrapper when the only candidate is a class-wide
11473 subprogram.
11474 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11475 inside a generic context.
11476
11477 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11478
11479 * exp_util.adb (Add_Inherited_Tagged_DIC):
11480 Pass the object parameters of both the parent and the derived
11481 type DIC procedure to the reference replacement circuitry.
11482 (Find_DIC_Type): Modify the circuitry to present the partial
11483 view of a private type in case the private type defines its own
11484 DIC pragma.
11485 (Replace_Object_And_Primitive_References): Add two
11486 optional formal parameters. Update the comment on usage. Update
11487 the replacement of references to object parameters.
11488
11489 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11490
11491 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11492
11493 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11494
11495 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11496 an out parameter that is a type conversion, independently of th
11497 range check that may apply to the expression of the conversion,
11498 for use in GNATProve.
11499
11500 2017-01-13 Yannick Moy <moy@adacore.com>
11501
11502 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11503 GNATprove_Mode here to Frontend.
11504 * frontend.adb (Frontend): Move the implicit with for System
11505 in GNATprove_Mode here as it ismore correct this way; the old
11506 place only worked by chance, since there were no overloaded names.
11507 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11508 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11509 four attributes identified in SRM 9(18), add an implicit with
11510 to Ada.Task_Identification.
11511 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11512 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11513 mode.
11514 * checks.adb (Apply_Discriminant_Check,
11515 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11516 In GNATprove mode, we do not apply the checks, but we still
11517 analyze the expression to possibly issue errors on SPARK
11518 code when a run-time error can be detected at compile time.
11519 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11520 in GNATprove mode.
11521
11522 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11523
11524 * expander.adb (Expand): Add a warning about using return
11525 statements in Ghost management code.
11526 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11527 statements in Ghost management code.
11528 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11529 Build_Invariant_Procedure_Declaration): Add a warning about
11530 using return statements in Ghost management code.
11531 * exp_disp.adb (Make_DT): Add a warning about using return
11532 statements in Ghost management code.
11533 * exp_util.adb (Build_DIC_Procedure_Body,
11534 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11535 warning about using return statements in Ghost management code.
11536 * freeze.adb (Freeze_Entity): Add a warning about using return
11537 statements in Ghost management code.
11538 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11539 statements in Ghost management code.
11540 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11541 a warning about using return statements in Ghost management code.
11542 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11543 return statements in Ghost management code.
11544 * sem_ch6.adb (Analyze_Procedure_Call,
11545 Analyze_Subprogram_Body_Helper): Add a warning about using return
11546 statements in Ghost management code.
11547 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11548 using return statements in Ghost management code.
11549 * sem_ch12.adb (Analyze_Package_Instantiation,
11550 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11551 Instantiate_Subprogram_Body): Add a warning about using return
11552 statements in Ghost management code.
11553 * sem_ch13.adb (Build_Predicate_Functions,
11554 Build_Predicate_Function_Declarations): Add a warning about
11555 using return statements in Ghost management code.
11556 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11557 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11558 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11559 using return statements in Ghost management code.
11560
11561 2017-01-13 Tristan Gingold <gingold@adacore.com>
11562
11563 * s-mmosin-mingw.adb: Fix pragma import.
11564
11565 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11566
11567 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11568 codepeer mode.
11569
11570 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11571
11572 * atree.adb (Allocate_Initialize_Node): A newly created node is
11573 no longer marked as Ghost at this level.
11574 (Mark_New_Ghost_Node): New routine.
11575 (New_Copy): Mark the copy as Ghost.
11576 (New_Entity): Mark the entity as Ghost.
11577 (New_Node): Mark the node as Ghost.
11578 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11579 apply to unanalyzed entities.
11580 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11581 entities.
11582 (Set_Is_Checked_Ghost_Entity): This attribute now
11583 applies to all entities as well as unanalyzed entities.
11584 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11585 all entities as well as unanalyzed entities.
11586 * expander.adb Add with and use clauses for Ghost.
11587 (Expand): Install and revert the Ghost region associated with the node
11588 being expanded.
11589 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11590 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11591 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11592 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11593 (Freeze_Type): Install and revert the Ghost region associated
11594 with the type being frozen.
11595 * exp_ch5.adb Remove with and use clauses for Ghost.
11596 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11597 * exp_ch6.adb Remove with and use clauses for Ghost.
11598 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11599 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11600 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11601 Ghost region of the working type.
11602 (Build_Invariant_Procedure_Declaration): Install and revert
11603 the Ghost region of the working type.
11604 (Expand_N_Package_Body): Remove all Ghost-related code.
11605 * exp_ch8.adb Remove with and use clauses for Ghost.
11606 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11607 code.
11608 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11609 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11610 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11611 code.
11612 * exp_ch13.adb Remove with and use clauses for Ghost.
11613 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11614 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11615 the tagged type. Move the generation of various entities within
11616 the Ghost region of the type.
11617 * exp_prag.adb Remove with and use clauses for Ghost.
11618 (Expand_Pragma_Check): Remove all Ghost-related code.
11619 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11620 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11621 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11622 * exp_util.adb (Build_DIC_Procedure_Body): Install
11623 and revert the Ghost region of the working types.
11624 (Build_DIC_Procedure_Declaration): Install and revert the
11625 Ghost region of the working type.
11626 (Make_Invariant_Call): Install and revert the Ghost region of the
11627 associated type.
11628 (Make_Predicate_Call): Reimplemented. Install and revert the
11629 Ghost region of the associated type.
11630 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11631 of the entity being frozen.
11632 (New_Freeze_Node): Removed.
11633 * ghost.adb Remove with and use clauses for Opt.
11634 (Check_Ghost_Completion): Update the parameter profile
11635 and all references to formal parameters.
11636 (Ghost_Entity): Update the comment on usage.
11637 (Install_Ghost_Mode): New routines.
11638 (Is_Ghost_Assignment): New routine.
11639 (Is_Ghost_Declaration): New routine.
11640 (Is_Ghost_Pragma): New routine.
11641 (Is_Ghost_Procedure_Call): New routine.
11642 (Is_Ghost_Renaming): Removed.
11643 (Is_OK_Declaration): Reimplemented.
11644 (Is_OK_Pragma): Reimplemented.
11645 (Is_OK_Statement): Reimplemented.
11646 (Is_Subject_To_Ghost): Update the comment on usage.
11647 (Mark_And_Set_Ghost_Assignment): New routine.
11648 (Mark_And_Set_Ghost_Body): New routine.
11649 (Mark_And_Set_Ghost_Completion): New routine.
11650 (Mark_And_Set_Ghost_Declaration): New routine.
11651 (Mark_And_Set_Ghost_Instantiation): New routine.
11652 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11653 (Mark_Full_View_As_Ghost): Removed.
11654 (Mark_Ghost_Declaration_Or_Body): New routine.
11655 (Mark_Ghost_Pragma): New routine.
11656 (Mark_Ghost_Renaming): New routine.
11657 (Mark_Pragma_As_Ghost): Removed.
11658 (Mark_Renaming_As_Ghost): Removed.
11659 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11660 (Prune_Node): Freeze nodes no longer need special pruning, they
11661 are processed by the general ignored Ghost code mechanism.
11662 (Restore_Ghost_Mode): New routine.
11663 (Set_Ghost_Mode): Reimplemented.
11664 (Set_Ghost_Mode_From_Entity): Removed.
11665 * ghost.ads Add with and use clauses for Ghost.
11666 (Check_Ghost_Completion): Update the parameter profile
11667 along with the comment on usage.
11668 (Install_Ghost_Mode): New routine.
11669 (Is_Ghost_Assignment): New routine.
11670 (Is_Ghost_Declaration): New routine.
11671 (Is_Ghost_Pragma): New routine.
11672 (Is_Ghost_Procedure_Call): New routine.
11673 (Mark_And_Set_Ghost_Assignment): New routine.
11674 (Mark_And_Set_Ghost_Body): New routine.
11675 (Mark_And_Set_Ghost_Completion): New routine.
11676 (Mark_And_Set_Ghost_Declaration): New routine.
11677 (Mark_And_Set_Ghost_Instantiation): New routine.
11678 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11679 (Mark_Full_View_As_Ghost): Removed.
11680 (Mark_Ghost_Pragma): New routine.
11681 (Mark_Ghost_Renaming): New routine.
11682 (Mark_Pragma_As_Ghost): Removed.
11683 (Mark_Renaming_As_Ghost): Removed.
11684 (Restore_Ghost_Mode): New routine.
11685 (Set_Ghost_Mode): Redefined.
11686 (Set_Ghost_Mode_From_Entity): Removed.
11687 * sem.adb (Analyze): Install and revert the Ghost region of the
11688 node being analyzed.
11689 (Do_Analyze): Change the way a clean Ghost
11690 region is installed and reverted.
11691 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11692 all Ghost-related code.
11693 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11694 (Analyze_Number_Declaration): Remove all Ghost-related code.
11695 (Analyze_Object_Declaration): Install and revert the Ghost region of
11696 a deferred object declaration's completion.
11697 (Array_Type_Declaration): Remove all Ghost-related code.
11698 (Build_Derived_Type): Update the comment on
11699 the propagation of Ghost attributes from a parent to a derived type.
11700 (Derive_Subprogram): Remove all Ghost-related code.
11701 (Make_Class_Wide_Type): Remove all Ghost-related code.
11702 (Make_Implicit_Base): Remove all Ghost-related code.
11703 (Process_Full_View): Install and revert the Ghost region of
11704 the partial view. There is no longer need to check the Ghost
11705 completion here.
11706 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11707 region of the left hand side.
11708 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11709 all Ghost-related code.
11710 (Analyze_Expression_Function): Remove all Ghost-related code.
11711 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11712 (Analyze_Procedure_Call): Install and revert the Ghost region of
11713 the procedure being called.
11714 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11715 region of the spec or body.
11716 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11717 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11718 (Find_Corresponding_Spec): Remove all Ghost-related code.
11719 (Process_Formals): Remove all Ghost-related code.
11720 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11721 the Ghost region of the spec.
11722 (Analyze_Package_Declaration): Remove all Ghost-related code.
11723 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11724 Ghost when it aliases a Ghost entity.
11725 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11726 a Ghost entity.
11727 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11728 it aliases a Ghost entity.
11729 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11730 a Ghost entity.
11731 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11732 aliases a Ghost entity.
11733 * sem_ch11.adb Remove with and use clauses for Ghost.
11734 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11735 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11736 Ghost-related code.
11737 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11738 code.
11739 (Analyze_Package_Instantiation): Install and revert the Ghost region
11740 of the package instantiation.
11741 (Analyze_Subprogram_Instantiation): Install
11742 and revert the Ghost region of the subprogram instantiation.
11743 (Instantiate_Package_Body): Code clean up. Install and revert the
11744 Ghost region of the package body.
11745 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11746 Ghost region of the subprogram body.
11747 * sem_ch13.adb (Build_Predicate_Functions): Install
11748 and revert the Ghost region of the related type.
11749 (Build_Predicate_Function_Declaration): Code clean up. Install
11750 and rever the Ghost region of the related type.
11751 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11752 Install and revert the Ghost region of the pragma.
11753 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11754 Ghost region of the pragma.
11755 (Analyze_Pragma): Install and revert the Ghost region of various
11756 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11757 or encloses a Ghost entity.
11758 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11759 region of the pragma.
11760 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11761 Ghost region of the pragma.
11762 * sem_res.adb (Resolve): Remove all Ghost-related code.
11763 * sem_util.adb (Is_Declaration): Reimplemented.
11764 (Is_Declaration_Other_Than_Renaming): New routine.
11765 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11766 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11767 (Is_Ghost_Pragma): Removed.
11768 (Is_Ignored_Ghost_Pragma): New routine.
11769 (Set_Is_Checked_Ghost_Pragma): New routine.
11770 (Set_Is_Ghost_Pragma): Removed.
11771 (Set_Is_Ignored_Ghost_Pragma): New routine.
11772 * sinfo.ads: Update the documentation on Ghost mode and
11773 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11774 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11775 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11776 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11777 (Is_Ghost_Pragma): Removed along with pragma Inline.
11778 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11779 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11780 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11781 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11782
11783 2017-01-12 Tristan Gingold <gingold@adacore.com>
11784
11785 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11786 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11787
11788 2017-01-12 Yannick Moy <moy@adacore.com>
11789
11790 * errout.adb, errout.ads (Initialize): Factor common treatment
11791 in Reset_Warnings.
11792 (Reset_Warnings): New procedure to reset counts related to warnings.
11793 (Record_Compilation_Errors): New variable to store the presence of an
11794 error, used in gnat2why to allow changing the Warning_Mode.
11795 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11796 store the presence of an error.
11797
11798 2017-01-12 Javier Miranda <miranda@adacore.com>
11799
11800 * sem_ch13.adb (Analyze_Aspect_Specifications):
11801 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11802 internally built reference to the protected procedure as coming
11803 from sources and force its analysis.
11804
11805 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11806
11807 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11808 inherit predicates if any from the first_subtype of the parent,
11809 not from the anonymous parent type.
11810 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11811 predicate is not a static subtype.
11812
11813 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11814
11815 * freeze.adb (Check_Suspicious_Convention): New procedure
11816 performing a warning check on discriminated record types with
11817 convention C or C++. Factored out of procedure Freeze_Record_Type,
11818 and changed to only apply to base types (to avoid spurious
11819 warnings on subtypes). Minor improvement of warning messages
11820 to refer to discriminated rather than variant record types.
11821 (Freeze_Record_Type): Remove code for performing a suspicious
11822 convention check.
11823 (Freeze_Entity): Only call Freeze_Record_Type
11824 on types that aren't declared within any enclosing generic units
11825 (rather than just excluding the type when the innermost scope
11826 is generic). Call Check_Suspicious_Convention whether or not
11827 the type is declared within a generic unit.
11828 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11829 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11830 from Sem_Ch8).
11831
11832 2017-01-12 Tristan Gingold <gingold@adacore.com>
11833
11834 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11835 (__gnat_current_codepage): Renamed from CurrentCodePage
11836 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11837
11838 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11839
11840 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11841 quantified expressions, following AI12-050: the loop parameters
11842 of two quantified expressions are conformant if they have the
11843 same identifier.
11844
11845 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11846
11847 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11848
11849 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11850
11851 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11852 Hnadle properly the attribute reference when it appears as part
11853 of an expression in another loop aspect.
11854
11855 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11856
11857 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11858 subsidiary of Build_Initialization_Call, to complete generation
11859 of predicate checks on discriminants whose (sub)types have
11860 predicates, and to add checks on variants that do not have an
11861 others clause.
11862 * sem_util.adb (Gather_Components): A missing Others alternative is
11863 not an error when the type of the discriminant is a static predicate
11864 (and coverage has been checked when analyzing the case statement). A
11865 runtime check is generated to verify that a given discriminant
11866 satisfies the predicate (RM 3.8.1. (21.1/2)).
11867
11868 2017-01-12 Yannick Moy <moy@adacore.com>
11869
11870 * gnat1drv.adb (Adjust_Global_Switches): Only
11871 perform checking of exception mechanism when generating code.
11872
11873 2017-01-12 Justin Squirek <squirek@adacore.com>
11874
11875 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11876 Remove handling of access component with invariant.
11877 (Build_Invariant_Procedure_Declaration): Remove return on class
11878 wide type.
11879 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11880 conditional exception for component or array so Has_Own_Invariants
11881 flag is not falsly set.
11882 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11883 wide type to have no invariant flags.
11884
11885 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11886
11887 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11888 sem_ch13.adb: Minor reformatting.
11889
11890 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11891
11892 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11893 adjustment primitive when the ancestor type was not properly frozen.
11894 (Gen_Assign): Guard against a missing initialization
11895 primitive when the component type was not properly frozen.
11896 (Initialize_Array_Component): Guard against a missing adjustment
11897 primitive when the component type was not properly frozen.
11898 (Initialize_Record_Component): Guard against a missing adjustment
11899 primitive when the component type was not properly frozen.
11900 (Process_Transient_Component_Completion): The transient object may
11901 not be finalized when its associated type was not properly frozen.
11902 * exp_ch3.adb (Build_Assignment): Guard against a missing
11903 adjustment primitive when the component type was not properly frozen.
11904 (Build_Initialization_Call): Guard against a missing
11905 initialization primitive when the associated type was not properly
11906 frozen.
11907 (Expand_N_Object_Declaration): Guard against a missing
11908 adjustment primitive when the base type was not properly frozen.
11909 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11910 body when there is no adjustment primitive available. Create an
11911 empty Deep_Finalize body when there is no finalization primitive
11912 available.
11913 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11914 missing finalization primitive when the designated type was
11915 not properly frozen.
11916 (Expand_N_Allocator): Guard against a missing initialization primitive
11917 when the designated type was not properly frozen.
11918 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11919 only when the corresponding adjustment primitive is available.
11920 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11921 adjustment/finalization statements only when there is an available
11922 primitive to carry out the action.
11923 (Build_Initialize_Statements): Generate the initialization/finalization
11924 statements only when there is an available primitive to carry out the
11925 action.
11926 (Make_Adjust_Call): Do not generate a call when the underlying
11927 type is not present due to a possible missing full view.
11928 (Make_Final_Call): Do not generate a call when the underlying
11929 type is not present due to a possible missing full view.
11930 (Make_Finalize_Address_Stmts): Generate an empty body when the
11931 designated type lacks a finalization primitive.
11932 (Make_Init_Call): Do not generate a call when the underlying type is
11933 not present due to a possible missing full view.
11934 (Process_Component_For_Adjust): Add the adjustment call only when the
11935 corresponding adjustment primitive is available.
11936 (Process_Component_For_Finalize): Add the finalization call only when
11937 the corresponding finalization primitive is available.
11938 (Process_Object_Declaration): Use a null statement to emulate a
11939 missing call to the finalization primitive of the object type.
11940 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11941 (Make_Final_Call): Update the comment on usage.
11942 (Make_Init_Call): Update the comment on usage.
11943 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11944
11945 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11946
11947 * einfo.ads: Update documentation of Address_Taken.
11948 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11949 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11950 for subprograms when setting Address_Taken flag.
11951
11952 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11953
11954 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11955 Configurable_Run_Time_Mode off when analysing with'ed predefined
11956 libraries.
11957
11958 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11959
11960 * sem_prag.adb: Minor reformatting.
11961 * sem_util.adb (Unique_Entity): fix result for
11962 bodies of entry families.
11963
11964 2017-01-12 Justin Squirek <squirek@adacore.com>
11965
11966 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11967 Resolve_Suppressible in the pragma Assertion_Policy case.
11968 (Resolve_Suppressible): Created this function to factor out
11969 common code used to resolve Suppress to either Ignore or Check
11970 * snames.ads-tmpl: Add name for Suppressible.
11971
11972 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11973
11974 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11975 reformatting.
11976 * debug.adb: Minor comment fixes.
11977
11978 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11979
11980 * sem_util.adb (Unique_Entity): For concurrent
11981 bodies that are defined with stubs and complete a declaration
11982 of a single concurrent object return the entity of an implicit
11983 concurrent type, not the entity of the anonymous concurrent
11984 object.
11985 * debug.adb: -gnatd.J is no longer used.
11986 * make.adb (Globalize): Removed, no longer used.
11987 * sem_ch9.adb: minor typo in comment for entry index
11988
11989 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11990
11991 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11992 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11993 the value record of a task, set its _Secondary_Stack_Size field
11994 if present.
11995 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11996 a _Secondary_Stack_Size field in the value record of
11997 the task if a Secondary_Stack_Size rep item is present.
11998 (Make_Task_Create_Call): Include secondary stack size
11999 parameter. If No_Secondary_Stack restriction is in place, passes
12000 stack size of 0.
12001 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12002 Secondary_Stack_Size.
12003 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12004 function to define the overhead of the secondary stack.
12005 * s-tarest.adb (Create_Restricted_Task,
12006 Create_Restricted_Task_Sequential): Functions now include
12007 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12008 * s-tarest.adb (Create_Restricted_Task,
12009 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
12010 include Secondary_Stack_Size parameter.
12011 (Task_Wrapper): Secondary stack now allocated to the size specified by
12012 the Secondary_Stack_Size parameter in the task's ATCB.
12013 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
12014 Secondary_Stack_Size component.
12015 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12016 Create_Restricted_Task_Sequential): Function now include
12017 Secondary_Stack_Size parameter.
12018 (Task_Wrapper): Secondary stack now allocated to the size
12019 specified by the Secondary_Stack_Size parameter in the task's
12020 ATCB.
12021 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
12022 to include Secondary_Stack_Size parameter.
12023 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
12024 Secondary_Stack_Size aspect, turning the aspect into its corresponding
12025 internal attribute.
12026 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
12027 * snames.adb-tmpl, snames.ads-tmpl: Added names
12028 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12029 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12030
12031 2017-01-12 Yannick Moy <moy@adacore.com>
12032
12033 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
12034 subtree.
12035
12036 2017-01-12 Justin Squirek <squirek@adacore.com>
12037
12038 * exp_attr.adb (Expand_N_Attribute_Reference):
12039 Fix Finalization_Size case by properly resolving the type after
12040 rewritting the node.
12041
12042 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12043
12044 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
12045 the tree.
12046 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
12047 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
12048 exp_sel.ads: Minor reformatting.
12049
12050 2017-01-12 Justin Squirek <squirek@adacore.com>
12051
12052 * exp_ch6.adb (Expand_Call): Add guard to prevent
12053 invariant checks from being created for internally generated
12054 subprograms.
12055
12056 2017-01-12 Bob Duff <duff@adacore.com>
12057
12058 * lib-writ.ads: Remove incorrect comment.
12059
12060 2017-01-12 Javier Miranda <miranda@adacore.com>
12061
12062 * debug.adb (-gnatd.K): Enable generation of contract-only
12063 procedures in CodePeer mode.
12064 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
12065 New subprogram.
12066 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
12067 set.
12068 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
12069 subprogram.
12070 (Get_Contract_Only_Missing_Body_Name): New subprogram.
12071 (Get_Contract_Only_Body): New subprogram.
12072 (Set_Contract_Only_Body): New subprogram.
12073 (Is_Contract_Only_Body): New subprogram.
12074 (Set_Is_Contract_Only_Body): New subprogram.
12075 (SCIL_Nodes): Replace table by hash-table.
12076
12077 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12078
12079 * exp_ch6.adb: Minor reformatting.
12080 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
12081
12082 2017-01-12 Bob Duff <duff@adacore.com>
12083
12084 * binde.adb (Forced): New reason for a dependence.
12085 (Force_Elab_Order): Implementation of the new switch.
12086 * binde.ads: Minor comment fixes.
12087 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
12088 long ago that is no longer supported; removed comment about that.
12089 * opt.ads (Force_Elab_Order_File): Name of file specified for
12090 -f switch.
12091 * switch-b.adb: Parse -f switch.
12092
12093 2017-01-12 Justin Squirek <squirek@adacore.com>
12094
12095 * exp_ch6.adb (Check_View_Conversion): Created this function
12096 to properly chain calls to check type invariants that may be
12097 present in a subprogram call after the subprogram.
12098 (Expand_Call): Add a conditional to identify when a view conversion
12099 needs to be checked.
12100 * nlists.adb, nlists.ads (Prepend_New): New routine.
12101 (Prepend_New_To): New routine.
12102
12103 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12104
12105 * sinfo.ads: Minor reformatting.
12106
12107 2017-01-12 Gary Dismukes <dismukes@adacore.com>
12108
12109 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
12110 reformatting.
12111
12112 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
12113
12114 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
12115 variable Definite. Create a local object and pass its 'Access to the
12116 BIP function when the result type is either definite or it does not
12117 require any finalization or secondary stack management.
12118
12119 2017-01-12 Bob Duff <duff@adacore.com>
12120
12121 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
12122 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
12123 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
12124 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
12125 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
12126 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
12127 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12128 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
12129 Change name to Pragma_Name_Unmapped.
12130 (Pragma_Name_Mapped): Change name to Pragma_Name.
12131 This is because the "mapped" version should be the usual case.
12132
12133 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
12134
12135 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
12136 Is_Default_Init_Cond_Procedure, and
12137 Has_Inherited_Default_Init_Cond. Add uses of flags
12138 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
12139 (Default_Init_Cond_Procedure): Removed.
12140 (DIC_Procedure): New routine.
12141 (Has_Default_Init_Cond): Removed.
12142 (Has_DIC): New routine.
12143 (Has_Inheritable_Invariants): The attribute applies to the base type.
12144 (Has_Inherited_Default_Init_Cond): Removed.
12145 (Has_Inherited_DIC): New routine.
12146 (Has_Inherited_Invariants): The attribute applies to the base type.
12147 (Has_Own_DIC): New routine.
12148 (Has_Own_Invariants): The attribute applies to the base type.
12149 (Is_Default_Init_Cond_Procedure): Removed.
12150 (Is_DIC_Procedure): New routine.
12151 (Set_Default_Init_Cond_Procedure): Removed.
12152 (Set_DIC_Procedure): New routine.
12153 (Set_Has_Default_Init_Cond): Removed.
12154 (Set_Has_Inheritable_Invariants): The attribute applies
12155 to the base type.
12156 (Set_Has_Inherited_Default_Init_Cond): Removed.
12157 (Set_Has_Inherited_DIC): New routine.
12158 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
12159 (Set_Has_Own_DIC): New routine.
12160 (Set_Has_Own_Invariants): The attribute applies to the base type.
12161 (Set_Is_Default_Init_Cond_Procedure): Removed.
12162 (Set_Is_DIC_Procedure): New routine.
12163 (Write_Entity_Flags): Update the output of all flags related to
12164 default initial condition.
12165 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
12166 of the call to the DIC procedure.
12167 (Freeze_Type): Generate the body of the DIC procedure.
12168 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
12169 all occurrences of Create_Append with Append_New_To. Do
12170 not generate an invariant procedure for a class-wide type.
12171 The generated body acts as a freeze action of the working type.
12172 (Build_Invariant_Procedure_Declaration): Do not generate an
12173 invariant procedure for a class-wide type.
12174 (Create_Append): Removed.
12175 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
12176 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
12177 class-wide pre/postcondition description and data structures from
12178 Sem_Prag.
12179 (Build_Class_Wide_Expression): Moved from Sem_Prag.
12180 (Build_DIC_Call): New routine.
12181 (Build_DIC_Procedure_Body): New routine.
12182 (Build_DIC_Procedure_Declaration): New routine.
12183 (Entity_Hash): Moved from Sem_Prag.
12184 (Find_DIC_Type): New routine.
12185 (Update_Primitives_Mapping): Reimplemented.
12186 (Update_Primitives_Mapping_Of_Types): New routine.
12187 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
12188 (Build_DIC_Call): New routine.
12189 (Build_DIC_Procedure_Body): New routine.
12190 (Build_DIC_Procedure_Declaration): New routine.
12191 (Update_Primitives_Mapping): Moved from Sem_Prag.
12192 (Update_Primitives_Mapping_Of_Types): New routine.
12193 * nlists.adb (Append_New): New routine.
12194 (Append_New_To): New routine.
12195 * nlists.ads (Append_New): New routine.
12196 (Append_New_To): New routine.
12197 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
12198 of DIC procedures here. This is now done at the end of the
12199 visible declarations, private declarations, and at the freeze
12200 point of a type.
12201 (Analyze_Private_Extension_Declaration):
12202 A private extension inherits the DIC pragma of a parent type.
12203 (Analyze_Subtype_Declaration): No need to propagate invariant
12204 attributes to a subtype as those apply to the base type.
12205 (Build_Derived_Record_Type): No need to inherit invariants here
12206 as this is now done in Build_Derived_Type.
12207 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
12208 a parent type.
12209 (Process_Full_View): Update the propagation of DIC attributes.
12210 (Propagate_Default_Init_Cond_Attributes): Removed.
12211 * sem_ch7.adb Add with and use clauses for Exp_Util.
12212 (Analyze_Package_Specification): Create the body of the DIC
12213 procedure at the end of the visible and private declarations.
12214 (Preserve_Full_Attributes): Propagate DIC attributes.
12215 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
12216 DIC attributes.
12217 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
12218 * sem_elab.adb (Check_A_Call): Update the call to
12219 Is_Nontrivial_Default_Init_Cond_Procedure.
12220 * sem_prag.adb Remove the with and use clauses for
12221 GNAT.HTable. Move the handling of class- wide pre/postcondition
12222 description and data structures to Exp_Util.
12223 (Analyze_Pragma): Create the declaration of the DIC procedure. There
12224 is no need to propagate invariant-related attributes at this point
12225 as this is done in Build_Invariant_Procedure_Declaration.
12226 (Build_Class_Wide_Expression): Moved to Exp_Util.
12227 (Entity_Hash): Moved to Exp_Util.
12228 (Update_Primitives_Mapping): Moved to Exp_Util.
12229 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
12230 (Update_Primitives_Mapping): Moved to Exp_Util.
12231 * sem_util.adb: Remove with and use clauses for Ghost
12232 and Sem_Ch13.
12233 (Build_Default_Init_Cond_Call): Removed.
12234 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12235 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12236 (Get_Views): Reimplemented.
12237 (Has_Full_Default_Initialization): Reimplement the section on DIC.
12238 (Inherit_Default_Init_Cond_Procedure): Removed.
12239 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12240 (Is_Nontrivial_DIC_Procedure): New routine.
12241 (Is_Verifiable_DIC_Pragma): New routine.
12242 (Propagate_DIC_Attributes): New routine.
12243 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
12244 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12245 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12246 (Inherit_Default_Init_Cond_Procedure): Removed.
12247 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12248 (Is_Nontrivial_DIC_Procedure): New routine.
12249 (Is_Verifiable_DIC_Pragma): New routine.
12250 (Propagate_DIC_Attributes): New routine.
12251 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
12252 on DIC.
12253 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
12254 usage in nodes.
12255 (Expression_Copy): New routine along with pragma Inline.
12256 (Set_Expression_Copy): New routine along with pragma Inline.
12257
12258 2017-01-06 Bob Duff <duff@adacore.com>
12259
12260 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
12261 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
12262 we won't generate the call to s_stalib_adafinal when the main
12263 is not written in Ada.
12264
12265 2017-01-06 Bob Duff <duff@adacore.com>
12266
12267 * sem_prag.adb: Minor: remove pragma Warnings.
12268
12269 2017-01-06 Tristan Gingold <gingold@adacore.com>
12270
12271 * Makefile.rtl: Do not compile s-stchop by default.
12272
12273 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12274
12275 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12276 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12277 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12278 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12279 Reverted previous change for now.
12280
12281 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12282
12283 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12284 check to default discriminant value if checks are enabled.
12285 (Build_Assignment): If type of component has static predicate,
12286 apply check to its default value, if any.
12287
12288 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12289
12290 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12291 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12292 the value record of a task, set its _Secondary_Stack_Size field
12293 if present.
12294 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12295 a _Secondary_Stack_Size field in the value record of
12296 the task if a Secondary_Stack_Size rep item is present.
12297 (Make_Task_Create_Call): Include secondary stack size
12298 parameter. If No_Secondary_Stack restriction is in place, passes
12299 stack size of 0.
12300 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12301 Secondary_Stack_Size.
12302 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12303 function to define the overhead of the secondary stack.
12304 * s-tarest.adb (Create_Restricted_Task,
12305 Create_Restricted_Task_Sequential): Functions now include
12306 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12307 * s-tarest.adb (Create_Restricted_Task,
12308 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12309 now include Secondary_Stack_Size parameter.
12310 (Task_Wrapper):
12311 Secondary stack now allocated to the size specified by the
12312 Secondary_Stack_Size parameter in the task's ATCB.
12313 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12314 Secondary_Stack_Size component.
12315 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12316 Create_Restricted_Task_Sequential): Function now include
12317 Secondary_Stack_Size parameter.
12318 (Task_Wrapper): Secondary stack
12319 now allocated to the size specified by the Secondary_Stack_Size
12320 parameter in the task's ATCB.
12321 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12322 for Secondary_Stack_Size aspect, turning the aspect into its
12323 corresponding internal attribute.
12324 (Analyze_Attribute_Definition):
12325 Process Secondary_Stack_Size attribute.
12326 * snames.adb-tmpl, snames.ads-tmpl: Added names
12327 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12328 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12329
12330 2017-01-06 Pascal Obry <obry@adacore.com>
12331
12332 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12333 Sequential_IO and Direct_IO.
12334
12335 2017-01-06 Bob Duff <duff@adacore.com>
12336
12337 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12338 * par-ch2.adb: Allow the new pragma (with analysis deferred
12339 to Sem_Prag).
12340 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12341 Keep a mapping from new pragma names to old names.
12342 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12343 implement it by calling Map_Pragma_Name.
12344 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12345 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12346 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12347 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12348 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12349 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12350 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12351 as appropriate.
12352
12353 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12354
12355 * exp_ch9.adb: Minor reformatting.
12356
12357 2017-01-06 Tristan Gingold <gingold@adacore.com>
12358
12359 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12360 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12361 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12362 (unused).
12363 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12364 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12365 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12366 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12367
12368 2017-01-06 Bob Duff <duff@adacore.com>
12369
12370 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12371 dummy implementation of Map_Pragma_Name.
12372
12373 2017-01-06 Tristan Gingold <gingold@adacore.com>
12374
12375 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12376 entry_body variable constant.
12377 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12378 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12379 to constant.
12380 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12381 now access to constant.
12382
12383 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12384
12385 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12386 reformatting and typo fixes.
12387
12388 2017-01-06 Bob Duff <duff@adacore.com>
12389
12390 * snames.ads-tmpl: New names for pragma renaming.
12391 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12392 * par-prag.adb: Add new pragma name to case statement.
12393 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12394 of the pragma.
12395 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12396 Dummy implementation of Pragma_Name_Mapped.
12397
12398 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12399
12400 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12401 better detect call within an entry_wrapper.
12402 * sem_res.adb (Resolve_Call): A protected call within an
12403 entity_wrapper is analyzed in the context of the protected
12404 object but corresponds to a pre-analysis and is not an access
12405 before elaboration.
12406 * sem_attr.adb: Minor reformatting.
12407
12408 2017-01-06 Justin Squirek <squirek@adacore.com>
12409
12410 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12411 Finalization_Size to allow a prefix of any non-class-wide type.
12412 * sem_attr.ads Modify comment for Finalization_Size to include
12413 definite type use case.
12414
12415 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12416
12417 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12418 on procedures that are wrappers created for entries that have
12419 preconditions.
12420 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12421 body is an entry_wrapper, compile it in the context of the
12422 synchronized type, because a precondition may refer to funtions
12423 of the type.
12424 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12425 body entity.
12426 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12427 within an Entry_Wrapper this is an external call whose target
12428 is the synchronized object that is the actual in the call to
12429 the wrapper.
12430
12431 2017-01-06 Yannick Moy <moy@adacore.com>
12432
12433 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12434 in tree, which means not analyzing the previous prefix if the node has
12435 been rewritten into its prefix.
12436
12437 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12438
12439 * s-tpobop.adb: Minor reformatting.
12440
12441 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12442
12443 * checks.adb (Ensure_Valid): Do not generate a validity check
12444 within a generated predicate function, validity checks will have
12445 been applied earlier when required.
12446
12447 2017-01-06 Tristan Gingold <gingold@adacore.com>
12448
12449 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12450 components for performances.
12451 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12452 semantic.
12453
12454 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12455
12456 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12457 If expression is compile-time known and obeys a static predicate
12458 it must be labelled as static, to prevent spurious warnings and
12459 run-time errors, e.g. in case statements. This is relevant when
12460 the expression is the result of constant-folding a type conversion
12461 whose expression is a variable with a known static value.
12462
12463 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12464
12465 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12466
12467 2017-01-06 Justin Squirek <squirek@adacore.com>
12468
12469 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12470 expansion of Finalization_Size attribute.
12471 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12472 semantics of Finalization_Size.
12473 (Eval_Attribute): Add null entry for Finalization_Size.
12474 * sem_attr.ads: Add Finalization_Size to the implementation
12475 dependent attribute list.
12476 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12477
12478 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12479
12480 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12481 iterator specification with a serious syntactic error, transform
12482 construct into an infinite loop in order to continue analysis
12483 and prevent a compiler abort.
12484
12485 2017-01-06 Tristan Gingold <gingold@adacore.com>
12486
12487 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12488 max_queue_lengths_array if unused.
12489
12490 2017-01-06 Bob Duff <duff@adacore.com>
12491
12492 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12493 array access, in case "\" is at the end of Text.
12494 * stylesw.adb (Set_Style_Check_Options): Don't include input
12495 characters in the error message template, because they could
12496 be control characters such as "\", which Errout will try to
12497 interpret.
12498
12499 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12500
12501 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12502 For a private type examine the visible declarations that follow
12503 the partial view, not just the private declarations that follow
12504 the full view.
12505
12506 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12507
12508 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12509 code cleanup.
12510
12511 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12512
12513 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12514 alias of the inherited op is the parent iterator, no need to
12515 examine dispatch table positions which might not be established
12516 yet if type is not frozen.
12517 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12518 predicate function may be a subtype of a tagged type.
12519 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12520 of representation items for the completion of a type extension
12521 where a predicate applies to the partial view.
12522 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12523 parameter that designates function whose actual receives a
12524 predicate check, to improve warning message when the check will
12525 lead to infinite recursion.
12526 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12527 Apply_Predicate_Check.
12528
12529 2017-01-06 Tristan Gingold <gingold@adacore.com>
12530
12531 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12532 Gnat_Extended_Ravenscar.
12533 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12534
12535 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12536
12537 * sem_util.ads: Minor typo fix and reformatting.
12538
12539 2017-01-06 Yannick Moy <moy@adacore.com>
12540
12541 * ghost.adb Minor fixing of references to SPARK RM.
12542 (Check_Ghost_Context): Check whether reference is to a lvalue
12543 before issuing an error about violation of SPARK RM 6.9(13)
12544 when declaration has Ghost policy Check and reference has Ghost
12545 policy Ignore.
12546 * sem_util.adb Minor indentation.
12547 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12548 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12549 * sem_util.ads (Unique_Defining_Entity): Document the result
12550 for package body stubs.
12551
12552 2017-01-06 Tristan Gingold <gingold@adacore.com>
12553
12554 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12555 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12556 constant.
12557 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12558 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12559 values.
12560 * exp_util.adb (Corresponding_Runtime_Package): Consider
12561 Max_Queue_Length pragma.
12562
12563 2017-01-06 Justin Squirek <squirek@adacore.com>
12564
12565 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12566 Remove declaration generation in the case of
12567 System_Tasking_Protected_Objects_Single_Entry being used,
12568 and add a warning message when this is detected to occur.
12569 (Make_Initialize_Protection): Remove reference pass in the case
12570 of System_Tasking_Protected_Objects_Single_Entry.
12571 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12572 * s-tposen.adb (Initialize_Protection_Entry): Remove
12573 Entry_Queue_Max parameter.
12574 * s-tposen.ads: Remove the types use to store the entry queue
12575 maximum.
12576 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12577
12578 2017-01-06 Yannick Moy <moy@adacore.com>
12579
12580 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12581 behavior of function, to also accept out of range positions
12582 and raise Constraint_Error in such case, and to copy sloc from
12583 literal if No_Location passed as location.
12584 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12585 of functions to raise Constraint_Error in case of value not in
12586 appropriate range.
12587
12588 2017-01-06 Tristan Gingold <gingold@adacore.com>
12589
12590 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12591 Invalidate_Stack_Cache.
12592
12593 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12594
12595 * s-os_lib.adb: Minor fix to the signature of Readlink.
12596
12597 2017-01-06 Javier Miranda <miranda@adacore.com>
12598
12599 * sem_ch6.adb (Conforming_Types): Handle another
12600 confusion between views in a nested instance with an actual
12601 private type whose full view is not in scope.
12602
12603 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12604
12605 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12606 mark a rewritten if statement as explicit (Comes_From_Source).
12607
12608 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12609
12610 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12611
12612 2017-01-06 Tristan Gingold <gingold@adacore.com>
12613
12614 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12615
12616 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12617
12618 * sem_case.adb: Minor reformatting.
12619
12620 2017-01-06 Thomas Quinot <quinot@adacore.com>
12621
12622 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12623
12624 2017-01-06 Justin Squirek <squirek@adacore.com>
12625
12626 * aspects.adb: Register aspect in Canonical_Aspect.
12627 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12628 into respective tables.
12629 * einfo.ads, einfo.adb: Add a new attribute for
12630 handling the parameters for Pragma_Max_Entry_Queue
12631 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12632 for accessing and setting were added as well.
12633 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12634 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12635 declaration for pramga arguments and store them in the protected
12636 type node.
12637 (Make_Initialize_Protection): Pass a reference to
12638 the Entry_Max_Queue_Lengths_Array in the protected type node to
12639 the runtime.
12640 * rtsfind.adb: Minor grammar fix.
12641 * rtsfind.ads: Register new types taken from the
12642 runtime libraries RE_Protected_Entry_Queue_Max and
12643 RE_Protected_Entry_Queue_Max_Array
12644 * s-tposen.adb, s-tpoben.adb
12645 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12646 Add extra parameter and add assignment to local object.
12647 * s-tposen.ads, s-tpoben.ads: Add new types to
12648 store entry queue maximums and a field to the entry object record.
12649 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12650 for Aspect_Max_Queue_Length.
12651 (Check_Aspect_At_Freeze_Point):
12652 Add aspect to list of aspects that don't require delayed analysis.
12653 * sem_prag.adb (Analyze_Pragma): Add case statement for
12654 Pragma_Max_Queue_Length, check semantics, and register arugments
12655 in the respective entry nodes.
12656 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12657 and Has_Max_Queue_Length
12658 * snames.ads-tmpl: Add constant for the new aspect-name
12659 Name_Max_Queue_Length and corrasponding pragma.
12660
12661 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12662
12663 * exp_util.adb (Is_Controlled_Function_Call):
12664 Reimplemented. Consider any node which has an entity as the
12665 function call may appear in various ways.
12666
12667 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12668
12669 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12670 an unchecked type conversion when performing a view conversion
12671 to/from a private type. In all other cases use a regular type
12672 conversion to ensure that any relevant checks are properly
12673 installed.
12674
12675 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12676
12677 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12678
12679 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12680
12681 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12682 error on case expression that is an entity, when coverage is
12683 incomplete and entity has a static value obtained by local
12684 propagation.
12685 (Handle_Static_Predicate): New procedure, subsidiary of
12686 Check_Choices, to handle case alternatives that are either
12687 subtype names or subtype indications involving subtypes that
12688 have static predicates.
12689
12690 2017-01-06 Thomas Quinot <quinot@adacore.com>
12691
12692 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12693 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12694
12695 2017-01-06 Bob Duff <duff@adacore.com>
12696
12697 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12698 Elaborate_All(P) to P itself. That could happen in obscure cases,
12699 and always introduced a cycle (P body must be elaborated before
12700 P body).
12701 * lib-writ.ads: Comment clarification.
12702 * ali-util.ads: Minor comment fix.
12703 * ali.adb: Minor reformatting.
12704
12705 2017-01-06 Tristan Gingold <gingold@adacore.com>
12706
12707 * a-exexpr-gcc.adb: Improve comment.
12708
12709 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12710
12711 * s-linux-mips.ads: Use correct signal and errno constants.
12712 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12713
12714 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12715
12716 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12717 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12718 sections.
12719
12720 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12721
12722 * gnatvsn.ads: Bump copyright year.
12723
12724 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12725
12726 * gnat_ugn.texi: Bump @copying's copyright year.
12727 * gnat_rm.texi: Likewise.
12728 \f
12729 Copyright (C) 2017 Free Software Foundation, Inc.
12730
12731 Copying and distribution of this file, with or without modification,
12732 are permitted in any medium without royalty provided the copyright
12733 notice and this notice are preserved.