gnat_and_program_execution.rst: Update section "Dynamic Stack Usage Analysis" to...
[gcc.git] / gcc / ada / ChangeLog
1 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
2
3 * doc/gnat_ugn/gnat_and_program_execution.rst: Update section "Dynamic
4 Stack Usage Analysis" to include more details about GNAT_STACK_LIMIT.
5
6 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
7
8 * exp_util.adb (Add_Own_DIC): Ensure that the expression of the pragma
9 is available (Is_Verifiable_DIC_Pragma): Moved from Sem_Util.
10 * sem_util.adb (Has_Full_Default_Initialization):
11 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
12 whether a type has full default initialization due to pragma
13 Default_Initial_Condition.
14 (Has_Fully_Default_Initializing_DIC_Pragma): New routine.
15 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
16 * sem_util.ads (Has_Fully_Default_Initializing_DIC_Pragma): New
17 routine.
18 (Is_Verifiable_DIC_Pragma): Moved to Exp_Util.
19 * sem_warn.adb (Is_OK_Fully_Initialized):
20 Has_Fully_Default_Initializing_DIC_Pragma is now used to determine
21 whether a type has full default initialization due to pragma
22 Default_Initial_Condition.
23
24 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
25
26 * sem_prag.adb (Match_Constituent): Do not quietly accept constants as
27 suitable constituents.
28 * exp_util.adb: Minor reformatting.
29
30 2017-12-15 Ed Schonberg <schonberg@adacore.com>
31
32 * exp_aggr.adb (In_Place_Assign_OK): Extend the predicate to recognize
33 an array aggregate in an allocator, when the designated type is
34 unconstrained and the upper bound of the aggregate belongs to the base
35 type of the index.
36
37 2017-12-15 Bob Duff <duff@adacore.com>
38
39 * exp_ch6.adb (Expand_N_Extended_Return_Statement,
40 Expand_Simple_Function_Return): Assert that the b-i-p-ness of the
41 caller and callee match. Otherwise, we would need some substantial
42 changes to allow b-i-p calls non-b-i-p, and vice versa.
43
44 2017-12-15 Ed Schonberg <schonberg@adacore.com>
45
46 * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
47 a generic package body. Unnesting is only an issue when generating
48 code, and if the main unit is generic then nested instance bodies have
49 not been created and analyzed, and unnesting will crash in the absence
50 of those bodies,
51
52 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
53
54 * inline.adb (Add_Inlined_Body): Do not add a function which is
55 completed by an expression function defined in the same context as the
56 initial declaration because the completing body is not in a package
57 body.
58 (Is_Non_Loading_Expression_Function): New routine.
59
60 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
61
62 * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
63 the behavior of -gnatdL from before revision 255412.
64 * sem_elab.adb: Update the section of compiler switches.
65 (Build_Call_Marker): Do not create a marker for a call which originates
66 from an expanded spec or body of an instantiated gener, does not invoke
67 a generic formal subprogram, the target is external to the instance,
68 and -gnatdL is in effect.
69 (In_External_Context): New routine.
70 (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
71 and associated flag.
72 (Process_Conditional_ABE_Call): Update the uses of -gnatdL and
73 associated flag.
74 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
75 -gnatd_i.
76 * exp_unst.adb: Minor typo fixes and edits.
77
78 2017-12-15 Ed Schonberg <schonberg@adacore.com>
79
80 * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
81 subprogram instantiation, now that the enclosing wrapper package
82 carries an explicit freeze node. THis prevents freeze nodes for the
83 subprogram for appearing in the wrong scope. This is relevant when the
84 generic subprogram has a private or incomplete formal type and the
85 instance appears within a package that declares the actual type for the
86 instantiation, and that type has itself a delayed freeze.
87
88 2017-12-15 Patrick Bernardi <bernardi@adacore.com>
89
90 * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
91 the environment variable GNAT_STACK_LIMIT from the Stack Overflow
92 Checking section as it is no longer used by any of our supported
93 targets.
94
95 2017-12-15 Bob Duff <duff@adacore.com>
96
97 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
98 Init_Assignment is rewritten, we need to set Assignment_OK on the new
99 node. Otherwise, we will get spurious errors when initializing via
100 assignment statement.
101
102 2017-12-15 Arnaud Charlet <charlet@adacore.com>
103
104 * exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
105 relevant nodes.
106 (Has_Non_Null_Statements): Moved to sem_util for later reuse.
107
108 2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
109
110 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
111 * libgnat/s-fatgen.adb (Model): Use Machine attribute.
112 (Truncation): Likewise.
113
114 2017-12-15 Bob Duff <duff@adacore.com>
115
116 * exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
117 statement sequence generated for certain extended return statements
118 have a Sloc that is not No_Location. Otherwise, the back end doesn't
119 set any location and ends up reading uninitialized variables.
120
121 2017-12-15 Bob Duff <duff@adacore.com>
122
123 * types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
124 r255414, committed by mistake.
125
126 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
127
128 * gcc-interface/Makefile.in: Generalize support for symbolic traces.
129
130 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
131
132 * gcc-interface/misc.c (default_pass_by_ref): Minor tweak.
133
134 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
135
136 * gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
137 to 0 on the callee if the call is recursive.
138
139 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
140
141 * gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
142 of the enclosing record type if it is not already set.
143
144 2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
145
146 * gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
147 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
148 a padding type for the alignment before validating the size.
149 Flip conditional construct and add a comment.
150 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
151 apply the exception for padded objects to the type of the object.
152 * gcc-interface/utils.c (hash_pad_type): New static function.
153 (lookup_and_insert_pad_type): Rename into...
154 (canonicalize_pad_type): ...this. Call hash_pad_type, do only one
155 lookup with insertion and always return the canonical type.
156 (maybe_pad_type): Adjust to above changes. Set debug type later.
157 (pad_type_has_rm_size): New predicate.
158 (set_reverse_storage_order_on_pad_type): Adjust to above changes.
159
160 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
161
162 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.
163
164 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
165
166 * gcc-interface/trans.c (process_freeze_entity): Be prepared for a
167 package without body.
168
169 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
170
171 * gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
172 descendant of System.Address.
173 (gnat_to_gnu_subprog_type): Likewise.
174
175 2017-12-08 Jakub Jelinek <jakub@redhat.com>
176
177 * gcc-interface/utils.c (gnat_internal_attribute_table): Add
178 exclusions to the comment.
179
180 2017-12-07 Martin Sebor <msebor@redhat.com>
181
182 PR c/81544
183 * gcc-interface/utils.c (gnat_internal_attribute_table): Initialize
184 new member of struct attribute_spec.
185
186 2017-12-06 Simon Wright <simon@pushface.org>
187
188 PR ada/66205
189 * bindgen.adb (Gen_AdaFinal): If the restriction No_Task_Termination is
190 set, generate a null body.
191
192 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
193
194 * sem_util.adb (Contains_Refined_State): Remove.
195
196 2017-12-05 Ed Schonberg <schonberg@adacore.com>
197
198 * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
199 predicate cannot apply to a formal type.
200
201 2017-12-05 Arnaud Charlet <charlet@adacore.com>
202
203 * exp_unst.ads: Fix typos.
204
205 2017-12-05 Jerome Lambourg <lambourg@adacore.com>
206
207 * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
208 QNX. At startup, the first mutex created has a non-zero ceiling
209 priority whatever its actual policy. This makes some tests fail
210 (c940013 for example).
211
212 2017-12-05 Bob Duff <duff@adacore.com>
213
214 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
215 Expand_Cleanup_Actions for N_Extended_Return_Statement.
216 * exp_ch7.adb (Expand_Cleanup_Actions): Handle
217 N_Extended_Return_Statement by transforming the statements into a
218 block, and (indirectly) calling Expand_Cleanup_Actions on the block.
219 It's too hard for Expand_Cleanup_Actions to operate directly on the
220 N_Extended_Return_Statement, because it has a different structure than
221 the other node kinds that Expand_Cleanup_Actions.
222 * exp_util.adb (Requires_Cleanup_Actions): Add support for
223 N_Extended_Return_Statement. Change "when others => return False;" to
224 "when others => raise ...;" so it's clear what nodes this function
225 handles. Use named notation where appropriate.
226 * exp_util.ads: Mark incorrect comment with ???.
227
228 2017-12-05 Javier Miranda <miranda@adacore.com>
229
230 * exp_ch9.adb (Install_Private_Data_Declarations): Add missing
231 Debug_Info_Needed decoration of internally generated discriminal
232 renaming declaration.
233
234 2017-12-05 Arnaud Charlet <charlet@adacore.com>
235
236 * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
237 nested subprograms.
238
239 2017-12-05 Sergey Rybin <rybin@adacore.com>
240
241 * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
242 option for gnatmetric, gnatpp, gnat2xml, and gnattest.
243
244 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
245
246 * sem_util.adb (Contains_Refined_State): Remove.
247
248 2017-12-05 Piotr Trojanek <trojanek@adacore.com>
249
250 * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
251 Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
252 Ada.Calendar.Clock_Time).
253
254 2017-12-05 Ed Schonberg <schonberg@adacore.com>
255
256 * sem_ch4.adb (Is_Private_Overriding): If the candidate private
257 subprogram is overloaded, scan the list of homonyms in the same
258 scope, to find the inherited operation that may be overridden
259 by the candidate.
260 * exp_ch11.adb, exp_ch7.adb: Minor reformatting.
261
262 2017-12-05 Bob Duff <duff@adacore.com>
263
264 * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
265 Init_Assignment is rewritten, we need to set Assignment_OK on the new
266 node. Otherwise, we will get spurious errors when initializing via
267 assignment statement.
268
269 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
270
271 * sem_elab.adb: Update the terminology and switch sections.
272 (Check_SPARK_Model_In_Effect): New routine.
273 (Check_SPARK_Scenario): Verify the model in effect for SPARK.
274 (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
275 SPARK.
276 (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
277 effect for SPARK.
278 (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
279 in effect for SPARK.
280
281 2017-12-05 Nicolas Setton <setton@adacore.com>
282
283 * terminals.c (__gnat_setup_child_communication): As documented,
284 __gnat_setup_child_communication should not terminate - it is intended
285 to be used as the child process of a call to fork(). However, execvp
286 might actually return in some cases, for instance when attempting to
287 run a 32-bit binary on a 64-bit Linux distribution when the
288 compatibility packages are not installed. In these cases, exit the
289 program to conform to the documentation.
290
291 2017-12-05 Olivier Hainque <hainque@adacore.com>
292
293 * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
294 update.
295
296 2017-12-05 Gary Dismukes <dismukes@adacore.com>
297
298 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
299 and reformatting.
300 * gnat_ugn.texi: Regenerate.
301
302 2017-12-05 Olivier Hainque <hainque@adacore.com>
303
304 * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
305 on access to subprogram types with foreign convention.
306
307 2017-12-05 Yannick Moy <moy@adacore.com>
308
309 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
310 Guide description of default settings of warnings.
311
312 2017-12-05 Olivier Hainque <hainque@adacore.com>
313
314 * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
315 of section. Add comments explaining the rationale of the computation.
316
317 2017-12-05 Bob Duff <duff@adacore.com>
318
319 * exp_ch11.adb: Minor refactoring.
320
321 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
322
323 * debug.adb: Add debug switches d_a, d_e, and d_p, along with
324 documentation.
325 (Set_Underscored_Debug_Flag): New routine.
326 * debug.ads: Add the flags for all underscore switches.
327 (Set_Underscored_Debug_Flag): New routine.
328 * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
329 (Suppress_Elaboration_Warnings): New routine.
330 (Set_Suppress_Elaboration_Warnings): New routine.
331 (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
332 * einfo.ads: Add new flag Suppress_Elaboration_Warnings.
333 (Suppress_Elaboration_Warnings): New routine along with pragma Inline.
334 (Set_Suppress_Elaboration_Warnings): New routine along with pragma
335 Inline.
336 * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
337 legacy elaboration model.
338 (Default_Initialize_Object): Restore the behavior of the legacy
339 elaboration model.
340 * exp_ch9.adb: Add with and use clause for Sem_Elab.
341 (Build_Task_Activation_Call): Restore the behavior of the legacy
342 elaboration model.
343 * frontend.adb (Frontend): Restore the behavior of the legacy
344 elaboration model.
345 * opt.ads: Add new flags Legacy_Elaboration_Checks and
346 Relaxed_Elaboration_Checks, along with documentation.
347 * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
348 legacy elaboration model.
349 * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
350 elaboration model.
351 * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
352 the legacy elaboration model.
353 * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
354 elaboration model.
355 * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
356 of the legacy elaboration model.
357 (Analyze_Package_Instantiation): Restore the behavior of the legacy
358 elaboration model.
359 (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
360 elaboration model.
361 * sem_elab.adb: Update the documentation of the Processing phase.
362 Update the documentation on elaboration-related compilation
363 switches. Update the documentation on adding a new target. Add
364 Processing_Attributes which represent the state of the Processing
365 phase. Resurrect the previous elaboration model as "legacy elaboration
366 model".
367 (Build_Call_Marker): This routine does not function when the legacy
368 elaboration model is in effect. Do not consider entry calls and requeue
369 statements when debug flag d_e is in effect. Do not consider calls to
370 subprograms which verify the runtime semantics of certain assertion
371 pragmas when debug flag d_p is in effect.
372 (Build_Variable_Reference_Marker): This routine does not function when
373 the legacy elaboration model is in effect.
374 (Check_Elaboration_Scenarios): This routine does not function when the
375 legacy elaboration model is in effect.
376 (Ensure_Prior_Elaboration): The various flags have now been replaced
377 with a state. Do not generate implicit Elaborate[_All] pragmas when
378 their creation has been suppressed.
379 (Ensure_Prior_Elaboration_Static): The with clause is marked based on
380 the requested pragma, not on the nature of the scenario.
381 (In_External_Context): Removed.
382 (Is_Assertion_Pragma_Target): New routine.
383 (Is_Potential_Scenario): Stop the traversal of a task body when
384 reaching an accept or select statement, and debug switch d_a is in
385 effect.
386 (Kill_Elaboration_Scenario): This routine does not function when the
387 legacy elaboration model is in effect.
388 (Process_Activation_Generic): The various flags have now been replaced
389 with a state.
390 (Process_Conditional_ABE): The various flags have now been replaced
391 with a state.
392 (Process_Conditional_ABE_Access): The various flags have now been
393 replaced with a state.
394 (Process_Conditional_ABE_Activation_Impl): The various flags have now
395 been replaced with a state. Do not process an activation call which
396 activates a task whose type is defined in an external instance, and
397 debug switch dL is in effect. Suppress the generation of implicit
398 Elaborate[_All] pragmas once a conditional ABE check has been
399 installed.
400 (Process_Conditional_ABE_Call): The various flags have now been
401 replaced with a state. Do not process a call which invokes a subprogram
402 defined in an external instance, and debug switch dL is in effect.
403 (Process_Conditional_ABE_Call_Ada): The various flags have now been
404 replaced with a state. Suppress the generation of implicit
405 Elaborate[_All] pragmas once a conditional ABE check has been
406 installed.
407 (Process_Conditional_ABE_Call_SPARK): The various flags have now been
408 replaced with a state.
409 (Process_Conditional_ABE_Instantiation): The various flags have now
410 been replaced with a state.
411 (Process_Conditional_ABE_Instantiation_Ada): The various flags have now
412 been replaced with a state. Suppress the generation of implicit
413 Elaborate[_All] pragmas once a conditional ABE check has been
414 installed.
415 (Process_Conditional_ABE_Instantiation_SPARK): The various flags have
416 now been replaced with a state.
417 (Process_Guaranteed_ABE_Activation_Impl): The various flags have now
418 been replaced with a state.
419 (Process_Single_Activation): The various flags have now been replaced
420 with a state.
421 (Record_Elaboration_Scenario): This routine does not function when the
422 legacy elaboration model is in effect.
423 (Traverse_Body): The various flags have now been replaced with a state.
424 * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
425 elaboration model".
426 * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
427 elaboration model.
428 * sem_res.adb (Resolve_Call): Restore the behavior of the legacy
429 elaboration model.
430 (Resolve_Entity_Name): Restore the behavior of the legacy elaboration
431 model.
432 * sem_util.adb (Mark_Elaboration_Attributes): This routine does not
433 function when the legacy elaboration model is in effect.
434 * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
435 (No_Elaboration_Check): New routine.
436 (Set_Is_Known_Guaranteed_ABE): Update the assertion check.
437 (Set_No_Elaboration_Check): New routine.
438 * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
439 along with occurrences in nodes. Add new flag No_Elaboration_Check
440 along with occurrences in nodes.
441 * switch-c.adb (Scan_Front_End_Switches): Add processing for debug
442 switches with underscores. Add processing for switches -gnatH and
443 -gnatJ.
444 * usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
445 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
446 documentation to include the legacy and relaxed elaboration models.
447 * gnat_ugn.texi: Regenerate.
448
449 2017-12-05 Arnaud Charlet <charlet@adacore.com>
450
451 * doc/gnat_ugn/platform_specific_information.rst: Minor edit.
452 Improve doc on required packages for linux 32bits.
453
454 2017-12-05 Doug Rupp <rupp@adacore.com>
455
456 * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
457
458 2017-12-05 Javier Miranda <miranda@adacore.com>
459
460 * checks.adb (Generate_Range_Check): Force evaluation of the node in
461 more cases. This patch was written to improve the code generated by
462 the CCG compiler but it is enabled for all targets since double
463 evaluation is always a potential source of inefficiency.
464
465 2017-12-05 Gary Dismukes <dismukes@adacore.com>
466
467 * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
468 -fdump-xref switch.
469
470 2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
471
472 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
473 iteration scheme throughout, except for the new loop statement(s).
474
475 2017-12-05 Ed Schonberg <schonberg@adacore.com>
476
477 * exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
478 assignment if it is part of an Iterated_Component_Association: the
479 analysis needs to take place once the loop structure is analyzed and
480 the loop parameter made visible, because references to it typically
481 appear in the corresponding expression. This is necessary if the
482 expression is an aggregate, because previous pre-analysis of the
483 expression does not handle nested aggregates properly.
484
485 2017-12-05 Bob Duff <duff@adacore.com>
486
487 * sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
488 allocator that is the expansion of a build-in-place function call.
489
490 2017-12-05 Olivier Hainque <hainque@adacore.com>
491
492 libgnat/
493 * s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
494 possibly adjusting the lookup address by a load address, expect
495 a extra argument through which the load address can be conveyed
496 separately.
497 (Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
498 retrieved load address to Init_Module.
499 * s-tsmona__linux.adb (Get): Honor the new interface.
500 * s-tsmona__mingw.adb (Get): Likewise.
501 * s-dwalin.ads: Adjust comments to be explicit about which
502 addresses are from module info and which are run-time addresses,
503 offsetted by the module load address.
504 * s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
505 Do not alter the module Low and High (relative) addresses.
506 (Is_Inside): Improve documentation regarding the kinds of addresses
507 at hand and correct the test.
508 (Symbolic_Traceback): Use separate variables with explicit names
509 for the address in traceback (run-time value) and the address to
510 lookup within the shared object (module-relative). Adjust the
511 computation of address passed to Symbolic_Address for symbolization.
512
513 2017-12-05 Arnaud Charlet <charlet@adacore.com>
514
515 * opt.ads (Expand_Nonbinary_Modular_Ops): New flag.
516 * exp_ch4.adb (Expand_Nonbinary_Modular_Op): Use
517 Expand_Nonbinary_Modular_Ops instead of Modify_Tree_For_C, so that
518 other back-ends can also benefit from the front-end expansion. Remove
519 test for Modify_Tree_For_C in all callers to better share code.
520 * gnat1drv.adb (Adjust_Global_Switches): Set
521 Expand_Nonbinary_Modular_Ops when generating C code.
522
523 2017-12-05 Ed Schonberg <schonberg@adacore.com>
524
525 * exp_ch5.adb (Expand_Formal_Container_Loop): Ensure that the loop
526 parameter becomes invisible after analyzing the loop, which has been
527 rewritten as a while-loop.
528
529 2017-12-05 Doug Rupp <rupp@adacore.com>
530
531 * vxaddr2line.adb: Revise and enhance for new ports, remove dead ports,
532 and update for 64bit ports.
533
534 2017-12-05 Bob Duff <duff@adacore.com>
535
536 * exp_ch6.adb (Build_In_Place_Formal): Search for the formal by suffix
537 instead of the full name.
538 * sem_ch6.adb (Create_Extra_Formals): Make sure there are extra formals
539 in the case of an instance of a generic.
540
541 2017-12-05 Arnaud Charlet <charlet@adacore.com>
542
543 (Adjust_Global_Switches): Create an alias GNAT_Annotate to map to
544 pragma Annotate.
545
546 2017-12-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
547
548 * gcc-interface/Makefile.in (RTEMS): Define EH_MECHANISM.
549
550 2017-12-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
551
552 * gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
553 * libgnat/s-osprim__rtems.adb: New file.
554 * libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
555 (pthread_mutexattr_t): Likewise.
556 (pthread_rwlockattr_t): Likewise.
557 (pthread_rwlock_t): Likewise.
558 (time_t): Use 64-bit integer.
559
560 2017-12-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
561
562 * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
563 alignment.
564 (pthread_mutex_t): Likewise.
565 (pthread_rwlock_t): Likewise.
566
567 2017-11-28 Jakub Jelinek <jakub@redhat.com>
568
569 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
570 using build2 instead of build3.
571
572 2017-11-23 Eric Botcazou <ebotcazou@adacore.com>
573
574 PR ada/83091
575 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not build a variant
576 type for the implementation type of a packed array.
577
578 2017-11-23 Mike Stump <mikestump@comcast.net>
579 Eric Botcazou <ebotcazou@adacore.com>
580
581 * gcc-interface/trans.c (gnat_gimplify_stmt) <LOOP_STMT>: Pass 3rd
582 operand to ANNOTATE_EXPR and also pass unrolling hints.
583
584 2017-11-20 Eric Botcazou <ebotcazou@adacore.com>
585
586 PR ada/83016
587 * gnatlink.adb (Process_Args): Accept multiple switches for --LINK.
588 (Usage): Adjust.
589 * gcc-interface/Makefile.in (GCC_LINK): Remove $(ADA_INCLUDES).
590 (common-tools): Pass $(CC) as --GCC= and $(GCC_LINK) as --LINK= in
591 the invocations of $(GNATLINK).
592 (../../gnatdll$(exeext)): Likewise.
593 (../../vxaddr2line$(exeext)): Likewise.
594 (gnatmake-re): Likewise.
595 (gnatlink-re): Likewise.
596
597 2017-11-16 Doug Rupp <rupp@adacore.com>
598
599 * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
600
601 2017-11-16 Steve Baird <baird@adacore.com>
602
603 * debug.adb: Update another comment to indicate gnat2scil's use of the
604 -gnatd.7 switch.
605
606 2017-11-16 Bob Duff <duff@adacore.com>
607
608 * exp_ch6.adb (Expand_Call_Helper): Avoid creating a transient scope in
609 the case of nested build-in-place calls.
610
611 2017-11-16 Joel Brobecker <brobecker@adacore.com>
612
613 * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches
614 available in gnatsymbolize.
615
616 2017-11-16 Steve Baird <baird@adacore.com>
617
618 * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7
619 switch.
620
621 2017-11-16 Gary Dismukes <dismukes@adacore.com>
622
623 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb,
624 sem_elab.adb: Minor editorial corrections.
625 * gnat_ugn.texi: Regenerate.
626
627 2017-11-16 Joel Brobecker <brobecker@adacore.com>
628
629 * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add
630 gnatsymbolize documentation.
631 * gnat_ugn.texi: Regenerate.
632
633 2017-11-16 Steve Baird <baird@adacore.com>
634
635 * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of
636 "Scope (Parent_Type)" with "Scope (Parent_Base)".
637
638 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
639
640 * opt.ads: Elaboration warnings are now on by default. Add a comment
641 explaining why this is needed.
642 * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration
643 warnings.
644 * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of
645 elaboration warnings.
646 (Analyze_Subprogram_Instantiation): Preserve the status of elaboration
647 warnings.
648 * sem_elab.adb: Update the structure of Call_Attributes and
649 Instantiation_Attributes.
650 (Build_Call_Marker): Propagate the status of elaboration warnings from
651 the call to the marker.
652 (Extract_Call_Attributes): Extract the status of elaboration warnings.
653 (Extract_Instantiation_Attributes): Extract the status of elaboration
654 warnings.
655 (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are
656 now dependent on the status of elaboration warnings.
657 (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now
658 dependent on the status of elaboration warnings.
659 (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics
660 are now dependent on the status of elaboration warnings.
661 (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced
662 for formal Call_Attrs. Elaboration diagnostics are now dependent on the
663 status of elaboration warnings.
664 (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now
665 dependent on the status of elaboration warnings.
666 (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now
667 dependent on the status of elaboration warnings.
668 * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning
669 concerning pragma Elaborate.
670 * sem_res.adb (Resolve_Call): Preserve the status of elaboration
671 warnings.
672 (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node
673 from the procedure call to the entry call.
674 * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter
675 Warnings.
676 (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration
677 warnings
678 * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter
679 Warnings. Update the comment on usage.
680 * sinfo.adb (Is_Dispatching_Call): Update to use Flag6.
681 (Is_Elaboration_Warnings_OK_Node): New routine.
682 (Set_Is_Dispatching_Call): Update to use Flag6.
683 (Set_Is_Elaboration_Warnings_OK_Node): New routine.
684 * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new
685 attribute Is_Elaboration_Warnings_OK_Node along with occurrences
686 in nodes.
687 (Is_Elaboration_Warnings_OK_Node): New routine along with pragma
688 Inline.
689 (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma
690 Inline.
691 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various
692 sections to indicate how to suppress elaboration warnings. Document
693 switches -gnatwl and -gnatwL.
694 * gnat_ugn.texi: Regenerate.
695
696 2017-11-16 Sylvain Dailler <dailler@adacore.com>
697
698 * sem_util.adb (Get_Enum_Lit_From_Pos): Add a condition for Pos
699 lower than 0.
700
701 2017-11-16 Bob Duff <duff@adacore.com>
702
703 * sem_ch13.adb (Check_Expr_Constants): Avoid error message in case of
704 System'To_Address.
705
706 2017-11-16 Yannick Moy <moy@adacore.com>
707
708 * sem_elab.adb (Include): Fix mode of parameter Curr to out.
709
710 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
711
712 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
713 Context_Id denotes a record type.
714
715 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
716
717 * sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
718 instantiations.
719
720 2017-11-16 Doug Rupp <rupp@adacore.com>
721
722 Initial gnat port to aarch64-wrs-vxworks7
723 * libgnarl/s-vxwork__aarch64.ads,
724 libgnat/system-vxworks7-aarch64-rtp-smp.ads,
725 libgnat/system-vxworks7-aarch64.ads: New files
726 * sigtramp-vxworks-target.inc (aarch64): New section.
727 * tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
728
729 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
730
731 * sem_elab.adb (Include): Including a node which is also a compilation
732 unit terminates the search because there are no more lists to examine.
733
734 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
735
736 * sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
737 declaration does not define a primitive operation of a tagged type for
738 SPARK.
739 (Check_SPARK_Primitive_Operation): New routine.
740
741 2017-11-16 Arnaud Charlet <charlet@adacore.com>
742
743 * libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
744 message when using -E binder switch.
745
746 2017-11-16 Piotr Trojanek <trojanek@adacore.com>
747
748 * errout.ads: Fix minor typo in comment.
749
750 2017-11-16 Ed Schonberg <schonberg@adacore.com>
751
752 * sem_ch3.adb (Process_Subtype): If the subtype indication does not
753 syntactically denote a type, return Any_Type to prevent subsequent
754 compiler crashes or infinite loops.
755
756 2017-11-16 Steve Baird <baird@adacore.com>
757
758 * lib-writ.adb: Fix bug which causes Program_Error to be raised in some
759 cases when writing out a .ali file when a Rename_Pragma pragma is in
760 effect.
761 * lib-writ.adb (Write_Unit_Information): Replace call to
762 Pragma_Name_Unmapped with call to Pragma_Name.
763
764 2017-11-16 Gary Dismukes <dismukes@adacore.com>
765
766 * sem_elab.adb: Minor typo fixes.
767
768 2017-11-16 Justin Squirek <squirek@adacore.com>
769
770 * sem_res.adb (Resolve_Allocator): Correct warning messages and make
771 them more explicit.
772
773 2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
774
775 * atree.ads (Nkind_In): Add 10 and 11 parameter versions.
776 * checks.adb (Install_Primitive_Elaboration_Check): Mark the setting of
777 the elaboration flag as elaboration code.
778 * einfo.adb (Contract): Update the comments.
779 (Ignore_SPARK_Mode_Pragmas): Update the comments.
780 (SPARK_Aux_Pragma): Update the comments.
781 (SPARK_Aux_Pragma_Inherited): Update the comments.
782 (SPARK_Pragma): Update the comments. The attribute now applies
783 to all types and abstract states.
784 (SPARK_Pragma_Inherited): Update the comments. The attribute now
785 applies to all types and abstract states.
786 (Set_Contract): Update the comments.
787 (Set_Ignore_SPARK_Mode_Pragmas): Update the comments.
788 (Set_SPARK_Aux_Pragma): Update the comments.
789 (Set_SPARK_Aux_Pragma_Inherited): Update the comments.
790 (Set_SPARK_Pragma): Update the comments. The attribute now applies to
791 all types and abstract states.
792 (Set_SPARK_Pragma_Inherited): Update the comments. The attribute now
793 applies to all types and abstract states.
794 (Write_Field40_Name): Add output for SPARK_Pragma when it appears on a
795 type and abstract states.
796 * einfo.ads: Update the documentation of attributes SPARK_Pragma and
797 SPARK_Pragma_Inherited. Both of them now apply to all types and
798 abstract states.
799 * exp_util.adb (Set_Elaboration_Flag): Mark the setting of the
800 elaboration flag as elaboration code.
801 * sem_ch3.adb: Add with and use clauses for Sem_Elab.
802 (Analyze_Full_Type_Declaration): Set the SPARK_Mode of the type. Record
803 a derived type for later processing by the ABE mechanism.
804 (Analyze_Incomplete_Type_Decl): Set the SPARK_Mode of the type.
805 (Analyze_Private_Extension_Declaration): Set the SPARK_Mode of the
806 type.
807 * sem_ch7.adb (Analyze_Private_Type_Declaration): Set the SPARK_Mode of
808 the type.
809 * sem_elab.adb: Define the term "early call region". Update the
810 terminology for "scenario" and "target". Update the architecture of
811 the ABE mechanism. Update the steps which must be taken when adding a
812 new scenario. Update the section on debugging ABE issues. Add new
813 hash tables Early_Call_Regions and Recorded_SPARK_Scenarios. Add new
814 table SPARK_Scenarios. Hash table Elaboration_Context is now
815 Elaboration_Statuses. The majority of Process_xxx routines have been
816 updated to better reflect their role.
817 (Add_Unit): Reimplemented.
818 (Check_Elaboration_Constituent): New routine.
819 (Check_Elaboration_Scenarios): Verify previously recorded scenarios for
820 conditional ABE issues. Verify previously recorded SPARK scenarios.
821 (Check_SPARK_Derived_Type): New routine.
822 (Check_SPARK_Instantiation): New routine.
823 (Check_SPARK_Scenario): New routine.
824 (Check_SPARK_Refined_State_Pragma): New routine.
825 (Early_Call_Region): New routine.
826 (Elaboration_Status): New routine.
827 (Ensure_Prior_Elaboration): Add new formal parameter Prag_Nam. The
828 implicit Elabotate[_All] pragma is now specified via Prag_Nam.
829 (Find_Early_Call_Region): New routine.
830 (Info_Scenario): Add output for refinement constituents.
831 (Is_Recorded_SPARK_Scenario): New routine.
832 (Is_Suitable_SPARK_Derived_Type): New routine.
833 (Is_Suitable_SPARK_Instantiation): New routine.
834 (Is_Suitable_SPARK_Refined_State_Pragma): New routine.
835 (Is_Visited_Body): New routine.
836 (Kill_Elaboration_Scenario): Reimplemented.
837 (Output_Active_Scenarios): Add output for pragma Refined_State.
838 (Output_SPARK_Refined_State_Pragma): New routine.
839 (Process_Conditional_ABE_Call): Remove the use of -gnatd.v. The effect
840 is now achieved by different means.
841 (Process_Conditional_ABE_Call_SPARK): Verify that a call which precedes
842 the subprogram body appears within the early call region of the body.
843 Either ensure the prior elaboration of external subprograms or verify
844 that the context meets the suitable elaboration requirement.
845 (Process_Conditional_ABE_Instantiation_SPARK): New routine.
846 (Record_Elaboration_Scenario): Reimplement the portion which enforces
847 the level restrictions of the static model. Add support for SPARK
848 scenarios.
849 (Record_SPARK_Elaboration_Scenario): New routine.
850 (Reset_Visited_Bodies): New routine.
851 (Set_Early_Call_Region): New routine.
852 (Set_Elaboration_Status): New routine.
853 (Set_Is_Recorded_SPARK_Scenario): New routine.
854 (Update_Elaboration_Scenario): Reimplemented.
855 * sem_elab.ads: Add new subtype Library_Or_Instantiation_Level.
856 * sem_prag.adb (Analyze_Refined_State_In_Decl_Part): Save the pragma
857 for examination by the ABE Processing phase.
858 (Create_Abstract_State): Save the SPARK_Mode from the context.
859 * sem_util.adb (Is_Non_Preelaborable_Construct): New routine.
860 * sem_util.ads (Is_Non_Preelaborable_Construct): New routine.
861 * sinfo.adb (Is_Elaboration_Code): New routine.
862 (Set_Is_Elaboration_Code): New routine.
863 (Nkind_In): Add 10 and 11 parameter versions.
864 * sinfo.ads: Add new attribute Is_Elaboration_Code along with
865 occurrences in nodes.
866 (Is_Elaboration_Code): New routine along with pragma Inline.
867 (Set_Is_Elaboration_Code): New routine along with pragma Inline.
868 (Nkind_In): Add 10 and 11 parameter versions.
869
870 2017-11-16 Justin Squirek <squirek@adacore.com>
871
872 * sem.adb (Analyze): Remove requirement that the original node of N be
873 an operator in the case that analysis on the node yields the relevant
874 operator - so prefer it instead.
875
876 2017-11-16 Bob Duff <duff@adacore.com>
877
878 * sem_ch6.adb (Create_Extra_Formals): The type of the BIP_Object_Access
879 formal must not have a designated type that is the full view coming
880 from a limited-with'ed package.
881 * sem_util.adb,sem_util.ads (Incomplete_View_From_Limited_With): New
882 function called from sem_ch6.
883 * sem_ch5.adb (Analyze_Assignment): Treat user-defined concatenation
884 specially for b-i-p cases.
885
886 2017-11-10 Martin Sebor <msebor@redhat.com>
887
888 PR c/81117
889 * adadecode.c (__gnat_decode): Use memcpy instead of strncpy.
890 * argv.c (__gnat_fill_arg, __gnat_fill_env): Likewise.
891
892 2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
893
894 * gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
895 not fall through to the next case.
896 <ARRAY_TYPE>: Deal specially with a dereference from another array
897 type with the same element type.
898
899 2017-11-09 Gary Dismukes <dismukes@adacore.com>
900
901 * exp_util.adb, freeze.adb: Minor reformatting.
902
903 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
904
905 * gcc-interface/Makefile.in: Add rules to build aarch64-qnx runtimes.
906
907 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
908
909 * gcc-interface/trans.c (gnat_to_gnu): Add processing for
910 N_Variable_Reference_Marker nodes.
911
912 2017-11-09 Ed Schonberg <schonberg@adacore.com>
913
914 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
915 the pragma Compile_Time_Error when it appears in a generic package
916 declaration and uses an expanded name to denote the current unit.
917
918 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
919
920 * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
921 * tracebak.c: Add support for tracebacks in QNX.
922
923 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
924
925 * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
926
927 2017-11-09 Yannick Moy <moy@adacore.com>
928
929 * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
930 justification.
931
932 2017-11-09 Joel Brobecker <brobecker@adacore.com>
933
934 * doc/gnat_ugn/platform_specific_information.rst: Document packages
935 needed on GNU/Linux by GNAT.
936 * gnat_ugn.texi: Regenerate.
937
938 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
939
940 * contracts.adb (Analyze_Contracts): Remove the three parameter
941 version. This routine now only analyzes contracts and does not perform
942 any freezing actions.
943 (Analyze_Previous_Contracts): Removed.
944 (Freeze_Previous_Contracts): New routine.
945 * contracts.ads (Analyze_Previous_Contracts): Removed.
946 (Freeze_Previous_Contracts): New routine.
947 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
948 enclosing package spec regardless of whether the list denotes the
949 visible or private declarations. Fix the removal of partial state
950 refinements when the context is a package spec.
951 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
952 contracts.
953 * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
954 * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
955 (Analyze_Protected_Body): Freeze previous contracts.
956 (Analyze_Task_Body): Freeze previous contracts.
957 * sem_prag.adb: Comment reformatting.
958
959 2017-11-09 Bob Duff <duff@adacore.com>
960
961 * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
962 Export this so users can use it without importing
963 System.Tasking.Utilities.
964 * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
965 that fails when Make_Independent is called on a user task.
966 * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
967 capitalization style ((style) bad casing of "Master_of_Task").
968
969 2017-11-09 Ed Schonberg <schonberg@adacore.com>
970
971 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
972 uninitialized variable uncovered by Codepeer.
973
974 2017-11-09 Arnaud Charlet <charlet@adacore.com>
975
976 * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
977
978 2017-11-09 Javier Miranda <miranda@adacore.com>
979
980 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
981 (Static_Dispatch_Tables): Minor rewording.
982 * gnat_rm.texi: Regenerate.
983
984 2017-11-09 Justin Squirek <squirek@adacore.com>
985
986 * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
987 use_clauses within instances.
988 (Use_One_Package): Add condition to check for "hidden" open scopes to
989 avoid skipping over packages that have not been properly installed even
990 though they are visible.
991
992 2017-11-09 Ed Schonberg <schonberg@adacore.com>
993
994 * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
995 private operation of a protected type, when the type has no visible
996 operations.
997
998 2017-11-09 Javier Miranda <miranda@adacore.com>
999
1000 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
1001 * exp_disp.adb (Make_DT): Initialize the HT_Link field of the TSD only
1002 if available.
1003
1004 2017-11-09 Bob Duff <duff@adacore.com>
1005
1006 * exp_ch4.adb, exp_ch9.adb, exp_prag.adb, par-ch3.adb, sem_aggr.adb,
1007 sem_ch12.adb, sem_ch13.adb, sem_ch4.adb, sem_disp.adb, sem_prag.adb,
1008 sem_res.adb, sem_util.adb: Get rid of warnings about uninitialized
1009 variables.
1010
1011 2017-11-09 Yannick Moy <moy@adacore.com>
1012
1013 * exp_disp.adb (Make_DT): Default initialize Ifaces_List and
1014 Ifaces_Comp_List.
1015
1016 2017-11-09 Pascal Obry <obry@adacore.com>
1017
1018 * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
1019 only for foreign threads. We initialize the thread handle only if not
1020 yet initialized. This happens in Enter_Task for foreign threads only.
1021 But for native threads (Ada tasking) we do want to keep the real
1022 handle (from Create_Task) to be able to free the corresponding
1023 resources in Finalize_TCB (CloseHandle).
1024
1025 2017-11-09 Yannick Moy <moy@adacore.com>
1026
1027 * sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
1028 P_Base_Type.
1029 (Error_Attr_P): Fix name in pragma No_Return.
1030 (Unexpected_Argument): Add pragma No_Return.
1031 (Placement_Error): Add pragma No_Return.
1032
1033 2017-11-09 Javier Miranda <miranda@adacore.com>
1034
1035 * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
1036 dispatch table is statically built.
1037 (Make_DT): Declare constant the Interface_Table object associated with
1038 an statically built dispatch table. For this purpose the Offset_To_Top
1039 value of each interface is computed using the dummy object.
1040 * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
1041 the Offset_To_Top field of secondary dispatch tables when the dispatch
1042 table is statically built.
1043 (Initialize_Tag): Do not generate calls to Register_Interface_Offset
1044 when the dispatch table is statically built.
1045 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
1046 Document the new GNAT restriction Static_Dispatch_Tables.
1047 * gnat_rm.texi: Regenerate.
1048
1049 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1050
1051 * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
1052 to avoid a dormant bug.
1053
1054 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1055
1056 * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
1057 as such capability is not available on the OS.
1058 * link.c: Make sure linker options for QNX are correct.
1059 * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
1060 * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
1061 in particular a workaround with locks priority ceiling where a higher
1062 priority task is allowed to lock a lower ceiling priority lock. This
1063 also fixes the scheduling of FIFO tasks when the priority of a task is
1064 lowered.
1065 * libgnat/system-qnx-aarch64.ads: Fix priority ranges.
1066
1067 2017-11-09 Yannick Moy <moy@adacore.com>
1068
1069 * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
1070 message.
1071 * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
1072 condition.
1073 * namet.adb (Copy_One_Character): Add assumption for static analysis,
1074 as knowledge that Hex(2) is in the range 0..255 is too complex for
1075 CodePeer.
1076 (Finalize): Add assumption for static analysis, as the fact that there
1077 are symbols in the table depends on a global invariant at this point in
1078 the program.
1079 * set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
1080 * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
1081 true.
1082
1083 2017-11-09 Javier Miranda <miranda@adacore.com>
1084
1085 * libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
1086 * exp_disp.adb (Building_Static_DT): Check restriction.
1087 (Building_Static_Secondary_DT): Check restriction.
1088 (Make_DT): Initialize the HT_Link to No_Tag.
1089 * opt.ads (Static_Dispatch_Tables): Rename flag...
1090 (Building_Static_Dispatch_Tables): ... into this. This will avoid
1091 conflict with the restriction name.
1092 * gnat1drv.adb: Update.
1093 * exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
1094 * exp_ch3.adb (Expand_N_Object_Declaration): Update.
1095
1096 2017-11-09 Pascal Obry <obry@adacore.com>
1097
1098 * libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
1099 named number.
1100
1101 2017-11-09 Yannick Moy <moy@adacore.com>
1102
1103 * binde.adb (Diagnose_Elaboration_Problem): Mark procedure No_Return.
1104 * checks.adb (Apply_Scalar_Range_Check): Rescope variable OK closer to
1105 use. Default initialize Hi, Lo.
1106 (Selected_Range_Checks): Retype Num_Checks more precisely.
1107 (Determine_Range, Determine_Range_R): Default initialize Hi_Right,
1108 Lo_Right.
1109 * contracts.adb (Process_Contract_Cases): Mark parameter Stmts as
1110 Unmodified.
1111 (Process_Postconditions): Mark parameter Stmts as Unmodified.
1112 * exp_attr.adb (Expand_Loop_Entry_Attribute): Default initialize Blk.
1113 * exp_ch4.adb (Expand_N_Allocator): Default initialize Typ.
1114 (Expand_Concatenate): Default initialize High_Bound.
1115 (Optimize_Length_Comparison): Default initialize Ent, Index.
1116 * exp_ch5.adb (Expand_Predicated_Loop): Default initialize L_Hi and
1117 L_Lo.
1118 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Default initialize
1119 Return_Stmt.
1120 * exp_ch9.adb (Expand_Entry_Barrier): Default initialize Func_Body and
1121 remove pragma Warnings(Off).
1122 * exp_imgv.adb (Expand_Image_Attribute): Default initialize Tent.
1123 * exp_util.adb (Find_Interface_Tag): Default initialize AI_Tag.
1124 * freeze.adb (Check_Component_Storage_Order): Default initialize
1125 Comp_Byte_Aligned rather than silencing messages with pragma
1126 Warnings(Off), which does not work for CodePeer initialization
1127 messages, and given that here the possible read of an unitialized value
1128 depends on a proper use of parameters by the caller.
1129 * inline.adb (Expand_Inlined_Call): Default initialize Lab_Decl, Targ.
1130 * sem_ch12.adb (Build_Operator_Wrapper): Default initialize Expr.
1131 * sem_ch3.adb (Build_Derived_Array_Type): Default initialize
1132 Implicit_Base.
1133 * sem_ch4.adb (List_Operand_Interps): Default initialize Nam and remove
1134 pragma Warnings(Off).
1135 (Analyze_Case_Expression): Rescope checking block within branch where
1136 Others_Present is set by the call to Check_Choices.
1137 * sem_ch5.adb (Analyze_Assignment): Default initialize
1138 Save_Full_Analysis.
1139 * sem_ch6.adb (Analyze_Function_Return): Default initialize Obj_Decl,
1140 and restructure code to defend against previous errors, so that, in
1141 that case, control does not flow to the elsif condition which read an
1142 uninitialized Obj_Decl.
1143 * sem_ch9.adb (Analyze_Requeue): Default initialize Synch_Type.
1144 (Check_Interfaces): Default initialize Full_T_Ifaces and Priv_T_Ifaces,
1145 which seem to be left uninitialized and possibly read in some cases.
1146 * sem_dim.adb (Analyze_Aspect_Dimension_System): Retype Position more
1147 precisely. This requires to exchange the test for exiting in case of
1148 too many positions and the increment to Position, inside the loop.
1149 * sem_eval.adb (Eval_Concatenation): Default initialize Folded_Val,
1150 which cannot be read uninitialized, but the reasons for that are quite
1151 subtle.
1152 * sem_intr.adb (Check_Intrinsic_Call): Default initialize Rtyp.
1153 * sem_prag.adb (Collect_Subprogram_Inputs_Outputs): Default initialize
1154 Spec_Id.
1155 * sem_res.adb (Make_Call_Into_Operator): Default initialize Opnd_Type,
1156 and test for presence of non-null Opnd_Type before testing its scope,
1157 in a test which would read its value uninitialized, and is very rarely
1158 exercized (it depends on the presence of an extension of System).
1159 * sem_spark.ads: Update comment to fix name of main analysis procedure.
1160 * sem_warn.adb (Warn_On_Known_Condition): Default initialize
1161 Test_Result.
1162 * set_targ.adb (FailN): Mark procedure with No_Return.
1163 * stylesw.adb (Save_Style_Check_Options): Delete useless code to
1164 initialize all array Options to white space, as there is already code
1165 doing the same for the remaining positions in Options at the end of the
1166 procedure.
1167
1168 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1169
1170 * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
1171 generic instantiations either.
1172
1173 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1174
1175 * sem_prag.adb (Analyze_Part_Of): Reword error message.
1176 (Get_SPARK_Mode_Type): Do not raise Program_Error in case pragma
1177 SPARK_Mode appears with an illegal mode, treat this as a non-existent
1178 mode.
1179
1180 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1181
1182 * sem_ch4.adb (Analyze_Call): Reject a call to a function that returns
1183 a limited view of a type T declared in unit U1, when the function is
1184 declared in another unit U2 and the call appears in a procedure within
1185 another unit.
1186
1187 2017-11-09 Justin Squirek <squirek@adacore.com>
1188
1189 * sem_ch8.adb (Analyze_Use_Package): Force installation of use_clauses
1190 when processing generic instances.
1191
1192 2017-11-09 Bob Duff <duff@adacore.com>
1193
1194 * namet.ads, namet.adb (Valid_Name_Id): New subtype that excludes
1195 Error_Name and No_Name. Use this (versus Name_Id) to indicate which
1196 objects can have those special values. Valid_Name_Id could usefully be
1197 used all over the compiler front end, but that's too much trouble for
1198 now. If we did that, we might want to rename:
1199 Name_Id --> Optional_Name_Id, Valid_Name_Id --> Name_Id.
1200 For parameters of type Valid_Name_Id, remove some redundant tests,
1201 including the ones found by CodePeer. Use Is_Valid_Name instead of
1202 membership test when appropriate.
1203 (Error_Name_Or_No_Name): Delete this; it's no longer needed.
1204 * sem_ch2.adb (Analyze_Identifier): Use "not Is_Valid_Name" instead of
1205 "in Error_Name_Or_No_Name".
1206 (Check_Parameterless_Call): Use "not Is_Valid_Name" instead of "in
1207 Error_Name_Or_No_Name".
1208
1209 2017-11-09 Arnaud Charlet <charlet@adacore.com>
1210
1211 * gnat1drv.adb (Adjust_Global_Switches): Suppress warnings in codepeer
1212 mode here unless -gnateC is specified.
1213 * switch-c.adb (Scan_Front_End_Switches): Do not suppress warnings with
1214 -gnatC here.
1215
1216 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1217
1218 * lib-writ.adb (Write_ALI): Remove processing of the frontend xrefs as
1219 part of the ALI writing; they are now processed directly from memory
1220 when requested by the backend.
1221 * lib-xref.ads (Collect_SPARK_Xrefs): Remove.
1222 (Iterate_SPARK_Xrefs): New routine for iterating over frontend xrefs.
1223 * lib-xref-spark_specific.adb (Traverse_Compilation_Unit): Remove.
1224 (Add_SPARK_File): Remove.
1225 (Add_SPARK_Xref): Refactored from removed code; filters xref entries
1226 that are trivially uninteresting to the SPARK backend.
1227 * spark_xrefs.ads: Remove code that is no longer needed.
1228 * spark_xrefs.adb (dspark): Adapt to use Iterate_SPARK_Xrefs.
1229
1230 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
1231
1232 * sem_elab.adb: Update the documentation on adding a new elaboration
1233 schenario. Add new hash table Recorded_Top_Level_Scenarios.
1234 (Is_Check_Emitting_Scenario): Removed.
1235 (Is_Recorded_Top_Level_Scenario): New routine.
1236 (Kill_Elaboration_Scenario): Reimplemented.
1237 (Record_Elaboration_Scenario): Mark the scenario as recorded.
1238 (Set_Is_Recorded_Top_Level_Scenario): New routine.
1239 (Update_Elaboration_Scenario): Reimplemented.
1240 * sinfo.adb (Is_Recorded_Scenario): Removed.
1241 (Set_Is_Recorded_Scenario): Removed.
1242 * sinfo.ads: Remove attribute Is_Recorded_Scenario along with
1243 occurrences in nodes.
1244 (Is_Recorded_Scenario): Removed along with pragma Inline.
1245 (Set_Is_Recorded_Scenario): Removed along with pragma Inline.
1246
1247 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1248
1249 * sem_prag.adb (Analyze_Part_Of): Change "designate" to "denote" in
1250 error message.
1251
1252 2017-11-09 Justin Squirek <squirek@adacore.com>
1253
1254 * sem_res.adb (Resolve_Allocator): Add warning messages corresponding
1255 to the allocation of an anonymous access-to-controlled object.
1256
1257 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1258
1259 * sigtramp-qnx.c: Fix obvious typo.
1260
1261 2017-11-09 Doug Rupp <rupp@adacore.com>
1262
1263 * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
1264
1265 2017-11-09 Ed Schonberg <schonberg@adacore.com>
1266
1267 * sem_res.adb (Resolve): If expression is an entity whose type has
1268 implicit dereference, generate reference to it, because no reference is
1269 generated for an overloaded entity during analysis, given that its
1270 identity may not be known.
1271
1272 2017-11-09 Javier Miranda <miranda@adacore.com>
1273
1274 * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
1275 offset-to-top field by addition.
1276 (Make_Secondary_DT): Initialize the offset-to-top field with a negative
1277 offset.
1278 * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
1279 return a negative offset-to-top value.
1280 (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
1281 Set_Static_Offset_To_Top passing a negative offet-to-top value;
1282 initialize also the offset-to-top field with a negative offset.
1283 * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
1284 an addition since the offset-to-top field is now a negative value.
1285 (Displace): Displace the pointer to the object means of a substraction
1286 since it is now a negative value.
1287 (Set_Dynamic_Offset_to_top): Displace the pointer to the object by
1288 means of a substraction since it is now a negative value.
1289
1290 2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
1291
1292 * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
1293 before Errout.Output_Messages also in the case of compilation errors.
1294
1295 2017-11-09 Javier Miranda <miranda@adacore.com>
1296
1297 * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
1298 the Class Level): Fix error interfacing with C strings.
1299 * gnat_ugn.texi: Regenerate.
1300
1301 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1302
1303 * system-qnx-aarch64.ads: Fix the priority constants.
1304 * s-osinte__qnx.ads: Fix constants for handling the locking protocols
1305 and scheduling.
1306 * s-osinte__qnx.adb: New file , prevents the use of priority 0 that
1307 corresponds to an idle priority on QNX.
1308
1309 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1310
1311 * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
1312 comments.
1313
1314 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1315
1316 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters
1317 in expression funtions that are expanded into variables.
1318
1319 2017-11-09 Piotr Trojanek <trojanek@adacore.com>
1320
1321 * sem_util.adb: Minor whitespace cleanup.
1322
1323 2017-11-09 Jerome Lambourg <lambourg@adacore.com>
1324
1325 * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX
1326 s-taprop version rather than a custom one.
1327 * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline.
1328
1329 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1330
1331 * lib-xref.ads, lib-xref-spark_specific.adb
1332 (Traverse_Compilation_Unit): Move declaration to package body.
1333
1334 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1335
1336 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
1337 the type of the renaming from its defining entity, rather then the
1338 subtype mark as there may not be a subtype mark.
1339
1340 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1341
1342 * adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
1343 libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
1344 libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
1345 libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
1346 terminals.c: Initial port of GNAT for aarch64-qnx
1347
1348 2017-11-08 Elisa Barboni <barboni@adacore.com>
1349
1350 * exp_util.adb (Find_DIC_Type): Move...
1351 * sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
1352
1353 2017-11-08 Justin Squirek <squirek@adacore.com>
1354
1355 * sem_res.adb (Resolve_Allocator): Add info messages corresponding to
1356 the owner and corresponding coextension.
1357
1358 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1359
1360 * sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
1361 following separate procedures.
1362 (Resolve_Delta_Array_Aggregate): Previous code form
1363 Resolve_Delta_Aggregate.
1364 (Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
1365 ARG decisions on the legality rules for delta aggregates for records:
1366 in the case of a variant record, components from different variants
1367 cannot be specified in the delta aggregate, and this must be checked
1368 statically.
1369
1370 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1371
1372 * spark_xrefs.ads (SPARK_Scope_Record): Remove File_Num component.
1373 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1374 removed component.
1375
1376 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1377
1378 * sem_ch4.adb: Minor typo fix.
1379
1380 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1381
1382 * spark_xrefs.ads (SPARK_Scope_Record): Remove Spec_File_Num and
1383 Spec_Scope_Num components.
1384 * spark_xrefs.adb (dspark): Skip pretty-printing to removed components.
1385 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Skip initialization of
1386 removed components.
1387 (Collect_SPARK_Xrefs): Skip setting proper values of removed
1388 components.
1389
1390 2017-11-08 Gary Dismukes <dismukes@adacore.com>
1391
1392 * exp_ch4.adb (Expand_N_Type_Conversion): Add test that the selector
1393 name is a discriminant in check for unconditional accessibility
1394 violation within instances.
1395
1396 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1397
1398 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove special-case
1399 for constants (with variable input).
1400 (Is_Constant_Object_Without_Variable_Input): Remove.
1401
1402 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1403
1404 * exp_ch9.adb, sem_disp.adb, sem_util.adb: Minor reformatting.
1405
1406 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1407
1408 * spark_xrefs.ads (Rtype): Remove special-casing of constants for SPARK
1409 cross-references.
1410 (dspark): Remove hardcoded table bound.
1411
1412 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1413
1414 * sem_ch4.adb (Analyze_Aggregate): For Ada2020 delta aggregates, use
1415 the type of the base of the construct to determine the type (or
1416 candidate interpretations) of the delta aggregate. This allows the
1417 construct to appear in a context that expects a private extension.
1418 * sem_res.adb (Resolve): Handle properly a delta aggregate with an
1419 overloaded base.
1420
1421 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1422
1423 * spark_xrefs.ads (SPARK_Xref_Record): Replace file and scope indices
1424 with Entity_Id of the reference.
1425 * spark_xrefs.adb (dspark): Adapt pretty-printing routine.
1426 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Store Entity_Id of the
1427 reference, not the file and scope indices.
1428
1429 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1430
1431 * errout.ads (Current_Node): New.
1432 * errout.adb (Error_Msg): Use Current_Node.
1433 * par-ch6.adb, par-ch7.adb, par-ch9.adb, par-util.adb: Set Current_Node
1434 when relevant.
1435 * style.adb: Call Error_Msg_N when possible.
1436
1437 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1438
1439 * spark_xrefs.ads (SPARK_Scope_Record): Rename Scope_Id component to
1440 Entity.
1441 * lib-xref-spark_specific.adb, spark_xrefs.adb: Propagate renaming of
1442 the Scope_Id record component.
1443
1444 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1445
1446 * spark_xrefs.ads (SPARK_File_Record): Remove string components.
1447 * spark_xrefs.adb (dspark): Remove pretty-printing of removed
1448 SPARK_File_Record components.
1449 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not store string
1450 representation of files/units.
1451
1452 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1453
1454 * lib-xref.ads, lib-xref-spark_specific.adb (Traverse_Declarations):
1455 Remove Inside_Stubs parameter.
1456
1457 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1458
1459 * spark_xrefs.ads (SPARK_Xref_Record): Referenced object is now
1460 represented by Entity_Id.
1461 (SPARK_Scope_Record): Referenced scope (e.g. subprogram) is now
1462 represented by Entity_Id; this information is not repeated as
1463 Scope_Entity.
1464 (Heap): Moved from lib-xref-spark_specific.adb, to reside next to
1465 Name_Of_Heap_Variable.
1466 * spark_xrefs.adb (dspark): Adapt debug routine to above changes in
1467 data types.
1468 * lib-xref-spark_specific.adb: Adapt routines for populating SPARK
1469 scope and xrefs tables to above changes in data types.
1470
1471 2017-11-08 Justin Squirek <squirek@adacore.com>
1472
1473 * sem_ch8.adb (Mark_Use_Clauses): Add condition to always mark the
1474 primitives of generic actuals.
1475 (Mark_Use_Type): Add recursive call to properly mark class-wide type's
1476 base type clauses as per ARM 8.4 (8.2/3).
1477
1478 2017-11-08 Ed Schonberg <schonberg@adacore.com>
1479
1480 * sem_ch6.adb (Analyze_Generic_Subprobram_Body): Validate
1481 categorization dependency of the body, as is done for non-generic
1482 units.
1483 (New_Overloaded_Entity, Visible_Part_Type): Remove linear search
1484 through declarations (Simple optimization, no behavior change).
1485
1486 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1487
1488 * spark_xrefs.ads (SPARK_Xref_Record): Remove inessential components.
1489 (SPARK_Scope_Record): Remove inessential components.
1490 * spark_xrefs.adb (dspark): Remove pretty-printing of removed record
1491 components.
1492 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove setting of
1493 removed record components.
1494 (Add_SPARK_Xrefs): Remove setting of removed record components.
1495
1496 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1497
1498 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Remove dead check for
1499 empty entities.
1500
1501 2017-11-08 Javier Miranda <miranda@adacore.com>
1502
1503 * sem_disp.adb (Is_Inherited_Public_Operation): Extend the
1504 functionality of this routine to handle multiple levels of derivations.
1505
1506 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1507
1508 * einfo.adb: Elist36 is now used as Nested_Scenarios.
1509 (Nested_Scenarios): New routine.
1510 (Set_Nested_Scenarios): New routine.
1511 (Write_Field36_Name): New routine.
1512 * einfo.ads: Add new attribute Nested_Scenarios along with occurrences
1513 in entities.
1514 (Nested_Scenarios): New routine along with pragma Inline.
1515 (Set_Nested_Scenarios): New routine along with pragma Inline.
1516 * sem_elab.adb (Find_And_Process_Nested_Scenarios): New routine.
1517 (Process_Nested_Scenarios): New routine.
1518 (Traverse_Body): When a subprogram body is traversed for the first
1519 time, find, save, and process all suitable scenarios found within.
1520 Subsequent traversals of the same subprogram body utilize the saved
1521 scenarios.
1522
1523 2017-11-08 Piotr Trojanek <trojanek@adacore.com>
1524
1525 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Remove detection of
1526 protected operations.
1527 (Add_SPARK_Xrefs): Simplify detection of empty entities.
1528 * get_spark_xrefs.ads, get_spark_xrefs.adb, put_spark_xrefs.ads,
1529 put_spark_xrefs.adb, spark_xrefs_test.adb: Remove code for writing,
1530 reading and testing SPARK cross-references stored in the ALI files.
1531 * lib-xref.ads (Output_SPARK_Xrefs): Remove.
1532 * lib-writ.adb (Write_ALI): Do not write SPARK cross-references to the
1533 ALI file.
1534 * spark_xrefs.ads, spark_xrefs.adb (pspark): Remove, together
1535 with description of the SPARK xrefs ALI format.
1536 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Remove get_spark_refs.o
1537 and put_spark_refs.o.
1538
1539 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1540
1541 * exp_ch4.adb (Apply_Accessibility_Check): Do not finalize the object
1542 when the associated access type is subject to pragma
1543 No_Heap_Finalization.
1544 * exp_intr.adb (Expand_Unc_Deallocation): Use the available view of the
1545 designated type in case it comes from a limited withed unit.
1546
1547 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1548
1549 * exp_ch3.adb (Expand_N_Object_Declaration): Save and restore relevant
1550 SPARK-related flags. Add ??? comment.
1551 * exp_util.adb (Insert_Actions): Add an entry for node
1552 N_Variable_Reference_Marker.
1553 * sem.adb (Analyze): Add an entry for node N_Variable_Reference_Marker.
1554 * sem_ch8.adb (Find_Direct_Name): Add constant Is_Assignment_LHS. Build
1555 and record a variable reference marker for the current name.
1556 (Find_Expanded_Name): Add constant Is_Assignment_LHS. Build and record
1557 a variable reference marker for the current name.
1558 * sem_elab.adb (Build_Variable_Reference_Marker): New routine.
1559 (Extract_Variable_Reference_Attributes): Reimplemented.
1560 (Info_Scenario): Add output for variable references and remove output
1561 for variable reads.
1562 (Info_Variable_Read): Removed.
1563 (Info_Variable_Reference): New routine.
1564 (Is_Suitable_Scenario): Variable references are now suitable scenarios
1565 while variable reads are not.
1566 (Output_Active_Scenarios): Add output for variable references and
1567 remove output for variable reads.
1568 (Output_Variable_Read): Removed.
1569 (Output_Variable_Reference): New routine.
1570 (Process_Variable_Read): Removed.
1571 (Process_Variable_Reference): New routine.
1572 (Process_Variable_Reference_Read): New routine.
1573 * sem_elab.ads (Build_Variable_Reference_Marker): New routine.
1574 * sem_res.adb (Resolve_Actuals): Build and record a variable reference
1575 marker for the current actual.
1576 * sem_spark.adb (Check_Node): Add an entry for node
1577 N_Variable_Reference_Marker.
1578 * sem_util.adb (Within_Subprogram_Call): Moved to the library level.
1579 * sem_util.ads (Within_Subprogram_Call): Moved to the library level.
1580 * sinfo.adb (Is_Read): New routine.
1581 (Is_Write): New routine.
1582 (Target): Updated to handle variable reference markers.
1583 (Set_Is_Read): New routine.
1584 (Set_Is_Write): New routine.
1585 (Set_Target): Updated to handle variable reference markers.
1586 * sinfo.ads: Add new attributes Is_Read and Is_Write along with
1587 occurrences in nodes. Update attribute Target. Add new node
1588 kind N_Variable_Reference_Marker.
1589 (Is_Read): New routine along with pragma Inline.
1590 (Is_Write): New routine along with pragma Inline.
1591 (Set_Is_Read): New routine along with pragma Inline.
1592 (Set_Is_Write): New routine along with pragma Inline.
1593 * sprint.adb (Sprint_Node_Actual): Add an entry for node
1594 N_Variable_Reference_Marker.
1595
1596 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1597
1598 * sem_util.adb (Subprogram_Name): Append suffix for overloaded
1599 subprograms.
1600
1601 2017-11-08 Yannick Moy <moy@adacore.com>
1602
1603 * sem_ch8.adb (Use_One_Type, Update_Use_Clause_Chain): Do not report
1604 about unused use-type or use-package clauses inside inlined bodies.
1605
1606 2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
1607
1608 * sem_elab.adb (Ensure_Prior_Elaboration): Add new parameter
1609 In_Partial_Fin along with a comment on its usage. Do not guarantee the
1610 prior elaboration of a unit when the need came from a partial
1611 finalization context.
1612 (In_Initialization_Context): Relocated to Process_Call.
1613 (Is_Partial_Finalization_Proc): New routine.
1614 (Process_Access): Add new parameter In_Partial_Fin along with a comment
1615 on its usage.
1616 (Process_Activation_Call): Add new parameter In_Partial_Fin along with
1617 a comment on its usage.
1618 (Process_Activation_Conditional_ABE_Impl): Add new parameter
1619 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1620 diagnostics when the activation occurs in a partial finalization
1621 context.
1622 (Process_Activation_Guaranteed_ABE_Impl): Add new parameter
1623 In_Partial_Fin along with a comment on its usage.
1624 (Process_Call): Add new parameter In_Partial_Fin along with a comment
1625 on its usage. A call is within a partial finalization context when it
1626 targets a finalizer or primitive [Deep_]Finalize, and the call appears
1627 in initialization actions. Pass this information down to the recursive
1628 steps of the Processing phase.
1629 (Process_Call_Ada): Add new parameter In_Partial_Fin along with a
1630 comment on its usage. Remove the guard which suppresses the generation
1631 of implicit Elaborate[_All] pragmas. This is now done in
1632 Ensure_Prior_Elaboration.
1633 (Process_Call_Conditional_ABE): Add new parameter In_Partial_Fin along
1634 with a comment on its usage. Do not emit any ABE diagnostics when the
1635 call occurs in a partial finalization context.
1636 (Process_Call_SPARK): Add new parameter In_Partial_Fin along with a
1637 comment on its usage.
1638 (Process_Instantiation): Add new parameter In_Partial_Fin along with a
1639 comment on its usage.
1640 (Process_Instantiation_Ada): Add new parameter In_Partial_Fin along
1641 with a comment on its usage.
1642 (Process_Instantiation_Conditional_ABE): Add new parameter
1643 In_Partial_Fin along with a comment on its usage. Do not emit any ABE
1644 diagnostics when the instantiation occurs in a partial finalization
1645 context.
1646 (Process_Instantiation_SPARK): Add new parameter In_Partial_Fin along
1647 with a comment on its usage.
1648 (Process_Scenario): Add new parameter In_Partial_Fin along with a
1649 comment on its usage.
1650 (Process_Single_Activation): Add new parameter In_Partial_Fin along
1651 with a comment on its usage.
1652 (Traverse_Body): Add new parameter In_Partial_Fin along with a comment
1653 on its usage.
1654
1655 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1656
1657 * sem_ch13.adb: Add optional parameter to Error_Msg.
1658
1659 2017-11-08 Jerome Lambourg <lambourg@adacore.com>
1660
1661 * fname.adb (Is_Internal_File_Name): Do not check the 8+3 naming schema
1662 for the Interfaces.* hierarchy as longer unit names are now allowed.
1663
1664 2017-11-08 Arnaud Charlet <charlet@adacore.com>
1665
1666 * sem_util.adb (Subprogram_Name): Emit sloc for the enclosing
1667 subprogram as well. Support more cases of entities.
1668 (Append_Entity_Name): Add some defensive code.
1669
1670 2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
1671
1672 * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
1673
1674 2017-10-31 Eric Botcazou <ebotcazou@adacore.com>
1675
1676 PR ada/82785
1677 * gcc-interface/Makefile.in (m68k/Linux): Fix typo.
1678
1679 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1680
1681 * gcc-interface/Makefile.in: Remove bogus settings for VxWorks.
1682
1683 2017-10-21 Eric Botcazou <ebotcazou@adacore.com>
1684
1685 * gcc-interface/utils.c (pad_type_hash): Use hashval_t for hash value.
1686 (convert): Do not use an unchecked conversion for converting from a
1687 type to another type padding it.
1688
1689 2017-10-20 Doug Rupp <rupp@adacore.com>
1690
1691 * libgnarl/s-osinte__linux.ads (Relative_Timed_Wait): Add variable
1692 needed for using monotonic clock.
1693 * libgnarl/s-taprop__linux.adb: Revert previous monotonic clock
1694 changes.
1695 * libgnarl/s-taprop__linux.adb, s-taprop__posix.adb: Unify and factor
1696 out monotonic clock related functions body.
1697 (Timed_Sleep, Timed_Delay, Montonic_Clock, RT_Resolution,
1698 Compute_Deadline): Move to...
1699 * libgnarl/s-tpopmo.adb: ... here. New separate package body.
1700
1701 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1702
1703 * sem_util.adb (Is_Controlling_Limited_Procedure): Handle properly the
1704 case where the controlling formal is an anonymous access to interface
1705 type.
1706 * exp_ch9.adb (Extract_Dispatching_Call): If controlling actual is an
1707 access type, handle properly the the constructed dereference that
1708 designates the object used in the rewritten synchronized call.
1709 (Parameter_Block_Pack): If the type of the actual is by-copy, its
1710 generated declaration in the parameter block does not need an
1711 initialization even if the type is a null-excluding access type,
1712 because it will be initialized with the value of the actual later on.
1713 (Parameter_Block_Pack): Do not add controlling actual to parameter
1714 block when its type is by-copy.
1715
1716 2017-10-20 Justin Squirek <squirek@adacore.com>
1717
1718 * sem_ch8.adb (Update_Use_Clause_Chain): Add sanity check to verify
1719 scope stack traversal into the context clause.
1720
1721 2017-10-20 Bob Duff <duff@adacore.com>
1722
1723 * sinfo.ads: Fix a comment typo.
1724
1725 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1726
1727 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add
1728 warning against usage in conjunction with -gnatn.
1729 (-fdump-xref): Delete entry.
1730 * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of
1731 -fdump-xref switch.
1732 * gnat_ugn.texi: Regenerate.
1733
1734 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com>
1735
1736 * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb:
1737 Minor reformatting.
1738
1739 2017-10-20 Yannick Moy <moy@adacore.com>
1740
1741 * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to
1742 compare a dimensioned expression with a literal.
1743 (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the
1744 special value zero.
1745 * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of
1746 dimensionality system in GNAT.
1747 * gnat_ugn.texi: Regenerate.
1748
1749 2017-10-20 Yannick Moy <moy@adacore.com>
1750
1751 * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove
1752 inadequate silencing of errors.
1753 * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when
1754 checking the subprogram body generated from an expression function,
1755 when this is done as part of the preanalysis done on expression
1756 functions, as the subprogram body may not yet be attached in the AST.
1757 The error if any will be issued later during the analysis of the body.
1758 (Is_Aliased_View): Trivial rewrite with Is_Formal_Object.
1759
1760 2017-10-20 Arnaud Charlet <charlet@adacore.com>
1761
1762 * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for
1763 warning on ineffective use clause.
1764
1765 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1766
1767 * exp_ch11.ads (Warn_If_No_Local_Raise): Declare.
1768 * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise
1769 to issue the warning on the absence of local raise.
1770 (Possible_Local_Raise): Do not issue the warning for Call_Markers.
1771 (Warn_If_No_Local_Raise): New procedure to issue the warning on the
1772 absence of local raise.
1773 * sem_elab.adb: Add with and use clauses for Exp_Ch11.
1774 (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases
1775 where a scenario could give rise to raising Program_Error.
1776 * sem_elab.adb: Typo fixes.
1777 * fe.h (Warn_If_No_Local_Raise): Declare.
1778 * gcc-interface/gigi.h (get_exception_label): Change return type.
1779 * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to
1780 simple vector of Entity_Id.
1781 (gnu_storage_error_label_stack): Likewise.
1782 (gnu_program_error_label_stack): Likewise.
1783 (gigi): Adjust to above changes.
1784 (Raise_Error_to_gnu): Likewise.
1785 (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label.
1786 (N_Push_Constraint_Error_Label): Push the label onto the stack.
1787 (N_Push_Storage_Error_Label): Likewise.
1788 (N_Push_Program_Error_Label): Likewise.
1789 (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue
1790 a warning on the absence of local raise.
1791 (N_Pop_Storage_Error_Label): Likewise.
1792 (N_Pop_Program_Error_Label): Likewise.
1793 (push_exception_label_stack): Delete.
1794 (get_exception_label): Change return type to Entity_Id and adjust.
1795 * gcc-interface/utils2.c (build_goto_raise): Change type of first
1796 parameter to Entity_Id and adjust. Set TREE_USED on the label.
1797 (build_call_raise): Adjust calls to get_exception_label and also
1798 build_goto_raise.
1799 (build_call_raise_column): Likewise.
1800 (build_call_raise_range): Likewise.
1801 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x):
1802 Document actual default behavior.
1803
1804 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1805
1806 * einfo.ads: Minor consistent punctuation in comment. All numbered
1807 items in the comment of Is_Internal are now terminated with a period.
1808
1809 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1810
1811 * exp_util.adb (Build_Temporary): Mark created temporary entity as
1812 internal.
1813
1814 2017-10-20 Piotr Trojanek <trojanek@adacore.com>
1815
1816 * sem_type.adb (In_Generic_Actual): Simplified.
1817
1818 2017-10-20 Justin Squirek <squirek@adacore.com>
1819
1820 * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to
1821 verify a renaming exists for a generic formal before comparing it to
1822 the actual as defaulted formals will not have a renamed_object.
1823
1824 2017-10-20 Javier Miranda <miranda@adacore.com>
1825
1826 * exp_ch6.adb (Replace_Returns): Fix wrong management of
1827 N_Block_Statement nodes.
1828
1829 2017-10-20 Bob Duff <duff@adacore.com>
1830
1831 * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
1832 component of an array aggregate if it is initialized by a
1833 build-in-place function call.
1834 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
1835 bip for nonlimited types.
1836 * debug.adb: Document -gnatd.9.
1837
1838 2017-10-20 Bob Duff <duff@adacore.com>
1839
1840 * sem_ch12.adb: Remove redundant setting of Parent.
1841
1842 2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
1843
1844 * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
1845 of the operands is a string literal.
1846
1847 2017-10-20 Bob Duff <duff@adacore.com>
1848
1849 * einfo.ads: Comment fix.
1850
1851 2017-10-20 Clement Fumex <fumex@adacore.com>
1852
1853 * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
1854
1855 2017-10-20 Ed Schonberg <schonberg@adacore.com>
1856
1857 * sem_dim.adb (Extract_Power): Accept dimension values that are not
1858 non-negative integers when the dimensioned base type is an Integer
1859 type.
1860
1861 2017-10-20 Bob Duff <duff@adacore.com>
1862
1863 * sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
1864 that an allocator came from a b-i-p return statement.
1865 * exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
1866 object of a nonlimited build-in-place function call.
1867 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
1868 Alloc_For_BIP_Return flag on generated allocators.
1869 * sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
1870 If the N_Assignment_Statement has been transformed into something else,
1871 then Should_Transform_BIP_Assignment won't work.
1872 * exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
1873 "Remove Adjust if we're building the return object of an extended
1874 return statement in place." Back out that part of the change, because
1875 the Alloc_For_BIP_Return flag is now used for that.
1876
1877 2017-10-19 Bob Duff <duff@adacore.com>
1878
1879 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Fix silly bug -- "Typ"
1880 should be "T". Handle case of a subtype of a class-wide type.
1881
1882 2017-10-19 Bob Duff <duff@adacore.com>
1883
1884 * exp_util.adb: (Process_Statements_For_Controlled_Objects): Clarify
1885 which node kinds can legitimately be ignored, and raise Program_Error
1886 for others.
1887
1888 2017-10-19 Hristian Kirtchev <kirtchev@adacore.com>
1889
1890 * sem_elab.adb (Compilation_Unit): Handle the case of a subprogram
1891 instantiation that acts as a compilation unit.
1892 (Find_Code_Unit): Reimplemented.
1893 (Find_Top_Unit): Reimplemented.
1894 (Find_Unit_Entity): New routine.
1895 (Process_Instantiation_SPARK): Correct the elaboration requirement a
1896 package instantiation imposes on a unit.
1897
1898 2017-10-19 Bob Duff <duff@adacore.com>
1899
1900 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Enable build-in-place
1901 for a narrow set of controlled types.
1902
1903 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1904
1905 * sinput.ads (Line_Start): Add pragma Inline.
1906 * widechar.ads (Is_Start_Of_Wide_Char): Likewise.
1907
1908 2017-10-19 Bob Duff <duff@adacore.com>
1909
1910 * exp_attr.adb (Expand_N_Attribute_Reference): Disable
1911 Make_Build_In_Place_Call_... for F(...)'Old, where F(...) is a
1912 build-in-place function call so that the temp is declared in the right
1913 place.
1914
1915 2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
1916
1917 * gcc-interface/misc.c (gnat_tree_size): Move around.
1918
1919 * gcc-interface/utils.c (max_size): Deal with SSA names.
1920
1921 2017-10-17 Jakub Jelinek <jakub@redhat.com>
1922
1923 * gcc-interface/misc.c (gnat_tree_size): New function.
1924 (LANG_HOOKS_TREE_SIZE): Redefine.
1925
1926 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1927
1928 * sem_elab.adb (In_Preelaborated_Context): A generic package subject to
1929 Remote_Call_Interface is not a suitable preelaboratd context when the
1930 call appears in the package body.
1931
1932 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
1933
1934 * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0.
1935 * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum
1936 alignment for consistency. If Align is non-zero, use the minimum of
1937 Align and M for the alignment.
1938 * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of
1939 setting the alignment directly.
1940
1941 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1942
1943 * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the
1944 optional string in an Assert pragma until the expansion of the pragma
1945 has rewritten it as a conditional statement, so that the string
1946 argument is only evaluaed if the assertion fails. This is mandated by
1947 RM 11.4.2.
1948
1949 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1950
1951 * debug.adb: Switch -gnatd.v and associated flag are now used to
1952 enforce the SPARK rules for elaboration in SPARK code.
1953 * sem_elab.adb: Describe switch -gnatd.v.
1954 (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect.
1955 (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is
1956 in effect.
1957 (Process_Variable_Assignment): Clarify why variable assignments are
1958 processed reglardless of whether -gnatd.v is in effect.
1959 * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
1960 sections on elaboration code and compilation switches.
1961 * gnat_ugn.texi: Regenerate.
1962
1963 2017-10-14 Gary Dismukes <dismukes@adacore.com>
1964
1965 * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb,
1966 sem_warn.adb: Minor reformattings.
1967
1968 2017-10-14 Ed Schonberg <schonberg@adacore.com>
1969
1970 * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation
1971 for reverse iteration over formal containers.
1972 * gnat_rm.texi: Regenerate.
1973
1974 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
1975
1976 * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to
1977 Ensure_Prior_Elaboration_Dynamic for consistency reasons.
1978 (Ensure_Static_Prior_Elaboration): Renamed to
1979 Ensure_Prior_Elaboration_Static for consistency reasons.
1980 (Info_Variable_Reference): Renamed to Info_Variable_Read in order to
1981 reflect its new purpose.
1982 (Is_Initialized): New routine.
1983 (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read
1984 in order to reflect its new purpose.
1985 (Is_Variable_Read): New routine.
1986 (Output_Variable_Reference): Renamed to Output_Variable_Read in order
1987 to reflect its new purpose.
1988 (Process_Variable_Assignment): This routine now acts as a top level
1989 dispatcher for variable assignments.
1990 (Process_Variable_Assignment_Ada): New routine.
1991 (Process_Variable_Assignment_SPARK): New routine.
1992 (Process_Variable_Reference): Renamed to Process_Variable_Read in order
1993 to reflects its new purpose. A reference to a variable is now suitable
1994 for ABE processing only when it is a read. The logic in the routine now
1995 reflects the latest SPARK elaboration rules.
1996
1997 2017-10-14 Justin Squirek <squirek@adacore.com>
1998
1999 * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that
2000 triggers marking on formal subprograms.
2001
2002 2017-10-14 Javier Miranda <miranda@adacore.com>
2003
2004 * checks.adb (Ensure_Valid): Do not skip adding the validity check on
2005 renamings of objects that come from the sources.
2006
2007 2017-10-14 Eric Botcazou <ebotcazou@adacore.com>
2008
2009 * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align
2010 parameter and set the alignment of the type to Align.
2011 (Copy_Float_Type): Adjust call to Build_Float_Type.
2012 (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust
2013 call to Build_Float_Type and do not set RM_Size and Alignment.
2014
2015 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2016
2017 * Makefile.rtl (GNATRTL_NONTASKING_OBJ): Add s-soliin to
2018 GNATRTL_NONTASKING_OBJ.
2019
2020 2017-10-14 Bob Duff <duff@adacore.com>
2021
2022 * exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
2023 enabling b-i-p for nonlimited controlled types (but disabled).
2024
2025 2017-10-14 Justin Squirek <squirek@adacore.com>
2026
2027 * sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
2028 Has_Warnings_Off with Warnings_Off.
2029
2030 2017-10-14 Piotr Trojanek <trojanek@adacore.com>
2031
2032 * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2033
2034 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
2035
2036 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
2037 enclosing package at the end of the visible declarations.
2038 * sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
2039 an initialization item which is undefined due to some illegality.
2040
2041 2017-10-14 Patrick Bernardi <bernardi@adacore.com>
2042
2043 * ali.adb: Add new ALI line 'T' to read the number of tasks contain
2044 within each unit that require a default-sized primary and secondary
2045 stack to be generated by the binder.
2046 (Scan_ALI): Scan new 'T' lines.
2047 * ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
2048 * bindgen.adb (Gen_Output_File): Count the number of default-sized
2049 stacks within the closure that are to be created by the binder.
2050 (Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
2051 stacks and record these in System.Secodnary_Stack.
2052 (Resolve_Binder_Options): Check if System.Secondary_Stack is in the
2053 closure of the program being bound.
2054 * bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
2055 * exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
2056 (Expand_N_Object_Declaration): Count the number of default-sized stacks
2057 used by task objects contained within the object whose declaration is
2058 being expanded. Only performed when either the restrictions
2059 No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
2060 effect.
2061 * exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
2062 (Expand_N_Task_Type_Declaration): Create a secondary stack as part of
2063 the expansion of a task type if the size of the stack is known at
2064 run-time and the restrictions No_Implicit_Heap_Allocations or
2065 No_Implicit_Task_Allocations are in effect.
2066 (Make_Task_Create_Call): If using a restricted profile provide
2067 secondary stack parameter: either the statically created stack or null.
2068 * lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
2069 Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
2070 Unit_Record initialization expressions.
2071 * lib-writ.adb (Add_Preprocessing_Dependency,
2072 Ensure_System_Dependency): Include Primary_Stack_Count and
2073 Sec_Stack_Count in Unit_Record initialization expression.
2074 (Write_ALI): Write T lines.
2075 (Write_Unit_Information): Do not output 'T' lines if there are no
2076 stacks for the binder to generate.
2077 * lib-writ.ads: Updated library information documentation to include
2078 new T line entry.
2079 * lib.adb (Increment_Primary_Stack_Count): New routine.
2080 (Increment_Sec_Stack_Count): New routine.
2081 (Primary_Stack_Count): New routine.
2082 (Sec_Stack_Count): New routine.
2083 * lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
2084 Unit_Record and updated documentation.
2085 (Increment_Primary_Stack_Count): New routine along with pragma Inline.
2086 (Increment_Sec_Stack_Count): New routine along with pragma Inline.
2087 (Primary_Stack_Count): New routine along with pragma Inline.
2088 (Sec_Stack_Count): New routine along with pragma Inline.
2089 * opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
2090 redefined. New flag Default_Sec_Stack_Size and
2091 Quantity_Of_Default_Size_Sec_Stacks.
2092 * rtfinal.c Fixed erroneous comment.
2093 * rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
2094 System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
2095 * sem_util.adb (Number_Of_Elements_In_Array): New routine.
2096 * sem_util.ads (Number_Of_Elements_In_Array): New routine.
2097 * switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
2098 * libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
2099 (Set_Sec_Stack_Addr): Removed routine.
2100 (Get_Sec_Stack): New routine.
2101 (Set_Sec_Stack): New routine.
2102 (Init_Tasking_Soft_Links): Update System.Soft_Links reference to
2103 reflect new procedure and global names.
2104 * libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
2105 libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
2106 libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
2107 parameter profile to allow the secondary stack size to be specified.
2108 * libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
2109 profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
2110 call to remove Secondary_Stack_Size reference. Add secondary stack
2111 address and size to SSL.Create_TSD call.
2112 (Task_Wrapper): Remove secondary stack creation.
2113 * libgnarl/s-tarest.ads (Create_Restricted_Task,
2114 Create_Restricted_Task_Sequential): Update parameter profile to include
2115 Sec_Stack_Address and clarify the Size parameter.
2116 * libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
2117 from profile and body.
2118 (Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
2119 * libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
2120 Common_ATCB.
2121 (Initialize_ATCB): Update the parameter profile to remove
2122 Secondary_Stack_Size.
2123 * libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
2124 call to Initialize_ATCB. Add secondary stack address and size to
2125 SSL.Create_TSD call, and catch any storage exception from the call.
2126 (Finalize_Global_Tasks): Update System.Soft_Links references to reflect
2127 new subprogram and component names.
2128 (Task_Wrapper): Remove secondary stack creation.
2129 (Vulnerable_Complete_Master): Update to reflect TSD changes.
2130 * libgnarl/s-tassta.ads: Reformat comments.
2131 (Create_Task): Update parameter profile.
2132 * libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
2133 profile to include secondary stack size. Remove secondary size
2134 parameter from Initialize_ATCB call and add it to Create_TSD call.
2135 * libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
2136 libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
2137 * libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
2138 libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
2139 Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
2140 Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
2141 Sec_Stack_Dynamic.
2142 (Default_Sec_Stack_Size): New routine.
2143 * libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
2144 now Preelaborate.
2145 * libgnat/s-soflin.adb: Removed unused with-clauses. With
2146 System.Soft_Links.Initialize to initialize non-tasking TSD.
2147 (Create_TSD): Update parameter profile. Initialize the TSD and
2148 unconditionally call SS_Init.
2149 (Destroy_TSD): Update SST.SS_Free call.
2150 (Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
2151 Set_Sec_Stack_Addr_Soft): Remove routines.
2152 (Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
2153 Set_Sec_Stack_Soft): Add routines.
2154 (NT_TSD): Move to private part of package specification.
2155 * libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
2156 with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
2157 objects to *_Sec_Stack_*. TSD: removed warning suppression and
2158 component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
2159 (Create_TSD): Update parameter profile.
2160 (NT_TSD): Move to private section from body.
2161 * libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
2162 * libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
2163 * libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
2164 Remove routine.
2165 (Get_Sec_Stack, Set_Sec_Stack): Add routine.
2166 (Thread_Body_Enter): Update parameter profile and body to adapt to new
2167 System.Secondary_Stack.
2168 (Init_RTS): Update body for new System.Soft_Links names.
2169 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
2170 s-soliin.o.
2171
2172 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2173
2174 * gcc-interface/decl.c (annotate_value): Use wi::to_wide when
2175 operating on trees as wide_ints.
2176
2177 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2178
2179 * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement
2180 as a scoping construct when it is byproduct of exception handling.
2181
2182 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2183
2184 * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
2185 semantic field Target of node N_Call_Marker.
2186
2187 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2188
2189 * sem_res.adb (Resolve_Allocator): Reject properly an allocator that
2190 attempts to copy a limited value, when the allocator is the expression
2191 in an expression function.
2192
2193 2017-10-09 Joel Brobecker <brobecker@adacore.com>
2194
2195 * doc/share/conf.py: Tell the style checker that this is a Python
2196 fragment, and therefore that pyflakes should not be run to validate
2197 this file.
2198
2199 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2200
2201 * einfo.ads (Is_Boolean_Type): Add pragma Inline.
2202 (Is_Entity_Name): Likewise.
2203 (Is_String_Type): Likewise.
2204 * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here
2205 and remove useless comparisons on the base types.
2206 (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests
2207 on T2. Always test Is_Private_Type before Full_View_Covers.
2208
2209 2017-10-09 Bob Duff <duff@adacore.com>
2210
2211 * exp_ch4.adb: Minor refactoring.
2212
2213 2017-10-09 Javier Miranda <miranda@adacore.com>
2214
2215 * sem_ch3.adb (Replace_Components): Browse the list of discriminants,
2216 not components.
2217
2218 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2219
2220 * sem_elab.adb (Static_Elaboration_Checks): Elaboration requirements
2221 are verified only in the static model.
2222
2223 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2224
2225 * sem_ch5.adb (Analyze_Iterator_Specification,
2226 Check_Reverse_Iteration): Check that the domain of iteration supports
2227 reverse iteration when it is a formal container. This requires the
2228 presence of a Previous primitive in the Iterable aspect.
2229 * sem_ch13.adb (Resolve_Iterable_Operation): Verify legality of
2230 primitives Last and Previous to support reverse iteration over formal
2231 containers.
2232 (Validate_Iterable_Aspect): Add check for reverse iteration operations.
2233 * exp_ch5.adb (Build_Formal_Container_Iteration): Add proper expansion
2234 for reverse iteration using primitives Last and Previous in generated
2235 loop.
2236
2237 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2238
2239 * sem_util.adb (Subprogram_Name): If this is a child unit, use the name
2240 of the Defining_Program_Unit_Name, which is an identifier, in order to
2241 construct the string for the fully qualified name.
2242
2243 2017-10-09 Justin Squirek <squirek@adacore.com>
2244
2245 * sem_ch3.adb: Rename Uses_Unseen_Priv into
2246 Contains_Lib_Incomplete_Type.
2247
2248 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2249
2250 * sem_aggr.adb, sem_spark.adb, adabkend.adb, exp_ch5.adb, frontend.adb,
2251 sem_ch12.adb, fmap.adb, exp_ch6.adb, exp_spark.adb, lib-load.adb,
2252 exp_ch9.adb, osint.adb, exp_disp.adb, sem_ch8.adb, sem_ch8.ads,
2253 prepcomp.adb, gnat1drv.adb, atree.adb, sinput-l.adb, targparm.adb,
2254 sem_ch10.adb, par-ch8.adb: Minor reformatting.
2255
2256 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2257
2258 * sem_elab.adb (Is_Suitable_Access): This scenario is now only relevant
2259 in the static model.
2260 (Is_Suitable_Variable_Assignment): This scenario is now only relevant
2261 in the static model.
2262 (Is_Suitable_Variable_Reference): This scenario is now only relevant in
2263 the static model.
2264
2265 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2266
2267 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, resolve aspect
2268 expressions when the enclosing scope is a subprogram body and the next
2269 declaration is a body that freezes entities previously declared in the
2270 scope.
2271
2272 2017-10-09 Justin Squirek <squirek@adacore.com>
2273
2274 * sem_ch8.adb (Analyze_Use_Package): Remove checking of mixture between
2275 ghost packages and living packages in use clauses.
2276 (Use_One_Type, Note_Redundant_Use): Correct warning messages
2277
2278 2017-10-09 Justin Squirek <squirek@adacore.com>
2279
2280 * osint.ads: Document new parameter FD for Read_Source_File.
2281
2282 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2283
2284 * exp_util.adb (Make_Predicate_Call): If the type of the expression to
2285 which the predicate check applies is tagged, convert the expression to
2286 that type. This is in most cases a no-op, but is relevant if the
2287 expression is clas-swide, because the predicate function being invoked
2288 is not a primitive of the type and cannot take a class-wide actual.
2289
2290 2017-10-09 Gary Dismukes <dismukes@adacore.com>
2291
2292 * exp_disp.adb: Minor reformatting.
2293
2294 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2295
2296 * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix typo.
2297
2298 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2299
2300 * sem_elab.adb (Install_ABE_Check): Do not generate an ABE check for
2301 GNATprove.
2302 (Install_ABE_Failure): Do not generate an ABE failure for GNATprove.
2303
2304 2017-10-09 Bob Duff <duff@adacore.com>
2305
2306 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Return
2307 immediately if the call has already been processed (by a previous call
2308 to Make_Build_In_Place_Call_In_Anonymous_Context).
2309 * sem_elab.adb: Minor typo fixes.
2310
2311 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2312
2313 * sem_ch13.adb (Replace_Type_Ref): In the expression for a dynamic
2314 predicate, do not replace an identifier that matches the type if the
2315 identifier is a selector in a selected component, because this
2316 indicates a reference to some homograph of the type itself, and not to
2317 the current occurence in the predicate.
2318
2319 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
2320
2321 * repinfo.adb (List_Record_Layout): Tweak formatting.
2322 (Write_Val): Remove superfluous spaces in back-end layout mode.
2323
2324 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2325
2326 * sem_res.adb (Property_Error): Remove.
2327 (Resolve_Actuals): check for SPARK RM 7.1.3(10) rewritten to match the
2328 current wording of the rule.
2329
2330 2017-10-09 Justin Squirek <squirek@adacore.com>
2331
2332 * sem_ch3.adb (Analyze_Declarations): Add check for ghost packages
2333 before analyzing a given scope due to an expression function.
2334 (Uses_Unseen_Lib_Unit_Priv): Rename to Uses_Unseen_Priv.
2335
2336 2017-10-09 Bob Duff <duff@adacore.com>
2337
2338 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use
2339 Defining_Identifier (Obj_Decl) in two places, because it might have
2340 changed.
2341 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases
2342 involving 'Input on (not visibly) derived types.
2343
2344 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com>
2345
2346 * atree.adb: Add new soft link Rewriting_Proc.
2347 (Rewrite): Invoke the subprogram attached to the rewriting soft link.
2348 (Set_Rewriting_Proc): New routine.
2349 * attree.ads: Add new access-to-subprogram type Rewrite_Proc.
2350 (Set_Rewriting_Proc): New routine.
2351 * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character
2352 for *E*laboration flag to maintain consistency with other elaboration
2353 flag generating subprograms.
2354 * debug.adb: Document the new usage of flag -gnatdL.
2355 * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used
2356 as Protected_Subprogram. Flag148 is now used as
2357 Is_Elaboration_Checks_OK_Id. Flag302 is now used as
2358 Is_Initial_Condition_Procedure.
2359 (Is_Elaboration_Checks_OK_Id): New routine.
2360 (Is_Initial_Condition_Procedure): New routine.
2361 (Protected_Subprogram): New routine.
2362 (Receiving_Entry): New routine.
2363 (SPARK_Pragma): Update assertion.
2364 (SPARK_Pragma_Inherited): Update assertion.
2365 (Suppress_Elaboration_Warnings): Removed.
2366 (Set_Is_Elaboration_Checks_OK_Id): New routine.
2367 (Set_Is_Initial_Condition_Procedure): New routine.
2368 (Set_Protected_Subprogram): New routine.
2369 (Set_Receiving_Entry): New routine.
2370 (Set_SPARK_Pragma): Update assertion.
2371 (Set_SPARK_Pragma_Inherited): Update assertion.
2372 (Write_Entity_Flags): Update the output for Flag148 and Flag302.
2373 (Write_Field19_Name): Add output for Receiving_Entry.
2374 (Write_Field39_Name): Add output for Protected_Subprogram.
2375 (Write_Field40_Name): Update the output for SPARK_Pragma.
2376 * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id,
2377 Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry.
2378 Remove attribute Suppress_Elaboration_Warnings. Update the stricture
2379 of various entities.
2380 (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline.
2381 (Is_Initial_Condition_Procedure): New routine along with pragma Inline.
2382 (Protected_Subprogram): New routine along with pragma Inline.
2383 (Receiving_Entry): New routine along with pragma Inline.
2384 (Suppress_Elaboration_Warnings): Removed.
2385 (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma
2386 Inline.
2387 (Set_Is_Initial_Condition_Procedure): New routine along with pragma
2388 Inline.
2389 (Set_Protected_Subprogram): New routine along with pragma Inline.
2390 (Set_Receiving_Entry): New routine along with pragma Inline.
2391 (Set_Suppress_Elaboration_Warnings): Removed.
2392 * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain
2393 consistency with other finalizer generating subprograms.
2394 (Default_Initialize_Object): Mark the block which wraps the call to
2395 finalize as being part of initialization.
2396 * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma
2397 Initial_Condition.
2398 (Expand_N_Package_Body): Directly expand pragma Initial_Condition.
2399 (Next_Suitable_Statement): Update the comment on usage. Skip over call
2400 markers generated by the ABE mechanism.
2401 * exp_ch9.adb (Activation_Call_Loc): New routine.
2402 (Add_Accept): Link the accept procedure to the original entry.
2403 (Build_Protected_Sub_Specification): Link the protected or unprotected
2404 version to the original subprogram.
2405 (Build_Task_Activation_Call): Code cleanup. Use a source location which
2406 is very close to the "begin" or "end" keywords when generating the
2407 activation call.
2408 * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented.
2409 * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to
2410 process loops.
2411 (Expand_SPARK_N_Loop_Statement): New routine.
2412 (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the
2413 call to the Default_Initial_Condition procedure.
2414 (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne.
2415 * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in
2416 effect.
2417 (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect.
2418 (Insert_Actions): Add processing for N_Call_Marker.
2419 (Kill_Dead_Code): Explicitly kill an elaboration scenario.
2420 * exp_util.ads (Make_Invariant_Call): Update the comment on usage.
2421 * frontend.adb: Initialize Sem_Elab. Process all saved top level
2422 elaboration scenarios for ABE issues.
2423 * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker
2424 nodes.
2425 * lib.adb (Earlier_In_Extended_Unit): New variant.
2426 * sem.adb (Analyze): Ignore N_Call_Marker nodes.
2427 (Preanalysis_Active): New routine.
2428 * sem.ads (Preanalysis_Active): New routine.
2429 * sem_attr.adb (Analyze_Access_Attribute): Save certain
2430 elaboration-related attributes. Save the scenario for ABE processing.
2431 * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in
2432 effect. Save certain elaboration-related attributes.
2433 * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related
2434 attributes. Save the scenario for ABE processing.
2435 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK
2436 mode in effect. Save certain elaboration-related attributes.
2437 (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when
2438 locating the first real statement.
2439 (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save
2440 certain elaboration-related attributes.
2441 * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress
2442 elaboration warnings.
2443 * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was
2444 generated for purposes of wrapping an attribute used as a generic
2445 actual.
2446 (Find_Direct_Name): Save certain elaboration-related attributes. Save
2447 the scenario for ABE processing.
2448 (Find_Expanded_Name): Save certain elaboration-related attributes. Save
2449 the scenario for ABE processing.
2450 * sem_ch9.adb (Analyze_Entry_Declaration): Save certain
2451 elaboration-related attributes.
2452 (Analyze_Requeue): Save certain elaboration-related attributes. Save
2453 the scenario for ABE processing.
2454 (Analyze_Single_Task_Declaration): Save certain elaboration-related
2455 attributes.
2456 (Analyze_Task_Type_Declaration): Save certain elaboration-related
2457 attributes.
2458 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain
2459 elaboration-related attributes.
2460 (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in
2461 effect. Save certain elaboration-related attributes.
2462 (Analyze_Package_Instantiation): Save certain elaboration-related
2463 attributes. Save the scenario for ABE processing. Create completing
2464 bodies in case the instantiation results in a guaranteed ABE.
2465 (Analyze_Subprogram_Instantiation): Save certain elaboration-related
2466 attributes Save the scenario for ABE processing. Create a completing
2467 body in case the instantiation results in a guaranteed ABE.
2468 (Provide_Completing_Bodies): New routine.
2469 * sem_elab.ads: Brand new implementation.
2470 * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All,
2471 Elaborate_Body): Do not suppress elaboration warnings.
2472 * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the
2473 operator.
2474 (Resolve_Call): Save certain elaboration-related attributes. Save the
2475 scenario for ABE processing.
2476 (Resolve_Entity_Name): Do not perform any ABE processing here.
2477 (Resolve_Entry_Call): Inherit certain attributes from the original call.
2478 * sem_util.adb (Begin_Keyword_Location): New routine.
2479 (Defining_Entity): Update the parameter profile. Add processing for
2480 concurrent subunits that are rewritten as null statements.
2481 (End_Keyword_Location): New routine.
2482 (Find_Enclosing_Scope): New routine.
2483 (In_Instance_Visible_Part): Code cleanup.
2484 (In_Subtree): Update the parameter profile. Add new version.
2485 (Is_Preelaborable_Aggregate): New routine.
2486 (Is_Preelaborable_Construct): New routine.
2487 (Mark_Elaboration_Attributes): New routine.
2488 (Scope_Within): Update the parameter profile.
2489 (Scope_Within_Or_Same): Update the parameter profile.
2490 * sem_util.ads (Begin_Keyword_Location): New routine.
2491 (Defining_Entity): Update the parameter profile and the comment on
2492 usage.
2493 (End_Keyword_Location): New routine.
2494 (Find_Enclosing_Scope): New routine.
2495 (In_Instance_Visible_Part): Update the parameter profile.
2496 (In_Subtree): Update the parameter profile. Add new version.
2497 (Is_Preelaborable_Aggregate): New routine.
2498 (Is_Preelaborable_Construct): New routine.
2499 (Mark_Elaboration_Attributes): New routine.
2500 (Scope_Within): Update the parameter profile and the comment on usage.
2501 (Scope_Within_Or_Same): Update the parameter profile and the comment on
2502 usage.
2503 * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions
2504 to determine whether a loop has meaningful condition actions.
2505 (Has_Condition_Actions): New routine.
2506 * sinfo.adb (ABE_Is_Certain): Removed.
2507 (Is_Declaration_Level_Node): New routine.
2508 (Is_Dispatching_Call): New routine.
2509 (Is_Elaboration_Checks_OK_Node): New routine.
2510 (Is_Initialization_Block): New routine.
2511 (Is_Known_Guaranteed_ABE): New routine.
2512 (Is_Recorded_Scenario): New routine.
2513 (Is_Source_Call): New routine.
2514 (Is_SPARK_Mode_On_Node): New routine.
2515 (No_Elaboration_Check): Removed.
2516 (Target): New routine.
2517 (Was_Attribute_Reference): New routine.
2518 (Set_ABE_Is_Certain): Removed.
2519 (Set_Is_Declaration_Level_Node): New routine.
2520 (Set_Is_Dispatching_Call): New routine.
2521 (Set_Is_Elaboration_Checks_OK_Node): New routine.
2522 (Set_Is_Initialization_Block): New routine.
2523 (Set_Is_Known_Guaranteed_ABE): New routine.
2524 (Set_Is_Recorded_Scenario): New routine.
2525 (Set_Is_Source_Call): New routine.
2526 (Set_Is_SPARK_Mode_On_Node): New routine.
2527 (Set_No_Elaboration_Check): Removed.
2528 (Set_Target): New routine.
2529 (Set_Was_Attribute_Reference): New routine.
2530 * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute
2531 Do_Discriminant_Check now utilizes Flag3. Attribute
2532 No_Side_Effect_Removal now utilizes Flag17. Add new node
2533 N_Call_Marker. Update the structure of various nodes.
2534 (ABE_Is_Certain): Removed along with pragma Inline.
2535 (Is_Declaration_Level_Node): New routine along with pragma Inline.
2536 (Is_Dispatching_Call): New routine along with pragma Inline.
2537 (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline.
2538 (Is_Initialization_Block): New routine along with pragma Inline.
2539 (Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2540 (Is_Recorded_Scenario): New routine along with pragma Inline.
2541 (Is_Source_Call): New routine along with pragma Inline.
2542 (Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2543 (No_Elaboration_Check): Removed along with pragma Inline.
2544 (Target): New routine along with pragma Inline.
2545 (Was_Attribute_Reference): New routine along with pragma Inline.
2546 (Set_ABE_Is_Certain): Removed along with pragma Inline.
2547 (Set_Is_Declaration_Level_Node): New routine along with pragma Inline.
2548 (Set_Is_Dispatching_Call): New routine along with pragma Inline.
2549 (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma
2550 Inline.
2551 (Set_Is_Initialization_Block): New routine along with pragma Inline.
2552 (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline.
2553 (Set_Is_Recorded_Scenario): New routine along with pragma Inline.
2554 (Set_Is_Source_Call): New routine along with pragma Inline.
2555 (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline.
2556 (Set_No_Elaboration_Check): Removed along with pragma Inline.
2557 (Set_Target): New routine along with pragma Inline.
2558 (Set_Was_Attribute_Reference): New routine along with pragma Inline.
2559 * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker.
2560
2561 2017-10-09 Bob Duff <duff@adacore.com>
2562
2563 * exp_ch7.adb (Create_Finalizer): Suppress checks within the finalizer.
2564
2565 2017-10-09 Bob Duff <duff@adacore.com>
2566
2567 * freeze.ads: Minor comment fixed.
2568
2569 2017-10-09 Bob Duff <duff@adacore.com>
2570
2571 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Take
2572 care of unchecked conversions in addition to regular conversions. This
2573 takes care of a case where a type is derived from a private untagged
2574 type that is completed by a tagged controlled type.
2575
2576 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2577
2578 * exp_disp.adb (Build_Class_Wide_Check, Replace_Formals): When
2579 rewriting a class-wide condition, handle properly the case where the
2580 controlling argument of the operation to which the condition applies is
2581 an access to a tagged type, and the condition includes a dispatching
2582 call with an implicit dereference.
2583
2584 2017-10-09 Bob Duff <duff@adacore.com>
2585
2586 * exp_ch6.adb: (Make_Build_In_Place_Call_In_Object_Declaration): Remove
2587 the code at the end of this procedure that was setting the type of a
2588 class-wide object to the specific type returned by a function call.
2589 Treat this case as indefinite instead.
2590
2591 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2592
2593 * sem_ch4.adb (Try_Class_Wide_Operation, Traverse_Homonyms):
2594 Suppress spurious ambiguity error when two traversals of the homonym
2595 chain (first directly, and then through an examination of relevant
2596 interfaces) retrieve the same operation, when other irrelevant homonyms
2597 of the operatioh are also present.
2598
2599 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2600
2601 * sem_util.adb (Object_Access_Level): If the object is the return
2602 statement of an expression function, return the level of the function.
2603 This is relevant when the object involves an implicit conversion
2604 between access types and the expression function is a completion, which
2605 forces the analysis of the expression before rewriting it as a body, so
2606 that freeze nodes can appear in the proper scope.
2607
2608 2017-10-09 Bob Duff <duff@adacore.com>
2609
2610 * atree.adb: Make nnd apply to everything "interesting", including
2611 Rewrite. Remove rrd.
2612
2613 2017-10-09 Javier Miranda <miranda@adacore.com>
2614
2615 * exp_ch3.adb (Expand_N_Object_Declaration): Avoid never-ending loop
2616 processing the declaration of the dummy object internally created by
2617 Make_DT to compute the offset to the top of components referencing
2618 secondary dispatch tables.
2619 (Initialize_Tag): Do not initialize the offset-to-top field if it has
2620 been initialized initialized.
2621 * exp_disp.ads (Building_Static_Secondary_DT): New subprogram.
2622 * exp_disp.adb (Building_Static_Secondary_DT): New subprogram.
2623 (Make_DT): Create a dummy constant object if we can statically build
2624 secondary dispatch tables.
2625 (Make_Secondary_DT): For statically allocated secondary dispatch tables
2626 use the dummy object to compute the offset-to-top field value by means
2627 of the attribute 'Position.
2628
2629 2017-10-09 Bob Duff <duff@adacore.com>
2630
2631 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
2632 code so if BIPAlloc is not passed in, it will likely raise
2633 Program_Error instead of cause miscellaneous chaos.
2634 (Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
2635 as for the other Is_B-I-P... functions.
2636 * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
2637 aggregate whose ancestor part is a build-in-place call returning a
2638 nonlimited type, transform the assignment to the ancestor part to use a
2639 temp.
2640 * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
2641 creating an Itype for a library unit entity.
2642 (Check_Initialization): Avoid spurious error message on
2643 internally-generated call.
2644 * sem_ch5.adb (Analyze_Assignment): Handle the case where the
2645 right-hand side is a build-in-place call. This didn't happen when b-i-p
2646 was only for limited types.
2647 * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
2648 implies >= Ada 2005.
2649 * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
2650 repeatedly.
2651 * sem_util.adb (Next_Actual): Handle case of build-in-place call.
2652
2653 2017-10-09 Arnaud Charlet <charlet@adacore.com>
2654
2655 * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2656
2657 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2658
2659 * libgnarl/s-taprob.adb: Minor whitespace fix.
2660
2661 2017-10-09 Bob Duff <duff@adacore.com>
2662
2663 * namet.ads: Minor comment fix.
2664
2665 2017-10-09 Piotr Trojanek <trojanek@adacore.com>
2666
2667 * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
2668 just like other program units listed in Ada RM 10.1(1).
2669
2670 2017-10-09 Justin Squirek <squirek@adacore.com>
2671
2672 * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2673
2674 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2675
2676 * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
2677 actual for a formal package is an instantiation of a child unit, create
2678 a freeze node for the instance of the parent if it appears in the same
2679 scope and is not frozen yet.
2680
2681 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
2682
2683 * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
2684 in-source documentation for tagged types's Offset_To_Top.
2685
2686 2017-10-09 Bob Duff <duff@adacore.com>
2687
2688 * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
2689 confusing. Same for N_Loc. Remove assumption that b-i-p implies
2690 limited. This is for the case of a function call that occurs as the
2691 default for a record component.
2692 (Expand_N_Object_Declaration): Deal with the case where expansion has
2693 created an object declaration initialized with something like
2694 F(...)'Reference.
2695 * exp_ch3.adb: Minor reformatting.
2696
2697 2017-10-09 Ed Schonberg <schonberg@adacore.com>
2698
2699 * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
2700 the attribute is an object, but it may appear within a conversion. The
2701 object itself must be retrieved when generating the range test that
2702 implements the validity check on a scalar type.
2703
2704 2017-10-05 Eric Botcazou <ebotcazou@adacore.com>
2705
2706 PR ada/82393
2707 * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
2708 * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.
2709
2710 2017-10-02 Eric Botcazou <ebotcazou@adacore.com>
2711 Pierre-Marie de Rodat <derodat@adacore.com>
2712
2713 PR ada/82384
2714 * libgnarl/s-linux__x32.ads (suseconds_t): New subtype.
2715 (time_t): Change from derived type to subtype.
2716 (timeval): Use suseconds_t for tv_usec.
2717 * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause.
2718
2719 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2720
2721 * gcc-interface/decl.c (annotate_value): Use wi::to_widest when
2722 handling the form (plus/mult (convert @0) @1).
2723
2724 2017-09-29 Bob Duff <duff@adacore.com>
2725
2726 * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
2727 what we had before.
2728 (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
2729 change. Set the Etype in the class-wide case. This fixes a regression
2730 in the libadalang test suite.
2731
2732 2017-09-29 Joel Brobecker <brobecker@adacore.com>
2733
2734 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
2735 doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
2736 in comment markup.
2737 * gnat_ugn.texi: Regenerate.
2738
2739 2017-09-29 Justin Squirek <squirek@adacore.com>
2740
2741 * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
2742 fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
2743 gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
2744 sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
2745 for checking source file status and error message and/or call to
2746 Read_Source_File.
2747 * libgnat/s-os_lib.ads: Add new potential value constant for
2748 uninitialized file descriptors.
2749 * osint.adb, osint.ads (Read_Source_File): Add extra parameter to
2750 return result of IO to encompass a read access failure in addition to a
2751 file-not-found error.
2752
2753 2017-09-29 Bob Duff <duff@adacore.com>
2754
2755 * exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
2756 functions returning nonlimited types. Allow for qualified expressions
2757 and type conversions.
2758 (Expand_N_Extended_Return_Statement): Correct the computation of
2759 Func_Bod to allow for child units.
2760 (Expand_Simple_Function_Return): Remove assumption that b-i-p implies
2761 limited (initialization of In_Place_Expansion), and implies >= Ada
2762 2005.
2763 (Is_Build_In_Place_Result_Type): New function to accompany
2764 Is_Build_In_Place_Function and Is_Build_In_Place_Function_Call, because
2765 sometimes we just have the type on our hands, not the function. For
2766 now, does the same thing as the old version, so build-in-place is
2767 disabled for nonlimited types, except that you can use -gnatd.9 to
2768 enable it.
2769 * exp_ch6.ads (Is_Build_In_Place_Result_Type): New function to
2770 accompany Is_Build_In_Place_Function and
2771 Is_Build_In_Place_Function_Call, because sometimes we just have the
2772 type on our hands, not the function.
2773 (Make_Build_In_Place_Call_In_...): Handle nonlimited build-in-place
2774 cases.
2775 (Make_Build_In_Place_Call_In_Object_Declaration): Remove the
2776 questionable code at the end that was setting the Etype.
2777 * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): New function to
2778 determine whether "return (...agg...);" is returning from a
2779 build-in-place function.
2780 (Initialize_Ctrl_Array_Component, Initialize_Ctrl_Record_Component):
2781 Remove assumption that b-i-p implies limited (initialization of
2782 In_Place_Expansion).
2783 (Build_Record_Aggr_Code): AI-287: fix comment; it can't be wrapped in
2784 an unchecked conversion. Add assertions.
2785 (Convert_Aggr_In_Object_Decl): Establish_Transient_Scope -- no need for
2786 secondary stack here, just because the type needs finalization. That
2787 code is obsolete.
2788 (Convert_To_Assignments): Only set Unc_Decl if Nkind (N) = N_Aggregate.
2789 For "return (...agg...);" don't assume b-i-p implies limited.
2790 Needs_Finalization does not imply secondary stack.
2791 (Expand_Array_Aggregate): Named notation. Reverse the sense of
2792 Component_OK_For_Backend -- more readability with fewer double
2793 negatives.
2794 * exp_attr.adb (Expand_N_Attribute_Reference): Remove assumptions that
2795 b-i-p implies >= Ada 2005.
2796 * exp_ch3.adb (Expand_N_Object_Declaration): Remove assumptions that
2797 b-i-p implies >= Ada 2005. Remove Adjust if we're building the return
2798 object of an extended return statement in place.
2799 * exp_ch4.adb (Expand_Allocator_Expression, Expand_N_Indexed_Component,
2800 Expand_N_Selected_Component, Expand_N_Slice): Remove assumptions that
2801 b-i-p implies >= Ada 2005.
2802 * exp_ch5.adb (Expand_N_Assignment_Statement): Remove assumption that
2803 b-i-p implies >= Ada 2005.
2804 * exp_ch7.adb: Comment fix.
2805 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Remove
2806 assumptions that b-i-p implies >= Ada 2005.
2807 * exp_disp.adb (Expand_Interface_Actuals): Remove assumptions that
2808 b-i-p implies >= Ada 2005.
2809 * exp_util.adb (Build_Allocate_Deallocate_Proc): Look at Storage_Pool
2810 (Expr), in case Pool_Id is not set.
2811 (Initialized_By_Aliased_BIP_Func_Call): Handle case where the call is
2812 qualified or converted.
2813 (Is_Secondary_Stack_BIP_Func_Call): Don't check if Nkind (Selector_Name
2814 (Param)) = N_Identifier; that's all it could be.
2815 * sinfo.ads: Comment fixes.
2816 * snames.ads-tmpl: Comment fixes.
2817 * debug.adb: Add flag gnatd.9, to enable the build-in-place machinery.
2818
2819 2017-09-29 Justin Squirek <squirek@adacore.com>
2820
2821 * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle
2822 all cases related to marking entity identifiers.
2823
2824 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2825
2826 * adaint.c (win32_wait): Properly handle error and take into account
2827 the WIN32 limitation on the number of simultaneous wait objects.
2828
2829 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2830
2831 * cal.c: Minor proofreading.
2832
2833 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com>
2834
2835 * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix.
2836 * gnat_ugn.texi: Regenerate.
2837
2838 2017-09-29 Bob Duff <duff@adacore.com>
2839
2840 * lib-xref.ads: Comment fix.
2841
2842 2017-09-29 Bob Duff <duff@adacore.com>
2843
2844 * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants.
2845 Discriminants can't need finalization.
2846
2847 2017-09-29 Ed Schonberg <schonberg@adacore.com>
2848
2849 * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes
2850 for types in expression if the function is within a generic unit.
2851 * sem_res.adb (Resolve): In a generic context do not freeze an
2852 expression, unless it is an entity. This exception is solely for the
2853 purpose of detecting illegal uses of deferred constants in generic
2854 units.
2855 * sem_res.adb: Minor reformatting.
2856
2857 2017-09-29 Justin Squirek <squirek@adacore.com>
2858
2859 * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
2860 redundant warnings.
2861
2862 2017-09-29 Yannick Moy <moy@adacore.com>
2863
2864 * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
2865
2866 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2867
2868 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
2869 * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
2870 Document the effect of pragma Optimize_Alignment (Space) on non-packed
2871 record types.
2872 * gnat_rm.texi: Regenerate.
2873
2874 2017-09-25 Justin Squirek <squirek@adacore.com>
2875
2876 * aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
2877 exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
2878 gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
2879 gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
2880 libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
2881 libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
2882 libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
2883 libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
2884 libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
2885 libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
2886 put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
2887 sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
2888 Removal of ineffective use-clauses.
2889 * exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
2890 constant folded barriers.
2891 * ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
2892 Subtype_Marks and Names list in use-clause nodes to their new singular
2893 counterparts (e.g. Subtype_Mark, Name).
2894 * par.adb, par-ch8.adb (Append_Use_Clause): Created to set
2895 Prev_Ids and More_Ids in use-clause nodes.
2896 (P_Use_Clause): Modify to take a list as a parameter.
2897 (P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
2898 subtype_marks within an aggregate use-clauses into individual clauses.
2899 * par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
2900 P_Use_Clause to match its new behavior.
2901 * sem.adb (Analyze): Mark use clauses for non-overloaded entities.
2902 * sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
2903 errors.
2904 * sem_ch6.adb (Analyze_Generic_Subprogram_Body,
2905 Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
2906 the declarative region.
2907 * sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
2908 after analysis (Analyze_Package_Specification): Update use clause chain
2909 when there is no body.
2910 * sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
2911 parameter to determine weither the installation of scopes should also
2912 propagate on the use-clause "chain".
2913 (Mark_Use_Clauses): Created to traverse use-clause chains and determine
2914 what constitutes a valid "use" of a clause.
2915 (Update_Use_Clause_Chain): Created to aggregate common machinary used
2916 to clean up use-clause chains (and warn on ineffectiveness) at the end
2917 of declaritive regions.
2918 * sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
2919 package name from a use-package clause.
2920 (Analyze_Package_Name_List): Created to perform analysis on a list of
2921 package names (similar to Analyze_Package_Name).
2922 (Find_Most_Prev): Created to traverse to the beginning of a given
2923 use-clause chain.
2924 (Most_Decendant_Use_Clause): Create to identify which clause from a
2925 given set is highest in scope (not always the most prev).
2926 (Use_One_Package, Use_One_Type): Major cleanup and reorganization to
2927 handle the new chaining algorithm, also many changes related to
2928 redundant clauses. A new parameter has also been added to force
2929 installation to handle certain cases.
2930 * sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
2931 Analyze_Task_Body): Mark use clauses on relevant entities.
2932 * sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
2933 Install_Parents): Add parameter to determine weither the installation
2934 of scopes should also propagate on the use-clause "chain".
2935 * sem_ch12.adb (Inline_Instance_Body): Add flag in call to
2936 Install_Context to avoid redundant chaining of use-clauses.
2937 * sem_ch13.adb: Minor reformatting.
2938 * sem_res.adb (Resolve): Mark use clauses on operators.
2939 (Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
2940 entities.
2941 * sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
2942 Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
2943 represent any given clause's usage/reference/necessity.
2944 (Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
2945 nodes to allow loose chaining of redundant clauses.
2946 (Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
2947 Set_More_Ids, Set_Name): Modify set procedure calls to reflect
2948 reorganization in node fields.
2949 * types.ads (Source_File_Index): Adjust index bounds.
2950 (No_Access_To_Source_File): New constant.
2951
2952 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2953
2954 * sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
2955 the expression to be used in the generated attribute specification
2956 (rather than relocating it) to avoid resolving a potentially malformed
2957 tree when the expression is resolved through an ASIS-specific call to
2958 Resolve_Aspect_Expressions. This manifests itself as a crash on a
2959 function with parameter associations.
2960
2961 2017-09-25 Yannick Moy <moy@adacore.com>
2962
2963 * exp_spark.adb (Expand_SPARK_Indexed_Component,
2964 Expand_SPARK_Selected_Component): New procedures to insert explicit
2965 dereference if required.
2966 (Expand_SPARK): Call the new procedures.
2967
2968 2017-09-25 Patrick Bernardi <bernardi@adacore.com>
2969
2970 * libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
2971 libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
2972 libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
2973 libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
2974 libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2975
2976 2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
2977
2978 * adaint.c (win32_wait): Properly handle error and take into account
2979 the WIN32 limitation on the number of simultaneous wait objects.
2980
2981 2017-09-25 Yannick Moy <moy@adacore.com>
2982
2983 * sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
2984 invariant procedure in GNATprove mode.
2985 * sem_ch5.adb (Analyze_Assignment): Likewise.
2986
2987 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
2988
2989 * adabkend.adb (Call_Back_End): Fix wording of "front-end" and
2990 "back-end" in comments.
2991
2992 2017-09-25 Ed Schonberg <schonberg@adacore.com>
2993
2994 * exp_ch6.adb (Expand_Call_Helper): The extra accessibility check in a
2995 call that appears in a classwide precondition and that mentions an
2996 access formal of the subprogram, must use the accessibility level of
2997 the actual in the call. This is one case in which a reference to a
2998 formal parameter appears outside of the body of the subprogram.
2999
3000 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3001
3002 * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant
3003 for GNATprove.
3004 (Resolve_Entry): Clean up predicate
3005
3006 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3007
3008 * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather
3009 than Program_Error because U_E is more in line with respect to the
3010 intended behavior.
3011
3012 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3013
3014 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect
3015 Storage_Size does not freeze, and thus can include references to
3016 deferred constants.
3017
3018 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3019
3020 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a
3021 reference when it appears within a pragma of no significance to SPARK.
3022 (In_Insignificant_Pragma): New routine.
3023 * sem_prag.ads: Add new table Pragma_Significant_In_SPARK.
3024
3025 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3026
3027 * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the
3028 actual is a renaming, indicate that it is the renamed package that must
3029 be frozen before the instantiation.
3030
3031 2017-09-25 Yannick Moy <moy@adacore.com>
3032
3033 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description
3034 of dimensionality system in GNAT UG.
3035 * gnat_ugn.texi: Regenerate.
3036
3037 2017-09-25 Yannick Moy <moy@adacore.com>
3038
3039 * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in
3040 GNATprove_Mode when switch -gnatdF used.
3041
3042 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3043
3044 * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting
3045 the backend.
3046
3047 2017-09-25 Javier Miranda <miranda@adacore.com>
3048
3049 * exp_imgv.adb (Expand_Image_Attribute): Disable the optimized
3050 expansion of user-defined enumeration types when the generation of
3051 names for enumeration literals is suppressed.
3052
3053 2017-09-25 Gary Dismukes <dismukes@adacore.com>
3054
3055 * libgnarl/s-taprop__linux.adb: Minor reformatting.
3056
3057 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3058
3059 * sem_ch13.adb (Resolve_Aspect_Expressions): Do not resolve identifiers
3060 that appear as selector names of parameter associations, as these are
3061 never resolved by visibility.
3062
3063 2017-09-25 Justin Squirek <squirek@adacore.com>
3064
3065 * sem_res.adb (Resolve_Entry): Generate reference for index entities.
3066
3067 2017-09-25 Doug Rupp <rupp@adacore.com>
3068
3069 * libgnarl/s-taprop__linux.adb (Compute_Base_Monotonic_Clock): Refine.
3070
3071 2017-09-25 Javier Miranda <miranda@adacore.com>
3072
3073 * exp_imgv.adb (Is_User_Defined_Enumeration_Type): New subprogram.
3074 (Expand_User_Defined_Enumeration_Image): New subprogram.
3075 (Expand_Image_Attribute): Enable speed-optimized expansion of
3076 user-defined enumeration types when we are compiling with optimizations
3077 enabled.
3078
3079 2017-09-25 Piotr Trojanek <trojanek@adacore.com>
3080
3081 * sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
3082 routine is already provided by Einfo.
3083 * einfo.adb (Has_Null_Abstract_State): Replace with the body from
3084 Sem_Util, which had better comments and avoided double calls to
3085 Abstract_State.
3086
3087 2017-09-25 Bob Duff <duff@adacore.com>
3088
3089 * exp_ch3.adb: Rename Comp_Type_Simple to be Comp_Simple_Init.
3090
3091 2017-09-25 Doug Rupp <rupp@adacore.com>
3092
3093 * libgnarl/s-taprop__linux.adb (Base_Monotonic_Clock): New variable.
3094 (Compute_Base_Monotonic_Clock): New function.
3095 (Timed_Sleep): Adjust to use Base_Monotonic_Clock.
3096 (Timed_Delay): Likewise.
3097 (Monotonic_Clock): Likewise.
3098 * s-oscons-tmplt.c (CLOCK_MONOTONIC): Use on Linux.
3099
3100 2017-09-25 Ed Schonberg <schonberg@adacore.com>
3101
3102 * sem_ch12.adb (Save_References_In_Aggregate): Small correction to
3103 previous change.
3104
3105 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com>
3106
3107 * exp_ch5.adb, sem_ch4.adb, sem_ch13.adb, sem_attr.adb, exp_ch3.adb:
3108 Minor reformatting.
3109
3110 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
3111
3112 * gcc-interface/lang.opt (gant, gnatO, gnat): Add RejectNegative.
3113
3114 2017-09-18 Bob Duff <duff@adacore.com>
3115
3116 * sem_ch4.adb (Complete_Object_Operation): Do not insert 'Access for
3117 reference types in the access-to-access case.
3118
3119 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3120
3121 * sem_attr.adb (Analyze_Access_Attribute): Move check for the presence
3122 of the "aliased" keyword on the prefix from here to...
3123 (Resolve_Attribute) <Attribute_Access>: ...here. Remove useless call
3124 to Check_No_Implicit_Aliasing.
3125 * sinfo.ads (Non_Aliased_Prefix): Delete.
3126 (Set_Non_Aliased_Prefix): Likewise.
3127 * sinfo.adb (Non_Aliased_Prefix): Delete.
3128 (Set_Non_Aliased_Prefix): Likewise.
3129
3130 2017-09-18 Bob Duff <duff@adacore.com>
3131
3132 * exp_ch5.adb (Build_Formal_Container_Iteration,
3133 Expand_Formal_Container_Element_Loop): Convert the container to the
3134 root type before passing it to the iteration operations, so it will be
3135 of the right type.
3136
3137 2017-09-18 Bob Duff <duff@adacore.com>
3138
3139 * einfo.ads, validsw.ads, treepr.ads, sem_util.ads: Comment fixes.
3140
3141 2017-09-18 Bob Duff <duff@adacore.com>
3142
3143 * exp_ch3.adb (Build_Array_Init_Proc): If validity checking is enabled,
3144 and it's a bit-packed array, pass False to the Consider_IS parameter of
3145 Needs_Simple_Initialization.
3146
3147 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3148
3149 * sem_ch6.adb (Check_Inline_Pragma): Link the newly generated spec to
3150 the preexisting body.
3151 * sem_prag.adb (Check_Inline_Always_Placement): New routine.
3152 (Process_Inline): Verify the placement of pragma Inline_Always. The
3153 pragma must now appear on the initial declaration of the related
3154 subprogram.
3155
3156 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3157
3158 * sem_ch3.adb (Analyze_Declarations): In ASIS mode, At the end of the
3159 declarative list in a subprogram body, analyze aspext specifications to
3160 provide basic semantic information, because otherwise the aspect
3161 specifications might only be snalyzed during expansion, when related
3162 subprograms are generated.
3163
3164 2017-09-18 Bob Duff <duff@adacore.com>
3165
3166 * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case
3167 validity checks have rewritten the tree.
3168
3169 2017-09-18 Bob Duff <duff@adacore.com>
3170
3171 * sem_util.adb: Comment fixes, and remove redundant Is_Itype check.
3172
3173 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3174
3175 * sem_ch12.adb (Save_References_In_Aggregate): When constructing a
3176 qualified exxpression for an aggregate in a generic unit, verify that
3177 the scope of the type is itself visible and not hidden, so that the
3178 qualified expression is correctly resolved in any instance.
3179
3180 2017-09-18 Bob Duff <duff@adacore.com>
3181
3182 * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type
3183 mark refers to the current instance. Set the type to Any_Type in that
3184 case, to avoid later crashes.
3185
3186 2017-09-18 Ed Schonberg <schonberg@adacore.com>
3187
3188 * exp_ch3.adb (Replace_Discriminant_References): New procedure,
3189 subsidiary of Build_Assignment, used to handle the initialization code
3190 for a mutable record component whose default value is an aggregate that
3191 sets the values of the discriminants of the components.
3192
3193 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
3194
3195 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark
3196 the entity as being volatile for an overlay that toggles the scalar
3197 storage order.
3198
3199 2017-09-18 Fedor Rybin <frybin@adacore.com>
3200
3201 * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest
3202 options -U main and --harness-only are not compatible.
3203
3204 2017-09-18 Hristian Kirtchev <kirtchev@adacore.com>
3205
3206 * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting.
3207
3208 2017-09-18 Piotr Trojanek <trojanek@adacore.com>
3209
3210 * einfo.ads (Is_Imported): Update comment, as this
3211 routine also applies to constants.
3212
3213 2017-09-18 Yannick Moy <moy@adacore.com>
3214
3215 * sem_util.adb (Find_Placement_In_State_Space): Allow generic package
3216 holding state.
3217
3218 2017-09-18 Justin Squirek <squirek@adacore.com>
3219
3220 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the
3221 constant indication for Pragma_Linker_Section.
3222
3223 2017-09-18 Bob Duff <duff@adacore.com>
3224
3225 Alternate fix for PR ada/71358
3226 * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
3227 Instead, make a local copy of Config, and if it's null, allocate an
3228 empty Command_Line_Configuration_Record, so we won't crash on null
3229 pointer dereference.
3230
3231 2017-09-16 Eric Botcazou <ebotcazou@adacore.com>
3232
3233 * libgnarl/a-intnam__rtems.ads: Update copyright date.
3234 * libgnarl/s-interr__hwint.adb: Likewise.
3235 * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
3236 * libgnarl/s-osinte__rtems.adb: Likewise.
3237 * libgnarl/s-osinte__rtems.ads: Likewise.
3238
3239 2017-09-13 Nicolas Roche <roche@adacore.com>
3240
3241 * Make-lang.in: In the fallback mechanim, parse the associated .ali
3242 file and try to guess the locations of dependencies.
3243
3244 2017-09-13 Eric Botcazou <ebotcazou@adacore.com>
3245
3246 * sem_ch13.adb (Register_Address_Clause_Check): New procedure to save
3247 the suppression status of Alignment_Check on the current scope.
3248 (Alignment_Checks_Suppressed): New function to use the saved instead of
3249 the current suppression status of Alignment_Check.
3250 (Address_Clause_Check_Record): Add Alignment_Checks_Suppressed field.
3251 (Analyze_Attribute_Definition_Clause): Instead of manually appending to
3252 the table, call Register_Address_Clause_Check.
3253 (Validate_Address_Clauses): Call Alignment_Checks_Suppressed on the
3254 recorded address clause instead of its entity.
3255
3256 2017-09-13 Jerome Guitton <guitton@adacore.com>
3257
3258 * libgnarl/s-tpopsp__vxworks-tls.adb,
3259 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-tpopsp__vxworks.adb
3260 (Self): Register thread if task id is null.
3261
3262 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3263
3264 * libgnat/s-htable.adb, libgnat/s-htable.ads: Minor style tuning.
3265
3266 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3267
3268 * lib-xref-spark_specific.adb (Scopes): simplify hash map; now it maps
3269 from an entity to only scope index, as a mapping from an entity to the
3270 same entity was useless.
3271 (Get_Scope_Num): refactor as a simple renaming; rename parameter from N
3272 to E.
3273 (Set_Scope_Num): refactor as a simple renaming; rename parameter from N
3274 to E.
3275 (Is_Constant_Object_Without_Variable_Input): remove local "Result"
3276 variable, just use return statements.
3277
3278 2017-09-13 Arnaud Charlet <charlet@adacore.com>
3279
3280 * libgnarl/s-vxwext__kernel-smp.adb,
3281 libgnarl/s-tpopsp__vxworks-rtp.adb, libgnarl/s-vxwext__noints.adb:
3282 New file.
3283
3284 2017-09-13 Hristian Kirtchev <kirtchev@adacore.com>
3285
3286 * einfo.adb: Flag42 is now Is_Controlled_Active.
3287 (Is_Controlled): This attribute is now synthesized.
3288 (Is_Controlled_Active): This attribute is now an explicit flag rather
3289 than a synthesized attribute. (Set_Is_Controlled): Removed.
3290 (Set_Is_Controlled_Active): New routine.
3291 (Write_Entity_Flags): Update the output for Flag42.
3292 * einfo.ads: Update the documentation of the following attributes:
3293 Disable_Controlled, Is_Controlled, Is_Controlled_Active, Is_Controlled
3294 and Is_Controlled_Active have swapped their functionality.
3295 (Is_Controlled): Renamed to Is_Controlled_Active.
3296 (Is_Controlled_Active): Renamed to Is_Controlled.
3297 (Set_Is_Controlled): Renamed to Set_Is_Controlled_Active.
3298 * exp_ch3.adb (Expand_Freeze_Record_Type): Restore the original use of
3299 Is_Controlled.
3300 * exp_util.adb (Has_Some_Controlled_Component): Code clean up.
3301 (Needs_Finalization): Code clean up. Remove the tests for
3302 Disable_Controlled because a) they were incorrect as they would reject
3303 a type which is sublect to the aspect, but may contain controlled
3304 components, and b) they are no longer necessary.
3305 * exp_util.ads (Needs_Finalization): Update comment on documentation.
3306 * freeze.adb (Freeze_Array_Type): Restore the original use of
3307 Is_Controlled.
3308 (Freeze_Record_Type): Restore the original use of Is_Controlled.
3309 * sem_ch3.adb (Analyze_Object_Declaration): Restore the original use of
3310 Is_Controlled.
3311 (Array_Type_Declaration): Restore the original use of Is_Controlled.
3312 (Build_Derived_Private_Type): Restore the original use of
3313 Is_Controlled.
3314 (Build_Derived_Record_Type): Set the Is_Controlled_Active flag of a
3315 type derived from Ada.Finalization.[Limited_]Controlled.
3316 (Build_Derived_Type): Restore the original use of Is_Controlled.
3317 (Record_Type_Definition): Restore the original use of Is_Controlled.
3318 * sem_ch7.adb (Preserve_Full_Attributes): Restore the original use of
3319 Is_Controlled.
3320 * sem_ch13.adb (Analyze_Aspect_Disable_Controlled): New routine.
3321 (Analyze_Aspect_Specifications): Use routine
3322 Analyze_Aspect_Disable_Controlled to process aspect Disable_Controlled.
3323
3324 2017-09-13 Vincent Celier <celier@adacore.com>
3325
3326 * clean.adb (Gnatclean): Fix error when looking for target
3327 of <target>-gnatclean
3328
3329 2017-09-13 Javier Miranda <miranda@adacore.com>
3330 Ed Schonberg <schonberg@adacore.com>
3331
3332 * sem_ch8.adb (Find_Expanded_Name): Complete code that identifies an
3333 expanded name that designates the current instance of a child unit in
3334 its own body and appears as the prefix of a reference to an entity
3335 local to the child unit.
3336
3337 2017-09-12 Bob Duff <duff@adacore.com>
3338
3339 * sem_warn.adb: Minor comment.
3340
3341 2017-09-12 Bob Duff <duff@adacore.com>
3342
3343 * libgnat/a-cbdlli.adb, libgnat/a-cbhama.adb,
3344 libgnat/a-cbmutr.adb, libgnat/a-cborma.adb: Rename New_Item to
3345 be Default_Initialized_Item, and apply pragma Unmodified to it,
3346 to suppress the warning.
3347
3348 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3349
3350 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add early return
3351 for access types.
3352
3353 2017-09-12 Yannick Moy <moy@adacore.com>
3354
3355 * gnat1drv.adb (Adjust_Global_Switches): Consider Refined_Global
3356 together with Global when ignoring one in CodePeer mode.
3357
3358 2017-09-12 Javier Miranda <miranda@adacore.com>
3359
3360 * sem_ch3.adb (Analyze_Declarations): In nested
3361 package declarations that have a private part enable missing check
3362 of the RM rule 13.1.1(11/3): usage names in aspect definitions are
3363 resolved at the end of the immediately enclosing declaration list.
3364
3365 2017-09-12 Bob Duff <duff@adacore.com>
3366
3367 * sem_ch6.adb (Analyze_Expression_Function): Initialize Def_Id to
3368 Empty.
3369
3370 2017-09-12 Georges-Axel Jaloyan <jaloyan@adacore.com>
3371
3372 * debug.adb: Reserving flag -gnatdF for safe pointer checking.
3373 * gnat1drv.adb (gnat1drv): Adding the call to the analysis on
3374 dF flag.
3375 * sem_spark.adb, sem_spark.ads: Implementation of the analysis,
3376 in preparation for the evolution of the SPARK language that
3377 includes a pointer analysis for checking non-aliasing of access
3378 types. The Check_Safe_Pointers function is the entry point, and
3379 will traverse the AST and raise compile-time errors everytime
3380 it detects non-begign aliasing. Detailed comments are present
3381 in the sem_spark.ads file.
3382 * sem_util.adb, sem_util.ads (First_Global, Next_Global): New
3383 functions to iterate over the list of globals of a subprogram.
3384 * libgnat/system.ads: Add restriction No_Finalization.
3385 * gcc-interface/Make-lang.in: Add new file sem_spark.adb and
3386 dependency on g-dynhta.adb.
3387
3388 2017-09-12 Bob Duff <duff@adacore.com>
3389
3390 * sem_ch6.adb (Analyze_Expression_Function): Call
3391 Check_Dynamically_Tagged_Expression.
3392 * sem_util.adb (Check_Dynamically_Tagged_Expression): Remove
3393 "and then Is_Tagged_Type (Typ)" because there is an earlier
3394 "Assert (Is_Tagged_Type (Typ))".
3395
3396 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
3397
3398 * gcc-interface/Makefile.in (SPARC/Solaris): Remove obsolete stuff.
3399
3400 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3401
3402 * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning.
3403 * doc/gnat_ugn/platform_specific_information.rst: Remove doc
3404 for no longer supported platforms.
3405 * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed
3406 description of the semantics for dimensionality analysis.
3407 * gnat_ugn.texi: Regenerated.
3408
3409 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3410
3411 * freeze.adb (Has_Incomplete_Compoent): Delete.
3412 (Freeze_Profile):
3413 Do not inhibit the freezing of the profile of an expression
3414 function here.
3415 (Freeze_Subprogram): Do not re-create extra formals.
3416 * sem_ch6.adb (Analyze_Expression_Function): Always
3417 pre-analyze the expression if the function is not a completion.
3418 (Analyze_Subprogram_Body_Helper): For the body generated
3419 from an expression function that is not a completion, do
3420 not freeze the profile and temporary mask the types declared
3421 outside the expression that are not yet frozen.
3422 * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked
3423 during the pre-analysis of an expression function.
3424
3425 2017-09-11 Eric Botcazou <ebotcazou@adacore.com>
3426
3427 * gcc-interface/gigi.h (enum standard_datatypes): Minor tweak.
3428 (gigi): Likewise.
3429
3430 2017-09-11 Yannick Moy <moy@adacore.com>
3431
3432 * lib-xref-spark_specific.adb: Minor rewrite.
3433
3434 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3435
3436 * libgnat: Rename ?-[a-z]*-* into ?-[a-z]*__*
3437 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Take this
3438 renaming into account.
3439
3440 2017-09-11 Jerome Lambourg <lambourg@adacore.com>
3441
3442 * libgnarl: Rename ?-[a-z]*-* into ?-[a-z]*__*
3443 * gcc-interface/Makefile.in: Take this renaming into account.
3444
3445 2017-09-11 Arnaud Charlet <charlet@adacore.com>
3446
3447 * s-auxdec-empty.ads, s-auxdec-empty.adb, 9drpc.adb: Removed, no
3448 longer used.
3449
3450 2017-09-11 Yannick Moy <moy@adacore.com>
3451
3452 * sem_util.adb (Check_Result_And_Post_State):
3453 Do not issue a warning about missing reference to an outcome if
3454 the subprogram is ghost and has no outputs.
3455 * lib-xref-spark_specific.adb, sem_aggr.adb, sem_aux.ads: Minor
3456 reformatting.
3457
3458 2017-09-11 Yannick Moy <moy@adacore.com>
3459
3460 * gnat1drv.adb (Adjust_Global_Switches): Set
3461 Check_Validity_Of_Parameters to False in GNATprove mode.
3462 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3463 set option.
3464
3465 2017-09-09 Pierre-Marie de Rodat <derodat@adacore.com>
3466
3467 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Don't
3468 generate debug info for inner record types if -fgnat-encodings=minimal.
3469 (gnat_to_gnu_entity) <E_Record_Subtype>: Use the ultimate base record
3470 type as the debug type.
3471
3472 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3473
3474 * gcc-interface/decl.c (components_to_record): Do not reorder in non-
3475 packed record types if pragma Optimize_Alignment (Space) is enabled.
3476
3477 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3478
3479 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Disregard inlining
3480 limits for expression functions.
3481 (gnat_to_gnu) <N_Object_Declaration>: Fix formatting.
3482
3483 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3484
3485 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Copy the
3486 layout of the record from the parent type only if both are or are not
3487 unchecked unions.
3488 (is_stored_discriminant): Return false for an unchecked union.
3489
3490 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3491
3492 * gcc-interface/utils2.c (build_allocator): In type_annotate_only mode
3493 return NULL_EXPR.
3494
3495 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3496
3497 * gcc-interface/decl.c (promote_object_alignment): New function taken
3498 from...
3499 (gnat_to_gnu_entity) <E_Variable>: ...here. Invoke it.
3500 (gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
3501 create a padding type on success before doing the atomic check.
3502
3503 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3504
3505 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
3506 promotion to static memory earlier in the processing.
3507
3508 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3509
3510 * gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
3511 and TYPE_BY_REFERENCE_P flags on types after various promotions.
3512 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
3513 Consider all kinds of entities.
3514
3515 2017-09-09 Eric Botcazou <ebotcazou@adacore.com>
3516
3517 * gcc-interface/utils.c (convert): When converting to a padding type,
3518 reuse an existing CONSTRUCTOR if it has got the right size.
3519
3520 2017-09-08 Nicolas Roche <roche@adacore.com>
3521
3522 * gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Find runtime
3523 source in libgnat/
3524 * a-lfztio.ads, g-timsta.ads, g-sercom-linux.adb, s-osprim-solaris.adb,
3525 a-inteio.ads, s-stchop-rtems.adb, s-casuti.adb, s-pack39.adb,
3526 i-vxwork-x86.ads, a-strbou.adb, a-stzmap.adb, s-assert.adb,
3527 a-sfecin.ads, a-cohama.adb, s-casuti.ads, a-suenco.adb, s-pack39.ads,
3528 a-stzmap.ads, a-strbou.ads, s-stalib.adb, s-trasym.adb, g-comver.adb,
3529 s-assert.ads, s-vector.ads, g-cgi.adb, a-cohama.ads, s-wchcnv.adb,
3530 a-titest.adb, s-pack48.adb, a-suenco.ads, a-strunb.adb, s-stalib.ads,
3531 s-trasym.ads, a-nudira.adb, g-comver.ads, a-nuflra.adb, g-cgi.ads,
3532 a-chacon.adb, s-wchcnv.ads, a-excach.adb, s-pack48.ads, a-titest.ads,
3533 a-strunb.ads, s-dwalin.adb, a-nudira.ads, a-chtgbo.adb, s-resfil.adb,
3534 a-scteio.ads, a-nuflra.ads, g-soliop-mingw.ads, s-pack57.adb,
3535 a-chacon.ads, s-bytswa.ads, s-pooloc.adb, g-os_lib.adb, s-dwalin.ads,
3536 a-szuzha.adb, s-resfil.ads, a-chtgbo.ads, s-spsufi.adb, s-pack57.ads,
3537 s-pooloc.ads, g-os_lib.ads, a-stfiha.ads, a-lcteio.ads, a-wtcoau.adb,
3538 a-szuzha.ads, s-mmosin-unix.adb, a-stmaco.ads, s-spsufi.ads,
3539 s-stchop-limit.ads, a-wtcoau.ads, a-exctra.adb, s-mmosin-unix.ads,
3540 s-sequio.adb, s-conca2.adb, g-table.adb, s-imglli.adb,
3541 a-numaux-x86.adb, a-strsea.adb, s-wchstw.adb, a-clrefi.adb,
3542 a-wwboio.adb, a-exctra.ads, s-sequio.ads, s-conca2.ads, a-wwunio.ads,
3543 system-linux-hppa.ads, g-table.ads, s-dimkio.ads, s-imglli.ads,
3544 a-cofove.adb, a-numaux-x86.ads, s-wchstw.ads, a-strsea.ads,
3545 a-clrefi.ads, a-wwboio.ads, s-stratt-xdr.adb, s-crc32.adb,
3546 s-excmac-arm.adb, g-busora.adb, a-cofove.ads, s-osprim-unix.adb,
3547 g-io.adb, s-pack49.adb, s-crc32.ads, s-excmac-arm.ads, a-fzteio.ads,
3548 g-busora.ads, s-stausa.adb, system-linux-mips.ads, sequenio.ads,
3549 g-exctra.adb, g-rewdat.adb, a-cgaaso.adb, g-io.ads, s-pack49.ads,
3550 a-wtflau.adb, a-undesu.adb, s-stausa.ads, a-ztenau.adb, g-enutst.ads,
3551 calendar.ads, s-pack58.adb, g-rewdat.ads, g-exctra.ads, s-ststop.adb,
3552 a-cgaaso.ads, a-strfix.adb, a-comlin.adb, a-strunb-shared.adb,
3553 a-wtflau.ads, a-undesu.ads, a-cbhase.adb, a-ztenau.ads, s-os_lib.adb,
3554 a-coorse.adb, a-chlat1.ads, s-pack58.ads, s-ststop.ads, a-strfix.ads,
3555 a-comlin.ads, a-strunb-shared.ads, a-nscefu.ads, s-valboo.adb,
3556 directio.ads, a-chtgke.adb, a-cbhase.ads, a-wtinau.adb,
3557 system-linux-alpha.ads, s-os_lib.ads, a-coorse.ads,
3558 system-linux-s390.ads, s-imgwiu.adb, a-chtgop.adb, s-valboo.ads,
3559 a-chtgke.ads, a-tienio.adb, s-conca3.adb, a-wtinau.ads,
3560 system-darwin-ppc.ads, i-c.adb, s-expllu.adb, g-expect.adb,
3561 g-sha256.ads, s-vallld.adb, s-imgwiu.ads, a-chtgop.ads, a-strmap.adb,
3562 a-tienio.ads, s-conca3.ads, s-imgint.adb, i-c.ads, s-expllu.ads,
3563 s-osprim-darwin.adb, a-cogeso.adb, g-expect.ads, a-iwteio.ads,
3564 s-vallld.ads, a-coinho-shared.adb, g-shsh64.adb, a-strmap.ads,
3565 g-comlin.adb, a-excpol.adb, s-imgint.ads, a-ztdeau.adb, a-cogeso.ads,
3566 a-coinho-shared.ads, g-shsh64.ads, g-comlin.ads, a-stzsup.adb,
3567 a-rbtgbk.adb, a-wtmoau.adb, a-ztdeau.ads, s-exnlli.adb, g-tty.adb,
3568 g-heasor.adb, g-socthi-dummy.adb, s-llflex.ads, a-zchara.ads,
3569 a-stzsup.ads, a-ztcstr.adb, a-rbtgbk.ads, a-sfwtio.ads, a-wtmoau.ads,
3570 a-sulcin.adb, s-exnlli.ads, system-freebsd.ads, a-stunha.adb,
3571 a-charac.ads, g-tty.ads, g-heasor.ads, s-exctra.adb,
3572 g-socthi-dummy.ads, a-coboho.adb, a-ztcstr.ads, a-tideio.adb,
3573 a-sulcin.ads, a-wrstfi.adb, g-alleve.adb, s-pack59.adb, a-ngrear.adb,
3574 a-stboha.adb, a-stunau-shared.adb, a-stunha.ads, a-lfwtio.ads,
3575 s-fileio.adb, s-exctra.ads, a-coboho.ads, a-ioexce.ads, a-tideio.ads,
3576 a-ngrear.ads, a-wrstfi.ads, s-pack59.ads, g-alleve.ads, a-stboha.ads,
3577 s-poosiz.adb, g-traceb.adb, g-rannum.adb, machcode.ads, s-purexc.ads,
3578 s-fileio.ads, a-cfinve.adb, a-crbtgk.adb, system-solaris-x86.ads,
3579 s-poosiz.ads, g-rannum.ads, g-traceb.ads, a-except.adb, s-conca4.adb,
3580 a-stream.adb, a-cfinve.ads, a-crbtgk.ads, s-wchwts.adb,
3581 system-mingw.ads, a-except.ads, s-conca4.ads, a-chzla9.ads,
3582 s-valenu.adb, s-soflin.adb, a-stream.ads, a-cgarso.adb, s-valllu.adb,
3583 g-crc32.adb, s-wchwts.ads, s-fatflt.ads, s-imguns.adb, s-strcom.adb,
3584 g-decstr.adb, s-valenu.ads, s-soflin.ads, a-cgarso.ads, a-cwila1.ads,
3585 s-valllu.ads, g-crc32.ads, s-imguns.ads, g-spipat.adb, s-valwch.adb,
3586 s-strcom.ads, g-decstr.ads, text_io.ads, g-debuti.adb, s-stchop.adb,
3587 g-spipat.ads, s-valwch.ads, a-string.ads, s-exnint.adb, g-awk.adb,
3588 g-tasloc.adb, s-wwdenu.adb, s-boustr.adb, a-zchuni.adb, s-stchop.ads,
3589 g-debuti.ads, s-stopoo.adb, system-dragonfly-x86_64.ads,
3590 system-linux-x86.ads, s-exnint.ads, g-awk.ads, a-stzhas.adb,
3591 g-tasloc.ads, s-wwdenu.ads, g-debpoo.adb, g-except.ads,
3592 g-sse.ads, s-boustr.ads, a-zchuni.ads, s-bitops.adb, s-wwdwch.adb,
3593 s-stopoo.ads, a-catizo.adb, a-stzhas.ads, a-nlcefu.ads, g-debpoo.ads,
3594 i-vxwoio.adb, s-bitops.ads, g-io-put-vxworks.adb, s-wwdwch.ads,
3595 g-sehamd.adb, a-ssicst.adb, a-catizo.ads, s-mmap.adb, g-string.adb,
3596 s-traceb.adb, a-swunau.adb, s-rannum.adb, a-ticoau.adb, i-vxwoio.ads,
3597 g-sehamd.ads, a-stwiun.adb, a-ssicst.ads, s-conca5.adb, a-ssitio.ads,
3598 s-mmap.ads, a-zttest.adb, g-string.ads, g-sercom.adb, a-cdlili.adb,
3599 a-swunau.ads, s-traceb.ads, s-rannum.ads, a-ticoau.ads, system-aix.ads,
3600 a-cforma.adb, a-stwiun.ads, s-conca5.ads, s-carsi8.adb, a-zttest.ads,
3601 g-sercom.ads, a-cdlili.ads, a-cihama.adb, g-sptain.ads, a-cforma.ads,
3602 s-maccod.ads, s-carsi8.ads, a-strsup.adb, g-sha1.adb, a-cihama.ads,
3603 g-stseme.adb, s-traent.adb, s-valcha.adb, g-curexc.ads, a-strsup.ads,
3604 g-sha1.ads, a-sflcin.ads, s-traent.ads, s-pack10.adb, s-valcha.ads,
3605 a-coteio.ads, s-tasloc.adb, g-utf_32.adb, a-suteio.adb, s-except.adb,
3606 a-direct.adb, g-stsifd-sockets.adb, a-numaux-vxworks.ads, s-winext.ads,
3607 s-pack10.ads, a-ztexio.adb, a-tiflau.adb, system-vxworks-arm.ads,
3608 s-tasloc.ads, a-suteio.ads, g-utf_32.ads, s-except.ads,
3609 a-direct.ads, a-swbwha.adb, g-hesorg.adb, s-wwdcha.adb, a-wtedit.adb,
3610 a-ztexio.ads, a-wtcoio.adb, a-tiflau.ads, a-ssizti.ads, s-casi32.adb,
3611 a-swbwha.ads, s-veboop.adb, g-hesorg.ads, s-parame-rtems.adb,
3612 s-wwdcha.ads, a-wtedit.ads, a-stuten.adb, a-coinve.adb, a-wtcoio.ads,
3613 s-casi32.ads, s-string.adb, a-tiinau.adb, a-cusyqu.adb, s-conca6.adb,
3614 s-veboop.ads, a-cgcaso.adb, a-numaux-darwin.adb, a-envvar.adb,
3615 a-stuten.ads, s-secsta.adb, a-coinve.ads, s-string.ads, a-cusyqu.ads,
3616 a-tiinau.ads, s-osprim-vxworks.adb, s-conca6.ads, g-spchge.adb,
3617 s-parint.adb, a-cuprqu.adb, a-cgcaso.ads, a-numaux-darwin.ads,
3618 a-envvar.ads, s-secsta.ads, g-spchge.ads, s-parint.ads, a-cuprqu.ads,
3619 a-swuwti.adb, a-flteio.ads, a-sbhcin.adb, a-coprnu.adb, g-u3spch.adb,
3620 s-atocou.adb, g-ctrl_c.adb, a-swuwti.ads, a-calend.adb, a-sbhcin.ads,
3621 a-coprnu.ads, g-dirope.adb, g-sha512.ads, g-u3spch.ads, s-atocou.ads,
3622 g-ctrl_c.ads, a-timoau.adb, a-witeio.adb, s-pack11.adb, a-strhas.adb,
3623 a-wtflio.adb, g-spitbo.adb, a-calend.ads, a-ztenio.adb, g-dirope.ads,
3624 a-slcain.adb, g-sechas.adb, a-timoau.ads, a-witeio.ads, s-pack11.ads,
3625 s-shasto.adb, s-traceb-mastop.adb, a-ciorse.adb, s-utf_32.adb,
3626 a-strhas.ads, a-wtflio.ads, g-spitbo.ads, a-ztenio.ads, a-slcain.ads,
3627 g-sechas.ads, s-gearop.adb, a-siztio.ads, s-pack20.adb, s-shasto.ads,
3628 a-ciorse.ads, s-utf_32.ads, s-crtl.ads, a-wtinio.adb, s-elaall.adb,
3629 s-explli.adb, s-chepoo.ads, s-gearop.ads, a-einuoc.adb, s-pack20.ads,
3630 system-linux-ia64.ads, a-swunau-shared.adb, a-wtinio.ads, g-alvety.ads,
3631 a-liztio.ads, g-calend.adb, s-conca7.adb, s-elaall.ads, s-explli.ads,
3632 a-einuoc.ads, s-widboo.adb, s-imgdec.adb, a-cbhama.adb, g-calend.ads,
3633 s-conca7.ads, a-llitio.ads, i-cexten.ads, a-coorma.adb, s-widboo.ads,
3634 s-diflio.adb, g-souinf.ads, s-imgdec.ads, g-strhas.ads, a-cbhama.ads,
3635 g-shshco.adb, a-ztdeio.adb, s-gloloc.adb, a-coorma.ads, g-wispch.adb,
3636 s-pack03.adb, g-eacodu.adb, s-casi16.adb, s-diflio.ads, a-colien.adb,
3637 g-shshco.ads, a-wtmoio.adb, a-rbtgbo.adb, a-ztdeio.ads,
3638 system-rtems.ads, s-gloloc.ads, a-csquin.ads, a-cofuse.adb,
3639 g-wispch.ads, s-pack03.ads, s-casi16.ads, s-io.adb, a-colien.ads,
3640 g-alveop.adb, gnat.ads, s-diinio.adb, a-cfdlli.adb, g-pehage.adb,
3641 a-wtmoio.ads, a-stwiha.adb, a-locale.adb, a-tirsfi.adb, a-nscoty.ads,
3642 a-rbtgbo.ads, s-pack12.adb, a-cofuse.ads, a-sfteio.ads, s-io.ads,
3643 g-alveop.ads, a-cfdlli.ads, s-diinio.ads, a-stwiha.ads, g-pehage.ads,
3644 a-locale.ads, a-tirsfi.ads, s-pack12.ads, s-valuti.adb, g-cppexc.adb,
3645 system-vxworks-ppc.ads, g-memdum.adb, a-lfteio.ads, s-pack21.adb,
3646 s-unstyp.ads, s-valuti.ads, g-cppexc.ads, system-hpux-ia64.ads,
3647 g-memdum.ads, g-soccon.ads, g-altive.ads, a-crbtgo.adb, s-pack21.ads,
3648 a-llizti.ads, a-numaux-libc-x86.ads, s-expint.adb, s-conca8.adb,
3649 a-crbtgo.ads, s-pack30.adb, s-vallli.adb, s-geveop.adb, s-expint.ads,
3650 a-direio.adb, s-conca8.ads, a-widcha.ads, s-pack30.ads, s-vallli.ads,
3651 s-strhas.adb, s-geveop.ads, g-md5.adb, a-direio.ads, a-numaux.ads,
3652 s-ransee.adb, a-szbzha.adb, i-cobol.adb, g-busorg.adb, s-strhas.ads,
3653 g-md5.ads, s-widenu.adb, s-ransee.ads, s-widllu.adb, a-szbzha.ads,
3654 a-ststio.adb, i-cobol.ads, g-busorg.ads, g-regpat.adb, s-widenu.ads,
3655 a-secain.adb, s-widllu.ads, s-pack13.adb, g-encstr.adb, a-ztcoau.adb,
3656 a-ststio.ads, s-widwch.adb, g-regpat.ads, s-atacco.adb, a-cborse.adb,
3657 a-secain.ads, s-pack13.ads, g-encstr.ads, a-ztcoau.ads, s-widwch.ads,
3658 g-io_aux.adb, s-atacco.ads, a-ncelfu.ads, interfac.ads, a-cborse.ads,
3659 g-regexp.adb, s-pack22.adb, a-szuzti.adb, g-io_aux.ads, s-caun32.adb,
3660 a-nselfu.ads, g-regexp.ads, s-pack22.ads, a-ticoio.adb, a-szuzti.ads,
3661 g-diopit.adb, s-caun32.ads, s-conca9.adb, a-tags.adb, a-swmwco.ads,
3662 a-sbecin.adb, s-pack31.adb, s-expuns.adb, a-ticoio.ads, s-valint.adb,
3663 s-conca9.ads, g-diopit.ads, a-tags.ads, a-nllcef.ads, a-izteio.ads,
3664 a-sbecin.ads, s-expuns.ads, s-pack31.ads, g-dyntab.adb, s-powtab.ads,
3665 s-flocon-none.adb, s-valint.ads, a-ssiwti.ads, s-mmosin-mingw.adb,
3666 s-pack40.adb, s-pack05.adb, a-ztflau.adb, g-dyntab.ads,
3667 a-szuzti-shared.adb, g-alvevi.ads, a-stwise.adb, s-mmosin-mingw.ads,
3668 s-pack40.ads, a-diocst.adb, a-ztflau.ads, s-pack05.ads, a-nlcoty.ads,
3669 a-contai.ads, a-stwisu.adb, g-byorma.adb, a-siwtio.ads, a-stwise.ads,
3670 s-regpat.adb, g-mbdira.adb, s-pack14.adb, a-diocst.ads, g-flocon.ads,
3671 g-mbflra.adb, a-ztinau.adb, s-dim.ads, s-mantis.adb, a-stwisu.ads,
3672 g-byorma.ads, s-atopri.adb, g-wistsp.ads, a-uncdea.ads, s-widcha.adb,
3673 a-caldel.adb, s-regpat.ads, g-mbdira.ads, a-tiflio.adb, s-pack14.ads,
3674 s-parame.adb, a-liwtio.ads, s-memory.adb, g-mbflra.ads, a-ztinau.ads,
3675 a-wtgeau.adb, s-direio.adb, s-mantis.ads, s-atopri.ads, s-widcha.ads,
3676 a-caldel.ads, s-pack23.adb, a-unccon.ads, a-tiflio.ads, s-parame.ads,
3677 a-llftio.ads, s-memory.ads, s-regexp.adb, a-wtgeau.ads, a-exexda.adb,
3678 s-direio.ads, s-pack23.ads, g-stheme.adb, a-tiinio.adb, g-sestin.ads,
3679 s-regexp.ads, a-wtfiio.adb, a-comutr.adb, a-exexpr.adb, a-tiinio.ads,
3680 a-ztmoau.adb, a-cohata.ads, a-wtfiio.ads, s-imgrea.adb, ada.ads,
3681 a-szunau-shared.adb, a-comutr.ads, s-valuns.adb, a-ztmoau.ads,
3682 system-linux-arm.ads, s-osprim-x32.adb, s-pack41.adb, s-pack06.adb,
3683 s-imgrea.ads, s-valuns.ads, s-finroo.adb, s-caun16.adb, s-pooglo.adb,
3684 a-zrstfi.adb, a-suenst.adb, s-pack41.ads, g-binenv.adb, s-pack06.ads,
3685 a-calari.adb, a-nlcoar.ads, s-finroo.ads, a-timoio.adb, s-caun16.ads,
3686 s-flocon.adb, a-suenst.ads, a-zrstfi.ads, s-pooglo.ads, s-wchcon.adb,
3687 s-traceb-hpux.adb, s-pack50.adb, i-fortra.adb, s-pack15.adb,
3688 a-ngcefu.adb, g-sptavs.ads, g-binenv.ads, s-wchjis.adb, a-calari.ads,
3689 a-timoio.ads, a-decima.adb, s-flocon.ads, s-wchcon.ads, a-llfzti.ads,
3690 i-fortra.ads, s-pack50.ads, s-pack15.ads, a-ngcefu.ads, a-cfhase.adb,
3691 s-wchjis.ads, g-soliop.ads, a-decima.ads, a-chlat9.ads, s-pack24.adb,
3692 a-nlelfu.ads, a-cfhase.ads, g-locfil.adb, s-atocou-builtin.adb,
3693 s-memcop.ads, a-szunau.adb, s-pack24.ads, s-imgllb.adb, s-auxdec.adb,
3694 g-locfil.ads, s-pack33.adb, a-szunau.ads, s-parame-vxworks.adb,
3695 s-imgllb.ads, a-ciorma.adb, s-auxdec.ads, a-cobove.adb, s-dsaser.ads,
3696 a-elchha.adb, s-pack33.ads, a-cofuve.adb, s-parame-vxworks.ads,
3697 a-ciorma.ads, system-darwin-x86.ads, s-multip.adb, a-stwiun-shared.adb,
3698 a-wichun.adb, a-cobove.ads, s-imgbiu.adb, s-tsmona-mingw.adb,
3699 a-coormu.adb, a-siocst.adb, s-win32.ads, a-elchha.ads, s-pack42.adb,
3700 s-pack07.adb, a-cofuve.ads, system-hpux.ads, a-teioed.adb,
3701 a-convec.adb, g-speche.adb, s-multip.ads, a-stwiun-shared.ads,
3702 a-wichun.ads, s-imgbiu.ads, a-numeri.ads, a-siocst.ads, a-coormu.ads,
3703 a-lliwti.ads, s-pack42.ads, s-pack07.ads, a-teioed.ads, a-convec.ads,
3704 g-speche.ads, g-socthi.adb, a-nucoty.ads, a-szmzco.ads, s-pack51.adb,
3705 s-osprim-mingw.adb, s-casi64.adb, g-strspl.ads, g-socthi.ads,
3706 g-socket-dummy.adb, s-pack51.ads, s-dimmks.ads, s-casi64.ads,
3707 a-wtenau.adb, s-stchop-vxworks.adb, s-pack60.adb,
3708 system-solaris-sparc.ads, s-pack25.adb, g-socket-dummy.ads,
3709 a-exstat.adb, a-cofuma.adb, s-tsmona-linux.adb, a-wtenau.ads,
3710 s-pack60.ads, s-pack25.ads, i-cstrea.adb, a-cofuma.ads, g-exptty.adb,
3711 a-chzla1.ads, s-pack34.adb, i-cstrea.ads, s-excdeb.adb, a-iteint.ads,
3712 g-exptty.ads, i-pacdec.adb, s-pack34.ads, s-rident.ads, s-sopco3.adb,
3713 i-vxwork.ads, s-excdeb.ads, system-linux-ppc.ads, a-swuwti-shared.adb,
3714 s-widlli.adb, s-pack43.adb, i-pacdec.ads, a-cwila9.ads, s-sopco3.ads,
3715 a-fwteio.ads, s-widlli.ads, s-pack43.ads, a-suhcin.adb, a-wtdeau.adb,
3716 g-allein.ads, a-suezst.adb, a-dirval-mingw.adb, g-zspche.adb,
3717 s-bignum.adb, a-ztedit.adb, g-regist.adb, a-nllefu.ads, a-ztcoio.adb,
3718 s-pack52.adb, a-llctio.ads, a-nucoar.ads, s-pack17.adb, a-suhcin.ads,
3719 a-wtdeau.ads, a-suezst.ads, a-dirval.adb, g-zspche.ads, g-regist.ads,
3720 a-ztedit.ads, s-bignum.ads, a-wtcstr.adb, system.ads, s-pack52.ads,
3721 a-ztcoio.ads, s-pack17.ads, s-imgboo.adb, a-rbtgso.adb, a-dirval.ads,
3722 a-cohase.adb, s-pack61.adb, a-wtcstr.ads, s-pack26.adb, s-osprim.ads,
3723 a-tigeau.adb, s-imgboo.ads, a-nuelfu.ads, a-swfwha.ads, s-commun.adb,
3724 g-socthi-vxworks.adb, a-rbtgso.ads, a-cohase.ads, g-zstspl.ads,
3725 s-pack61.ads, s-pack26.ads, a-intnam-dragonfly.ads, s-imglld.adb,
3726 a-tigeau.ads, s-commun.ads, g-socthi-vxworks.ads, a-cborma.adb,
3727 a-stwifi.adb, g-moreex.adb, s-pack35.adb, s-imglld.ads, s-valdec.adb,
3728 a-tifiio.adb, a-cborma.ads, g-moreex.ads, a-stwifi.ads, s-pack35.ads,
3729 s-sopco4.adb, g-sha224.ads, g-socket.adb, a-intnam-rtems.ads,
3730 s-finmas.adb, s-valdec.ads, s-addima.adb, a-finali.adb, a-tifiio.ads,
3731 s-rpc.adb, a-ztflio.adb, s-pack44.adb, s-pack09.adb, a-sblcin.adb,
3732 s-sopco4.ads, a-textio.adb, g-socket.ads, g-sptabo.ads, s-finmas.ads,
3733 g-shsh32.adb, s-addima.ads, a-finali.ads, s-mmauni-long.ads, s-rpc.ads,
3734 a-ztflio.ads, system-djgpp.ads, s-stache.adb, s-pack44.ads,
3735 s-pack09.ads, a-sblcin.ads, a-textio.ads, a-cidlli.adb, g-shsh32.ads,
3736 a-chtgbk.adb, a-tiocst.adb, s-pack53.adb, s-pack18.adb, s-stache.ads,
3737 a-zchhan.adb, s-fatlfl.ads, a-ztinio.adb, s-strops.adb, a-siteio.ads,
3738 a-cidlli.ads, a-chtgbk.ads, g-ssvety.ads, a-tiocst.ads, s-pack53.ads,
3739 s-parame-hpux.ads, s-pack18.ads, a-zchhan.ads, s-strops.ads,
3740 a-ztinio.ads, a-wichha.adb, a-stwima.adb, a-nlrear.ads, a-liteio.ads,
3741 s-pack62.adb, s-pack27.adb, s-fore.adb, s-vercon.adb, a-wichha.ads,
3742 a-stwima.ads, s-pack62.ads, system-linux-sparc.ads, s-pack27.ads,
3743 g-dynhta.adb, s-fore.ads, s-vercon.ads, a-cofuba.adb, a-cimutr.adb,
3744 i-cpoint.adb, s-imgenu.adb, a-stwibo.adb, s-pack36.adb, i-cstrin.adb,
3745 s-imgllu.adb, a-suteio-shared.adb, g-excact.adb, s-stoele.adb,
3746 s-addope.adb, g-dynhta.ads, a-cofuba.ads, a-ztmoio.adb, a-llfwti.ads,
3747 a-cimutr.ads, i-cpoint.ads, s-imgenu.ads, a-stwibo.ads, a-wttest.adb,
3748 s-pack36.ads, a-tgdico.ads, s-sopco5.adb, s-scaval.adb, i-cstrin.ads,
3749 s-imgllu.ads, g-excact.ads, s-stoele.ads, g-deutst.ads, s-addope.ads,
3750 s-imgwch.adb, g-sha384.ads, a-ztmoio.ads, s-pack45.adb, a-wttest.ads,
3751 s-sopco5.ads, s-excmac-gcc.adb, s-scaval.ads, a-storio.adb,
3752 a-coinho.adb, a-btgbso.adb, s-imgwch.ads, s-carun8.adb, memtrack.adb,
3753 s-pack45.ads, a-sfhcin.ads, s-excmac-gcc.ads, a-storio.ads,
3754 a-coinho.ads, a-btgbso.ads, s-stratt.adb, s-carun8.ads, a-shcain.adb,
3755 s-pack54.adb, s-pack19.adb, a-colire.adb, a-tigeli.adb, s-caun64.adb,
3756 s-stratt.ads, s-fatgen.adb, a-shcain.ads, a-stzunb-shared.adb,
3757 s-pack54.ads, s-pack19.ads, a-colire.ads, a-calcon.adb, s-caun64.ads,
3758 s-fatgen.ads, s-pack63.adb, g-arrspl.adb, a-stzunb-shared.ads,
3759 s-pack28.adb, a-nllrar.ads, a-zzboio.adb, a-zzunio.ads, a-stunau.adb,
3760 a-calcon.ads, g-cgideb.adb, s-objrea.adb, s-mastop.adb, a-tienau.adb,
3761 g-altcon.adb, g-arrspl.ads, s-pack63.ads, s-restri.adb, s-pack28.ads,
3762 a-zzboio.ads, a-stunau.ads, g-cgideb.ads, g-htable.adb, g-sothco.adb,
3763 s-objrea.ads, g-soliop-solaris.ads, s-mastop.ads, a-tienau.ads,
3764 system-linux-m68k.ads, g-altcon.ads, s-dmotpr.ads, s-memory-mingw.adb,
3765 g-cgicoo.adb, s-pack37.adb, s-restri.ads, s-fatllf.ads, s-expmod.adb,
3766 a-swuwha.adb, a-exextr.adb, a-cfhama.adb, s-gloloc-mingw.adb,
3767 a-tiboio.adb, g-forstr.adb, g-sothco.ads, a-stzbou.adb, a-nllcty.ads,
3768 a-suecin.adb, g-htable.ads, s-exctab.adb, a-tiunio.ads, g-cgicoo.ads,
3769 s-osprim-posix.adb, s-pack37.ads, a-ciormu.adb, s-atocou-x86.adb,
3770 a-swuwha.ads, s-expmod.ads, a-cfhama.ads, s-ficobl.ads, a-ngcoty.adb,
3771 g-forstr.ads, a-tiboio.ads, a-calfor.adb, a-stzbou.ads, a-suecin.ads,
3772 a-conhel.adb, a-crbltr.ads, s-exctab.ads, a-dhfina.ads, s-imgcha.adb,
3773 s-pack46.adb, a-ciormu.ads, system-linux-sh4.ads, a-chahan.adb,
3774 a-ngcoty.ads, a-stzunb.adb, a-szfzha.ads, a-calfor.ads, a-cbdlli.adb,
3775 a-conhel.ads, s-imgcha.ads, s-pack46.ads, a-assert.adb, a-chahan.ads,
3776 a-stzunb.ads, a-crdlli.adb, s-pack55.adb, a-cbdlli.ads, a-tideau.adb,
3777 a-assert.ads, ioexcept.ads, s-boarop.ads, g-hesora.adb, a-crdlli.ads,
3778 s-pack55.ads, a-tideau.ads, g-bubsor.adb, a-wtenio.adb, a-cbsyqu.adb,
3779 g-hesora.ads, s-pack29.adb, a-nurear.ads, g-catiio.adb, s-stposu.adb,
3780 g-bubsor.ads, a-wtenio.ads, a-cbsyqu.ads, a-suewst.adb,
3781 system-vxworks-x86.ads, s-pack29.ads, a-cbmutr.adb, a-cbprqu.adb,
3782 s-imenne.adb, g-sothco-dummy.adb, g-casuti.adb, g-catiio.ads,
3783 s-stposu.ads, a-stzsea.adb, s-pack38.adb, a-suewst.ads, s-imgllw.adb,
3784 a-cbprqu.ads, a-cbmutr.ads, s-imenne.ads, g-sothco-dummy.ads,
3785 g-casuti.ads, s-htable.adb, s-fatsfl.ads, g-trasym.adb, unchconv.ads,
3786 a-stzsea.ads, s-arit64.adb, s-pack38.ads, a-nllcar.ads, s-valrea.adb,
3787 s-imgllw.ads, s-htable.ads, a-sequio.adb, g-trasym.ads, a-ngcoar.adb,
3788 s-exnllf.adb, s-pack47.adb, s-arit64.ads, g-sercom-mingw.adb,
3789 s-valrea.ads, g-socthi-mingw.adb, g-bytswa.adb, g-sehash.adb,
3790 unchdeal.ads, a-sequio.ads, a-ngcoar.ads, s-exnllf.ads, a-wtdeio.adb,
3791 s-pack47.ads, g-socthi-mingw.ads, a-excpol-abort.adb, a-ztgeau.adb,
3792 g-bytswa.ads, g-sehash.ads, s-pack56.adb, a-wtdeio.ads, a-ngelfu.adb,
3793 a-ztgeau.ads, a-cforse.adb, s-filatt.ads, a-stzfix.adb, a-cihase.adb,
3794 s-pack56.ads, a-sfztio.ads, a-ngelfu.ads, s-trasym-dwarf.adb,
3795 a-cforse.ads, a-ztfiio.adb, g-timsta.adb, a-stzfix.ads, a-cihase.ads,
3796 a-ztfiio.ads, system-darwin-arm.ads: Move non-tasking runtime sources
3797 to libgnat subdirectory.
3798
3799 2017-09-08 Yannick Moy <moy@adacore.com>
3800
3801 * sem_aux.adb, sem_aux.ads (Get_Called_Entity): New function to
3802 return the entity associated with the call.
3803 * sem_util.adb, sem_util.ads (Check_Function_Writable_Actuals):
3804 Replace the internal Get_Function_Id with the new
3805 Sem_Aux.Get_Called_Entity.
3806 (Iterate_Call_Parameters): New
3807 procedure to iterate on formals and actuals at the same time.
3808 * sem_ch12.adb (Analyze_Subprogram_Instantiation):
3809 Set SPARK_Mode from spec when set, for analysis
3810 of instance. Restore after analysis of instance.
3811 (Instantiate_Subprogram_Body): Set SPARK_Mode from body when
3812 set, for analysis of body instance. Restored automatically at
3813 the end of the subprogram.
3814 * gnat1drv.adb (Adjust_Global_Switches): Set
3815 Check_Validity_Of_Parameters to False in GNATprove mode.
3816 * opt.ads (Check_Validity_Of_Parameters): Document switch to
3817 set option.
3818
3819 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3820
3821 * sem_util.adb (NCT_Tables_In_Use): Move to library level from...
3822 (New_Copy_Tree): ...there. Reset the hash tables only if they
3823 were used in the previous invocation.
3824 * s-htable.adb: Fix typo.
3825
3826 2017-09-08 Bob Duff <duff@adacore.com>
3827
3828 * a-ssicst.adb (Open): Set File.Last_Op to the appropriate value.
3829
3830 2017-09-08 Arnaud Charlet <charlet@adacore.com>
3831
3832 * sem_aggr.adb: minor style fix.
3833
3834 2017-09-08 Bob Duff <duff@adacore.com>
3835
3836 * sprint.adb (Write_Corresponding_Source): Ignore if there is
3837 no current source file.
3838 (Write_Name_With_Col_Check, Write_Name_With_Col_Check_Sloc):
3839 Print something helpful in case N is invalid.
3840 * sprint.ads: Minor comment fix.
3841
3842 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3843
3844 * exp_aggr.adb: (Aggr_Assignment_OK_For_Backend): Add early return for
3845 access types.
3846
3847 2017-09-08 Bob Duff <duff@adacore.com>
3848
3849 * par-prag.adb, sem_prag.adb, snames.ads-tmpl: Implement pragma
3850 Ada_2020, along the same lines as the other Ada version pragmas.
3851
3852 2017-09-08 Gary Dismukes <dismukes@adacore.com>
3853
3854 * sem_ch12.adb: Minor typo fixes and reformatting.
3855
3856 2017-09-08 Yannick Moy <moy@adacore.com>
3857
3858 * sem_aggr.adb (Resolve_Record_Aggregate):
3859 Rewrite bounds of aggregate subexpressions which may depend on
3860 discriminants of the enclosing aggregate.
3861
3862 2017-09-08 Yannick Moy <moy@adacore.com>
3863
3864 * sem_ch5.adb: Prevent assertion failure on illegal code.
3865
3866 2017-09-08 Yannick Moy <moy@adacore.com>
3867
3868 * lib-xref-spark_specific.adb (Add_SPARK_Xrefs.Is_SPARK_Scope): Avoid
3869 calling Renamed_Entity on an entity which cannot be a renaming.
3870
3871 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3872
3873 * exp_aggr.adb: Add with & use clause for Urealp.
3874 (Aggr_Assignment_OK_For_Backend): Accept (almost all)
3875 elementary types instead of just discrete types.
3876 * sem_eval.adb (Expr_Value): Deal with N_Null for access types.
3877 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>:
3878 Be prepared for the FP zero value in the memset case. Add small
3879 guard.
3880
3881 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3882
3883 * s-htable.adb (Static_HTable.Reset): Use aggregate instead
3884 of loop.
3885
3886 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
3887
3888 * exp_aggr.adb (Expand_Array_Aggregate): Use New_Copy_Tree instead
3889 of New_Copy because the latter leaves the syntactic structure of
3890 the tree inconsistent (a child is accessible through two parents)
3891 and prevents proper replication of itypes by subsequent calls
3892 to New_Copy_Tree.
3893 * exp_ch4.adb (Expand_Concatenate): Use New_Copy_Tree instead of
3894 New_Copy because the latter leaves the syntactic structure of the
3895 tree inconsistent (a child is accessible through two parents)
3896 and prevents proper replication of itypes by subsequent calls
3897 to New_Copy_Tree.
3898 * sem_util.adb (In_Subtree): New routine.
3899 (New_Copy_Tree): Reimplemented.
3900 * sem_util.ads (In_Subtree): New routine.
3901 (New_Copy_Tree): Reimplemented.
3902
3903 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3904
3905 * sem_ch13.adb (Resolve_Aspect_Expressions): The expression
3906 for aspect Default_Value is a static scalar value, but it does
3907 not freeze the type. Yhis allows for subsequent representation
3908 clauses for the type.
3909
3910 2017-09-08 Javier Miranda <miranda@adacore.com>
3911
3912 * sem_ch8.adb (Find_Direct_Name.Undefined): Do
3913 not add entries into the undefined reference table when we are
3914 compiling with errors ignored.
3915
3916 2017-09-08 Ed Schonberg <schonberg@adacore.com>
3917
3918 * sem_ch12.adb (Check_Formal_Packages): Do not apply conformance
3919 check if the instance is within an enclosing instance body. The
3920 formal package was legal in the enclosing generic, and is
3921 legal in the enclosing instantiation. This optimisation may be
3922 applicable elsewhere, and it also removes spurious errors that
3923 may arise with on-the-fly processing of instantiations that
3924 contain Inline_Always subprograms.
3925
3926 2017-09-08 Vincent Celier <celier@adacore.com>
3927
3928 * gnatcmd.adb: Disregard empty argument of GNAT driver.
3929
3930 2017-09-08 Justin Squirek <squirek@adacore.com>
3931
3932 * checks.adb (Insert_Valid_Check): Manually decorate
3933 the generated temporary for range valdity checks.
3934
3935 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
3936
3937 * usage.adb (Usage): Document new -gnatw.q/-gnatw.Q switches.
3938
3939 2017-09-08 Justin Squirek <squirek@adacore.com>
3940
3941 * switch-c.adb (Scan_Front_End_Switches): Add new warning switch
3942 case to handle underscore flags.
3943 * warnsw.adb, warnsw.ads (Set_Underscore_Warning_Switch): Create
3944 new procedure to handle underscores.
3945
3946 2017-09-08 Javier Miranda <miranda@adacore.com>
3947
3948 * exp_ch4.adb (Expand_N_Op_Divide): Reordering code that handles
3949 divisions with fixed point results to avoid generating twice
3950 the runtime check on divide by zero.
3951 * checks.adb (Apply_Divide_Checks): Ensure that operands are
3952 not evaluated twice (once for their runtime checks and once for
3953 their regular computation).
3954
3955 2017-09-08 Yannick Moy <moy@adacore.com>
3956
3957 * sem_prag.adb (Analyze_Part_Of): Add missing
3958 return statements after issuing errors. Add detection of
3959 out-of-order item and single concurrent type.
3960
3961 2017-09-08 Nicolas Roche <roche@adacore.com>
3962
3963 * gcc-interface/Makefile.in, a-extiti.ads, s-taprop-linux.adb,
3964 s-osinte-solaris.adb, a-intnam.ads, s-osinte-solaris.ads,
3965 s-tpobop.adb, s-intman-android.adb, s-tasinf.adb, s-tpobop.ads,
3966 s-tasinf.ads, i-vxinco.adb, a-exetim-posix.adb, i-vxinco.ads,
3967 a-astaco.adb, a-astaco.ads, s-tporft.adb, s-tpoaal.adb, a-taside.adb,
3968 a-taside.ads, s-tpopsp-posix.adb, s-tasdeb.adb, s-tasdeb.ads,
3969 s-tpoben.adb, a-dinopr.ads, s-inmaop-vxworks.adb, s-tpoben.ads,
3970 s-interr-vxworks.adb, s-interr-dummy.adb, s-tassta.adb,
3971 a-intnam-mingw.ads, s-tassta.ads, s-taasde.adb, a-stcoed.ads,
3972 s-taasde.ads, s-osinte-darwin.adb, s-proinf.adb, s-taprop-dummy.adb,
3973 s-osinte-darwin.ads, s-proinf.ads, s-linux.ads, a-intnam-linux.ads,
3974 s-tasren.adb, s-tasren.ads, s-mudido.adb, g-semaph.adb, s-mudido.ads,
3975 s-taprop-posix.adb, g-semaph.ads, s-osinte-mingw.ads, s-vxwork-x86.ads,
3976 s-tposen.adb, s-linux-sparc.ads, s-taprop-vxworks.adb, s-tasini.adb,
3977 s-tposen.ads, s-tasini.ads, a-etgrbu.ads, s-interr-hwint.adb,
3978 s-osinte-linux.ads, s-taprop.ads, s-tasque.adb, s-tasque.ads,
3979 s-taenca.adb, s-taspri-vxworks.ads, s-taenca.ads, a-dynpri.adb,
3980 s-tpopsp-solaris.adb, a-dynpri.ads, s-taprop-hpux-dce.adb,
3981 a-interr.adb, a-intnam-freebsd.ads, s-tarest.adb, a-interr.ads,
3982 s-intman-susv3.adb, a-synbar.adb, a-intnam-dummy.ads, s-tadeca.adb,
3983 s-osinte-vxworks.adb, s-tarest.ads, s-taskin.adb, a-synbar.ads,
3984 s-taspri-hpux-dce.ads, s-tadeca.ads, s-osinte-vxworks.ads,
3985 s-taskin.ads, s-intman-solaris.adb, a-sytaco.adb, s-vxwext-kernel.adb,
3986 s-mudido-affinity.adb, a-sytaco.ads, s-vxwext-kernel.ads, s-taprob.adb,
3987 s-intman-mingw.adb, s-taprob.ads, s-osinte-kfreebsd-gnu.ads,
3988 s-osinte-dummy.ads, s-osinte-gnu.adb, s-osinte-rtems.adb, s-interr.adb,
3989 s-inmaop.ads, s-vxwext-rtp.adb, s-osinte-gnu.ads, s-osinte-rtems.ads,
3990 a-synbar-posix.adb, s-interr.ads, s-taspri-posix-noaltstack.ads,
3991 s-vxwext-rtp.ads, a-synbar-posix.ads, a-extiin.ads, s-osinte-posix.adb,
3992 s-tpinop.adb, s-tasres.ads, s-tpinop.ads, a-disedf.ads, a-diroro.ads,
3993 s-linux-alpha.ads, a-tasatt.adb, s-solita.adb, a-intnam-solaris.ads,
3994 a-tasatt.ads, s-solita.ads, s-tasinf-solaris.adb, s-tasinf-solaris.ads,
3995 s-vxwork-arm.ads, s-tpopsp-posix-foreign.adb, s-intman-dummy.adb,
3996 s-intman.ads, s-stusta.adb, s-stusta.ads, s-intman-posix.adb,
3997 s-tpopsp-vxworks.adb, s-inmaop-dummy.adb, s-taspri-mingw.ads,
3998 a-intnam-darwin.ads, s-osinte-aix.adb, s-osinte-dragonfly.adb,
3999 s-osinte-aix.ads, s-tasinf-mingw.adb, s-osinte-dragonfly.ads,
4000 s-linux-hppa.ads, s-osinte-x32.adb, s-inmaop-posix.adb,
4001 s-tasinf-mingw.ads, s-intman-vxworks.adb, s-linux-mips.ads,
4002 s-intman-vxworks.ads, s-osinte-android.adb, s-tasinf-linux.adb,
4003 s-osinte-android.ads, s-vxwork-ppc.ads, s-tasinf-linux.ads,
4004 a-dispat.adb, a-dispat.ads, s-tadert.adb, g-thread.adb, s-tadert.ads,
4005 g-thread.ads, a-intnam-hpux.ads, s-linux-android.ads, s-tataat.adb,
4006 a-exetim.ads, s-tataat.ads, a-reatim.adb, a-reatim.ads, thread.c,
4007 g-boubuf.adb, s-osinte-freebsd.adb, g-boubuf.ads, s-osinte-freebsd.ads,
4008 s-tasuti.adb, s-taspri-dummy.ads, a-exetim-mingw.adb, s-linux-x32.ads,
4009 s-tasuti.ads, g-signal.adb, a-exetim-mingw.ads, s-interr-sigaction.adb,
4010 g-signal.ads, s-osinte-hpux.ads, a-intnam-vxworks.ads,
4011 s-osinte-hpux-dce.adb, s-taspri-posix.ads, s-osinte-hpux-dce.ads,
4012 s-tasinf-vxworks.ads, g-tastus.ads, s-tpopsp-tls.adb,
4013 s-taprop-solaris.adb, a-retide.adb, a-exetim-darwin.adb, a-retide.ads,
4014 s-vxwext.adb, s-vxwext.ads, a-rttiev.adb, a-rttiev.ads, g-boumai.ads,
4015 a-exetim-default.ads, s-taprop-mingw.adb, s-taspri-solaris.ads,
4016 a-intnam-aix.ads: Move libgnarl sources to libgnarl subdir.
4017
4018 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4019
4020 * doc/share/conf.py, doc/share/latex_elements.py,
4021 doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada
4022 highlighting.
4023
4024 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4025
4026 * gnat_rm.texi, gnat_ugn.texi,
4027 doc/gnat_ugn/the_gnat_compilation_model.rst,
4028 doc/gnat_ugn/getting_started_with_gnat.rst,
4029 doc/gnat_ugn/inline_assembler.rst,
4030 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4031 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
4032 doc/gnat_ugn/about_this_guide.rst,
4033 doc/gnat_ugn/platform_specific_information.rst,
4034 doc/gnat_ugn/example_of_binder_output.rst,
4035 doc/gnat_ugn/gnat_and_program_execution.rst,
4036 doc/gnat_ugn/gnat_utility_programs.rst,
4037 doc/gnat_rm/implementation_of_specific_ada_features.rst,
4038 doc/gnat_rm/interfacing_to_other_languages.rst,
4039 doc/gnat_rm/implementation_defined_aspects.rst,
4040 doc/gnat_rm/intrinsic_subprograms.rst,
4041 doc/gnat_rm/implementation_defined_characteristics.rst,
4042 doc/gnat_rm/implementation_advice.rst,
4043 doc/gnat_rm/implementation_defined_attributes.rst,
4044 doc/gnat_rm/compatibility_and_porting_guide.rst,
4045 doc/gnat_rm/standard_library_routines.rst,
4046 doc/gnat_rm/the_gnat_library.rst,
4047 doc/gnat_rm/implementation_defined_pragmas.rst,
4048 doc/gnat_rm/representation_clauses_and_pragmas.rst,
4049 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4050 doc/gnat_rm/obsolescent_features.rst,
4051 doc/gnat_rm/about_this_guide.rst,
4052 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4053 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4054 doc/gnat_ugn.rst,
4055 doc/gnat_rm.rst: Update documentation.
4056
4057 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4058
4059 * s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
4060 s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
4061 * gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
4062
4063 2017-09-08 Bob Duff <duff@adacore.com>
4064
4065 * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
4066 New routine to read the Tag robustly.
4067 * exp_attr.adb (Input): Change the expansion of 'Input,
4068 in the class-wide case, to call String_Input_Tag instead of
4069 String_Input_Blk_IO.
4070
4071 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4072
4073 * s-rident.ads (Restriction_Id): reorder enum
4074 literals, so that Pure_Barriers is no longer in range of the
4075 Cunit_Boolean_Restrictions subtype.
4076
4077 2017-09-08 Nicolas Roche <roche@adacore.com>
4078
4079 * a-taster.ads, a-taster.adb: Move to libgnarl
4080 * gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
4081 Add support for files in libgnarl.
4082
4083 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4084
4085 * exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
4086 accessibility check to an interface conversion, whose purpose
4087 is to perform a pointer adjustment in a dispatching call.
4088 * exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
4089 when the actual is a construct that involves a dereference of an
4090 expression that includes a formal of the enclosing subprogram,
4091 In such cases, the accessibility level of the actual is that of
4092 the corresponding formal, which is passed in as an additional
4093 actual in the outer call.
4094
4095 2017-09-08 Bob Duff <duff@adacore.com>
4096
4097 * exp_intr.adb (Add_Source_Info): Do not decode
4098 file names; they were not encoded in the first place.
4099
4100 2017-09-08 Bob Duff <duff@adacore.com>
4101
4102 * a-tags.adb (Internal_Tag): Unsuppress checks, so we get
4103 exceptions instead of crashes. Check for absurdly long strings
4104 and empty strings. Empty strings cause trouble because they can
4105 have super-null ranges (e.g. 100..10), which causes Ext_Copy to
4106 be empty, which causes an array index out of bounds.
4107 * s-ststop.adb (Input): Unsuppress checks, so we get exceptions
4108 instead of crashes.
4109
4110 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4111
4112 * sem_util.adb (Is_CCT_Instance): allow use in
4113 the context of protected types.
4114
4115 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4116
4117 * a-tigeli.adb: minor remove extra whitespace.
4118
4119 2017-09-08 Gary Dismukes <dismukes@adacore.com>
4120
4121 * par-ch4.adb: Reformatting of an error message.
4122
4123 2017-09-08 Javier Miranda <miranda@adacore.com>
4124
4125 * sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
4126 identifiers to ensure their correct decoration of names on
4127 aspect expressions.
4128
4129 2017-09-08 Yannick Moy <moy@adacore.com>
4130
4131 * exp_attr.adb (Expand_Loop_Entry_Attribute): Do
4132 not skip a loop coming from source which is rewritten into a loop.
4133
4134 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4135
4136 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
4137 wrapper has convention Ada, to prevent spurious warnings on
4138 unconstrained array parameters.
4139
4140 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4141
4142 * sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
4143 (Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.
4144
4145 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4146
4147 * sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.
4148
4149 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4150
4151 * exp_intr.adb (Append_Entity_Name): Move to ...
4152 * sem_util.ads, sem_util.adb: ... here to share it.
4153 (Subprogram_Name): New subprogram, to compute the name of the enclosing
4154 subprogram/entity.
4155 * errutil.adb (Error_Msg): Fill new field Node.
4156 * erroutc.ads (Subprogram_Name_Ptr): New.
4157 (Error_Msg_Object): New field Node.
4158 * erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
4159 * errout.adb (Error_Msg): New variant with node id parameter.
4160 Fill new parameter Node when emitting messages. Revert previous
4161 changes for Include_Subprogram_In_Messages.
4162 * sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
4163 generating warning message.
4164
4165 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4166
4167 * par-ch4.adb (P_Iterated_Component_Association): Place construct
4168 under -gnat2020 flag, given that it is a future feature of
4169 the language.
4170 * sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
4171 defining identifier as referenced to prevent spurious warnings:
4172 corresponding loop is expanded into one or more loops whose
4173 variable has the same name, and the expression uses those names
4174 and not the original one.
4175
4176 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4177
4178 * sem_elab.adb (Check_A_Call): Do not consider
4179 references to internal variables for SPARK semantics.
4180
4181 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4182
4183 * inline.adb (In_Package_Spec): refine type of
4184 the parameter from Node_Id to Entity_Id.
4185
4186 2017-09-08 Justin Squirek <squirek@adacore.com>
4187
4188 * exp_ch5.adb (Expand_Formal_Container_Loop):
4189 Reset the scope of the loop parameter after it is reanalyzed.
4190
4191 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4192
4193 * sem_util.ads (Set_Rep_Info): New inline procedure.
4194 * sem_util.adb (Set_Rep_Info): Implement it.
4195 * sem_ch3.adb (Process_Subtype): If the case of a constraint present,
4196 always copy the representation aspects onto the subtype.
4197
4198 2017-09-08 Georges-Alex Jaloyan <jaloyan@adacore.com>
4199
4200 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
4201 Correction of the return type from access type to option type.
4202 (Simple_HTable): Moving the Instance_Data to ads file.
4203
4204 2017-09-08 Yannick Moy <moy@adacore.com>
4205
4206 * sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.
4207
4208 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4209
4210 * opt.ads (Include_Subprogram_In_Messages): New variable.
4211 * errout.ads (Current_Subprogram_Ptr): New variable.
4212 * errout.adb (Error_Msg): Prepend current subprogram info
4213 in messages if Include_Subprogram_In_Messages is set.
4214 * sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
4215 Current_Subprogram.
4216 * gnat1drv.adb (Adjust_Global_Switches): Set
4217 Include_Subprogram_In_Messages when -gnatdJ is set.
4218 * debug.adb: Document and reserve -gnatdJ.
4219
4220 2017-09-08 Georges-Axel Jaloyan <jaloyan@adacore.com>
4221
4222 * g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
4223 functions to iterate over simple hastables.
4224 (Load_Factor_HTable): Remove obsolete and inefficient implementation.
4225
4226 2017-09-08 Javier Miranda <miranda@adacore.com>
4227
4228 * exp_ch6.adb (Unqual_BIP_Function_Call): Adding
4229 missing checks on the presence of Entity() before checking the
4230 entity attributes.
4231
4232 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4233
4234 * sem_ch6.adb (Analyze_Expression_Function): Reorder some
4235 statements, use local variable and remove unnecessary processing.
4236
4237 2017-09-08 Javier Miranda <miranda@adacore.com>
4238
4239 * exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
4240 subprogram.
4241 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
4242 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4243 subprogram.
4244 (Unqual_BIP_Iface_Function_Call): New subprogram.
4245 * exp_ch6.adb (Replace_Renaming_Declaration_Id): New
4246 subprogram containing code that was previously inside
4247 Make_Build_In_Place_Call_In_Object_Declaration since it is also
4248 required for one of the new subprograms.
4249 (Expand_Actuals):
4250 Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
4251 (Expand_N_Extended_Return_Statement): Extend the
4252 cases covered by an assertion on expected BIP object
4253 declarations.
4254 (Make_Build_In_Place_Call_In_Assignment):
4255 Removing unused code; found working on this ticket.
4256 (Make_Build_In_Place_Call_In_Object_Declaration): Move the code
4257 that replaces the internal name of the renaming declaration
4258 into the new subprogram Replace_Renaming_Declaration_Id.
4259 (Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
4260 (Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
4261 New subprogram.
4262 (Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
4263 subprogram.
4264 (Unqual_BIP_Iface_Function_Call): New subprogram.
4265 * exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
4266 subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
4267 * exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
4268 subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4269 * exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
4270 subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
4271 (Expand_N_Indexed_Component): Invoke the new subprogram
4272 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4273 (Expand_N_Selected_Component): Invoke the new subprogram
4274 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4275 (Expand_N_Slice): Invoke the new subprogram
4276 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4277 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
4278 Invoke the new subprogram
4279 Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
4280
4281 2017-09-08 Javier Miranda <miranda@adacore.com>
4282
4283 * exp_disp.adb (Expand_Interface_Conversion): Fix handling of
4284 access to interface types. Remove also the accessibility check.
4285
4286 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4287
4288 * sem_ch6.adb (Freeze_Expr_Types): Really freeze
4289 all the types that are referenced by the expression.
4290 (Analyze_Expression_Function): Call Freeze_Expr_Types for
4291 a completion instead of manually freezing the type of the
4292 expression.
4293 (Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.
4294
4295 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4296
4297 * exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
4298 New procedure, auxiliary to Expand_Pragma_Check, to handle
4299 references to the discriminants of a protected type within a
4300 precondition of a protected operation. This is needed because
4301 the original precondition has been analyzed in the context of
4302 the protected declaration, but in the body of the operation
4303 references to the discriminants have been replaved by references
4304 to the discriminants of the target object, and these references
4305 are only created when expanding the protected body.
4306
4307 2017-09-08 Yannick Moy <moy@adacore.com>
4308
4309 * sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
4310 Loop_Variant.
4311
4312 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4313
4314 * exp_attr.adb (Build_Record_VS_Func): If the record is an
4315 unchecked union, do not emit checks for its (non-existent)
4316 discriminants, or for variant parts that depend on them.
4317
4318 2017-09-08 Justin Squirek <squirek@adacore.com>
4319
4320 * sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
4321 Find_Comparison_Type.Try_One_Interp): Add check for generic
4322 instances.
4323
4324 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4325
4326 * sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
4327 exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
4328 repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
4329 exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
4330 remaining references to AAMP_On_Target.
4331
4332 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4333
4334 * style.adb: Fix typo.
4335
4336 2017-09-08 Javier Miranda <miranda@adacore.com>
4337
4338 * einfo.adb (Underlying_Type): Add missing support for class-wide
4339 types that come from the limited view.
4340 * exp_attr.adb (Attribute_Address): Check class-wide type
4341 interfaces using the underlying type to handle limited-withed
4342 types.
4343 (Attribute_Tag): Check class-wide type interfaces using
4344 the underlying type to handle limited-withed types.
4345
4346 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4347
4348 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
4349 over a subtype of a type with a static predicate, taking into
4350 account the predicate function of the parent type and the bounds
4351 given in the loop specification.
4352 * sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
4353 a loop specification that is a subtype indication whose type mark
4354 is a type with a static predicate, inherit predicate function,
4355 used to build case statement for rewritten loop.
4356
4357 2017-09-08 Justin Squirek <squirek@adacore.com>
4358
4359 * lib-load.adb: Modify printing of error message to exclude file
4360 line number.
4361
4362 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4363
4364 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
4365 don't inline subprograms declared in both visible and private
4366 parts of a package.
4367 (In_Package_Spec): previously In_Package_Visible_Spec; now
4368 detects subprograms declared both in visible and private parts
4369 of a package spec.
4370
4371 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4372
4373 * exp_util.adb (Build_Invariant_Procedure_Declaration): If
4374 the type is an anonymous array in an object declaration, whose
4375 component type has an invariant, use the object declaration
4376 as the insertion point for the invariant procedure, given that
4377 there is no explicit type declaration for an anonymous array type.
4378
4379 2017-09-08 Bob Duff <duff@adacore.com>
4380
4381 * a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.
4382
4383 2017-09-08 Bob Duff <duff@adacore.com>
4384
4385 * a-strfix.adb (Trim): Compute Low and High only if needed.
4386
4387 2017-09-08 Justin Squirek <squirek@adacore.com>
4388
4389 * lib-load.adb (Load_Main_Source): Add error output in the case a
4390 source file is missing.
4391
4392 2017-09-08 Bob Duff <duff@adacore.com>
4393
4394 PR ada/80888
4395 * a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
4396 Default_WCEM by default (i.e. if the encoding is not specified
4397 by the Form string).
4398
4399 2017-09-08 Bob Duff <duff@adacore.com>
4400
4401 * s-trasym.ads (Hexa_Traceback): If
4402 Suppress_Hex is True, print "..." instead of a hexadecimal
4403 address.
4404 * s-trasym.adb: Ignore No_Hex in this version.
4405 Misc cleanup.
4406
4407 2017-09-08 Bob Duff <duff@adacore.com>
4408
4409 * debug.adb: Minor reformatting.
4410
4411 2017-09-08 Bob Duff <duff@adacore.com>
4412
4413 * a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
4414 code so it doesn't trigger an "uninit var" warning.
4415
4416 2017-09-08 Nicolas Roche <roche@adacore.com>
4417
4418 * s-hibaen.ads: Remove obsolete file.
4419
4420 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4421
4422 * a-locale.ads: Add comment explaining the state of this package.
4423
4424 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4425
4426 * sem_util.adb (Is_CCT_Instance): Allow calls in the context
4427 of packages.
4428 * sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
4429 allow calls in the context of package spec (for pragma
4430 Initializes) and bodies (for pragma Refined_State).
4431
4432 2017-09-08 Bob Duff <duff@adacore.com>
4433
4434 * checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
4435 new Exp.
4436
4437 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4438
4439 * debug.adb (dA): Adjust comment.
4440 * gnat1drv.adb (Gnat1drv): Likewise.
4441 * opt.ads (List_Representation_Info_Extended): New variable.
4442 * repinfo.adb (List_Record_Info): Split implementation into...
4443 (Compute_Max_Length): ...this. Recurse on records if requested.
4444 (List_Record_Layout): Likewise.
4445 * switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
4446 statement, accept '0' and set List_Representation_Info_Extended
4447 on 'e'.
4448 * usage.adb (Usage): Document new -gnatRe variant.
4449
4450 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4451
4452 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
4453 Do not save the given entity in the global variable Default_Pool
4454 if the pragma appears within a generic unit.
4455
4456 2017-09-08 Bob Duff <duff@adacore.com>
4457
4458 * errout.adb (Delete_Warning): Do not
4459 decrement Warnings_Treated_As_Errors. This is called before
4460 Warnings_Treated_As_Errors has been incremented to account for
4461 this warning. Decrementing it here can lead to negative values
4462 of Warnings_Treated_As_Errors, raising Constraint_Error in
4463 checks-on builds, and causing the compiler to return an error
4464 code in checks-off builds.
4465
4466 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4467
4468 * sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
4469 entities of named concurrent types as Ref_Id and not of anonymous
4470 concurrent objects (because callers already know when a conversion
4471 is necessary and can easily do it); also, do not expect protected
4472 types or protected objects as Context_Id (because no flow-related
4473 SPARK pragmas are attached there); reflect these changes in a
4474 more precise comment.
4475
4476 2017-09-08 Olivier Hainque <hainque@adacore.com>
4477
4478 * g-altive.ads: Add documentation.
4479
4480 2017-09-08 Bob Duff <duff@adacore.com>
4481
4482 * sem_util.ads, debug.adb: Minor comment fix.
4483 * erroutc.ads: Comment fix.
4484
4485 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4486
4487 * sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
4488 for compatibility of component types of formal and actual in an
4489 instantiation of a child unit, when the component type of the
4490 formal is itself a formal of an enclosing generic.
4491
4492 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4493
4494 * sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
4495 sem_prag.adb to make it available for GNATprove; for concurrent
4496 types replace custom scope climbing with Scope_Same_Or_Within; for
4497 single concurrent objects add scope climbing (with Scope_Within),
4498 which was not there (that's the primary semantic change of this
4499 commit); also, when comparing a single concurrent object with
4500 its corresponding concurrent type rely on equality of types,
4501 not of objects (because that's simpler to code).
4502 * sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
4503 (Analyze_Global_Item): adjust special-casing of references to the
4504 current instance of a concurrent unit in the Global contracts
4505 of task types and single tasks objects; similar for references
4506 in the protected operations and entries of protected types and
4507 single protected objects (in all these cases the current instance
4508 behaves as an implicit parameter and must not be mentioned in
4509 the Global contract).
4510
4511 2017-09-08 Arnaud Charlet <charlet@adacore.com>
4512
4513 * exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
4514 function calls returning a record within a subprogram call,
4515 for C generation.
4516
4517 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4518
4519 * sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
4520 name that designates the current instance of a child unit in its
4521 own body and appears as the prefix of a reference to an entity
4522 local to the child unit.
4523 * exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
4524 Minor reformatting.
4525
4526 2017-09-08 Yannick Moy <moy@adacore.com>
4527
4528 * sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
4529 may be intentional.
4530
4531 2017-09-08 Tristan Gingold <gingold@adacore.com>
4532
4533 * sem_warn.adb (Check_Unused_Withs): Remove test that disabled
4534 warnings on internal units in configurable run time mode.
4535
4536 2017-09-08 Bob Duff <duff@adacore.com>
4537
4538 * sem_ch3.adb (Build_Derived_Private_Type): Inherit
4539 representation items from interfaces that the derived type
4540 implements, not just from the parent type.
4541 * sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
4542 this to return an empty list when there are no interfaces.
4543 * einfo.ads, sem_ch13.adb: Minor comment fixes.
4544 * sem_attr.adb: Minor comment fix.
4545
4546 2017-09-08 Doug Rupp <rupp@adacore.com>
4547
4548 * sigtramp-vxworks.c [i386]: Adjust the kernel context for
4549 x86-vx7.
4550
4551 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4552
4553 * exp_ch4.adb (Expand_N_Allocator): Generate a
4554 call to Allocate_Any_Controlled when the allocation does not
4555 require any initialization.
4556
4557 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4558
4559 * sem_util.adb (Copy_Node_With_Replacement):
4560 Update the Renamed_Object field of a replicated object renaming
4561 declaration.
4562
4563 2017-09-08 Patrick Bernardi <bernardi@adacore.com>
4564
4565 * exp_ch9.adb (Is_Pure_Barrier): Allow type
4566 conversions and components of objects. Simplified the detection
4567 of the Count attribute by identifying the corresponding run-time
4568 calls.
4569
4570 2017-09-08 Yannick Moy <moy@adacore.com>
4571
4572 * exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
4573 sem_type.adb, sinfo.ads: Minor reformatting.
4574
4575 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4576
4577 * freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
4578 of Freeze_Profile, used to inhibit the freezing of the profile
4579 of an expression function declared within a nested package, when
4580 some type in the profile depends on a private type declared in
4581 an enclosing package.
4582
4583 2017-09-08 Bob Duff <duff@adacore.com>
4584
4585 * gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
4586 the subunit case. It's still OK to set it in the "missing subunits"
4587 case, because that won't cause the obsolete .ali files that cause
4588 confusion.
4589
4590 2017-09-08 Bob Duff <duff@adacore.com>
4591
4592 * sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
4593 unclear why this didn't cause a warning.
4594 * a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
4595 pragmas. It's unclear why this didn't cause an error.
4596
4597 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4598
4599 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
4600 Reimplemented.
4601 (Expand_SPARK_Potential_Renaming): Code clean up.
4602 * sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
4603 the item does not have a proper entity.
4604 (Analyze_Input_Item): Add a guard in case the item does not have a
4605 proper entity.
4606 (Collect_States_And_Objects): Include object renamings in the
4607 items being collected.
4608 (Resolve_State): Update the documentation of this routine.
4609 * sem_util.adb (Entity_Of): Add circuitry to handle
4610 renamings of function results.
4611 (Remove_Entity): New routine.
4612 (Remove_Overloaded_Entity): Take advantage of factorization.
4613 * sem_util.ads (Entity_Of): Update the documentation
4614 of this routine.
4615 (Remove_Entity): New routine.
4616 (Remove_Overloaded_Entity): Update the documentation of this
4617 routine.
4618
4619 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
4620
4621 * repinfo.adb (List_Record_Info): During first loop,
4622 do not override the normalized position and first bit
4623 if they have already been set. Move fallback code
4624 for the packed case to the case where it belongs.
4625 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4626 Also adjust the normalized position of components.
4627 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.
4628
4629 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4630
4631 * exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
4632 the placement of a primitive operation O that renames an operation
4633 R declared in an inner package, and which is thus not a primitive
4634 of the dispatching type of O. In this case O is a new primitive
4635 and does not inherit its dispatch table position from R (which
4636 has none).
4637
4638 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4639
4640 * sem_dim.adb (Analyze_Dimension_If_Expression,
4641 Analyze_Dimension_Case_Expression): new subprograms to verify
4642 the dimensional correctness of Ada2012 conditional expressions,
4643 and set properly the dimensions of the construct.
4644 * sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
4645 call Analyze_Dimension.
4646
4647 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4648
4649 * sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
4650 loop on an interface declared as a private extension of another
4651 synchronized interface.
4652
4653 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4654
4655 * sem_ch12.adb (Check_Generic_Parent): New procedure within
4656 Analyze_Associations, to handle actual packages that depend on
4657 previous instances. If a package IAP that is an instantiation is
4658 used as an actual in a subsequent instantiation SI in the same
4659 scope, and IAP has a body, IAP must be frozen before SI. If
4660 the generic parent of IAP is itself declared in a previous
4661 instantiation in the same scope, that instantiation must also
4662 be frozen before SI.
4663 (Install_Body): Prevent double insertion of freeze node for
4664 instance.
4665
4666 2017-09-08 Hristian Kirtchev <kirtchev@adacore.com>
4667
4668 * sem_prag.adb (Resolve_State): Update the
4669 comment on documentation. Generate a reference to the state once
4670 resolution takes place.
4671
4672 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4673
4674 * sem_ch13.adb (Analyze_Aspect_Specifications, case
4675 Linker_Section): If the aspect applies to an object declaration
4676 with explicit initialization, do not delay the freezing of the
4677 object, to prevent access-before-elaboration in the generated
4678 initialization code.
4679
4680 2017-09-08 Ed Schonberg <schonberg@adacore.com>
4681
4682 * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
4683 (Integer_Value (Item)) when the size of the fixed decimal type
4684 is larger than Integer.
4685
4686 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4687
4688 PR ada/82127
4689 * gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
4690 in order of increasing position in more cases.
4691
4692 2017-09-07 Yannick Moy <moy@adacore.com>
4693
4694 * a-exetim-mingw.ads: Add contract Global=>null
4695 on all operations that are modeled as having no read or write
4696 of global variables in SPARK.
4697
4698 2017-09-07 Raphael Amiard <amiard@adacore.com>
4699
4700 * a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
4701 to Hmaps.Generic_Ops.
4702 * a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
4703 cursors.
4704 * a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
4705 cursors.
4706 * a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
4707 position in cursors.
4708
4709 2017-09-07 Javier Miranda <miranda@adacore.com>
4710
4711 * sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
4712 allow disabling the generation of implicit pragma Elaborate_All
4713 on task bodies.
4714
4715 2017-09-07 Javier Miranda <miranda@adacore.com>
4716
4717 * exp_disp.adb (Make_Tags): Avoid suffix counter
4718 in the external name of the elaboration flag. Required to fix
4719 the regressions introduced by the initial version of this patch.
4720
4721 2017-09-07 Bob Duff <duff@adacore.com>
4722
4723 * sem_ch6.adb (Analyze_Function_Return): Do not
4724 insert an explicit conversion to force the displacement of the
4725 "this" pointer to reference the secondary dispatch table in the
4726 case where the return statement is returning a raise expression,
4727 as in "return raise ...".
4728
4729 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4730
4731 * sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
4732 * sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
4733 procedure from sem_disp.adb.
4734 * sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
4735 with Unit.
4736 * sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
4737 return the instantiation node for subprograms. Update references
4738 to Get_Unit_Instantiation_Node.
4739 * sem_ch7.adb (Install_Parent_Private_Declarations): update
4740 reference to Get_Unit_Instantiation_Node.
4741 * exp_dist.adb (Build_Package_Stubs): update reference to
4742 Get_Unit_Instantiation_Node.
4743 * sem_ch9.adb: minor typo in comment.
4744 * lib-xref-spark_specific.adb
4745 (Traverse_Declaration_Or_Statement): traverse into task type
4746 definition.
4747
4748 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4749
4750 * sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
4751 to handle properly various cases of type conversions where the
4752 target type and/or the expression carry dimension information.
4753 (Dimension_System_Root); If a subtype carries dimension
4754 information, obtain the source parent type that carries the
4755 Dimension aspect.
4756
4757 2017-09-07 Dmitriy Anisimkov <anisimko@adacore.com>
4758
4759 * g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.
4760
4761 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4762
4763 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
4764 If the prefix is a reference to an object, rewrite it as an
4765 explicit dereference, as required by 3.7.2 (2) and as is done
4766 with most other attributes whose prefix is an access value.
4767
4768 2017-09-07 Bob Duff <duff@adacore.com>
4769
4770 * par-ch13.adb: Set the Inside_Depends flag if we are inside a
4771 Refined_Depends aspect.
4772 * par-ch2.adb: Set the Inside_Depends flag if we are inside a
4773 Refined_Depends pragma.
4774 * scans.ads: Fix documentation of Inside_Depends flag.
4775 * styleg.adb, styleg.ads: Minor reformatting and comment fixes.
4776
4777 2017-09-07 Hristian Kirtchev <kirtchev@adacore.com>
4778
4779 * exp_ch7.adb (Insert_Actions_In_Scope_Around):
4780 Account for the case where the are no lists to insert, but the
4781 secondary stack still requires management.
4782 * a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
4783 comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
4784 lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
4785 sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
4786 Minor reformatting.
4787
4788 2017-09-07 Vincent Celier <celier@adacore.com>
4789
4790 * clean.adb: Do not get the target parameters before calling
4791 gprclean.
4792
4793 2017-09-07 Nicolas Roche <roche@adacore.com>
4794
4795 * s-osinte-solaris-posix.ads: Removed.
4796
4797 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4798
4799 * sem_prag.adb (Collect_States_And_Objects): Detect also instances of
4800 single concurrent objects.
4801
4802 2017-09-07 Javier Miranda <miranda@adacore.com>
4803
4804 * s-regexp.ads: Fix documentation of the globbing grammar.
4805
4806 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4807
4808 * a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.
4809
4810 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4811
4812 * gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
4813 in CodePeer mode, to support more legacy code automatically.
4814
4815 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4816
4817 * exp_disp.adb (Replace_Formals): If thr formal is classwide,
4818 and thus not a controlling argument, preserve its type after
4819 rewriting because it may appear in an nested call with a classwide
4820 parameter.
4821
4822 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4823
4824 * comperr.adb (Delete_SCIL_Files): Handle case of
4825 N_Package_Instantiation.
4826
4827 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4828
4829 * sem_ch10.adb (Remove_Private_With_Clause): If a private with
4830 clause for a unit U appears in a context that includes a regular
4831 with_clause on U, rewrite the redundant private clause into a null
4832 statement, rather than removing it altogether from the context,
4833 so that ASIS tools can reconstruct the original source.
4834
4835 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4836
4837 * sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
4838 for aspect Small can be of any real type (not only a universal
4839 real literal) as long as it is a static constant.
4840
4841 2017-09-07 Thomas Quinot <quinot@adacore.com>
4842
4843 * par_sco.adb: Minor reformatting.
4844
4845 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4846
4847 * s-parame-ae653.ads: Removed.
4848
4849 2017-09-07 Nicolas Roche <roche@adacore.com>
4850
4851 * s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
4852 s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
4853 s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
4854 s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
4855 s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
4856 s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.
4857
4858 2017-09-07 Yannick Moy <moy@adacore.com>
4859
4860 * a-ngelfu.ads Add preconditions to all functions
4861 listed in Ada RM A.5.1(19-33) as having constraints on inputs.
4862
4863 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4864
4865 * lib-xref.adb (Generate_Reference): ignore
4866 references to entities which are Part_Of single concurrent
4867 objects.
4868
4869 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4870
4871 * sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
4872 comment.
4873
4874 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4875
4876 * a-taside.adb (Activation_Is_Complete): Raise Program_Error if
4877 Null_Task_Id is passed.
4878
4879 2017-09-07 Javier Miranda <miranda@adacore.com>
4880
4881 * einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
4882 attribute. Defined for record types and subtypes.
4883 * exp_ch3.ads (Init_Secondary_Tags): Adding new formal
4884 (Init_Tags_List) to facilitate generating separate code in the
4885 IP routine to initialize the object components and for completing
4886 the elaboration of dispatch tables.
4887 * exp_ch3.adb (Build_Init_Procedure): Improve the code
4888 generated in the IP routines by means of keeping separate
4889 the initialization of the object components from the
4890 initialization of its dispatch tables. (Init_Secondary_Tags):
4891 Adding new formal (Init_Tags_List) and adjusting calls to
4892 Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
4893 adjusting also calls to Ada.Tags.Register_Interface_Offset
4894 because the type of one of its formals has been changed.
4895 * a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
4896 modified. Instead of receiving a pointer to an object this
4897 routine receives now a primary tag.
4898 (Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
4899 additional formal: the tag of the primary dispatch table.
4900 * exp_disp.ads (Elab_Flag_Needed): New subprogram.
4901 * exp_disp.adb (Elab_Flag_Needed): New subprogram.
4902 (Make_Tags): Adding the declaration of the elaboration flag (if needed).
4903 * exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
4904 formal in calls to Init_Secondary_Tags.
4905
4906 2017-09-07 Javier Miranda <miranda@adacore.com>
4907
4908 * ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
4909 subprogram.
4910 * sem_prag.adb (Pragma_Ghost): Add missing support for ghost
4911 applied to generic subprograms.
4912
4913 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4914
4915 * sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
4916 (because it refers to the anonymous concurrent object, not its type);
4917 fix condition for emitting error message about task/protected type,
4918
4919 2017-09-07 Bob Duff <duff@adacore.com>
4920
4921 * binde.adb (Debug_Flag_Old): If both -do and -dp
4922 are specified, behave as if just -do was specified, rather than
4923 using a mixture.
4924
4925 2017-09-07 Nicolas Roche <roche@adacore.com>
4926
4927 * system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
4928 system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.
4929
4930 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4931
4932 * sem_prag.adb (Find_Role): The Global_Seen flag
4933 is now consulted not only for abstract states and variables,
4934 but for all kinds of items.
4935 (Collect_Subprogram_Inputs_Outputs): Do not process formal
4936 generic parameters, because unlike ordinary formal parameters,
4937 generic formals only act as input/ outputs if they are explicitly
4938 mentioned in a Global contract.
4939
4940 2017-09-07 Yannick Moy <moy@adacore.com>
4941
4942 * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
4943 predicate procedure. Check predicate pragma/aspect with Ghost entity.
4944 * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
4945 reformatting.
4946
4947 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4948
4949 * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
4950 (code cleanup);
4951 * sem_ch3.adb (Build_Derived_Record_Type):i Call
4952 Copy_Dimensions_Of_Components after creating the copy of the
4953 record declaration.
4954 * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
4955 derived recor type, copy the dikensions if any of each component
4956 of the parent record to the corresponding component declarations
4957 of the derived record. These expressions are used among other
4958 things as default values in aggregates with box associations.
4959 * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
4960 repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
4961 Minor reformatting.
4962
4963 2017-09-07 Arnaud Charlet <charlet@adacore.com>
4964
4965 * sem_util.adb: Remove extra space after THEN.
4966
4967 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4968
4969 * sem_ch7.adb (Has_Referencer): For a subprogram renaming,
4970 also mark the renamed subprogram as referenced.
4971
4972 2017-09-07 Ed Schonberg <schonberg@adacore.com>
4973
4974 * par-ch6.adb (P_Subprogram): Improve error message on null
4975 procedure with misplaced aspect specification, which the parser
4976 first attempts to interpret as a malformed expression function.
4977
4978 2017-09-07 Gary Dismukes <dismukes@adacore.com>
4979
4980 * sem_attr.adb (Analyze_Attribute_Old_Result):
4981 Allow attributes Result and Old in the case of an expression
4982 function.
4983
4984 2017-09-07 Justin Squirek <squirek@adacore.com>
4985
4986 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
4987 Volatile to subcomponents.
4988
4989 2017-09-07 Bob Duff <duff@adacore.com>
4990
4991 * exp_ch7.adb (Find_Last_Init): Check for the
4992 case where a build-in-place function call has been replaced by a
4993 'Reference attribute reference.
4994
4995 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
4996
4997 * sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
4998 nodes.
4999
5000 2017-09-07 Bob Duff <duff@adacore.com>
5001
5002 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
5003 Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
5004 secondary stack for all functions that return limited tagged
5005 types -- just do it for dispatching calls. Misc cleanup.
5006 * sem_util.ads, sem_util.adb (Unqual_Conv): New function to
5007 remove qualifications and type conversions. Fix various bugs
5008 where only a single level of qualification or conversion was
5009 removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
5010 instead of "X".
5011 * checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
5012 cleanup.
5013
5014 2017-09-07 Ed Schonberg <schonberg@adacore.com>
5015
5016 * sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
5017 do not create actual subtypes that may generate further predicate
5018 functions.
5019 * sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
5020 of body is a predicate function as well.
5021 (Resolve_Aspect_Expressions, Resolve_Name): For a component
5022 association, only the expression needs resolution, not the name.
5023 (Resolve_Aspect_Expressions, case Predicates): Construct and
5024 analyze the predicate function declaration in the scope of the
5025 type, before making the type and its discriminants visible.
5026
5027 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5028
5029 * gcc-interface/decl.c (warn_on_field_placement): Issue the warning
5030 only if the record type itself comes from source.
5031
5032 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5033
5034 * sem_ch5.adb: Minor reformatting and a typo fix
5035
5036 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5037
5038 * sinput-l.ads: minor remove extra period at the end of comment
5039
5040 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5041
5042 * sem_prag.adb (Add_Item_To_Name_Buffer): remove support for
5043 E_Discriminant.
5044 (Find_Role): remove support for E_Discriminant.
5045
5046 2017-09-06 Javier Miranda <miranda@adacore.com>
5047
5048 * exp_ch6.adb (Expand_Simple_Function_Return):
5049 Add missing implicit type conversion to force displacement of the
5050 "this" pointer.
5051
5052 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5053
5054 * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting.
5055
5056 2017-09-06 Yannick Moy <moy@adacore.com>
5057
5058 * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set
5059 global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once.
5060
5061 2017-09-06 Bob Duff <duff@adacore.com>
5062
5063 * sem_ch8.adb: Change Assert to be consistent with
5064 other similar ones.
5065
5066 2017-09-06 Bob Duff <duff@adacore.com>
5067
5068 * binde.adb (Find_Elab_Order): Do not run Elab_Old unless
5069 requested. Previously, the -do switch meant "run Elab_New and
5070 Elab_Old and use the order chosen by Elab_Old, possibly with
5071 debugging printouts comparing the two orders." Now it means
5072 "do not run Elab_New." This is of use if there are bugs that
5073 cause Elab_New to crash.
5074 (Elab_Position, Num_Chosen): Change type to Nat, to avoid various
5075 type conversions.
5076 * ali.ads (Elab_Position): Change type to Nat, to avoid various
5077 type conversions.
5078
5079 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5080
5081 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix
5082 reference to SPARK RM.
5083
5084 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5085
5086 * layout.adb: Use SSU short hand consistently throughout the file.
5087
5088 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5089
5090 * freeze.adb (Freeze_Record_Type)
5091 <Sized_Component_Total_Round_RM_Size>: New local variable to
5092 accumulate the rounded RM_Size of components. Update it for
5093 every component whose RM_Size is statically known. Add missing
5094 guard to check that bit packing is really required before issuing
5095 the error about packing. Swap condition for clarity's sake.
5096 * sem_prag.adb (Usage_Error): Fix reference to SPARK RM in comment.
5097
5098 2017-09-06 Fedor Rybin <frybin@adacore.com>
5099
5100 * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb,
5101 mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads,
5102 mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5103 mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
5104 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb,
5105 mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb,
5106 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb,
5107 mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads,
5108 prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb,
5109 prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads,
5110 prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb,
5111 prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads,
5112 prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb,
5113 prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
5114 prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete
5115 project manager sources.
5116
5117 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5118
5119 * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an
5120 entity of a mutable type and the right-hand side is a conditional
5121 expression, resolve the alternatives of the conditional using
5122 the base type of the target entity, because the alternatives
5123 may have distinct subtypes. This is particularly relevant if
5124 the alternatives are aggregates.
5125
5126 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5127
5128 * checks.adb (Apply_Predicate_Check): If the expression is an
5129 aggregate that is the RHS of an assignment, apply the check to
5130 the LHS after the assignment, rather than to the aggregate. This
5131 is more efficient than creating a temporary for the aggregate,
5132 and prevents back-end crashes when the aggregate includes a
5133 dynamic "others' association.
5134
5135 2017-09-06 Yannick Moy <moy@adacore.com>
5136
5137 * sem_ch12.adb (Analyze_Instance_And_Renamings):
5138 Set variable to ignore SPARK_Mode in instance before the analysis
5139 of the generated package declaration.
5140
5141 2017-09-06 Yannick Moy <moy@adacore.com>
5142
5143 * sem_res.adb (Resolve_Call): Do not issue a
5144 message for calls inside expression function, unless body was
5145 seen and is candidate for inlining.
5146
5147 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5148
5149 * sem_aux.adb (Is_Generic_Formal): Handle properly formal packages.
5150 * sem_ch3.adb (Analyze_Declarations): In a generic subprogram
5151 body. do not freeze the formals of the generic unit.
5152
5153 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5154
5155 * errout.adb (Error_Msg): Separate the
5156 treatment for warning vs. style messages in inlinings and
5157 instantiations. Prevents blowups on calls to Warn_Insertion for
5158 style messages, which should not be called in that case because
5159 Warning_Msg_Char is not set.
5160
5161 2017-09-06 Justin Squirek <squirek@adacore.com>
5162
5163 * sem_prag.adb (Check_VFA_Conflicts): Created
5164 to group all Volatile_Full_Access checks relating to other
5165 representation pragmas (Mark_Component_Or_Object): Created
5166 to centeralize the flagging of attributes for the record type
5167 component case, a pragma applied individually to a component, and
5168 the object case.
5169 (Process_Atomic_Independent_Shared_Volatile):
5170 Add propagation of certain pragmas to record components and move
5171 evaluation of VFA checks
5172
5173 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5174
5175 * sem_prag.adb (Check_Postcondition_Use_In_Inlined_Subprogram):
5176 Do not warn on conditions that are not obeyed for Inline_Always
5177 subprograms, when assertions are not enabled.
5178
5179 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5180
5181 * sem_util.adb (Unique_Entity): For abstract states return their
5182 non-limited view.
5183
5184 2017-09-06 Bob Duff <duff@adacore.com>
5185
5186 * sem_ch12.adb (Copy_Generic_Node): When we copy a node
5187 that is a proper body corresponding to a stub, we defer the
5188 adjustment of the sloc until after the correct adjustment has
5189 been computed. Otherwise, Adjust_Instantiation_Sloc will ignore
5190 the adjustment, because it will be outside the range in (the old,
5191 incorrect) S_Adjustment.
5192 * inline.adb: Use named notation for readability and uniformity.
5193 * sinput-l.adb: Minor improvements to debugging output printed
5194 for Debug_Flag_L.
5195 * sinput-l.ads (Create_Instantiation_Source): Minor comment
5196 correction.
5197
5198 2017-09-06 Vincent Celier <celier@adacore.com>
5199
5200 * make.adb: Do not invoke gprbuild for -bargs -P.
5201
5202 2017-09-06 Sylvain Dailler <dailler@adacore.com>
5203
5204 * sem_eval.adb (Compile_Time_Known_Value_Or_Aggr): Adding a
5205 case when Op is of kind N_Qualified_Expression. In this case,
5206 the function is called recursively on the subexpression like in
5207 other cases.
5208 * make.adb: Minor reformatting
5209
5210 2017-09-06 Justin Squirek <squirek@adacore.com>
5211
5212 * einfo.adb (Set_Linker_Section_Pragma): Modify
5213 Set_Linker_Section_Pragma to be consistant with the "getter"
5214 Linker_Section_Pragma.
5215 * exp_ch5.adb (Expand_Formal_Container_Loop): Add proper error
5216 checking for container loops so that the index cursor is not
5217 directly changable by the user with the use of E_Loop_Parameter.
5218 * sem_ch5.adb (Analyze_Block_Statement): Revert previous change.
5219 * sem_warn.adb (Check_References): Revert previous change.
5220
5221 2017-09-06 Bob Duff <duff@adacore.com>
5222
5223 * exp_util.adb (Is_Displace_Call): Make sure it works for indirect
5224 calls and the like.
5225
5226 2017-09-06 Yannick Moy <moy@adacore.com>
5227
5228 * sem_prag.adb (Analyze_Depends_Global): Reinforce test on object
5229 declarations to only consider valid uses of Global/Depends those on
5230 single concurrent objects.
5231
5232 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5233
5234 * sem_ch13.adb (Check_Record_Representation_Clause): Give an
5235 error as soon as one of the specified components overlaps the
5236 parent field.
5237
5238 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5239
5240 * sem_prag.ads: minor fix typo in comment.
5241
5242 2017-09-06 Justin Squirek <squirek@adacore.com>
5243
5244 * sem_ch5.adb (Analyze_Block_Statement): Verify a block comes
5245 from source before checking source references.
5246 * sem_warn.adb (Check_References): Add check for internal block
5247 before recursing.
5248
5249 2017-09-06 Vincent Celier <celier@adacore.com>
5250
5251 * make.adb, makeusg.adb, switch-m.adb, switch-m.ads, make_util.adb,
5252 make_util.ads, sinput.adb, sinput.ads, clean.adb, gnatls.adb,
5253 gnatname.adb: Remove the Project Manager from the GNAT tools.
5254 * gcc-interface/Makefile.in: ditto.
5255
5256 2017-09-06 Bob Duff <duff@adacore.com>
5257
5258 * sem_util.ads: Minor comment fix.
5259
5260 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5261
5262 * sem_ch12.adb (Analyze_Associations, case of Formal_Package):
5263 Generate a freeze node for the actual of a formal package, if
5264 the actual is declared in the same unit and has a corresponding
5265 body, to prevent the current instance from being frozen before
5266 the actual is.
5267
5268 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5269
5270 * sem_ch7.adb (Entity_Table_Size): Change to nearest prime number.
5271
5272 2017-09-06 Yannick Moy <moy@adacore.com>
5273
5274 * sem_warn.adb: Minor refactoring.
5275
5276 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5277
5278 * einfo.ads, einfo.adb (Get_Classwwide_Pragma): New utility,
5279 to retrieve the inherited classwide precondition/postcondition
5280 of a subprogram.
5281 * freeze.adb (Freeze_Entity): Use Get_Classwide_Pragma when
5282 freezing a subprogram, to complete the generation of the
5283 corresponding checking code.
5284
5285 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5286
5287 * exp_util.adb (Is_Controlled_Indexing): New routine.
5288 (Is_Displace_Call): Use routine Strip to remove indirections.
5289 (Is_Displacement_Of_Object_Or_Function_Result): Code clean up. Add a
5290 missing case of controlled generalized indexing.
5291 (Is_Source_Object): Use routine Strip to remove indirections.
5292 (Strip): New routine.
5293
5294 2017-09-06 Bob Duff <duff@adacore.com>
5295
5296 * sysdep.c (__gnat_has_cap_sys_nice): If HAVE_CAPABILITY is defined,
5297 we include the proper header. Otherwise, we just declare the necessary
5298 things from the capabilities library. This is so we can build on
5299 machines without that library, while still enabling that library.
5300 At run time, we're using weak symbols, so __gnat_has_cap_sys_nice will
5301 simply return 0 if the library is not present, or not included
5302 in the link.
5303
5304 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5305
5306 * exp_dbug.adb (Debug_Renaming_Declaration): Do not create an encoding
5307 for renamings that involve function calls in prefix form.
5308
5309 2017-09-06 Bob Duff <duff@adacore.com>
5310
5311 * sem_ch3.adb (Analyze_Subtype_Declaration):
5312 Set Has_Delayed_Freeze on a subtype of an incomplete type.
5313
5314 2017-09-06 Pierre-Marie de Rodat <derodat@adacore.com>
5315
5316 * par_sco.adb (Extend_Statement_Sequence): When the accept statement
5317 has no parameter specification and no entry index, use the entry name
5318 as the end of the generated SCO statement.
5319
5320 2017-09-06 Steve Baird <baird@adacore.com>
5321
5322 * exp_util.adb (Side_Effect_Free): For CodePeer (only) treat
5323 uses of 'Image and related attributes as having side effects in
5324 order to avoid replicating such uses.
5325 * pprint.ads (Expression_Image) Add new generic formal flag
5326 Hide_Temp_Derefs. The flag defaults to False; CodePeer will
5327 (eventually) override the default.
5328 * pprint.adb (Expression_Image) If the new flag is set, then
5329 suppress the ".all" suffix when displaying a dereference whose
5330 prefix is a use of a value-capturing compiler temp of the sort
5331 generated by Expr_Util.Remove_Side_Effects .
5332 * exp_attr.adb, g-catiio.adb, inline.adb, sem_attr.adb, sem_ch13.adb,
5333 sem_ch7.adb, sem_dim.adb, sem_util.adb, sem_util.ads, sem_warn.adb:
5334 Minor reformatting.
5335 * inline.adb: Minor wording change.
5336
5337 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5338
5339 * sem_ch7.adb: Update comment.
5340
5341 2017-09-06 Yannick Moy <moy@adacore.com>
5342
5343 * einfo.adb, einfo.ads (Is_Subprogram_Or_Entry): New predicate.
5344 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Use new function.
5345 * sem_util.adb, sem_util.ads (Within_Protected_Type): Renaming
5346 with slight modification from Is_Subp_Or_Entry_Inside_Protected,
5347 so that applies to any entity.
5348
5349 2017-09-06 Yannick Moy <moy@adacore.com>
5350
5351 * sem_ch3.adb (Derived_Type_Declaration): Use
5352 Incomplete_Or_Partial_View rather than local Find_Partial_View.
5353
5354 2017-09-06 Javier Miranda <miranda@adacore.com>
5355
5356 * g-catiio.ads, g-catiio.adb (Value): Extended to parse an UTC time
5357 following ISO-8861.
5358
5359 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5360
5361 * sem_dim.adb (Analyze_Dimension): In an instance, a type
5362 conversion takes its dimensions from the expression, not from
5363 the context type.
5364 (Dimensions_Of_Operand): Ditto.
5365
5366 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5367
5368 * exp_ch6.adb (Expand_Call_Helper): Do not optimize calls to
5369 null procedures when GNAT coverage is used, so that their (empty)
5370 bodies are properly covered.
5371
5372 2017-09-06 Bob Duff <duff@adacore.com>
5373
5374 * sem_ch13.adb (Resolve_Aspect_Expressions): If
5375 the entity is a type with discriminants, make the discriminants
5376 directly visible in aspect clauses.
5377
5378 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5379
5380 * sem_res.adb (Resolve_Arithmentic_Op): If both operands are
5381 Universal_Real and the context is a floating-point type, resolve
5382 both operands to the target type.
5383
5384 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5385
5386 * a-comlin.adb, exp_aggr.adb, exp_ch6.adb, frontend.adb, gnatbind.adb,
5387 sem_ch3.adb, sem_util.adb: Minor reformatting.
5388
5389 2017-09-06 Yannick Moy <moy@adacore.com>
5390
5391 * freeze.adb (Check_Inherited_Conditions): Rewriting
5392 of inherited preconditions and postconditions should only occur
5393 in GNATprove mode, that is, when GNATprove_Mode is True, not to
5394 be confused with SPARK_Mode being On.
5395
5396 2017-09-06 Yannick Moy <moy@adacore.com>
5397
5398 * sem_warn.adb (Check_References): Take into
5399 account possibility of attribute reference as original node.
5400
5401 2017-09-06 Yannick Moy <moy@adacore.com>
5402
5403 * exp_attr.adb (Expand_N_Attribute_Reference): Protect against invalid
5404 use of attribute.
5405
5406 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5407
5408 * inline.adb (Split_Unconstrained_Function): Also set Is_Inlined
5409 on the procedure created to encapsulate the body.
5410 * sem_ch7.adb: Add with clause for GNAT.HTable.
5411 (Entity_Table_Size): New constant.
5412 (Entity_Hash): New function.
5413 (Subprogram_Table): New instantiation of GNAT.Htable.Simple_HTable.
5414 (Is_Subprogram_Ref): Rename into...
5415 (Scan_Subprogram_Ref): ...this. Record references to subprograms in
5416 the table instead of bailing out on them. Scan the value of constants
5417 if it is not known at compile time.
5418 (Contains_Subprograms_Refs): Rename into...
5419 (Scan_Subprogram_Refs): ...this.
5420 (Has_Referencer): Scan the body of all inlined subprograms. Reset the
5421 Is_Public flag on subprograms if they are not actually referenced.
5422 (Hide_Public_Entities): Beef up comment on the algorithm.
5423 Reset the table of subprograms on entry.
5424
5425 2017-09-06 Yannick Moy <moy@adacore.com>
5426
5427 * inline.adb: Add comments to Can_Be_Inlined_In_GNATprove_Mode.
5428
5429 2017-09-06 Javier Miranda <miranda@adacore.com>
5430
5431 * exp_aggr.adb (Component_Not_OK_For_Backend): The C backend
5432 cannot handle a type conversion of an array as an aggregate
5433 component.
5434
5435 2017-09-06 Bob Duff <duff@adacore.com>
5436
5437 * g-comlin.adb (Try_Help): Remove ".exe" so we
5438 get the same results on windows and unix.
5439
5440 2017-09-06 Justin Squirek <squirek@adacore.com>
5441
5442 * exp_imgv.adb (Expand_Image_Attribute),
5443 (Expand_Wide_Image_Attribute), (Expand_Wide_Wide_Image_Attribute):
5444 Added case to handle new-style 'Image expansion
5445 (Rewrite_Object_Image): Moved from exp_attr.adb
5446 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5447 attribute cases so that the relevant subprograms in exp_imgv.adb
5448 handle all expansion.
5449 (Rewrite_Object_Reference_Image): Moved to exp_imgv.adb
5450 * sem_attr.adb (Analyze_Attribute): Modified Image attribute
5451 cases to call common function Analyze_Image_Attribute.
5452 (Analyze_Image_Attribute): Created as a common path for all
5453 image attributes (Check_Object_Reference_Image): Removed
5454 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5455 Removed and refactored into Is_Object_Image (Is_Object_Image):
5456 Created as a replacement for Is_Image_Applied_To_Object
5457
5458 2017-09-06 Yannick Moy <moy@adacore.com>
5459
5460 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add continuation
5461 message for missing input.
5462
5463 2017-09-06 Yannick Moy <moy@adacore.com>
5464
5465 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Prevent inlining
5466 of protected subprograms and entries.
5467 * sem_util.adb, sem_util.ads (Is_Subp_Or_Entry_Inside_Protected):
5468 New function to detect when a subprogram of entry is defined
5469 inside a protected object.
5470
5471 2017-09-06 Bob Duff <duff@adacore.com>
5472
5473 * sysdep.c (__gnat_has_cap_sys_nice): New function to determine
5474 whether the current process has the CAP_SYS_NICE capability.
5475 * s-taprop-linux.adb (Get_Ceiling_Support): Update this to allow
5476 ceiling priorities if the current process has the CAP_SYS_NICE
5477 capability.
5478
5479 2017-09-06 Bob Duff <duff@adacore.com>
5480
5481 * a-comlin.ads, a-comlin.adb (Argument): Move the constraint
5482 check back to the body, because SPARK is not yet ready for
5483 "or else raise Constraint_Error".
5484
5485 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5486
5487 * exp_ch6.adb (Expand_Call_Helper): Replace call to null
5488 procedure by a single null statement, after evaluating the
5489 actuals that require it.
5490
5491 2017-09-06 Javier Miranda <miranda@adacore.com>
5492
5493 * exp_aggr.adb (Backend_Processing_Possible.Component_Check):
5494 Generating C code improve the code that checks the use of nested
5495 aggregates to initialize object declarations.
5496
5497 2017-09-06 Yannick Moy <moy@adacore.com>
5498
5499 * sem_ch3.adb (Derived_Type_Declaration): Detect
5500 violations of new rule SPARK RM 3.4(1). Also refactor existing
5501 check to use the new function Find_Partial_View.
5502
5503 2017-09-06 Vincent Celier <celier@adacore.com>
5504
5505 * gnatcmd.adb: gnat ls -V -P... invokes gprls -V -P... The code
5506 from the Prj hierarchy has been removed from the GNAT driver.
5507
5508 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5509
5510 * sem_type.adb (Interface_Present_In_Ancestor): Within an
5511 expression function, or within a spec expression (default value,
5512 etc) a reference to an incomplete type is legal: legality of
5513 the operation will be checked when some related entity (type,
5514 object or subprogram) is frozen.
5515
5516 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5517
5518 * exp_ch5.adb, s-diinio.ads, sem_ch4.adb, s-diflio.ads: Minor spelling
5519 adjustments and a typo fix.
5520
5521 2017-09-06 Yannick Moy <moy@adacore.com>
5522
5523 * sem_res.adb (Resolve_Call): Do not issue info
5524 message about inlining of calls to functions in assertions,
5525 for functions whose body has not been seen yet.
5526
5527 2017-09-06 Bob Duff <duff@adacore.com>
5528
5529 * a-comlin.ads, a-comlin.adb (Argument): Simplify the code, now that
5530 we can use modern Ada in this package.
5531 * s-resfil.ads, s-resfil.adb, a-clrefi.ads, a-clrefi.adb:
5532 Move Ada.Command_Line.Response_File to System.Response_File,
5533 and make Ada.Command_Line.Response_File into a rename of
5534 System.Response_File. This is to avoid having gnatbind depend
5535 Ada.Command_Line, which would damage the bootstrap process now
5536 that Ada.Command_Line contains modern Ada (the raise expression).
5537 * gnatbind.adb: Avoid dependence on
5538 Ada.Command_Line. Depend on System.Response_File instead
5539 of Ada.Command_Line.Response_File. Change one call to
5540 Ada.Command_Line.Command_Name to use Fill_Arg. Change one call
5541 to Ada.Command_Line.Argument_Count to use Arg_Count.
5542 * gcc-interface/Make-lang.in, Makefile.rtl: Take note of the new files.
5543
5544 2017-09-06 Bob Duff <duff@adacore.com>
5545
5546 * frontend.adb (Frontend): Skip -gnatec=gnat.adc
5547 switch, because we've already read gnat.adc by default.
5548
5549 2017-09-06 Bob Duff <duff@adacore.com>
5550
5551 * exp_ch5.adb (Get_Default_Iterator): Replace
5552 "Assert(False)" with "return Iter", because if an iterable
5553 type is derived from a noniterable one, then we won't find an
5554 overriding or inherited default iterator.
5555
5556 2017-09-06 Yannick Moy <moy@adacore.com>
5557
5558 * sem_warn.adb (Warn_On_Suspicious_Index): Improve warning when the
5559 literal index used to access a string is null or negative.
5560
5561 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5562
5563 * einfo.adb (Status_Flag_Or_Transient_Decl): The attribute is now
5564 allowed on loop parameters.
5565 (Set_Status_Flag_Or_Transient_Decl): The attribute is now allowed
5566 on loop parameters.
5567 (Write_Field15_Name): Update the output for
5568 Status_Flag_Or_Transient_Decl.
5569 * einfo.ads: Attribute Status_Flag_Or_Transient_Decl now applies
5570 to loop parameters. Update the documentation of the attribute
5571 and the E_Loop_Parameter entity.
5572 * exp_ch7.adb (Process_Declarations): Remove the bogus guard
5573 which assumes that cursors can never be controlled.
5574 * exp_util.adb (Requires_Cleanup_Actions): Remove the bogus
5575 guard which assumes that cursors can never be controlled.
5576
5577 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5578
5579 * exp_attr.adb, sem_util.adb, sem_attr.adb, sem_ch6.adb, sem_ch8.adb,
5580 sem_warn.adb: Minor reformatting.
5581
5582 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5583
5584 * sem_warn.adb (Warn_On_Overlapping_Actuals): Refine previous
5585 fix and preserve older GNAT warning on overlapping actuals that
5586 are not elementary types.
5587
5588 2017-09-06 Justin Squirek <squirek@adacore.com>
5589
5590 * sem_attr.adb: Comment correction.
5591
5592 2017-09-06 Gary Dismukes <dismukes@adacore.com>
5593
5594 * sem_util.adb: Minor reformatting.
5595
5596 2017-09-06 Yannick Moy <moy@adacore.com>
5597
5598 * a-comlin.ads (Argument): Add precondition for analysis.
5599
5600 2017-09-06 Yannick Moy <moy@adacore.com>
5601
5602 * sem_res.adb (Resolve): Update message for function call as statement.
5603
5604 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5605
5606 * sem_ch6.adb (Check_Returns): Clean up warnings coming from
5607 generated bodies for renamings that are completions, when renamed
5608 procedure is No_Return.
5609 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
5610 rule in 6.5.1 (7/2): if a renaming is a completion of a subprogram
5611 with No_Return, the renamed entity must be No_Return as well.
5612
5613 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5614
5615 * exp_ch5.adb, freeze.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb:
5616 Minor reformatting.
5617
5618 2017-09-06 Justin Squirek <squirek@adacore.com>
5619
5620 * exp_attr.adb (Expand_N_Attribute_Reference): Modified Image
5621 attribute cases (Rewrite_Object_Reference_Image): Created to
5622 aid the rewriting of new-style 'Image attributes.
5623 * sem_attr.adb (Analyze_Attribute): Modified Image attribute cases
5624 (Check_Object_Reference_Image): Created to handle verification of
5625 'Image with object-references as prefixes.
5626 * sem_util.ads, sem_util.adb (Is_Image_Applied_To_Object):
5627 Create predicate to identify cases where an 'Image attribute's
5628 prefix applies to an object reference.
5629
5630 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5631
5632 * freeze.adb (Freeze_Entity): Do not generate a freeze
5633 node for a generic unit, even if it includes delayed aspect
5634 specifications. Freeze nodes for generic entities must never
5635 appear in the tree that reaches the back-end of the compiler.
5636
5637 2017-09-06 Yannick Moy <moy@adacore.com>
5638
5639 * treepr.adb (Print_Entity_Info): Do not print empty Elist.
5640
5641 2017-09-06 Yannick Moy <moy@adacore.com>
5642
5643 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not consider calls
5644 to subprograms in other units as possibly inlined.
5645
5646 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5647
5648 * freeze.adb (Freeze_Entity): For a derived type that has no
5649 explicit delayed aspects but may inherit delayed aspects from its
5650 parent type, analyze aspect at freeze point for proper capture
5651 of an inherited aspect.
5652
5653 2017-09-06 Arnaud Charlet <charlet@adacore.com>
5654
5655 * lib-xref.adb (Get_Through_Renamings): Get through subprogram
5656 renamings; also, avoid repeated calls to Renamed_Object when getting
5657 through object renamings.
5658
5659 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5660
5661 * sem_ch3.adb (Array_Type_Declaration): Handle properly an
5662 array type declaration in a private part, when an index is a
5663 subtype indication of a discrete type with a private partial view.
5664
5665 2017-09-06 Javier Miranda <miranda@adacore.com>
5666
5667 * exp_ch4.adb (Expand_Modular_Op): Force generating
5668 temporary to improve the generated code.
5669
5670 2017-09-06 Tristan Gingold <gingold@adacore.com>
5671
5672 * s-fatgen.adb: Minor typo fix in comment.
5673
5674 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5675
5676 * exp_ch5.adb (Make_Field_Assign): If the type
5677 of the right-hand side has stored constraint, use its values
5678 (except for those that are renamings of parent discriminants)
5679 to produce additional assignments for the discriminants of the
5680 left-hand side, which are invisible in the righ-hand side and
5681 not retrievable as selected components.
5682
5683 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5684
5685 * sem_util.adb (Needs_One_Formal): The first formal of such a
5686 function must be a controlling formal, so that Obj.F (X, Y)
5687 can have the interpretation F(Obj)(X, Y).
5688 * sem_util.ads: Clarify documentation.
5689
5690 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5691
5692 * table.ads, table.adb: Restore original implementation.
5693 * namet.h (Names_Ptr): Adjust back.
5694 (Name_Chars_Ptr): Likewise.
5695 * uintp.h (Uints_Ptr): Likewise.
5696 (Udigits_Ptr): Likewise.
5697 * g-table.ads: Remove pragma Compiler_Unit_Warning.
5698 * par_sco.adb: Do not with GNAT.Table and use Table consistently.
5699 * scos.ads: Replace GNAT.Table with Table and adjust instantiations.
5700 * spark_xrefs.ads: Likewise.
5701 * scos.h: Undo latest changes.
5702
5703 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5704
5705 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Propagate
5706 No_Return flag to instance if pragma applies to generic unit. This
5707 must be done explicitly because the pragma does not appear
5708 directly in the generic declaration (unlike the corresponding
5709 aspect specification).
5710
5711 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5712
5713 * sem_ch7.adb (Has_Referencer): Move up and expand comment
5714 explaining the test used to detect inlining. Use same test
5715 in second occurrence.
5716 (Analyze_Package_Body_Helper): Minor formatting fixes.
5717
5718 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5719
5720 * exp_ch4.adb (Handle_Changed_Representation): For an untagged
5721 derived type with a mixture of renamed and constrained parent
5722 discriminants, the constraint for the target must obtain the
5723 discriminant values from both the operand and from the stored
5724 constraint for it, given that the constrained discriminants are
5725 not visible in the object.
5726 * exp_ch5.adb (Make_Field_Assign): The type of the right-hand
5727 side may be derived from that of the left-hand side (as in the
5728 case of an assignment with a change of representation) so the
5729 discriminant to be used in the retrieval of the value of the
5730 component must be the entity in the type of the right-hand side.
5731
5732 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5733
5734 * sem_ch3.adb, sem_ch7.adb, sem_util.adb, g-debpoo.adb, sem_ch4.adb,
5735 sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5736 * exp_util.adb (Is_Source_Object): Account for
5737 the cases where the source object may appear as a dereference
5738 or within a type conversion.
5739 * exp_ch6.adb: Fix missing space in error message.
5740
5741 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5742
5743 * sem_prag.adb: Update description of Eliminate.
5744
5745 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5746
5747 * sem_attr.adb (Analyze_Attribute, case 'Loop_Entry): Handle
5748 properly an attribute reference 'Loop_Entry that appears in the
5749 list of indices of an indexed expression, to prevent an infinite
5750 loop in the compiler.
5751
5752 2017-09-06 Bob Duff <duff@adacore.com>
5753
5754 * s-fileio.adb (Name): Do not raise Use_Error for temp files.
5755
5756 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5757
5758 * sem_ch4.adb (Analyze_Set_Membership): If an alternative
5759 in a set membership is an overloaded enumeration literal, and
5760 the type of the alternative is resolved from a previous one,
5761 replace the entity of the alternative as well as the type,
5762 to prevent inconsistencies between the entity and the type.
5763
5764 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5765
5766 * ali.ads (ALIs_Record): Add No_Component_Reordering component.
5767 (No_Component_Reordering_Specified): New switch.
5768 * ali.adb (Initialize_ALI): Set No_Component_Reordering_Specified.
5769 (Scan_ALI): Set No_Component_Reordering and deal with NC marker.
5770 * bcheck.adb (Check_Consistent_No_Component_Reordering):
5771 New check.
5772 (Check_Configuration_Consistency): Invoke it.
5773 * debug.adb (d.r): Toggle the effect of the switch.
5774 (d.v): Change to no-op.
5775 * einfo.ads (Has_Complex_Representation):
5776 Restrict to record types.
5777 (No_Reordering): New alias for Flag239.
5778 (OK_To_Reorder_Components): Delete.
5779 (No_Reordering): Declare.
5780 (Set_No_Reordering): Likewise.
5781 (OK_To_Reorder_Components): Delete.
5782 (Set_OK_To_Reorder_Components): Likewise.
5783 * einfo.adb (Has_Complex_Representation): Expect record types.
5784 (No_Reordering): New function.
5785 (OK_To_Reorder_Components): Delete.
5786 (Set_Has_Complex_Representation): Expect base record types.
5787 (Set_No_Reordering): New procedure.
5788 (Set_OK_To_Reorder_Components): Delete.
5789 (Write_Entity_Flags): Adjust to above change.
5790 * fe.h (Debug_Flag_Dot_R): New macro and declaration.
5791 * freeze.adb (Freeze_Record_Type): Remove conditional code setting
5792 OK_To_Reorder_Components on record types with convention Ada.
5793 * lib-writ.adb (Write_ALI): Deal with NC marker.
5794 * opt.ads (No_Component_Reordering): New flag.
5795 (No_Component_Reordering_Config): Likewise.
5796 (Config_Switches_Type): Add No_Component_Reordering component.
5797 * opt.adb (Register_Opt_Config_Switches): Copy
5798 No_Component_Reordering onto No_Component_Reordering_Config.
5799 (Restore_Opt_Config_Switches): Restore No_Component_Reordering.
5800 (Save_Opt_Config_Switches): Save No_Component_Reordering.
5801 (Set_Opt_Config_Switches): Set No_Component_Reordering.
5802 * par-prag.adb (Prag): Deal with Pragma_No_Component_Reordering.
5803 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Also set the
5804 No_Reordering flag from the default.
5805 (Build_Derived_Private_Type): Likewise.
5806 (Build_Derived_Record_Type): Likewise. Then inherit it
5807 for untagged types and clean up handling of similar flags.
5808 (Record_Type_Declaration): Likewise.
5809 * sem_ch13.adb (Same_Representation): Deal with No_Reordering and
5810 remove redundant test on Is_Tagged_Type.
5811 * sem_prag.adb (Analyze_Pragma): Handle No_Component_Reordering.
5812 (Sig_Flags): Likewise.
5813 * snames.ads-tmpl (Name_No_Component_Reordering): New name.
5814 (Pragma_Id): Add Pragma_No_Component_Reordering value.
5815 * warnsw.adb (Set_GNAT_Mode_Warnings): Enable -gnatw.q as well.
5816 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
5817 Copy the layout of the parent type only if the No_Reordering
5818 settings match.
5819 (components_to_record): Reorder record types with
5820 convention Ada by default unless No_Reordering is set or -gnatd.r
5821 is specified and do not warn if No_Reordering is set in GNAT mode.
5822
5823 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5824
5825 * sem_util.ads, sem_util.adb (Check_Previous_Null_Procedure):
5826 new predicate to reject declarations that can be completions,
5827 when there is a visible prior homograph that is a null procedure.
5828 * sem_ch6.adb (Analyze_Null_Procedure): use it.
5829 * sem_ch8.adb (Analyze_Subprogram_Renaming): ditto.
5830
5831 2017-09-06 Thomas Quinot <quinot@adacore.com>
5832
5833 * s-regpat.adb (Compile.Parse_Literal): Fix handling of literal
5834 run of 253 characters or more.
5835
5836 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5837
5838 * einfo.adb (Designated_Type): Use Is_Incomplete_Type to handle
5839 properly incomplete subtypes that may be created by explicit or
5840 implicit declarations.
5841 (Is_Base_Type): Take E_Incomplete_Subtype into account.
5842 (Subtype_Kind): Ditto.
5843 * sem_ch3.adb (Build_Discriminated_Subtype): Set properly the
5844 Ekind of a subtype of a discriminated incomplete type.
5845 (Fixup_Bad_Constraint): Use Subtype_Kind in all cases, including
5846 incomplete types, to preserve error reporting.
5847 (Process_Incomplete_Dependents): Do not create a subtype
5848 declaration for an incomplete subtype that is created internally.
5849 * sem_ch7.adb (Analyze_Package_Specification): Handle properly
5850 incomplete subtypes that do not require a completion, either
5851 because they are limited views, of they are generic actuals.
5852
5853 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5854
5855 * checks.adb (Insert_Valid_Check): Remove the
5856 suspicious manipulation of the Do_Range_Check flag as ths is
5857 no linger needed. Suppress validity check when analysing the
5858 validation variable.
5859
5860 2017-09-06 Philippe Gil <gil@adacore.com>
5861
5862 * g-debpoo.adb: adapt GNAT.Debug_Pools to allow safe thread
5863 GNATCOLL.Memory
5864
5865 2017-09-06 Bob Duff <duff@adacore.com>
5866
5867 * sem_elim.adb: Minor comment fix.
5868
5869 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5870
5871 * sem_util.adb (Is_Object_Reference): A function call is an
5872 object reference, and thus attribute references for attributes
5873 that are functions (such as Pred and Succ) as well as predefined
5874 operators are legal in contexts that require an object, such as
5875 the prefix of attribute Img and the Ada2020 version of 'Image.
5876
5877 2017-09-06 Hristian Kirtchev <kirtchev@adacore.com>
5878
5879 * exp_util.adb, einfo.adb, sem_attr.adb, exp_ch4.adb, gnatls.adb,
5880 exp_ch3.adb, xoscons.adb: Minor reformatting.
5881
5882 2017-09-06 Raphael Amiard <amiard@adacore.com>
5883
5884 * a-chtgop.ads, a-chtgop.adb: Add versions of First and Next with
5885 Position parameter. If supplied, use it to provide efficient iteration.
5886 * a-cohase.ads, a-cohase.adb, a-cihama.ads, a-cihama.adb,
5887 a-cohama.ads, a-cohama.adb: Add/Use Position to provide efficient
5888 iteration.
5889
5890 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5891
5892 * exp_util.adb (Build_Allocate_Deallocate_Proc): If the
5893 designated type is class-wide and the expression is an unchecked
5894 conversion, preserve the conversion when checking the tag of the
5895 designated object, to prevent spurious semantic errors when the
5896 expression in the conversion has an untagged type (for example
5897 an address attribute).
5898
5899 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5900
5901 * sem_res.adb (Resolve_Entry_Call): Check whether a protected
5902 operation is subject to a pragma Eliminate.
5903
5904 2017-09-06 Ed Schonberg <schonberg@adacore.com>
5905
5906 * sem_elim.ads, exp_ch4.adb: Minor reformatting.
5907
5908 2017-09-06 Eric Botcazou <ebotcazou@adacore.com>
5909
5910 * fe.h (Eliminate_Error_Msg): Remove.
5911
5912 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5913
5914 * gcc-interface/utils.c (make_packable_type): Update call to
5915 mode_for_size_tree.
5916
5917 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
5918
5919 * gcc-interface/utils2.c (build_load_modify_store):
5920 Use int_mode_for_size.
5921
5922 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5923
5924 PR ada/62235
5925 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
5926 for Itypes that are E_Record_Subtype with a cloned subtype.
5927 <E_Record_Subtype>: Use the DECL of the cloned type directly, if any.
5928
5929 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5930
5931 * gcc-interface/trans.c (convert_with_check): Use a custom base type
5932 if the base type of the expression has a different machine mode.
5933 Rename a couple of parameters and local variable.
5934
5935 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5936
5937 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Address>: Do not strip
5938 conversions around prefixes that are not references.
5939
5940 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5941
5942 * gcc-interface/utils.c (unchecked_convert): When the result type is a
5943 non-biased integral type with size 0, set the result to 0 directly.
5944
5945 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5946
5947 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): Turn to
5948 (renaming_from_instantiation_p): ...this.
5949 * gcc-interface/decl.c (gnat_to_gnu_entity): Use inline predicate
5950 instead of explicit tests on kind of entities. Adjust for renaming.
5951 (gnat_to_gnu_profile_type): Likewise.
5952 (gnat_to_gnu_subprog_type): Likewise.
5953 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
5954 (Case_Statement_to_gnu): Likewise.
5955 (gnat_to_gnu): Likewise.
5956 (process_freeze_entity): Likewise.
5957 (process_type): Likewise.
5958 (add_stmt_with_node): Adjust for renaming.
5959 * gcc-interface/utils.c (gnat_pushdecl): Adjust for renaming.
5960 (renaming_from_generic_instantiation_p): Rename to...
5961 (renaming_from_instantiation_p): ...this. Use inline predicate.
5962 (pad_type_hasher::keep_cache_entry): Fold.
5963
5964 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5965
5966 * gcc-interface/trans.c (adjust_for_implicit_deref): New function.
5967 (gnat_to_gnu) <N_Explicit_Dereference>: Translate result type first.
5968 (N_Indexed_Component): Invoke adjust_for_implicit_deref on the prefix.
5969 (N_Slice): Likewise.
5970 (N_Selected_Component): Likewise. Do not try again to translate it.
5971 (N_Free_Statement): Invoke adjust_for_implicit_deref on the expression.
5972
5973 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5974
5975 * repinfo.ads: Document new treatment of dynamic values.
5976 (TCode): Bump upper bound to 29.
5977 (Dynamic_Val): New constant set to 29.
5978 * repinfo.adb (Print_Expr) <Dynamic_Val>: New case.
5979 (Rep_Value) <Dynamic_Val>: Likewise.
5980 * repinfo.h (Dynamic_Val): New macro.
5981 * gcc-interface/decl.c (annotate_value): Tidy up and cache result for
5982 DECL_P nodes too.
5983 <INTEGER_CST>: Set TCODE instead of recursing.
5984 <COMPONENT_REF>: Set TCODE instead of calling Create_Node manually.
5985 <VAR_DECL>: New case.
5986 <MULT_EXPR, PLUS_EXPR>: Fold conversions into inner operations.
5987 <BIT_AND_EXPR>: Adjust.
5988 <CALL_EXPR>: Do not fall through.
5989
5990 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5991
5992 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
5993 there is no target, do not create a temporary for the return value for
5994 an allocator either.
5995
5996 2017-09-05 Eric Botcazou <ebotcazou@adacore.com>
5997
5998 * gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
5999 unconstrained array type.
6000
6001 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6002 Alan Hayward <alan.hayward@arm.com>
6003 David Sherwood <david.sherwood@arm.com>
6004
6005 * gcc-interface/decl.c (validate_size): Use NARROWEST_INT_MODE
6006 instead of GET_CLASS_NARROWEST_MODE (MODE_INT).
6007
6008 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6009 Alan Hayward <alan.hayward@arm.com>
6010 David Sherwood <david.sherwood@arm.com>
6011
6012 * gcc-interface/decl.c (check_ok_for_atomic_type): Use
6013 is_a <scalar_int_mode>.
6014 * gcc-interface/trans.c (Pragma_to_gnu): Likewise.
6015 * gcc-interface/utils.c (gnat_type_for_mode): Likewise.
6016
6017 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6018 Alan Hayward <alan.hayward@arm.com>
6019 David Sherwood <david.sherwood@arm.com>
6020
6021 * gcc-interface/decl.c (gnat_to_gnu_entity): Use int_mode_for_size
6022 instead of mode_for_size.
6023 (gnat_to_gnu_subprog_type): Likewise.
6024 * gcc-interface/utils.c (make_type_from_size): Likewise.
6025
6026 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6027 Alan Hayward <alan.hayward@arm.com>
6028 David Sherwood <david.sherwood@arm.com>
6029
6030 * gcc-interface/misc.c (fp_prec_to_size): Use opt_scalar_float_mode.
6031 (fp_size_to_prec): Likewise.
6032
6033 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6034 Alan Hayward <alan.hayward@arm.com>
6035 David Sherwood <david.sherwood@arm.com>
6036
6037 * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
6038 <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
6039
6040 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6041 Alan Hayward <alan.hayward@arm.com>
6042 David Sherwood <david.sherwood@arm.com>
6043
6044 * gcc-interface/decl.c (validate_size): Update use of
6045 GET_MODE_WIDER_MODE, forcing a wider mode to exist.
6046
6047 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
6048 Alan Hayward <alan.hayward@arm.com>
6049 David Sherwood <david.sherwood@arm.com>
6050
6051 * gcc-interface/misc.c (fp_prec_to_size): Use new mode iterators.
6052 (fp_size_to_prec): Likewise.
6053
6054 2017-08-29 Martin Liska <mliska@suse.cz>
6055
6056 PR other/39851
6057 * gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.
6058
6059 2017-08-08 Martin Liska <mliska@suse.cz>
6060
6061 * gcc-interface/trans.c: Include header files.
6062
6063 2017-07-29 Jakub Jelinek <jakub@redhat.com>
6064
6065 * gcc-interface/utils.c (gnat_write_global_declarations): Pass false
6066 as new argument to the imported_module_or_decl debug hook.
6067
6068 2017-07-25 Javier Miranda <miranda@adacore.com>
6069
6070 * checks.adb (Apply_Divide_Checks): Ensure that operands are not
6071 evaluated twice.
6072
6073 2017-07-19 Jakub Jelinek <jakub@redhat.com>
6074
6075 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
6076 TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
6077 (TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.
6078
6079 2017-07-18 Mike Frysinger <vapier@chromium.org>
6080
6081 * gcc-interface/Makefile.in (../../gnatmake$(exeext)): Delete $(P).
6082 (../../gnatlink$(exeext)): Likewise.
6083
6084 2017-07-15 John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
6085
6086 PR ada/81446
6087 * system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
6088 (Backend_Overflow_Checks): Set to True.
6089
6090 2017-06-23 Jakub Jelinek <jakub@redhat.com>
6091
6092 * gcc-interface/trans.c (gnat_to_gnu): Initialize sync to false.
6093
6094 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
6095
6096 * gcc-interface/ada-tree.h (DECL_FUNCTION_IS_DEF): Update copyright
6097 notice. New macro.
6098 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Tag the subprogram
6099 as a definition.
6100 (Compilation_Unit_to_gnu): Tag the elaboration procedure as a
6101 definition.
6102 * gcc-interface/decl.c (gnat_to_gnu_entity): Tag declarations of
6103 imported subprograms for the current compilation unit as
6104 definitions. Disable debug info for references to variables.
6105 * gcc-interface/gigi.h (create_subprog_decl): Update declaration.
6106 * gcc-interface/utils.c (gnat_pushdecl): Add external DECLs that are
6107 not built-in functions to their binding scope.
6108 (create_subprog_decl): Add a DEFINITION parameter. If it is true, tag
6109 the function as a definition. Update all callers.
6110 (gnat_write_global_declarations): Emit debug info for imported
6111 functions. Filter out external variables for which debug info
6112 is disabled.
6113
6114 2017-06-15 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
6115
6116 PR ada/81105
6117 * gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
6118 (i[3456]86-pc-gnu): Likewise.
6119 (x86_64 kfreebsd): Likewise.
6120
6121 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6122
6123 PR bootstrap/80897
6124 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6125
6126 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
6127
6128 PR ada/81070
6129 * s-interr-hwint.adb: Reinstate.
6130 * gcc-interface/Makefile.in (RTEMS): Use it again.
6131
6132 2017-06-08 Olivier Hainque <hainque@adacore.com>
6133
6134 * vx_crtbegin_auto.c: Update year in copyright notice.
6135 * vx_crtbegin.c: Likewise.
6136 * vx_crtbegin.inc: Likewise.
6137 * vx_crtend.c: Likewise.
6138
6139 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
6140
6141 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
6142 * s-tpopsp-rtems.adb: Delete.
6143
6144 2017-06-02 Olivier Hainque <hainque@adacore.com>
6145
6146 * vx_crtbegin_auto.c: New file.
6147 * vx_crtbegin.c: New file.
6148 * vx_crtbegin.inc: New file.
6149 * vx_crtend.c: New file.
6150
6151 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
6152
6153 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
6154 const qualifiers that cause -Wignored-qualifiers warnings.
6155
6156 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6157
6158 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
6159 for Itypes that are E_Access_Subtype.
6160 <E_Access_Subtype>: Use the DECL of the base type directly.
6161
6162 2017-05-22 Ed Schonberg <schonberg@adacore.com>
6163 Eric Botcazou <ebotcazou@adacore.com>
6164
6165 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
6166 limited view may appear in the profile of a function, and a call to
6167 that function in another unit in which the full view is available must
6168 use this full view to spurious type errors at the point of call.
6169 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
6170 of parent body with a with clause for the main unit.
6171 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
6172 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
6173 types declared in external units like types from limited with clauses.
6174 Adjust final processing of defer_limited_with_list accordingly.
6175 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
6176 again to translate the prefix after the field if it is incomplete.
6177
6178 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
6179
6180 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
6181 alignment for simple volatile fields and remove associated errors.
6182
6183 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6184
6185 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
6186 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
6187
6188 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
6189
6190 * gcc-interface/utils.c (can_materialize_object_renaming_p):
6191 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
6192 process Original_Node instead of expanded names.
6193
6194 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6195
6196 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
6197 addressability check in the constrained case.
6198
6199 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6200
6201 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
6202 types not coming from a limited context.
6203
6204 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6205
6206 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
6207 the inlined list that are not public.
6208 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
6209 there is a pragma Inline_Always on the subprogram.
6210
6211 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6212
6213 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
6214 <N_Allocator>: Use properly typed constants.
6215 (extract_values): Move around.
6216 (pos_to_constructor): Minor tweaks.
6217 (Sloc_to_locus): Fix formatting.
6218 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
6219 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
6220 (Gigi_Equivalent_Type): Adjust head comment.
6221 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
6222
6223 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
6224
6225 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
6226 is a representation clause on an extension, propagate the alignment of
6227 the parent type only if the platform requires strict alignment.
6228
6229 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
6230
6231 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
6232 instead of Word_Size.
6233
6234 Revert
6235 2017-03-28 Andreas Schwab <schwab@suse.de>
6236
6237 PR ada/80117
6238 * system-linux-aarch64-ilp32.ads: New file.
6239 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
6240 from LIBGNAT_TARGET_PAIRS.
6241 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
6242 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
6243 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
6244 or -mabi=ilp32, resp.
6245
6246 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
6247
6248 PR ada/80626
6249 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
6250 instead of Word_Size.
6251
6252 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6253
6254 * raise-gcc.c (exception_class_eq): Make ec parameter const.
6255
6256 2017-05-02 Richard Biener <rguenther@suse.de>
6257
6258 * gcc-interface/misc.c (gnat_post_options): Do not set
6259 -fstrict-overflow.
6260
6261 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6262
6263 * gcc-interface/trans.c (assoc_to_constructor): Make sure
6264 Corresponding_Discriminant is only called on discriminants.
6265 Skip the saving of the result only for them.
6266 (gnat_to_gnu) <N_Selected_Component>: Likewise.
6267 <N_Unchecked_Type_Conversion>: Translate the result type first.
6268 (gigi): Set TREE_NOTHROW on Begin_Handler.
6269 (stmt_list_cannot_raise_p): New predicate.
6270 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
6271 a cleanup if the statements of the handler cannot raise.
6272 (process_freeze_entity): Use Is_Record_Type.
6273 (process_type): Likewise.
6274
6275 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6276
6277 * einfo.ads (Corresponding_Record_Component): New alias
6278 for Node21 used for E_Component and E_Discriminant.
6279 * einfo.adb (Corresponding_Record_Component): New function.
6280 (Set_Corresponding_Record_Component): New procedure.
6281 (Write_Field21_Name): Handle Corresponding_Record_Component.
6282 * sem_ch3.adb (Inherit_Component): Set
6283 Corresponding_Record_Component for every component in
6284 the untagged case. Clear it afterwards for non-girder
6285 discriminants.
6286 * gcc-interface/decl.c (gnat_to_gnu_entity)
6287 <E_Record_Type>: For a derived untagged type with discriminants
6288 and constraints, apply the constraints to the layout of the
6289 parent type to deduce the layout.
6290 (field_is_aliased): Delete.
6291 (components_to_record): Test DECL_ALIASED_P directly.
6292 (annotate_rep): Check that fields are present except for
6293 an extension.
6294 (create_field_decl_from): Add DEBUG_INFO_P
6295 parameter and pass it in recursive and other calls. Add guard
6296 for the manual CSE on the size.
6297 (is_stored_discriminant): New predicate.
6298 (copy_and_substitute_in_layout): Consider only
6299 stored discriminants and check that original fields are present
6300 in the old type. Deal with derived types. Adjust call to
6301 create_variant_part_from.
6302
6303 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6304
6305 * exp_ch6.adb (Expand_Call_Helper): When locating the
6306 accessibility entity created for an access parameter, handle
6307 properly a reference to a formal of an enclosing subprogram. if
6308 the reference appears in an inherited class-wide condition, it
6309 is the rewriting of the reference in the ancestor expression,
6310 but the accessibility entity must be that of the current formal.
6311
6312 2017-05-02 Javier Miranda <miranda@adacore.com>
6313
6314 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
6315 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
6316 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
6317 Call Expand_Non_Binary_Modular_Op.
6318
6319 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6320
6321 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
6322 has discriminants, do not override the Stored_Constraint list of
6323 the full view of the derived type with that of the derived type.
6324
6325 2017-05-02 Bob Duff <duff@adacore.com>
6326
6327 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
6328
6329 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6330
6331 * s-os_lib.ads: Minor typo fix.
6332
6333 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6334
6335 * gnatls.adb: Merge and refactor code from Prj.Env and remove
6336 this deprecated dependency.
6337
6338 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6339
6340 * exp_util.ads: minor comment addition.
6341
6342 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6343
6344 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
6345 pastos in part #3 of the head comment.
6346
6347 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6348
6349 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
6350 procedure body for a local (sub)type declaration within a
6351 predicate function. Invariant checks do not apply to these, and
6352 the expansion of the procedure will happen in the wrong scope,
6353 leading to misplaced freeze nodes.
6354
6355 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6356
6357 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
6358 to analyze generated actions. If the main unit is a body,
6359 the required scope is that of the corresponding unit declaration.
6360
6361 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6362
6363 * einfo.adb (Declaration_Node): flip branches of
6364 an IF statement to avoid repeated negations in its condition;
6365 no change in semantics, only to improve readability.
6366
6367 2017-05-02 Arnaud Charlet <charlet@adacore.com>
6368
6369 * sem_case.adb: Remove extra spaces in parameter declarations.
6370
6371 2017-05-02 Justin Squirek <squirek@adacore.com>
6372
6373 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
6374 in usage line for new -gnatwE switch.
6375
6376 2017-05-02 Claire Dross <dross@adacore.com>
6377
6378 * a-cofuve.ads (Remove): Remove unnecessary
6379 conditions in precondition.
6380
6381 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
6382
6383 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
6384 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
6385
6386 2017-05-02 Justin Squirek <squirek@adacore.com>
6387
6388 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6389 alternative expression.
6390 * sem_res.adb (Resolve_Case_Expression): Ditto.
6391
6392 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6393
6394 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
6395 Refine predicate for the case where the primitive operation
6396 is a renaming of equality. An overriding operation that is
6397 a user-defined renaming of predefined equality inherits its
6398 slot from the overridden operation. Otherwise it is treated
6399 as a predefined op and occupies the same predefined slot as
6400 equality. A call to it is transformed into a call to its alias,
6401 which is the predefined equality. A dispatching call thus uses
6402 the proper slot if operation is further inherited and called
6403 with class-wide arguments.
6404
6405 2017-05-02 Justin Squirek <squirek@adacore.com>
6406
6407 * errout.adb (Set_Msg_Text): Add a case to switch the message
6408 type when the character '[' is detected signifying a warning
6409 about a run-time exception.
6410 * opt.ads Add a new Warning_Mode value for new switch
6411 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
6412 to handle new warning mode
6413 * usage.adb (Usage): Add usage entry for -gnatwE
6414 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
6415
6416 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6417
6418 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
6419 declaration that operates on some fixed point type.
6420
6421 2017-05-02 Justin Squirek <squirek@adacore.com>
6422
6423 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
6424
6425 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6426
6427 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
6428
6429 2017-05-02 Justin Squirek <squirek@adacore.com>
6430
6431 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
6432 expression (Analyze_If_Expression): Add check for valid condition
6433 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
6434 on case-expression
6435 * sem_res.adb (Resolve_If_Expression): Add check for valid
6436 condition and then-expression.
6437
6438 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6439
6440 * exp_ch3.adb (Build_Initialization_Call): Generate a null
6441 statement if the initialization call is a null procedure, as
6442 can happen with a controlled type with no explicit Initialize
6443 procedure, or an array of such.
6444 * exp_ch7.adb (Process_Object_Declaration): For a type with
6445 controlled components that has a trivial Initialize procedure,
6446 insert declaration for finalization counter after object
6447 declaration itself.
6448 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
6449 finalization block and attendant declarations if component has
6450 a trivial Initialize procedure.
6451 (Make_Init_Call): Do not generate a call if controlled type has
6452 a trivial Initialize procedure.
6453
6454 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6455
6456 * g-forstr.ads (Data): Move Format component last.
6457 * g-forstr.adb ("+"): Adjust for above change.
6458 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
6459 * g-sechas.ads (Context): Move Key last.
6460 * g-socket.ads (Service_Entry_Type): Move Aliases last.
6461 * s-fileio.adb (Temp_File_Record): Move Name last.
6462 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
6463 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
6464
6465 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
6466
6467 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
6468 switch introduced recently. finally not needed.
6469
6470 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6471
6472 * sem_ch6.adb (Analyze_Null_Procedure): Set the
6473 Corresponding_Body link for a null procedure declaration.
6474
6475 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6476
6477 * atree.h (Flag290): Add missing terminating parenthesis.
6478 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
6479 (Set_Is_Class_Wide_Clone): Likewise.
6480 * einfo.ads (Is_Class_Wide_Clone): Likewise.
6481
6482 2017-05-02 Gary Dismukes <dismukes@adacore.com>
6483
6484 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
6485 parameter Array_Comp to indicate the case of an array object
6486 with null-excluding components.
6487 * checks.adb (Null_Exclusion_Static_Checks):
6488 Call Compile_Time_Constraint_Error instead of
6489 Apply_Compile_Time_Constraint_Error in the component case. Also
6490 call that when Array_Comp is True, with an appropriate warning for
6491 the array component case. Only create an explicit initialization
6492 by null in the case of an object of a null-excluding access type
6493 (and no longer do that in the component case).
6494 * sem_ch3.adb (Check_Component): Add a Boolean parameter
6495 Array_Comp defaulted to False. Pass Empty for the Comp
6496 actual when calling Null_Exclusion_Static_Checks in the case
6497 where Comp_Decl matches Object_Decl, because we don't have a
6498 component in that case. In the case of an object or component
6499 of an array type, pass True for Array_Comp on the recursive call
6500 to Check_Component.
6501
6502 2017-05-02 Bob Duff <duff@adacore.com>
6503
6504 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
6505 compute the linux priority from the Ada priority. Call this everywhere
6506 required. In particular, the previous version was not doing this
6507 computation when setting the ceiling priority in various places. It
6508 was just converting to C.int, which results in a ceiling that is off
6509 by 1.
6510
6511 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6512
6513 * sem_ch3.adb: Comment predicate inheritance.
6514
6515 2017-05-02 Tristan Gingold <gingold@adacore.com>
6516
6517 * s-trasym.ads: Add comment.
6518
6519 2017-05-02 Bob Duff <duff@adacore.com>
6520
6521 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
6522 * sem_ch4.adb: Minor reformatting.
6523 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
6524 * s-taspri-posix-noaltstack.ads: Minor refactoring.
6525 * sinput.ads: Minor typo fix.
6526
6527 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6528
6529 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
6530 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
6531 here from exp_ch9, to recognize objects whose creation requires
6532 dynamic allocation, so that the proper warning can be emitted
6533 when restriction No_Implicit_Heap_Allocation is in effect.
6534 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
6535 to emit proper warning when an object that requires dynamic
6536 allocation is declared.
6537
6538 2017-05-02 Tristan Gingold <gingold@adacore.com>
6539
6540 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
6541
6542 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6543
6544 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
6545 visibility rules for equality operators that apply within an
6546 instantiation apply within an inlined body.
6547 * sem_type.adb (Add_One_Interp): ditto.
6548
6549 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6550
6551 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
6552 procedures.
6553
6554 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6555
6556 * snames.ads-tmpl
6557 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
6558 Name_No_Tagged_Streams): Move to regular pragmas. Add
6559 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
6560 and Secondary_Stack_Size.
6561 (Pragma_Id): Move Pragma_Assume,
6562 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
6563 Pragma_No_Tagged_Streams to second part.
6564
6565 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6566
6567 * exp_attr.adb: Minor reformatting.
6568
6569 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6570
6571 * sem_ch4.adb (Analyze_Selected_Component): Improve error
6572 detection for illegal references to private components or
6573 operations of a protected type in the body of the type.
6574
6575 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6576
6577 * opt.ads: Add missing GNAT markers in comments.
6578 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
6579 settings of Optimize_Alignment at the end.
6580
6581 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6582
6583 * checks.adb (Apply_Constraint_Check): Do not apply
6584 a discriminant check when the associated type is a constrained
6585 subtype created for an unconstrained nominal type.
6586 * exp_attr.adb: Minor reformatting.
6587
6588 2017-05-02 Bob Duff <duff@adacore.com>
6589
6590 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
6591 the N_Raise_Expression case.
6592 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
6593 and add assertions.
6594
6595 2017-05-02 Yannick Moy <moy@adacore.com>
6596
6597 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
6598 optimize length comparison in GNATprove mode.
6599 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
6600 operator /= into negation of operator = when needed.
6601 (Expand_SPARK): Call new
6602 function to expand operator /=.
6603
6604 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6605
6606 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
6607 Simplify the expression for a fixed-fixed division to remove
6608 divisions by constants whenever possible, as an optimization
6609 for restricted targets.
6610
6611 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
6612
6613 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
6614
6615 2017-05-02 Bob Duff <duff@adacore.com>
6616
6617 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
6618 to find primitive ops, instead of using an Identifier that will
6619 later be looked up. This is necessary because these ops are not
6620 necessarily visible at all places where we need to call them.
6621 * exp_util.ads: Minor comment fix.
6622
6623 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6624
6625 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
6626 references are fully conformant if they are both expansions
6627 of the discriminant of a protected type, within one of the
6628 protected operations. One occurrence may be expanded into a
6629 constant declaration while the other is an input parameter to
6630 the corresponding generated subprogram.
6631
6632 2017-05-02 Justin Squirek <squirek@adacore.com>
6633
6634 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
6635 recursivly searching composite-types for null-excluding access
6636 types and verifying them.
6637 (Analyze_Object_Declaration): Add a
6638 call to Check_Null_Excluding_Components for static verification
6639 of non-initialized objects.
6640 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
6641 a parameter for a composite-type's component and an extra case
6642 for printing component information.
6643
6644 2017-05-02 Yannick Moy <moy@adacore.com>
6645
6646 * sem_ch10.adb (Analyze_Subunit): Take
6647 configuration pragma into account when restoring appropriate
6648 pragma for analysis of subunit.
6649
6650 2017-05-02 Justin Squirek <squirek@adacore.com>
6651
6652 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
6653 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
6654 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
6655 clauses from the runtime.
6656
6657 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
6658
6659 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
6660 array components specially.
6661
6662 2017-05-02 Ed Schonberg <schonberg@adacore.com>
6663
6664 * sem_ch8.adb (Premature_Usage): If the premature usage of
6665 an entity is as the expression in its own object decaration,
6666 rewrite the reference as Any_Id to prevent cascaded errors or
6667 compiler loops when such an entity is used in an address clause.
6668
6669 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6670
6671 * gcc-interface/decl.c (components_to_record): Add missing guard.
6672
6673 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
6674
6675 * gcc-interface/decl.c (components_to_record): Add more comments.
6676 Put back pending fields onto the regular list if the misalignment
6677 happens to cancel itself.
6678
6679 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6680
6681 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
6682 controlling actual in a prefixed call, preserve the original node
6683 information if the prefix itself has been rewritten, for ASIS use.
6684
6685 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6686
6687 * exp_ch6.adb (Insert_Post_Call_Actions):
6688 Code clean up. Insert the post-call actions after an enclosing
6689 procedure call when N denotes a function call and appears as an
6690 actual parameter in the procedure call.
6691
6692 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6693
6694 * freeze.adb (Check_Component_Storage_Order): If there is a clause
6695 for the component, also reject the attribute if the component
6696 doesn't end on a byte boundary and its scalar storage order is
6697 different from that of the enclosing record type.
6698
6699 2017-04-28 Javier Miranda <miranda@adacore.com>
6700
6701 * atree.ads (Info_Messages): Removed.
6702 (Warning_Info_Messages): New counter.
6703 (Report_Info_Messages): New counter.
6704 * err_vars.ads Update documentation.
6705 * errout.adb (Delete_Warning_And_Continuations): Update
6706 Info_Message occurrences.
6707 (Error_Msg_Internal): Update Info_Message occurrences.
6708 (Delete_Warning): Update Info_Message occurrences.
6709 (Write_Error_Summary): Update Info_Message occurrences.
6710 (Output_Messages): Update Info_Message occurrences.
6711 (To_Be_Removed): Update Info_Message occurrences.
6712 (Reset_Warnings): Update Info_Message occurrences.
6713 * errutil.adb (Error_Msg): Update Info_Message occurrences.
6714 (Finalize): Update Info_Message occurrences.
6715 (Initialize): Update Info_Message occurrences.
6716 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
6717 (Compilation_Errors): Update Info_Message_Occurences.
6718
6719 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6720
6721 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
6722 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
6723 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
6724 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
6725 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
6726 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
6727 Y_Size.
6728 * sem_eval.adb (Why_Not_Static): Initialize Typ.
6729 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
6730
6731 2017-04-28 Bob Duff <duff@adacore.com>
6732
6733 * sem_util.ads, sem_util.adb (Might_Raise): New function
6734 that replaces Is_Exception_Safe, but has the opposite
6735 sense. Is_Exception_Safe was missing various cases -- calls inside
6736 a pragma Debug, calls inside an 'if' or assignment statement,
6737 etc. Might_Raise now walks the entire subtree looking for things
6738 that can raise.
6739 * exp_ch9.adb (Is_Exception_Safe): Remove.
6740 (Build_Protected_Subprogram_Body): Replace call to
6741 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
6742 constants where possible).
6743 * exp_ch7.adb: Rename Is_Protected_Body -->
6744 Is_Protected_Subp_Body. A protected_body is something different
6745 in the grammar.
6746
6747 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6748
6749 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
6750 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
6751 (P_Discrete_Choice_List): Initialize Expr_Node variable.
6752 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
6753 (P_Protected): Likewise.
6754 * sem_case.adb (Check_Duplicates):
6755 Add pragma Warnings on variable.
6756 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
6757 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
6758 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
6759 (Analyze_Exit_Statement): Initialize Scope_Id variable.
6760 (Analyze_Iterator_Specification): Initialize Bas variable.
6761 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
6762 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
6763 (Analyze_Accept_Statement): Initialize Task_Nam.
6764
6765 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6766
6767 * checks.adb (Install_Primitive_Elaboration_Check):
6768 Do not generate an elaboration check if all checks have been
6769 suppressed.
6770
6771 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6772
6773 * sem_ch13.adb (Analyze_Aspect_Specifications, case
6774 Interrupt_Handler and Attach_Handler): Generate reference
6775 to protected operation to prevent spurious warnings about
6776 unreferenced entities. Previous scheme failed with style checks
6777 enabled.
6778
6779 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6780
6781 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
6782 that follows an expression function must not be relocated to
6783 the generated body, because it applies to the code that follows.
6784
6785 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6786
6787 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
6788 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
6789 code that might violate the more stringent checking for 'Access
6790 introduced in Ada 2005.
6791
6792 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6793
6794 * a-cforse.adb: minor style fix in comment.
6795
6796 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6797
6798 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
6799 initialize Block_Decls variable.
6800 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
6801 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
6802 * exp_disp.adb (Expand_Interface_Actuals): Initialize
6803 Formal_DDT and Actual_DDT variables.
6804 (Expand_Interface_Thunk): Initialize Iface_Formal.
6805 (Make_DT): Initialize Size_Comp.
6806 (Make_Select_Specific_Data_Table): Initialize Decls.
6807 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
6808 Also initialize more RPC_Receiver_* variables.
6809 (Build_To_Any_Function): Initialize Cstr_Formal.
6810 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
6811
6812 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6813
6814 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
6815 node between access types, freeze the designated type as well,
6816 so that dispatch table pointers are created in the proper scope,
6817 and not in the constructed body of the expression function.
6818
6819 2017-04-28 Bob Duff <duff@adacore.com>
6820
6821 * alloc.ads (Nodes_Initial): Go back to previous value. The large
6822 value makes large compilations faster, but small compilations slower.
6823
6824 2017-04-28 Arnaud Charlet <charlet@adacore.com>
6825
6826 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
6827
6828 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6829
6830 * erroutc.adb (Compilation_Errors): Do not consider info messages
6831 as suitable warnings when warnings must be treated as errors.
6832 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
6833 internally-generated packages when outputting completion
6834 information.
6835 * errout.adb (Output_Messages): Do not consider info messages as
6836 suitable warnings when warnings must be treated as errors.
6837 * errutil.adb (Finalize): Do not consider info messages as
6838 suitable warnings when warnings must be treated as errors.
6839
6840 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
6841
6842 * warnsw.ads: Minor fix for incorrect wording in comment.
6843
6844 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6845
6846 * sem_res.adb (In_Instance_Code): New predicate in
6847 Valid_Conversion, to determine whether a type conversion appears
6848 as (or within) an actual for a formal object. Type conversions
6849 in instances are not rechecked in Valid_Conversion because
6850 visibility changes between generic location andi instance may
6851 lead to spurious errors, but conversions within an actual must be
6852 fully checked, and they are not fully resolved when pre-analyzing
6853 the actuals.
6854
6855 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6856
6857 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
6858 New_Copy_Tree instead of Relocate_Node as any subsequent copies
6859 of the relocated node will have mangled Parent pointers.
6860 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
6861 tables used in conjunction with entity and itype replication.
6862 (Visit_Entity): Rewrite the restriction on which entities
6863 require duplication. The restriction now includes all types.
6864
6865 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6866
6867 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
6868 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
6869 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
6870 cleanups.
6871
6872 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
6873
6874 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
6875 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
6876
6877 2017-04-28 Gary Dismukes <dismukes@adacore.com>
6878
6879 * exp_util.adb: Minor reformatting.
6880
6881 2017-04-28 Ed Schonberg <schonberg@adacore.com>
6882
6883 * sem_ch4.adb: Fix copy/pasto.
6884
6885 2017-04-27 Tristan Gingold <gingold@adacore.com>
6886
6887 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
6888 raise-gcc.c. Fix include search path for raise-gcc.c
6889
6890 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
6891
6892 * fe.h (Warn_On_Questionable_Layout): Declare.
6893 * warnsw.ads (Warn_On_Record_Holes): Move down.
6894 (Warn_On_Questionable_Layout): New boolean variable.
6895 (Warning_Record): Add Warn_On_Questionable_Layout field.
6896 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
6897 (Restore_Warnings): Likewise.
6898 (Save_Warnings): Likewise.
6899 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
6900 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
6901 components_to_record.
6902 (gnu_field_to_gnat): New function.
6903 (warn_on_field_placement): Likewise.
6904 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
6905 parameters. Rename local variables and adjust recursive call.
6906 Rework final scan of the field list and implement warnings on the
6907 problematic placement of specific sorts of fields.
6908
6909 2017-04-27 Bob Duff <duff@adacore.com>
6910
6911 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
6912 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
6913 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
6914 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
6915 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
6916 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
6917 For efficiency, cache results of Is_Internal_File_Name and
6918 Is_Predefined_File_Name in the Units table. This avoids a lot
6919 of repeated text processing.
6920
6921 2017-04-27 Emmanuel Briot <briot@adacore.com>
6922
6923 * g-comlin.adb (Sort_Sections): remove useless test.
6924
6925 2017-04-27 Claire Dross <dross@adacore.com>
6926
6927 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
6928 allow the use of regular equality over elements in contracts.
6929 (Formal_Model): Ghost package containing model functions that are
6930 used in subprogram contracts.
6931 (Current_To_Last): Removed, model functions should be used instead.
6932 (First_To_Previous): Removed, model functions should be used instead.
6933 (Strict_Equal): Removed, model functions should be used instead.
6934 (No_Overlap): Removed, model functions should be used instead.
6935 (Equivalent_Keys): Functions over cursors are removed. They were
6936 awkward with explicit container parameters.
6937 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
6938 allow the use of regular equality over elements in contracts.
6939 (Formal_Model): Ghost package containing model functions that
6940 are used in subprogram contracts.
6941 (Current_To_Last): Removed, model functions should be used instead.
6942 (First_To_Previous): Removed, model functions should be used instead.
6943 (Strict_Equal): Removed, model functions should be used instead.
6944 (No_Overlap): Removed, model functions should be used instead.
6945
6946 2017-04-27 Yannick Moy <moy@adacore.com>
6947
6948 * gnat1drv.adb: Code cleanup.
6949
6950 2017-04-27 Ed Schonberg <schonberg@adacore.com>
6951
6952 * exp_util.adb (Replace_Entity): The prefix of a 'Result
6953 attribute reference in a post- condition is the subprogram to
6954 which the condition applies. If the condition is inherited
6955 by a type extension, the prefix becomes a reference to the
6956 inherited operation, but there is no need to create a wrapper
6957 for this operation, because 'Result is expanded independently
6958 when elaborating the postconditions.
6959
6960 2017-04-27 Bob Duff <duff@adacore.com>
6961
6962 * sinput.adb: Minor code cleanup.
6963 * namet.adb (Append): Create faster versions of
6964 Append(String) and Append(Name_Id) by using slice assignment
6965 instead of loops.
6966 * sem_util.adb (In_Instance): Speed this up by removing
6967 unnecessary tests; Is_Generic_Instance is defined for all
6968 entities.
6969 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
6970 Remove unused function.
6971 * alloc.ads (Nodes_Initial): Use a much larger value, because
6972 the compiler was spending a lot of time copying the nodes table
6973 when it grows. This number was chosen in 1996, so is rather out
6974 of date with current memory sizes. Anyway, it's virtual memory.
6975 Get rid of Orig_Nodes_...; use Node_... instead.
6976 * atree.adb (Lock): Do not release the Nodes tables; it's a
6977 waste of time.
6978 Orig_Nodes_ ==> Nodes_
6979 * nlists.adb: Orig_Nodes_ ==> Nodes_
6980 * g-table.adb: Remove unused "with" clause.
6981 * g-table.ads, table.ads: Remove Big_Table_Type, which should
6982 not be used by clients.
6983 * g-dyntab.adb (Last_Allocated): New function
6984 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
6985
6986 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6987
6988 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
6989 check.
6990 (Subtypes_Statically_Match): Remove duplicate check.
6991 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
6992
6993 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
6994
6995 * exp_aggr.adb (Replace_Type): Remove the special processing
6996 for selected components.
6997 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
6998 processing for attributes Fixed_Value and Integer_Value.
6999 * exp_util.adb (Side_Effect_Free): Merge the processing for
7000 qualified expressions, type conversions, and unchecked type
7001 conversions.
7002 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
7003 and Optional.
7004 * par-ch3.adb (P_Declarative_Items): Merge the processing for
7005 tokens function, not, overriding, and procedure.
7006 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
7007 for qualified expressions, type conversions, and unchecked
7008 type conversions.
7009 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
7010 processing for Ada 83 and instances.
7011 (Object_Access_Level): Merge the processing for indexed components
7012 and selected components.
7013 * uname.adb (Add_Node_Name): Merge the processing for stubs.
7014
7015 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7016
7017 * checks.adb (Install_Primitive_Elaboration_Check):
7018 Do not generate the check when restriction No_Elaboration_Code
7019 is in effect.
7020
7021 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7022
7023 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
7024 of Expand_Dispatching_Call. If the denoted subprogram has a
7025 class-wide precondition, this is the only precondition that
7026 applies to the call, rather that the class-wide preconditions
7027 that may apply to the body that is executed. (This is specified
7028 in AI12-0195).
7029
7030 2017-04-27 Yannick Moy <moy@adacore.com>
7031
7032 * gnat1drv.adb (Adjust_Global_Switches): Issue
7033 a warning in GNATprove mode if the runtime library does not
7034 support IEEE-754 floats.
7035
7036 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7037
7038 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
7039 is itself inherited it does not carry any contract information,
7040 so examine its parent operation which is its Alias.
7041
7042 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7043
7044 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
7045 prefix can be an object reference in which case Obj'Image (X)
7046 can only be interpreted as an indexing of the parameterless
7047 version of the attribute.
7048 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
7049 an indexing or a slice operation if the attribute does not require
7050 parameters. In Ada2012 'Image also belongs in this category,
7051 and A'Image (lo .. hi) is legal and must be parsed as a slice.
7052
7053 2017-04-27 Yannick Moy <moy@adacore.com>
7054
7055 * exp_ch4.adb: Minor reformatting.
7056 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
7057 disable the CodePeer and C generation modes. Similar to the
7058 opposite actions done in CodePeer mode.
7059
7060 2017-04-27 Yannick Moy <moy@adacore.com>
7061
7062 * sem_res.adb: Remove duplicate code.
7063 * sem_attr.adb: Delete duplicate code.
7064
7065 2017-04-27 Bob Duff <duff@adacore.com>
7066
7067 * g-dyntab.adb: Reduce the amount of copying in
7068 Release. No need to copy items past Last.
7069
7070 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7071
7072 * checks.adb Add with and use clauses for Sem_Disp.
7073 (Install_Primitive_Elaboration_Check): New routine.
7074 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
7075 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
7076 processing of 'Elaborated.
7077 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
7078 elaboration check.
7079
7080 2017-04-27 Bob Duff <duff@adacore.com>
7081
7082 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
7083 If the table grows and then shrinks back to empty, we won't necessarily
7084 point back to the empty array. Code cleanups.
7085 * sinput.ads: Add 'Base to Size clause to match the declared
7086 component subtypes.
7087
7088 2017-04-27 Claire Dross <dross@adacore.com>
7089
7090 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
7091 allow the use of regular equality over elements in contracts.
7092 (Formal_Model): Ghost package containing model functions that
7093 are used in subprogram contracts.
7094 (Current_To_Last): Removed, model functions should be used instead.
7095 (First_To_Previous): Removed, model functions should be used instead.
7096 (Strict_Equal): Removed, model functions should be used instead.
7097 (No_Overlap): Removed, model functions should be used instead.
7098 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
7099 Boolean generic parameter to disable contracts for equivalence
7100 between keys.
7101 (Witness): Create a witness of a key that is used for handling of
7102 equivalence between keys.
7103 (Has_Witness): Check whether a witness is contained in a map.
7104 (W_Get): Get the element associated to a witness.
7105 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
7106 directly.
7107 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
7108 Boolean generic parameter to disable contracts for equivalence
7109 between keys.
7110 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
7111 of equivalence on functional maps.
7112 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
7113 of equivalence on functional maps.
7114
7115 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7116
7117 * exp_ch9.adb (Expand_Entry_Barrier): Code
7118 cleanup. Do not perform the optimization which removes the
7119 declarations of the discriminant and component renamings when
7120 validity checks on operands and attributes are in effect.
7121
7122 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7123
7124 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
7125 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
7126 a-cfhama.ads, a-cofove.ads: Minor reformatting.
7127
7128 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7129
7130 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
7131 pointer dereference.
7132 * g-spipat.adb (Dump): Code clean up. Protect against a possible
7133 null pointer dereference.
7134
7135 2017-04-27 Bob Duff <duff@adacore.com>
7136
7137 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
7138 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
7139 Free renames Init, since they do the same thing.
7140 * g-table.ads: Default for Table_Low_Bound.
7141 * table.ads: Default for Table_Low_Bound, Table_Initial, and
7142 Table_Increment.
7143
7144 2017-04-27 Bob Duff <duff@adacore.com>
7145
7146 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
7147 can reallocate.
7148 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
7149 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
7150 Reorder code so that above assertions do not fail.
7151 * table.ads: Remove obsolete comment on Locked.
7152
7153 2017-04-27 Claire Dross <dross@adacore.com>
7154
7155 * a-cfdlli.ads: Code cleanup.
7156
7157 2017-04-27 Yannick Moy <moy@adacore.com>
7158
7159 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
7160 when needed for proof. (Expand_SPARK): Call the new procedure.
7161 * exp_util.ads Fix typo.
7162
7163 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7164
7165 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
7166 fixes.
7167
7168 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7169
7170 * sem_elab.adb Add new type Visited_Element
7171 and update the contents of table Elab_Visited. Various code clean up.
7172 (Check_Elab_Call): Determine whether a prior call to
7173 the same subprogram was already examined within the same context.
7174 (Check_Internal_Call_Continue): Register the subprogram being
7175 called as examined within a particular context. Do not suppress
7176 elaboration warnings.
7177
7178 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7179
7180 * xoscons.adb, osint.ads: Minor reformatting.
7181
7182 2017-04-27 Bob Duff <duff@adacore.com>
7183
7184 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
7185 Table_Count_Type --> Table_Last_Type, because the name
7186 was confusing (a "count" usually starts at zero). Add
7187 functionality supported or needed by other tables packages
7188 (Move, Release_Threshold).
7189 * g-table.ads, g-table.adb: This is now just a thin wrapper
7190 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
7191 or needed by other tables packages (Save, Restore).
7192 * table.ads, table.adb: This is now just a thin wrapper around
7193 * g-table.ads/g-table.adb.
7194 * namet.h, scos.h, uintp.h: These files are reaching into the
7195 private data of some instances of g-table, whose names changed,
7196 so the above change requires some adjustment here. It now uses
7197 public interfaces.
7198
7199 2017-04-27 Bob Duff <duff@adacore.com>
7200
7201 * namet.adb, namet.ads: Minor: remove unused procedures.
7202
7203 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7204
7205 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
7206 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
7207 Add pragma Warnings on Rtype variable in nested block. *
7208 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
7209 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
7210 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
7211 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
7212 (Process_Component_List_For_Finalize): Initialize Counter_Id.
7213 (Build_Finalize_Statements): Initialize Bod_Stmts.
7214 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
7215
7216 2017-04-27 Claire Dross <dross@adacore.com>
7217
7218 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
7219 allow the use of regular equality over elements in contracts.
7220 (Formal_Model): Ghost package containing model functions that are
7221 used in subprogram contracts.
7222 (Current_To_Last): Removed, model
7223 functions should be used instead.
7224 (First_To_Previous): Removed, model functions should be used instead.
7225 (Strict_Equal): Removed, model functions should be used instead.
7226 (No_Overlap): Removed, model functions should be used instead.
7227 (Equivalent_Keys): Functions over cursors are removed. They were
7228 awkward with explicit container parameters.
7229 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
7230 (proof only) procedure to help GNATprove when equivalence over
7231 keys is not equality.
7232
7233 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7234
7235 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
7236 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
7237 Minor reformatting and code cleanups.
7238
7239 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7240
7241 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
7242 subsidiary of Check_Inherited_Conditions, to build pragmas for an
7243 operation whose ancestor has classwide pre/postconditions. This
7244 is used both to check the legality of the inheritance in Ada
7245 and in SPARK, and to determine whether a wrapper is needed for
7246 an inherited operation.
7247 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
7248 Improve placement of error message for inherited classwide
7249 conditions that become illegal on type derivation.
7250
7251 2017-04-27 Yannick Moy <moy@adacore.com>
7252
7253 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
7254 SPARK_Mode from context on generic package.
7255 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
7256 useless test.
7257
7258 2017-04-27 Claire Dross <dross@adacore.com>
7259
7260 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
7261 overflows in computations.
7262 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
7263 overflows in computations.
7264 (Insert): Rewrite precondition to avoid overflows in computations.
7265 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
7266 overflows in computations.
7267 (Insert): Rewrite precondition to avoid overflows in computations.
7268
7269 2017-04-27 Steve Baird <baird@adacore.com>
7270
7271 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
7272 flag when it is declared in order to avoid confusing CodePeer about
7273 the possibility of an uninitialized variable read.
7274
7275 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7276
7277 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
7278 no dimensionality error if the subtype of the expression is
7279 identical to the nominal subtype in the declaration, even though
7280 the expression itself may have been constant-folded and lack a
7281 dimension vector.
7282 * sem_dim.ads: Add comments on setting of dimension vectors and
7283 its interaction with node rewritings and side-effect removal.
7284
7285 2017-04-27 Bob Duff <duff@adacore.com>
7286
7287 * debug.adb: Minor comment correction.
7288 * sem_dim.ads: Minor reformatting and typo fixes.
7289
7290 2017-04-27 Bob Duff <duff@adacore.com>
7291
7292 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
7293 Last of the tables via function calls, rather than relying on layout
7294 of data structures.
7295
7296 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7297
7298 * exp_util.adb: No wrapper in GNATprove mode.
7299
7300 2017-04-27 Yannick Moy <moy@adacore.com>
7301
7302 * sem_res.adb (Resolve_Comparison_Op): Always
7303 evaluate comparisons between values of universal types.
7304
7305 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7306
7307 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
7308 an elaboration counter nor a check when in GNATprove mode.
7309 * sem_util.adb (Build_Elaboration_Entity): Do not create an
7310 elaboration counter when in GNATprove mode.
7311
7312 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7313
7314 * freeze.adb: copy-paste typo.
7315
7316 2017-04-27 Yannick Moy <moy@adacore.com>
7317
7318 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
7319 Use correct test to detect call in GNATprove mode instead of
7320 compilation.
7321
7322 2017-04-27 Claire Dross <dross@adacore.com>
7323
7324 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
7325 New property function expressing that the element of a
7326 sequence are contained in the union of two sequences.
7327 (Formal_Model.M_Elements_Included): New property function
7328 expressing that the element of a sequence are another sequence.
7329 (Generic_Sorting): Use new property functions to state that
7330 elements are preserved by Sort and Merge.
7331 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
7332 allow the use of regular equality over elements in contracts.
7333 (Formal_Model): Ghost package containing model functions
7334 that are used in subprogram contracts. (Capacity):
7335 On unbounded containers, return the maximal capacity.
7336 (Current_To_Last): Removed, model functions should be used instead.
7337 (First_To_Previous): Removed, model functions should be used instead.
7338 (Append): Default parameter value replaced
7339 by new wrapper to allow more precise contracts.
7340 (Insert): Subprogram restored, it seems it was useful to users even if
7341 it is inefficient.
7342 (Delete): Subprogram restored, it seems it was useful to users even if
7343 it is inefficient.
7344 (Prepend): Subprogram restored, it seems it was useful to users even
7345 if it is inefficient.
7346 (Delete_First): Subprogram restored, it seems it
7347 was useful to users even if it is inefficient. (Delete_Last):
7348 Default parameter value replaced by new wrapper to allow more
7349 precise contracts.
7350 (Generic_Sorting.Merge): Subprogram restored.
7351 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
7352 allow the use of regular equality over elements in contracts.
7353 (Formal_Model): Ghost package containing model functions
7354 that are used in subprogram contracts. (Capacity):
7355 On unbounded containers, return the maximal capacity.
7356 (Current_To_Last): Removed, model functions should be used
7357 instead.
7358 (First_To_Previous): Removed, model functions should be used instead.
7359 (Append): Default parameter value replaced
7360 by new wrapper to allow more precise contracts.
7361 (Insert): Subprogram restored, it seems it was useful to users even if
7362 it is inefficient.
7363 (Delete): Subprogram restored, it seems it was useful to users even if
7364 it is inefficient.
7365 (Prepend): Subprogram restored, it seems it was useful to users even
7366 if it is inefficient.
7367 (Delete_First): Subprogram restored, it seems it
7368 was useful to users even if it is inefficient. (Delete_Last):
7369 Default parameter value replaced by new wrapper to allow more
7370 precise contracts.
7371 (Generic_Sorting.Merge): Subprogram restored.
7372 (Vector): Do not reuse formal vectors, as it is no longer possible
7373 to supply them with an equality function over elements.
7374
7375 2017-04-27 Bob Duff <duff@adacore.com>
7376
7377 * g-dyntab.adb (Release): When allocating the new
7378 table, use the correct slice of the old table to initialize it.
7379
7380 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
7381
7382 * einfo.ads: Minor fixes in comments.
7383
7384 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7385
7386 * sem_prag.adb: disable clones in SPARK_Mode.
7387
7388 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7389
7390 * sem_util.ads, contracts.adb: Minor reformatting.
7391
7392 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7393
7394 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
7395 Build body of subprogram that has a class-wide condition that
7396 contains calls to other primitives.
7397 (Build_Class_Wide_Clone_Call); Build a call to the common
7398 class-wide clone of a subprogram with classwide conditions. The
7399 body of the subprogram becomes a wrapper for a call to the
7400 clone. The inherited operation becomes a similar wrapper to which
7401 modified conditions apply, and the call to the clone includes
7402 the proper conversion in a call the parent operation.
7403 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
7404 subprogram that has a classwide condition that contains calls to
7405 other primitives, build an internal subprogram that is invoked
7406 through a type-specific wrapper for all inherited subprograms
7407 that may have a modified condition.
7408 * sem_prag.adb (Check_References): If subprogram has a classwide
7409 condition, create entity for corresponding clone, to be invoked
7410 through wrapper subprograns.
7411 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
7412 message about placement if pragma isi internally generated.
7413 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
7414 a classwide clone, build body of clone as copy of original body,
7415 and rewrite original body as a wrapper as a wrapper for a call to
7416 the clone, so that it incorporates the original pre/postconditions
7417 of the subprogram.
7418 * freeze.adb (Check_Inherited_Conditions): For an inherited
7419 subprogram that inherits a classwide condition, build spec and
7420 body of corresponding wrapper so that call to inherited operation
7421 gets the modified conditions.
7422 * contracts.adb (Analyze_Contracts): If analysis of classwide
7423 condition has created a clone for a primitive operation, analyze
7424 declaration of clone.
7425
7426 2017-04-27 Steve Baird <baird@adacore.com>
7427
7428 * exp_util.adb (Build_Allocate_Deallocate_Proc):
7429 Add "Suppress => All_Checks" to avoid generating unnecessary
7430 checks.
7431
7432 2017-04-27 Yannick Moy <moy@adacore.com>
7433
7434 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
7435 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
7436 inlining body in GNATprove mode when switch -gnatdm used.
7437 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
7438 in GNATprove mode when switch -gnatdm used.
7439
7440 2017-04-27 Arnaud Charlet <charlet@adacore.com>
7441
7442 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
7443 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
7444 clauses, so that we keep an indication of the address clause
7445 before removing it from the tree.
7446
7447 2017-04-27 Yannick Moy <moy@adacore.com>
7448
7449 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
7450 of expression being qualified, when not an object name, or else
7451 evaluate the underlying name.
7452
7453 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
7454
7455 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
7456
7457 2017-04-27 Justin Squirek <squirek@adacore.com>
7458
7459 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
7460 Process_Component_List_For_Finalization as a local variable.
7461 (Process_Component_For_Finalize): Add an extra parameter to avoid
7462 global references.
7463 (Process_Component_List_For_Finalization): Correct calls to
7464 Process_Component_For_Finalize to take Num_Comps as a parameter.
7465
7466 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7467
7468 * sem_ch8.adb (Find_Direct_Name): Account for the case where
7469 a use-visible entity is defined within a nested scope of an
7470 instance when giving priority to entities which were visible in
7471 the original generic.
7472 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
7473
7474 2017-04-27 Tristan Gingold <gingold@adacore.com>
7475
7476 * raise-gcc.c: Don't use unwind.h while compiling
7477 for the frontend, but mimic host behavior.
7478
7479 2017-04-27 Javier Miranda <miranda@adacore.com>
7480
7481 * sem_ch3.adb (Build_Discriminated_Subtype):
7482 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
7483
7484 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7485
7486 * sem_prag.adb (Analyze_Global_Item):
7487 Do not consider discriminants because they are not "entire
7488 objects". Remove the discriminant-related checks because they are
7489 obsolete.
7490 (Analyze_Input_Output): Do not consider discriminants
7491 because they are not "entire objects".
7492
7493 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7494
7495 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
7496 perform check if the current scope does not come from source,
7497 as is the case for a rewritten task body, because check has
7498 been performed already, and may not be doable because of changed
7499 visibility.
7500
7501 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7502
7503 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
7504 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
7505 Minor reformatting.
7506
7507 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7508
7509 * sem_ch4.adb (Analyze_Call): If the return type of a function
7510 is incomplete in an context in which the full view is available,
7511 replace the type of the call by the full view, to prevent spurious
7512 type errors.
7513 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
7514 abstract subprogram so that compiler does not reject a parameter
7515 of a primitive operation of a tagged type being frozen, when
7516 the untagged type of that parameter cannot be frozen.
7517
7518 2017-04-27 Bob Duff <duff@adacore.com>
7519
7520 * sem_attr.adb (Compute_Type_Key): Don't walk
7521 representation items for irrelevant types, which could be in a
7522 different source file.
7523
7524 2017-04-27 Steve Baird <baird@adacore.com>
7525
7526 * exp_attr.adb (Expand_N_Attribute_Reference):
7527 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
7528 for CodePeer.
7529
7530 2017-04-27 Yannick Moy <moy@adacore.com>
7531
7532 * exp_unst.ads: Fix typos in comments.
7533
7534 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7535
7536 * sem_eval.adb (Choice_Matches): Handle properly a real literal
7537 whose type has a defined static predicate.
7538
7539 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7540
7541 * exp_ch4.adb (Insert_Dereference_Action):
7542 Do not adjust the address of a controlled object when the
7543 associated access type is subject to pragma No_Heap_Finalization.
7544 Code reformatting.
7545
7546 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
7547
7548 * gcc-interface/utils.c (gnat_type_for_size): Set
7549 TYPE_ARTIFICIAL on created types.
7550
7551 2017-04-27 Claire Dross <dross@adacore.com>
7552
7553 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7554 modifications in functional containers.
7555 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7556 to improve readablity. Subprograms are separated between basic
7557 operations, constructors and properties. Universally quantified
7558 formulas in contracts are factorized in independant functions
7559 with a name and a comment. Names of parameters are improved.
7560
7561 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7562
7563 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7564
7565 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7566
7567 * sem_res.adb (Resolve_Type_Conversion): Do not
7568 install a predicate check here since this is already done during
7569 the expansion phase. Verify whether the operand satisfies the
7570 static predicate (if any) of the target type.
7571 * sem_ch3.adb (Analyze_Object_Declaration): Do
7572 not install a predicate check if the object is initialized by
7573 means of a type conversion because the conversion is subjected
7574 to the same check.
7575
7576 2017-04-27 Tristan Gingold <gingold@adacore.com>
7577
7578 * raise.c (__gnat_builtin_longjmp): Remove.
7579 (__gnat_bracktrace):
7580 Add a dummy definition for the compiler (__gnat_eh_personality,
7581 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
7582 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
7583 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
7584 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
7585 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
7586 and a-except-2005.adb.
7587 * raise-gcc.c: Allow build in compiler, compiled as a C++
7588 file.
7589 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
7590 (db): Constify msg_format.
7591 (get_call_site_action_for): Don't use void arithmetic.
7592 * system.ads (Frontend_Exceptions): Set to False.
7593 (ZCX_By_Default): Set to True.
7594 (GCC_ZC_Support): Set to True.
7595 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
7596 a-except.ad[sb].
7597 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
7598 in gnat1 and gnatbind.
7599 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
7600 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
7601 * s-excmac.ads, s-excmac.adb: Copy of variants.
7602 * a-except.o: Adjust preequisites.
7603 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
7604
7605 2017-04-27 Claire Dross <dross@adacore.com>
7606
7607 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
7608 modifications in functional containers.
7609 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
7610 to improve readablity. Subprograms are separated between basic
7611 operations, constructors and properties. Universally quantified
7612 formulas in contracts are factorized in independant functions
7613 with a name and a comment. Names of parameters are improved.
7614
7615 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7616
7617 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
7618
7619 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7620
7621 * sem_res.adb (Resolve_Type_Conversion): Do not
7622 install a predicate check here since this is already done during
7623 the expansion phase. Verify whether the operand satisfies the
7624 static predicate (if any) of the target type.
7625 * sem_ch3.adb (Analyze_Object_Declaration): Do
7626 not install a predicate check if the object is initialized by
7627 means of a type conversion because the conversion is subjected
7628 to the same check.
7629
7630 2017-04-27 Tristan Gingold <gingold@adacore.com>
7631
7632 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
7633 replaced by their variants).
7634
7635 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7636
7637 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
7638 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
7639 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
7640
7641 2017-04-27 Tristan Gingold <gingold@adacore.com>
7642
7643 * s-excmac-gcc.ads, s-excmac-gcc.adb,
7644 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
7645 Ada95.
7646
7647 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7648
7649 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
7650 the loop which detects potential enclosing transient scopes. The
7651 loop now terminates much earlier as transient scopes are bounded
7652 by packages and subprograms.
7653
7654 2017-04-27 Claire Dross <dross@adacore.com>
7655
7656 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
7657 allow the use of regular equality over elements in contracts.
7658 (Cursor): Type is now public so that it can be used in
7659 model functions.
7660 (Formal_Model): Ghost package containing
7661 model functions that are used in subprogram contracts.
7662 (Current_To_Last): Removed, model functions should be used
7663 instead.
7664 (First_To_Previous): Removed, model functions should
7665 be used instead.
7666 (Strict_Equal): Removed, model functions
7667 should be used instead.
7668 (Append): Default parameter value
7669 replaced by new wrapper to allow more precise contracts.
7670 (Insert): Default parameter value replaced by new wrapper to
7671 allow more precise contracts.
7672 (Delete): Default parameter
7673 value replaced by new wrapper to allow more precise contracts.
7674 (Prepend): Default parameter value replaced by new wrapper to
7675 allow more precise contracts.
7676 (Delete_First): Default parameter
7677 value replaced by new wrapper to allow more precise contracts.
7678 (Delete_Last): Default parameter value replaced by new wrapper
7679 to allow more precise contracts.
7680
7681 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7682
7683 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
7684 for object declarations.
7685 (Expand_SPARK_N_Object_Declaration): New routine.
7686 * sem_elab.adb (Check_A_Call): Include calls to the
7687 Default_Initial_Condition procedure of a type under the SPARK
7688 elaboration checks umbrella.
7689
7690 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7691
7692 * sem.adb (Analyze): Diagnose an illegal iterated component
7693 association.
7694 * sem_util.ads, sem_util.adb
7695 (Diagnose_Iterated_Component_Association): New routine.
7696
7697 2017-04-27 Bob Duff <duff@adacore.com>
7698
7699 * adaint.c (__gnat_get_current_dir): Return 0 in length if
7700 getcwd fails.
7701 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
7702 exception if getcwd failed.
7703
7704 2017-04-27 Yannick Moy <moy@adacore.com>
7705
7706 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
7707 entities with special prefix.
7708
7709 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7710
7711 * debug.adb Change the documentation of switch -gnatd.s.
7712 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
7713 to manage the secondary stack when an enclosing scope already
7714 performs this functionality (aka relaxed management). Switch
7715 -gnatd.s may be used to force strict management in which case
7716 the block will manage the secondary stack unconditionally. Add
7717 a guard to stop the traversal when encountering a package or a
7718 subprogram scope.
7719
7720 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7721
7722 * sem_res.adb (Resolve_Call): Refine further the handling of
7723 limited views of return types in function calls. If the function
7724 that returns a limited view appears in the current unit,
7725 we do not replace its type by the non-limited view because
7726 this transformation is performed int the back-end. However,
7727 the type of the call itself must be the non-limited view, to
7728 prevent spurious resolution errors.
7729
7730 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7731
7732 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
7733 Removed, proposed implementation using generics for class-wide
7734 preconditions proved impractical.
7735 (Class_Wide_Clone): New attribute of subprogram. Designates
7736 subprogram created for primitive operations with class-wide
7737 pre/postconditions that contain calls to other primitives. The
7738 clone holds the body of the original primitive, but the
7739 pre/postonditions do not apply to it. The original body is
7740 rewritten as a wrapper for a call to the clone.
7741 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
7742 the flag is set, no code for the corresponding pre/postconditions
7743 is inserted into its body.
7744
7745 2017-04-27 Bob Duff <duff@adacore.com>
7746
7747 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
7748 Scalar_Storage_Order if -gnatI is given.
7749 * sem_prag.adb (Analyze_Pragma): Ignore
7750 Default_Scalar_Storage_Order if -gnatI is given.
7751
7752 2017-04-27 Claire Dross <dross@adacore.com>
7753
7754 * a-cofuba.ads (Add): Take as an additional input parameter
7755 the position where the element should be inserted.
7756 (Remove): New function that removes an element from the container.
7757 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
7758 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
7759 (Remove): New function that removes an element from a set.
7760 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
7761 (Remove): New function that removes an element from a sequence.
7762 (Insert): New function that adds anywhere in a sequence.
7763
7764 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7765
7766 * checks.adb (Generate_Range_Check): Revert previous change.
7767
7768 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7769
7770 * sem_util.adb: Minor reformatting/rewording.
7771
7772 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7773
7774 * lib-xref.adb (Generate_Reference): The use
7775 of attribute 'Result is not considered a violation of pragma
7776 Unreferenced.
7777
7778 2017-04-27 Justin Squirek <squirek@adacore.com>
7779
7780 * cstand.adb (Create_Standard): Correctly set
7781 Directly_Designated_Type for Any_Access.
7782 * sem_type.adb (Covers): Minor grammar fixes.
7783
7784 2017-04-27 Bob Duff <duff@adacore.com>
7785
7786 * sem_attr.adb: Minor cleanup.
7787
7788 2017-04-27 Claire Dross <dross@adacore.com>
7789
7790 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
7791 private child of Ada.Containers used to implement all functional
7792 containers.
7793 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
7794 child of Ada.Containers. It provides functional indefinite unbounded
7795 maps which can be used as high level models for specification
7796 of data structures.
7797 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
7798 child of Ada.Containers. It provides functional indefinite unbounded
7799 sets which can be used as high level models for specification
7800 of data structures.
7801 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
7802 child of Ada.Containers. It provides functional indefinite unbounded
7803 vectors which can be used as high level models for specification
7804 of data structures.
7805 * Makefile.rtl: Add new packages.
7806 * impunit.adb: Add new packages.
7807
7808 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7809
7810 * sem_ch4.adb: Minor reformatting.
7811
7812 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7813
7814 * sem_ch12.adb (Analyze_Associations): minor reformatting.
7815 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
7816 point type actual that has user-defined arithmetic primitives,
7817 when there is a previous actual for a formal package that defines
7818 a fixed-point type with the parent user-defined operator.
7819
7820 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7821
7822 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
7823 * sem_attr.adb (Resolve_Attribute): Generate a range check when
7824 the component type allows range checks.
7825
7826 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7827
7828 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
7829 corresponding declaration, because formal derived types are
7830 rewritten as private extensions.
7831
7832 2017-04-27 Ed Schonberg <schonberg@adacore.com>
7833
7834 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
7835 dimensions of operands if node has been analyzed already, because
7836 previous analysis and dimension checking will have removed the
7837 dimension information from the operands.
7838
7839 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7840
7841 * debug.adb: Document the use of switch -gnatd.s.
7842 * einfo.ads Update the documentation on attribute
7843 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
7844 the uses of these attributes from certain entities.
7845 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
7846 which determines whether the block should continue to manage
7847 the secondary stack.
7848 (Manages_Sec_Stack): New routine.
7849
7850 2017-04-27 Bob Duff <duff@adacore.com>
7851
7852 * atree.ads: Minor edit.
7853
7854 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
7855
7856 * sinfo.ads: Update the section on Ghost mode. Add
7857 a section on SPARK mode. Update the placement of section on
7858 expression functions.
7859
7860 2017-04-27 Bob Duff <duff@adacore.com>
7861
7862 * sinput.adb (Get_Source_File_Index): Don't
7863 assert that S is in the right range in the case where this is
7864 a .dg file under construction.
7865
7866 2017-04-27 Yannick Moy <moy@adacore.com>
7867
7868 * sem_util.adb (Check_Result_And_Post_State):
7869 Handle more precisely each conjunct in expressions formed by
7870 and'ing sub-expressions.
7871
7872 2017-04-27 Gary Dismukes <dismukes@adacore.com>
7873
7874 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
7875
7876 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7877
7878 * gnat_rm.texi, gnat_ugn.texi,
7879 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
7880 doc/gnat_ugn/platform_specific_information.rst,
7881 doc/gnat_ugn/gnat_and_program_execution.rst,
7882 doc/gnat_ugn/gnat_utility_programs.rst,
7883 doc/gnat_ugn/the_gnat_compilation_model.rst,
7884 doc/gnat_rm/implementation_defined_attributes.rst,
7885 doc/gnat_rm/the_gnat_library.rst,
7886 doc/gnat_rm/implementation_defined_pragmas.rst,
7887 doc/gnat_rm/representation_clauses_and_pragmas.rst,
7888 doc/gnat_rm/implementation_of_specific_ada_features.rst,
7889 doc/gnat_rm/implementation_defined_aspects.rst,
7890 doc/gnat_rm/implementation_defined_characteristics.rst: Update
7891 documentation.
7892
7893 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7894
7895 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
7896 generating C code on complex case expressions.
7897
7898 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7899
7900 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
7901 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
7902 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
7903 Ada_2012 instead of Ada_2005 to be compatible with the above
7904 change.
7905 * bindgen.adb: Silence new warning on pragma Ada_95.
7906
7907 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7908
7909 * checks.adb (Generate_Range_Check): Revert part of previous change.
7910
7911 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7912
7913 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
7914 container indexing operation that appears as a an actual in a
7915 parameter association in a procedure call.
7916
7917 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
7918
7919 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
7920 Fix spelling mistakes.
7921
7922 2017-04-25 Bob Duff <duff@adacore.com>
7923
7924 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
7925 * sinput-p.adb: Use regular fat pointers, with bounds checking,
7926 for source buffers. Fix misc obscure bugs.
7927 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
7928 checking, for source buffers. Modify representation clause for
7929 Source_File_Record as appropriate. Move Source_File_Index_Table
7930 from spec to body, because it is not used outside the body.
7931 Move Set_Source_File_Index_Table into the private part, because
7932 it is used only in the body and in children. Use trickery to
7933 modify the dope in the generic instantiation case. It's ugly,
7934 but not as ugly as the previous method. Fix documentation.
7935 Remove obsolete code.
7936 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
7937 indexing in source buffers.
7938 * fmap.adb: Avoid conversions from one string type to another.
7939 Remove a use of global name buffer.
7940 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
7941 fixes.
7942
7943 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7944
7945 * exp_util.adb, exp_ch4.adb: Minor reformatting.
7946
7947 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7948
7949 * checks.adb: Code clean up in various routines.
7950 (Generate_Range_Check): Do not generate a range check when the
7951 expander is not active or when index/range checks are suppressed
7952 on the target type.
7953 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
7954 Remove variants that include a Supress parameter. These routines
7955 are never used, and were introduced before the current scope-based
7956 check suppression method.
7957
7958 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
7959
7960 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
7961 code and some subprogram calls that are now noop.
7962
7963 2017-04-25 Arnaud Charlet <charlet@adacore.com>
7964
7965 * exp_ch4.adb (Expand_N_Case_Expression): Take
7966 Minimize_Expression_With_Actions into account when possible.
7967
7968 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
7969
7970 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
7971 (Known_Null): Moved to Sem_Util.
7972 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
7973 (Known_Null): Moved to Sem_Util.
7974 * sem_util.adb Add new enumeration type Null_Status_Kind.
7975 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
7976 this routine is now carried out by Null_Status.
7977 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
7978 is now carried out by Null_Status.
7979 (Null_Status): New routine.
7980 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
7981 (Known_Null): Moved from Exp_Util.
7982
7983 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7984
7985 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
7986 error on the return type of an expression function that is a
7987 completion, if the type is derived from a generic formal type.
7988
7989 2017-04-25 Ed Schonberg <schonberg@adacore.com>
7990
7991 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
7992 conversion are those of the target type.
7993
7994 2017-04-25 Bob Duff <duff@adacore.com>
7995
7996 * a-clrefi.adb: Minor cleanup.
7997
7998 2017-04-25 Gary Dismukes <dismukes@adacore.com>
7999
8000 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
8001
8002 2017-04-25 Bob Duff <duff@adacore.com>
8003
8004 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
8005 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
8006 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
8007 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
8008 the Internal_Source buffer. This removes the incorrect call to "="
8009 the customer noticed.
8010 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
8011 eventually need to eliminate them altogether. Or else get rid
8012 of zero-origin addressing.
8013
8014 2017-04-25 Claire Dross <dross@adacore.com>
8015
8016 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
8017 function used in GNATprove to know if an expression contains
8018 non-dispatching calls on primitives of a tagged type.
8019
8020 2017-04-25 Bob Duff <duff@adacore.com>
8021
8022 * rtsfind.adb (Initialize): Initialize
8023 First_Implicit_With. Building the compiler with Normalize_Scalars
8024 and validity checking finds this being used as an uninitialized
8025 variable.
8026
8027 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8028
8029 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
8030 Add a warning about SPARK mode management. The routine now
8031 saves and restores both the mode and associated pragma.
8032 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
8033 SPARK mode management. The routine now saves and restores both
8034 the mode and associated pragma.
8035 (Analyze_Object_Contract):
8036 Add a warning about SPARK mode management. The routine
8037 now saves and restores both the mode and associated pragma.
8038 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
8039 management. The routine now saves and restores both the mode
8040 and associated pragma. (Analyze_Package_Contract): Add a warning
8041 about SPARK mode management. The routine now saves and restores
8042 both the mode and associated pragma.
8043 (Analyze_Task_Contract):
8044 Add a warning about SPARK mode management. The routine now saves
8045 and restores both the mode and associated pragma.
8046 * expander.adb (Expand): Change the way the Ghost mode is saved
8047 and restored.
8048 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
8049 saved and restored.
8050 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
8051 and restored.
8052 * exp_util.adb (Build_DIC_Procedure_Body):
8053 Change the way the Ghost mode is saved and restored.
8054 (Build_DIC_Procedure_Declaration): Change the way the Ghost
8055 mode is saved and restored.
8056 (Build_Invariant_Procedure_Body):
8057 Change the way the Ghost mode is saved and restored.
8058 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
8059 mode is saved and restored.
8060 (Make_Predicate_Call): Change the
8061 way the Ghost mode is saved and restored.
8062 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
8063 saved and restored.
8064 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8065 and its assignment.
8066 (Mark_And_Set_Ghost_Body): Remove parameter
8067 Mode and its assignment.
8068 (Mark_And_Set_Ghost_Completion):
8069 Remove parameter Mode and its assignment.
8070 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
8071 assignment.
8072 (Mark_And_Set_Ghost_Instantiation): Remove parameter
8073 Mode and its assignment.
8074 (Mark_And_Set_Ghost_Procedure_Call):
8075 Remove parameter Mode and its assignment.
8076 (Set_Ghost_Mode):
8077 Remove parameter Mode and its assignment.
8078 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
8079 and update the comment on usage.
8080 (Mark_And_Set_Ghost_Body):
8081 Remove parameter Mode and update the comment on usage.
8082 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
8083 update the comment on usage.
8084 (Mark_And_Set_Ghost_Declaration):
8085 Remove parameter Mode and update the comment on usage.
8086 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
8087 update the comment on usage.
8088 (Mark_And_Set_Ghost_Procedure_Call):
8089 Remove parameter Mode and update the comment on usage.
8090 (Set_Ghost_Mode): Remove parameter Mode and update the comment
8091 on usage.
8092 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
8093 types.
8094 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
8095 of obsolete field SPARK_Mode_Pragma.
8096 (Load_Main_Source): Remove
8097 the assignment of obsolete field SPARK_Mode_Pragma.
8098 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
8099 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
8100 the assignment of obsolete field SPARK_Mode_Pragma.
8101 (Ensure_System_Dependency): Remove the assignment of obsolete
8102 field SPARK_Mode_Pragma.
8103 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
8104 mode management. Change the way Ghost and SPARK modes are saved
8105 and restored.
8106 * sem.adb (Analyze): Change the way the Ghost mode is saved
8107 and restored.
8108 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
8109 Ghost mode is saved and restored.
8110 (Process_Full_View): Change
8111 the way the Ghost mode is saved and restored.
8112 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
8113 mode is saved and restored.
8114 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
8115 mode is saved and restored.
8116 (Analyze_Subprogram_Body_Helper):
8117 Change the way the Ghost mode is saved and restored.
8118 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
8119 Ghost mode is saved and restored.
8120 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
8121 management. Save the SPARK mode-related data prior to any changes
8122 to the scope stack and contexts. The mode is then reinstalled
8123 before the subunit is analyzed in order to restore the original
8124 view of the subunit.
8125 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
8126 warning on region management. Change the way the Ghost and
8127 SPARK modes are saved and restored.
8128 (Inline_Instance_Body):
8129 Add a warning about SPARK mode management. Code clean up.
8130 (Analyze_Subprogram_Instantiation): Update the warning on region
8131 management. Change the way the Ghost and SPARK modes are saved
8132 and restored.
8133 (Instantiate_Package_Body): Update the warning
8134 on region management. Change the way the Ghost and SPARK modes
8135 are saved and restored.
8136 (Instantiate_Subprogram_Body): Update
8137 the warning on region management. Change the way the Ghost and
8138 SPARK modes are saved and restored.
8139 (Set_Instance_Env): Add a
8140 warning about SPARK mode management. Change the way SPARK mode
8141 is saved and restored.
8142 * sem_ch13.adb (Build_Predicate_Functions):
8143 Change the way the Ghost mode is saved and restored.
8144 (Build_Predicate_Function_Declaration): Change the way the Ghost
8145 mode is saved and restored.
8146 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
8147 mode management. Change the way SPARK mode is saved and restored.
8148 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
8149 Change the way the Ghost mode is saved and restored.
8150 (Analyze_Initial_Condition_In_Decl_Part): Change the way
8151 the Ghost mode is saved and restored.
8152 (Analyze_Pragma):
8153 Change the way the Ghost mode is saved and restored.
8154 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
8155 Ghost mode is saved and restored.
8156 * sem_util.adb (Install_SPARK_Mode): New routine.
8157 (Restore_SPARK_Mode): New routine.
8158 (Save_SPARK_Mode_And_Set): Removed.
8159 (Set_SPARK_Mode): New routine.
8160 * sem_util.ads (Install_SPARK_Mode): New routine.
8161 (Restore_SPARK_Mode): New routine.
8162 (Save_SPARK_Mode_And_Set): Removed.
8163 (Set_SPARK_Mode): New routine.
8164
8165 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8166
8167 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
8168 to determine whether a type is declared in a local package that
8169 has not yet been frozen.
8170 * freeze.adb (Freeze_Before): Use new predicate to determine
8171 whether a local package must be installed on the scope stack
8172 in order to evaluate in the proper scope actions generated by
8173 aspect specifications, such as Predicate
8174 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
8175 using new predicate.
8176
8177 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8178
8179 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
8180 comparisons between non- scalar expressions expressions because
8181 their values cannot be invalidated.
8182 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
8183 comment on usage.
8184
8185 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8186
8187 * par_sco.adb: Minor reformatting.
8188
8189 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8190
8191 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
8192 is a type from an unfrozen local package, install package to
8193 complete the analysis of delayed aspects of the type.
8194
8195 2017-04-25 Tristan Gingold <gingold@adacore.com>
8196
8197 * bingen.adb (System_Version_Control_Used): New variable.
8198 (Resolve_Binder_Options): Set the above variable.
8199 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
8200 (Gen_Elab_Order): Emit blank line before.
8201
8202 2017-04-25 Justin Squirek <squirek@adacore.com>
8203
8204 * sem_cat.adb (Validate_RT_RAT_Component): Added
8205 an extra check to ignore incomplete types.
8206
8207 2017-04-25 Thomas Quinot <quinot@adacore.com>
8208
8209 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
8210 bogus circuitry for the case where Name is Predicate.
8211
8212 2017-04-25 Thomas Quinot <quinot@adacore.com>
8213
8214 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
8215 Create SCOs for Predicate aspects in disabled
8216 state initially, to be enabled later on by...
8217 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
8218 SCO for predicate as enabled.
8219
8220 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8221
8222 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
8223 pragmas Warnings Off / On.
8224 * namet.adb (Finalize): Remove now obsolete pair of pragmas
8225 Warnings Off / On.
8226 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
8227 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
8228 consider comparisons between static expressions because their
8229 values cannot be invalidated.
8230 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
8231 Warnings Off / On.
8232 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
8233 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
8234
8235 2017-04-25 Bob Duff <duff@adacore.com>
8236
8237 * sem_elab.adb (In_Task_Activation): Trace internal calls in
8238 task bodies.
8239
8240 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8241
8242 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
8243 typo fixes.
8244
8245 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8246
8247 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
8248 On/Off to defend against a spurious warning in conditional
8249 compilation.
8250 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
8251 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
8252 defend against a spurious warning in conditional compilation.
8253 * output.adb Add a pair of pragma Warnings On/Off to defend
8254 against a spurious warning in conditional compilation.
8255 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
8256 (Fold_General_Op): New routine.
8257 (Fold_Static_Real_Op): New routine.
8258 (Test_Comparison): New routine.
8259 * sem_eval.ads (Test_Comparison): New routine.
8260 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
8261 (Warn_On_Constant_Valid_Condition): New routine.
8262 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
8263 to detect a specific case.
8264 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
8265 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
8266 to defend against a spurious warning in conditional compilation.
8267 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
8268 against a spurious warning in conditional compilation.
8269 * usage.adb Add a pair of pragma Warnings On/Off to defend
8270 against a spurious warning in conditional compilation.
8271
8272 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8273
8274 * sinfo.ads, sem_ch13.adb: Update comment.
8275
8276 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8277
8278 * sem_util.adb (Is_Post_State): A reference to a
8279 generic in out parameter is considered a change in the post-state
8280 of a subprogram.
8281
8282 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8283
8284 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
8285 declaration of a subprogram instance within its wrapper package,
8286 skip over null statements that may result from the rewriting of
8287 ignored pragmas.
8288
8289 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8290
8291 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
8292 If the type is an unchecked_union, replace the attribute with
8293 a Raise_Program_Error (rather than inserting such before the
8294 attribute reference) to handle properly the case where we are
8295 processing a component of a larger record, and we need to prevent
8296 further expansion for the unchecked union.
8297 (Expand_Attribute_Reference, case 'Write): If the type is
8298 an unchecked_union, check whether enclosing scope is a Write
8299 subprogram. Replace attribute with a Raise_Program_Error if the
8300 discriminants of the unchecked_union type have not default values
8301 because such a use is erroneous..
8302
8303 2017-04-25 Tristan Gingold <gingold@adacore.com>
8304
8305 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
8306 Add relative_deadline to task record on edf profile.
8307 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
8308 (Make_Task_Create_Call): Pass relative_deadline value.
8309 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
8310 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
8311 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
8312 * sem_prag.adb (Set_Ravenscar_Profile): Handle
8313 GNAT_Ravenscar_EDF (set scheduling policy).
8314 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
8315 pragma.
8316 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
8317 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
8318 New names.
8319 (Pragma_Deadline_Floor): New pragma.
8320 * targparm.adb (Get_Target_Parameters): Recognize
8321 GNAT_Ravenscar_EDF profile.
8322
8323 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8324
8325 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
8326
8327 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8328
8329 * sem_aux.adb (Nearest_Ancestor): Use original node of type
8330 declaration to locate nearest ancestor, because derived
8331 type declarations for record types are rewritten as record
8332 declarations.
8333 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
8334 properly derivations that are completions of private types.
8335 (Add_Predicates): If type is private, examine rep. items of full
8336 view, which may include inherited predicates.
8337 (Build_Predicate_Functions): Ditto.
8338
8339 2017-04-25 Javier Miranda <miranda@adacore.com>
8340
8341 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
8342 to generate new entities for subtype declarations located in
8343 Expression_With_Action nodes.
8344
8345 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8346
8347 * sem_elab.adb (Check_A_Call): Remove
8348 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
8349 need for Elaborate_All when SPARK elaboration checks are
8350 required. Update the checks for instances, variables, and calls
8351 to Default_Initial_Condition procedures.
8352
8353 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8354
8355 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
8356 into a boolean aspect, in analogy with the Ada aspect No_Return.
8357
8358 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8359
8360 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
8361
8362 2017-04-25 Bob Duff <duff@adacore.com>
8363
8364 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
8365 Is_True_Constant for an array variable that is passed to a
8366 foreign function as an 'in' parameter.
8367 * debug.adb: Document -gnatd.q.
8368
8369 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8370
8371 * sem_ch6.adb (Analyze_Expression_Function): If expression function
8372 is completion and return type is an access type do not freeze
8373 designated type: this will be done in the process of freezing
8374 the expression if needed.
8375 (Freeze_Expr_Types): Check whether type is complete before
8376 creating freeze node, to provide a better error message if
8377 reference is premature.
8378 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
8379 functions created by type derivations.
8380
8381 2017-04-25 Pascal Obry <obry@adacore.com>
8382
8383 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
8384
8385 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8386
8387 * sem_res.adb (Resolve_Type_Conversion):
8388 When resolving against any fixed type, set the type of the
8389 operand as universal real when the operand is a multiplication
8390 or a division where both operands are of any fixed type.
8391 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
8392 placement of an error message by pointing to the operand of a
8393 type conversion rather than the conversion itself.
8394
8395 2017-04-25 Thomas Quinot <quinot@adacore.com>
8396
8397 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
8398 Needs_Debug_Info when producing SCOs.
8399
8400 2017-04-25 Thomas Quinot <quinot@adacore.com>
8401
8402 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
8403 Always pass a null finalization master for a library level named access
8404 type to which a pragme No_Heap_Finalization applies.
8405
8406 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8407
8408 PR ada/78845
8409
8410 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
8411 set to A'First(2) and vice versa.
8412
8413 2017-04-25 Yannick Moy <moy@adacore.com>
8414
8415 * freeze.adb (Freeze_Record_Type): Remove obsolete
8416 rule on volatile tagged record restriction on SPARK code.
8417
8418 2017-04-25 Yannick Moy <moy@adacore.com>
8419
8420 * sem_prag.adb (minor) Fix SPARK RM reference.
8421
8422 2017-04-25 Yannick Moy <moy@adacore.com>
8423
8424 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
8425 comment to reflect which entity is chosen as unique entity.
8426 (Unique_Entity): Return full view instead of private spec for
8427 protected type or task type. Fix possible incorrect access when
8428 called on entry.
8429
8430 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8431
8432 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
8433 array types only instead of all packed array types.
8434
8435 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8436
8437 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
8438 dimension system, verify that dimensions of both match.
8439 (Check_Conformance): Add error message in case of dimension
8440 mismatch.
8441 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
8442 predicate.
8443
8444 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
8445
8446 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
8447 confusing.
8448
8449 2017-04-25 Yannick Moy <moy@adacore.com>
8450
8451 * sem_util.adb: Minor refactoring.
8452 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
8453
8454 2017-04-25 Claire Dross <dross@adacore.com>
8455
8456 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
8457 ultimate alias when accessing overridden operation. Indeed, if the
8458 overridden operation is itself inherited, it won't have any explicit
8459 contract.
8460
8461 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8462
8463 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
8464 overlap if the two formals have different types, because formally
8465 the corresponding actuals cannot designate the same objects.
8466
8467 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8468
8469 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
8470 dimensions are present from context, use them. b) If operand is
8471 a static constant rewritten as a literal, obtain the dimensions
8472 from the original declaration, otherwise use dimensions of type
8473 established from context.
8474
8475 2017-04-25 Yannick Moy <moy@adacore.com>
8476
8477 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
8478 of array that is private.
8479
8480 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8481
8482 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
8483 reformatting.
8484
8485 2017-04-25 Yannick Moy <moy@adacore.com>
8486
8487 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
8488 on body.
8489
8490 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8491
8492 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
8493 the check that recognizes a call to a private overridding and
8494 replaces the called subprogram with its alias.
8495
8496 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8497
8498 * exp_util.adb: Minor reformatting.
8499
8500 2017-04-25 Justin Squirek <squirek@adacore.com>
8501
8502 * exp_ch3.adb (Freeze_Type): Add condition to always treat
8503 interface types as a partial view of a private type for the
8504 generation of invariant procedure bodies.
8505 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
8506 Add a condition to get the Corresponding_Record_Type for
8507 concurrent types, add condition to return in the absence of a
8508 class in the pragma, remove call to Replace_Type_References,
8509 and add call to Replace_References.
8510 (Add_Interface_Invariatns),
8511 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
8512 to including the working type T.
8513 (Add_Own_Invariants): Remove
8514 legacy condition for separate units, remove dispatching for ASIS
8515 and save a copy of the expression in the pragma expression.
8516 (Build_Invariant_Procedure_Body): Default initalize vars,
8517 remove return condition on interfaces, always use the
8518 private type for interfaces, and move the processing of types
8519 until after the processing of invariants for the full view.
8520 (Build_Invariant_Procedure_Declaration): Remove condition
8521 to return if an interface type is encountered and add
8522 condition to convert the formal parameter to its class-wide
8523 counterpart if Work_Typ is abstract.
8524 (Replace_Type): Add call to Remove_Controlling_Arguments.
8525 (Replace_Type_Ref): Remove class-wide dispatching for the current
8526 instance of the type.
8527 (Replace_Type_References): Remove parameter "Derived"
8528 (Remove_Controlling_Arguments): Created in order to removing
8529 the controlliong argument from calls to primitives in the case
8530 of the formal parameter being an class-wide abstract type.
8531 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
8532 to the change made to Freeze_Type in exp_ch3. Add a condition
8533 to treat interface types as a partial view.
8534 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
8535 to Build_Invariant_Procedure_Declaration to properly generate a
8536 "partial" invariant procedure when Typ is an interface.
8537
8538 2017-04-25 Bob Duff <duff@adacore.com>
8539
8540 * a-numeri.ads: Go back to using brackets encoding for the Greek
8541 letter pi.
8542
8543 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8544
8545 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
8546 (10-15): if derived type T with progenitors is abstract,
8547 and primitive P of this type inherits non-trivial classwide
8548 preconditions from both a parent operation and from an interface
8549 operation, then the inherited operation is abstract if the parent
8550 operation is not null.
8551 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
8552 with Covered_Interface_Op to yield the actual interface operation
8553 that is implemented by a given inherited operation.
8554
8555 2017-04-25 Javier Miranda <miranda@adacore.com>
8556
8557 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
8558 and right operands after performing the validity checks. Required
8559 because validity checks may remove side effects from the operands.
8560
8561 2017-04-25 Javier Miranda <miranda@adacore.com>
8562
8563 * exp_attr.adb (Attribute_Unrestricted_Access):
8564 Do not disable implicit type conversion. Required to generate
8565 code that displaces the pointer to reference the secondary
8566 dispatch table.
8567
8568 2017-04-25 Pascal Obry <obry@adacore.com>
8569
8570 * prj-attr.adb, snames.ads-tmpl: Add package Install's
8571 Required_Artifacts attribute.
8572
8573 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8574
8575 * sem_util.adb (Same_Value): String literals are compile-time
8576 values, and comparing them must use Expr_Value_S.
8577
8578 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8579
8580 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
8581 dereference is introduced for the object, and the object is
8582 overloaded, do not check whether it is aliased, because it may
8583 include an implicit dereference.
8584 * sem_type.adb (Disambiguate): If two interpretations are access
8585 attribute types with the same designated type keep either of
8586 them and do not report an ambiguity. A true ambiguity will be
8587 reported elsewhere.
8588
8589 2017-04-25 Bob Duff <duff@adacore.com>
8590
8591 * a-numeri.ads: Change the encoding of Greek letter Pi from
8592 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
8593 to indicate the encoding. We considered using a byte order mark
8594 (BOM), but that causes various trouble (misc software eats the
8595 BOM, if you have a patch with a BOM, then it's not at the start
8596 of the patch, so it's not a BOM, the BOM affects with-ing files,
8597 etc.).
8598 * scng.adb, s-wchcnv.adb: Minor.
8599
8600 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8601
8602 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
8603 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8604
8605 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
8606 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
8607 Improve error message on operations that inherit non-conforming
8608 classwide preconditions from ancestor and progenitor.
8609 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
8610 moved here from sem_ch3.
8611 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
8612 check given in RM 6.1.1 (17) concerning renamings of overriding
8613 operations that inherits class-wide preconditions from ancestor
8614 or progenitor.
8615
8616 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8617
8618 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
8619 (Build_Adjust_Statements): Code cleanup.
8620 (Build_Finalizer): Update the initialization of
8621 Exceptions_OK.
8622 (Build_Finalize_Statements): Code cleanup.
8623 (Build_Initialize_Statements): Code cleanup.
8624 (Make_Deep_Array_Body): Update the initialization of
8625 Exceptions_OK.
8626 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
8627 (Process_Object_Declaration): Generate a null exception handler only
8628 when exceptions are allowed.
8629 (Process_Transients_In_Scope): Update the initialization of
8630 Exceptions_OK.
8631 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
8632 routine.
8633 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
8634 restrictions when the handler is internally generated and the
8635 mode is warnings.
8636
8637 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8638
8639 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
8640 enforce legality rule on classwide preconditions inherited from
8641 both an ancestor and a progenitor (RM 6.1.1 (10-13).
8642 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
8643 subprogram need not be dispatching if it appears in a precondition
8644 for an abstract or null subprogram.
8645
8646 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8647
8648 * sem_ch10.adb: Minor typo fix.
8649
8650 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8651
8652 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
8653
8654 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8655
8656 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
8657 have a length which is a power of 2.
8658 (Is_Predefined_File_Name): Likewise. Adjust comment.
8659
8660 2017-04-25 Bob Duff <duff@adacore.com>
8661
8662 * exp_aggr.adb (Component_Count): Protect the
8663 arithmetic from attempting to convert a value >= 2**31 to Int,
8664 which would otherwise raise Constraint_Error.
8665
8666 2017-04-25 Bob Duff <duff@adacore.com>
8667
8668 * opt.ads (Locking_Policy): Fix incorrect documentation. The
8669 first character of the policy name is not unique.
8670
8671 2017-04-25 Bob Duff <duff@adacore.com>
8672
8673 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
8674 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
8675 about this flag not being used. It was already used, and it is
8676 now used more.
8677
8678 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8679
8680 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
8681 (Ignore_SPARK_Mode_Pragmas): New routine.
8682 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
8683 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
8684 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
8685 related entities.
8686 (Ignore_SPARK_Mode_Pragmas): New routine
8687 along with pragma Inline.
8688 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
8689 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
8690 Ignore_SPARK_Mode_Pragmas_In_Instance.
8691 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
8692 Save and restore the value of global flag
8693 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
8694 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
8695 the corresponding spec or the body must ignore all SPARK_Mode
8696 pragmas found within.
8697 (Analyze_Subprogram_Declaration): Mark
8698 the spec when it needs to ignore all SPARK_Mode pragmas found
8699 within to allow the body to infer this property in case it is
8700 instantiated or inlined later.
8701 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
8702 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8703 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8704 when the corresponding spec also ignored all SPARK_Mode pragmas
8705 found within.
8706 (Analyze_Package_Declaration): Mark the spec when
8707 it needs to ignore all SPARK_Mode pragmas found within to allow
8708 the body to infer this property in case it is instantiated or
8709 inlined later.
8710 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
8711 Save and restore the value of flag
8712 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8713 formal spec when it needs to ignore all SPARK_Mode
8714 pragmas found within to allow the body to infer this
8715 property in case it is instantiated or inlined later.
8716 (Analyze_Package_Instantiation): Save and restore the value
8717 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
8718 the instance spec when it needs to ignore all SPARK_Mode
8719 pragmas found within to allow the body to infer this
8720 property in case it is instantiated or inlined later.
8721 (Analyze_Subprogram_Instantiation): Save and restore the value
8722 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
8723 instance spec and anonymous package when they need to ignore
8724 all SPARK_Mode pragmas found within to allow the body to infer
8725 this property in case it is instantiated or inlined later.
8726 (Instantiate_Package_Body): Save and restore the value of global
8727 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
8728 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
8729 corresponding instance spec also ignored all SPARK_Mode pragmas
8730 found within.
8731 (Instantiate_Subprogram_Body): Save and restore the
8732 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
8733 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
8734 when the corresponding instance spec also ignored all SPARK_Mode
8735 pragmas found within.
8736 * sem_prag.adb (Analyze_Pragma): Update the reference to
8737 Ignore_Pragma_SPARK_Mode.
8738 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
8739 all SPARK_Mode pragmas defined within yields mode "off".
8740
8741 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8742
8743 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
8744
8745 2017-04-25 Bob Duff <duff@adacore.com>
8746
8747 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
8748 All_Checks" to avoid generating unnecessary checks.
8749 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
8750 All_Checks".
8751 * sem.ads: Fix comment.
8752 * expander.ads: Fix comment.
8753 * exp_atag.ads: Fix comment: "Index = 0" should be
8754 "Index >= 0".
8755
8756 2017-04-25 Gary Dismukes <dismukes@adacore.com>
8757
8758 * s-taprop-linux.adb: Minor editorial fixes.
8759
8760 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8761
8762 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
8763 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
8764 variable and set it to True whenever the main hash table is
8765 populated. Short- circuit the Assoc function if it is false
8766 and add associated guards.
8767
8768 2017-04-25 Olivier Hainque <hainque@adacore.com>
8769
8770 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
8771 specs without elaboration code that have an elaboration counter
8772 nevertheless, e.g. when compiled with -fpreserve-control-flow.
8773 * sem_ch10.adb (Analyze_Compilation_Unit):
8774 Set_Elaboration_Entity_Required when requested to preserve
8775 control flow, to ensure the unit elaboration is materialized at
8776 bind time, resulting in the inclusion of the unit object file
8777 in the executable closure at link time.
8778
8779 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
8780
8781 * exp_dbug.adb: In Debug_Renaming_Declaration,
8782 when dealing with indexed component, accept to produce a renaming
8783 symbol when the index is an IN parameter or when it is a name
8784 defined in an outer scope.
8785
8786 2017-04-25 Yannick Moy <moy@adacore.com>
8787
8788 * errout.adb (Error_Msg): Adapt continuation
8789 message in instantiations and inlined bodies for info messages.
8790
8791 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
8792
8793 * fname.adb (Has_Internal_Extension): Add pragma Inline.
8794 Use direct 4-character slice comparisons.
8795 (Has_Prefix): Add
8796 pragma Inline. (Has_Suffix): Delete.
8797 (Is_Internal_File_Name):
8798 Test Is_Predefined_File_Name first.
8799 (Is_Predefined_File_Name):
8800 Use direct slice comparisons as much as possible and limit all
8801 comparisons to at most 8 characters.
8802
8803 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8804
8805 * checks.adb (Insert_Valid_Check): Code cleanup.
8806 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
8807 (Expand_Actuals): Generate proper copy-back for a validation
8808 variable when it acts as the argument of a type conversion.
8809 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
8810 predicate to operate on type qualifications.
8811
8812 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8813
8814 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
8815 Minor reformatting.
8816
8817 2017-04-25 Bob Duff <duff@adacore.com>
8818
8819 * sem_prag.adb (No_Return): Give an error if the pragma applies
8820 to a body. Specialize the error for the specless body case,
8821 as is done for (e.g.) pragma Convention.
8822 * debug.adb: Add switch -gnatd.J to disable the above legality
8823 checks. This is mainly for use in our test suite, to avoid
8824 rewriting a lot of illegal (but working) code. It might also
8825 be useful to customers. Under this switch, if a pragma No_Return
8826 applies to a body, and the procedure raises an exception (as it
8827 should), the pragma has no effect. If the procedure does return,
8828 execution is erroneous.
8829
8830 2017-04-25 Bob Duff <duff@adacore.com>
8831
8832 * exp_ch6.adb (Expand_Actuals): This is the
8833 root of the problem. It took N as an 'in out' parameter, and in
8834 some cases, rewrote N, but then set N to Original_Node(N). So
8835 the node returned in N had no Parent. The caller continued
8836 processing of this orphaned node. In some cases that caused a
8837 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
8838 and trips over the Empty Parent). The solution is to make N an
8839 'in' parameter. Instead of rewriting it, return the list of
8840 post-call actions, so the caller can do the rewriting later,
8841 after N has been fully processed.
8842 (Expand_Call_Helper): Move most of Expand_Call here. It has
8843 too many premature 'return' statements, and we want to do the
8844 rewriting on return.
8845 (Insert_Post_Call_Actions): New procedure to insert the post-call
8846 actions in the appropriate place. In the problematic case,
8847 that involves rewriting N as an Expression_With_Actions.
8848 (Expand_Call): Call the new procedures Expand_Call_Helper and
8849 Insert_Post_Call_Actions.
8850
8851 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8852
8853 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
8854 properly type derived from generic formal types, to handle
8855 properly modified version of ACATS 4.1B B611017.
8856
8857 2017-04-25 Javier Miranda <miranda@adacore.com>
8858
8859 * exp_unst.adb (Subp_Index): Adding missing
8860 support for renamings and functions that return a constrained
8861 array type (i.e. functions for which the frontend built a
8862 procedure with an extra out parameter).
8863
8864 2017-04-25 Pascal Obry <obry@adacore.com>
8865
8866 * s-string.adb: Minor code clean-up.
8867
8868 2017-04-25 Bob Duff <duff@adacore.com>
8869
8870 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
8871 procedure.
8872 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
8873 function for Non_Blocking_Wait_Process.
8874
8875 2017-04-25 Bob Duff <duff@adacore.com>
8876
8877 * prep.adb (Preprocess): Remove incorrect
8878 Assert. Current character can be ASCII.CR.
8879
8880 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8881
8882 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
8883 convention Stdcall, which has a number of exceptions. Convention
8884 is legal on a component declaration whose type is an anonymous
8885 access to subprogram.
8886
8887 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8888
8889 * sem_ch4.adb: sem_ch4.adb Various reformattings.
8890 (Try_One_Prefix_Interpretation): Use the base type when dealing
8891 with a subtype created for purposes of constraining a private
8892 type with discriminants.
8893
8894 2017-04-25 Javier Miranda <miranda@adacore.com>
8895
8896 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
8897 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
8898 dispatching primitives (Restore_Warnings): Restore warning on
8899 late dispatching primitives (Save_Warnings): Save warning on late
8900 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
8901 to enable/disable this warning.
8902 (WA_Warnings): Set warning on late dispatching primitives.
8903 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
8904 that its parent type has a private extension.
8905 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
8906 New subprogram.
8907 * usage.adb: Document -gnatw.j and -gnatw.J.
8908
8909 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8910
8911 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
8912 reformatting.
8913
8914 2017-04-25 Bob Duff <duff@adacore.com>
8915
8916 * binde.adb (Validate): Do not pass dynamic strings
8917 to pragma Assert, because older compilers do not support that.
8918
8919 2017-04-25 Bob Duff <duff@adacore.com>
8920
8921 * s-fileio.adb (Close): When a temp file is
8922 closed, delete it and clean up its Temp_File_Record immediately,
8923 rather than waiting until later.
8924 (Temp_File_Record): Add File
8925 component, so Close can know which Temp_File_Record corresponds
8926 to the file being closed.
8927 (Delete): Don't delete temp files,
8928 because they are deleted by Close.
8929 (Open): Set the File component
8930 of Temp_File_Record. This requires moving the creation of the
8931 Temp_File_Record to the end, after the AFCB has been created.
8932
8933 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8934
8935 * checks.adb (Insert_Valid_Check): Do not generate
8936 a validity check when inside a generic.
8937
8938 2017-04-25 Yannick Moy <moy@adacore.com>
8939
8940 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
8941
8942 2017-04-25 Arnaud Charlet <charlet@adacore.com>
8943
8944 * snames.ads-tmpl (Snames): More names for detecting predefined
8945 potentially blocking subprograms.
8946
8947 2017-04-25 Ed Schonberg <schonberg@adacore.com>
8948
8949 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
8950 concerning inheritance of class-wide preconditions do not apply
8951 to postconditions.
8952
8953 2017-04-25 Bob Duff <duff@adacore.com>
8954
8955 * s-ficobl.ads: Minor comment fix.
8956
8957 2017-04-25 Yannick Moy <moy@adacore.com>
8958
8959 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
8960 conversions from float to integer in GNATprove mode.
8961 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
8962 to call Apply_Type_Conversion_Checks, so that range checks
8963 are properly positioned when needed on conversions, including
8964 when converting from float to integer. (Determine_Range): In
8965 GNATprove mode, take into account the possibility of conversion
8966 from float to integer.
8967 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
8968 check on conversions from fixed-point to integer, not anymore
8969 on conversions from floating-point to integer, when in GNATprove
8970 mode.
8971
8972 2017-04-25 Yannick Moy <moy@adacore.com>
8973
8974 * checks.adb (Determine_Range_R): Special case type conversions
8975 from integer to float in order to get bounds in that case too.
8976 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
8977 mode, for computations involved in interval checking.
8978
8979 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
8980
8981 * checks.adb (Insert_Valid_Check): Partially reimplement validity
8982 checks.
8983 * einfo.adb Node36 is now used as Validated_Object.
8984 (Validated_Object): New routine.
8985 (Set_Validated_Object): New routine.
8986 (Write_Field36_Name): Add an entry for Validated_Object.
8987 * einfo.ads Add new attribute Validated_Object along with
8988 usage in entities.
8989 (Validated_Object): New routine along with pragma Inline.
8990 (Set_Validated_Object): New routine along with pragma Inline.
8991 * exp_attr.adb (Make_Range_Test): Add processing for validation
8992 variables to avoid extra reads and copies of the prefix.
8993 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
8994 variables in order to reflect any changes done in the variable
8995 back into the original object.
8996 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
8997 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
8998
8999 2017-04-25 Steve Baird <baird@adacore.com>
9000
9001 * exp_ch7.adb (Build_Array_Deep_Procs,
9002 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
9003 generate Finalize_Address routines for CodePeer.
9004
9005 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9006
9007 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
9008 Analyze_Pre_Post_Condition, to implement the legality checks
9009 mandated by AI12-0131: Pre'Class shall not be specified for an
9010 overriding primitive subprogram of a tagged type T unless the
9011 Pre'Class aspect is specified for the corresponding primitive
9012 subprogram of some ancestor of T.
9013
9014 2017-04-25 Bob Duff <duff@adacore.com>
9015
9016 * sem_ch8.adb (Use_One_Type): If a use_type_clause
9017 is redundant, set its Used_Operations to empty. This is only
9018 necessary for use clauses that appear in the parent of a generic
9019 child unit, because those use clauses get reanalyzed when we
9020 instantiate the generic, and we don't want the Used_Operations
9021 carried over from the original context (where it was probably
9022 not redundant).
9023
9024 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9025
9026 * exp_ch6.adb: Minor reformatting.
9027
9028 2017-04-25 Bob Duff <duff@adacore.com>
9029
9030 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
9031 Use Source_Index (Current_Sem_Unit) to find the correct casing.
9032 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
9033 (Current_Sem_Unit) to find the correct casing.
9034 * par.adb (Par): Null out Current_Source_File, to ensure that
9035 the above bugs won't rear their ugly heads again.
9036
9037 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9038
9039 * sem_ch8.adb (Find_Type): For an attribute reference
9040 'Class, if prefix type is synchronized and previous errors
9041 have suppressed the creation of the corresponding record type,
9042 create a spurious class-wide for the synchonized type itself,
9043 to catch other misuses of the attribute
9044
9045 2017-04-25 Steve Baird <baird@adacore.com>
9046
9047 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
9048 is True, then don't generate the accessibility check for the
9049 tag of a tagged result.
9050 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
9051 if CodePeer_Mode is True, then don't generate the
9052 tag checks for the result of call to an instance of
9053 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
9054 descendant of" check and the accessibility check).
9055
9056 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9057
9058 * sem_ch13.adb: Code cleanups.
9059 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
9060 * sem_ch8.ads: Minor comment fix.
9061
9062 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9063
9064 * exp_ch4.adb (Library_Level_Target): New function.
9065 (Expand_Concatenate): When optimization is enabled, also expand
9066 the operation out-of-line if the concatenation is present within
9067 the expression of the declaration of a library-level object and
9068 not only if it is the expression of the declaration.
9069
9070 2017-04-25 Bob Duff <duff@adacore.com>
9071
9072 * freeze.adb (Freeze_Object_Declaration): Do
9073 not Remove_Side_Effects if there is a pragma Linker_Section,
9074 because in that case we want static initialization in the
9075 appropriate section.
9076
9077 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9078
9079 * exp_dbug.adb: Minor rewording and reformatting.
9080
9081 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9082
9083 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
9084 handle the proposed changes to rules concerning potentially
9085 unevaluated expressions, to include selected components that
9086 do not depend on discriminants, and indexed components with
9087 static indices.
9088 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
9089 predicate in quantified expression, and fix bugs in the handling
9090 of case expressions and membership test.
9091 (Analyze_Attribute_Old_Result): use new predicate.
9092 (Analyze_Attribute, case Loop_Entry): ditto.
9093
9094 2017-04-25 Bob Duff <duff@adacore.com>
9095
9096 * s-secsta.adb (SS_Info): Add a comment
9097 explaining why we don't need to walk all the chunks in order to
9098 compute the total size.
9099
9100 2017-04-25 Bob Duff <duff@adacore.com>
9101
9102 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
9103 of the global name buffer to 4*Max_Line_Length.
9104
9105 2017-04-25 Javier Miranda <miranda@adacore.com>
9106
9107 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
9108 renaming entity for debug information, mark the entity as needing debug
9109 info if it comes from sources.
9110
9111 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9112
9113 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
9114 restriction converning the use of 'Address where the prefix is
9115 of a controlled type.
9116
9117 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
9118
9119 * exp_dbug.adb: In Debug_Renaming_Declaration,
9120 skip slices that are made redundant by an indexed component
9121 access.
9122 * atree.h: New definition for Original_Node.
9123
9124 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9125
9126 * sem_prag.adb, sem_prag.ads: Minor reformatting.
9127
9128 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9129
9130 * sem_ch3.adb (Check_Entry_Contract): Call
9131 Preanalyze_Spec_Expression so that resolution takes place as well.
9132 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
9133 internal calls that appear in preconditions of protected
9134 operations, in default values for same, and in contract guards
9135 for contract cases in SPARK.
9136
9137 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9138
9139 * a-numaux.ads: Fix description of a-numaux-darwin
9140 and a-numaux-x86.
9141 (Double): Define to Long_Float.
9142 * a-numaux-vxworks.ads (Double): Likewise.
9143 * a-numaux-darwin.ads
9144 (Double): Likewise.
9145 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
9146 * a-numaux-x86.ads: Fix package description.
9147 * a-numaux-x86.adb (Is_Nan): Minor tweak.
9148 (Reduce): Adjust and complete description. Call Is_Nan instead of
9149 testing manually. Use an integer temporary to hold rounded value.
9150 * a-numaux-darwin.adb (Reduce): Likewise.
9151 (Is_Nan): New function.
9152
9153 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9154
9155 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
9156 on analysis of prefix whose type is a current instance of a
9157 synchronized type, but where the prefix itself is an entity that
9158 is an object.
9159
9160 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9161
9162 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
9163 the identity of callable entities therein, because they have been
9164 properly resolved, and prefixed calls may have been rewritten
9165 as normal calls.
9166
9167 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
9168
9169 * exp_ch3.adb (Build_Init_Statements): Convert
9170 the expression of the pragma/aspect Secondary_Stack_Size to
9171 internal type System.Parameters.Size_Type before assigning
9172 it to the Secondary_Stack_Size component of the task type's
9173 corresponding record.
9174
9175 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9176
9177 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
9178 (etc) optimizations when the type is modular and the offsets
9179 are equal.
9180
9181 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
9182
9183 * s-osinte-freebsd.ads: Minor comment tweaks
9184
9185 2017-04-25 Javier Miranda <miranda@adacore.com>
9186
9187 * urealp.adb (UR_Write): Reverse previous patch
9188 adding documentation on why we generate multiplications instead
9189 of divisions (needed to avoid expressions whose computation with
9190 large numbers may cause division by 0).
9191
9192 2017-04-25 Bob Duff <duff@adacore.com>
9193
9194 * erroutc.adb (Set_Specific_Warning_Off,
9195 Set_Warnings_Mode_Off): Use the correct source file for
9196 Stop. Was using Current_Source_File, which is only valid during
9197 parsing. Current_Source_File will have a leftover value from
9198 whatever file happened to be parsed last, because of a with_clause
9199 or something.
9200
9201 2017-04-25 Bob Duff <duff@adacore.com>
9202
9203 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
9204 to In_Predefined_Unit, but including GNAT units.
9205 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
9206 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
9207 because Should_Ignore_Pragma was not working reliably outside
9208 the parser, because Current_Source_File is not valid.
9209 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
9210 * par-prag.adb: Call Should_Ignore_Pragma_Par.
9211
9212 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9213
9214 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
9215 codepeer mode.
9216
9217 2017-04-25 Javier Miranda <miranda@adacore.com>
9218
9219 * urealp.adb (UR_Write): Fix output of constants with a base other
9220 that 10.
9221
9222 2017-04-25 Justin Squirek <squirek@adacore.com>
9223
9224 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
9225 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
9226 Add extra parameter for Process_Interface_Name.
9227 (Process_Interface_Name): Add parameter for pragma to analyze
9228 corresponding aspect.
9229 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
9230 from sem_ch13.adb
9231
9232 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9233
9234 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
9235 correction.
9236
9237 2017-04-25 Yannick Moy <moy@adacore.com>
9238
9239 * sem_res.adb (Resolve_Comparison_Op): Do not
9240 attempt evaluation of relational operations inside assertions.
9241
9242 2017-04-25 Justin Squirek <squirek@adacore.com>
9243
9244 * exp_util.adb (Add_Interface_Invariants):
9245 Restored, code moved back from Build_Invariant_Procedure_Body.
9246 (Add_Parent_Invariants): Restored, code moved back from
9247 Build_Invariant_Procedure_Body.
9248 (Build_Invariant_Procedure_Body):
9249 Remove refactored calls and integrated code from
9250 Add_Parent_Invariants and Add_Interface_Invariants.
9251
9252 2017-04-25 Johannes Kanig <kanig@adacore.com>
9253
9254 * errout.adb (Output_Messages): Adjust computation of total
9255 errors
9256 * erroutc.adb (Error_Msg): In statistics counts, deal
9257 correctly with informational messages that are not warnings.
9258 * errutil.adb (Finalize): adjust computation of total errors.
9259
9260 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9261
9262 * terminals.c (__gnat_terminate_pid): New.
9263 * g-exptty.ads (Terminate_Process): New. Update comments.
9264
9265 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9266
9267 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
9268
9269 2017-04-25 Justin Squirek <squirek@adacore.com>
9270
9271 * sem_ch3.adb (Analyze_Declarations): Minor
9272 correction to comments, move out large conditional and scope
9273 traversal into a predicate.
9274 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
9275 logic.
9276
9277 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9278
9279 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
9280 of prefix whose type is a current instance of a synchronized
9281 type. If the prefix is an object this is an external call (or
9282 requeue) that can only access public operations of the object. The
9283 previous predicate was too restrictive, and did not allow public
9284 protected operations, only task entries.
9285
9286 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9287
9288 * sem_ch5.adb, fname.adb: Minor reformatting.
9289
9290 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9291
9292 * einfo.adb (Is_Anonymous_Access_Type): New routine.
9293 * einfo.ads Update the placement of
9294 E_Anonymous_Access_Subprogram_Type along with all subtypes that
9295 mention the ekind.
9296 (Is_Anonymous_Access_Type): New routine.
9297 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
9298 master for an access type subject to pragma No_Heap_Finalization.
9299 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
9300 allocated or deallocated does not finalization actions if the
9301 associated access type is subject to pragma No_Heap_Finalization.
9302 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
9303 * par-prag.adb Pragma No_Heap_Finalization does not need special
9304 processing from the parser.
9305 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
9306 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
9307 * sem_prag.adb Add an entry in table Sig_Flags for pragma
9308 No_Heap_Finalization.
9309 (Analyze_Pragma): Add processing for
9310 pragma No_Heap_Finalization. Update various error messages to
9311 use Duplication_Error.
9312 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
9313 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
9314 and corresponding pragma id.
9315
9316 2017-04-25 Bob Duff <duff@adacore.com>
9317
9318 * freeze.adb (Freeze_Record_Type): Use the
9319 underlying type of the component type to determine whether it's
9320 elementary. For representation clause purposes, a private type
9321 should behave the same as its full type.
9322 * fname.ads, fname.adb (Is_Predefined_File_Name):
9323 Make sure things like "system.ali" are recognized as predefined.
9324
9325 2017-04-25 Javier Miranda <miranda@adacore.com>
9326
9327 * debug.adb: Update documentation of -gnatd.6.
9328
9329 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9330
9331 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
9332 element iterator when the name is an overloaded function call,
9333 one of whose interpretations yields an array.
9334
9335 2017-04-25 Bob Duff <duff@adacore.com>
9336
9337 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
9338 Is_Internal_Unit_Name): New functions for operating on unit
9339 names, as opposed to file names. There's some duplicated code
9340 with fname.adb, which is unfortunate, but it seems like we don't
9341 want to add dependencies here.
9342 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
9343 to Is_Predefined_Unit_Name; the former was wrong, because Uname
9344 is not a file name at all.
9345 * fname.ads, fname.adb: Document the fact that
9346 Is_Predefined_File_Name and Is_Internal_File_Name can be called
9347 for ALI files, and fix the code so it works properly for ALI
9348 files. E.g. these should return True for "system.ali".
9349
9350 2017-04-25 Justin Squirek <squirek@adacore.com>
9351
9352 * exp_util.adb (Add_Invariant): Removed,
9353 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
9354 and Add_Own_Invariant. (Add_Invariant_Check): Used
9355 for adding runtime checks from any kind of invariant.
9356 (Add_Inherited_Invariant): Generates invariant checks for
9357 class-wide invariants (Add_Interface_Invariants): Removed, code
9358 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
9359 Create a types own invariant procedure (Add_Parent_Invariants):
9360 Removed, code moved to Build_Invariant_Procedure_Body
9361 (Build_Invariant_Procedure_Body): Add refactored calls
9362 and integrated code from Add_Parent_Invariants and
9363 Add_Interface_Invariants.
9364 (Process_Type): Removed, the
9365 relavant code was inlined into both Add_Own_Invariant and
9366 Add_Inherited_Invariant.
9367
9368 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9369
9370 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
9371 scn.adb, osint.adb, fname.adb: Minor reformatting.
9372
9373 2017-04-25 Pascal Obry <obry@adacore.com>
9374
9375 * s-taprop-mingw.adb: Do not check for CloseHandle in
9376 Finalize_TCB.
9377
9378 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9379
9380 * sem_util.adb (Check_Part_Of_Reference):
9381 Continue to examine the context if the reference appears within
9382 an expression function.
9383
9384 2017-04-25 Justin Squirek <squirek@adacore.com>
9385
9386 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
9387 and Build_Invariant_Procedure_Declaration.
9388 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
9389 and Build_Invariant_Procedure_Declaration from exp_ch7
9390 and break-out Is_Untagged_Private_Derivation from
9391 Build_Invariant_Procedure_Body.
9392 (Replace_Type_References):
9393 Append an extra parameter to allow for dispatching replacements
9394 and add the corrasponding logic.
9395 (Type_Invariant): Remove
9396 Replace_Typ_Refs and replace its references with calls to
9397 Replace_Type_References.
9398 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
9399
9400 2017-04-25 Bob Duff <duff@adacore.com>
9401
9402 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
9403 that returns True when appropriate.
9404 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
9405 when compiling predefined files.
9406 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
9407 "gnat.adc" should not be considered a predefined file name.
9408 That required (or at least encouraged) a lot of cleanup of global
9409 variable usage. We shouldn't be communicating information via
9410 the global name buffer.
9411 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
9412 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
9413 required by the above-mentioned cleanup.
9414
9415 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9416
9417 * osint.adb (Find_File): Handle properly a request for a
9418 configuration file whose name is a directory.
9419
9420 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9421
9422 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
9423
9424 2017-04-25 Bob Duff <duff@adacore.com>
9425
9426 * types.ads: Minor: Fix '???' comment.
9427 * sem_ch8.adb: Minor comment fix.
9428
9429 2017-04-25 Bob Duff <duff@adacore.com>
9430
9431 * sem_prag.adb: Remove suspicious uses of Name_Buf.
9432 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
9433 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
9434 Add String_To_Name with no side effects.
9435
9436 2017-04-25 Justin Squirek <squirek@adacore.com>
9437
9438 * sem_ch3.adb (Analyze_Declarations): Add
9439 additional condition for edge case.
9440
9441 2017-04-25 Bob Duff <duff@adacore.com>
9442
9443 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
9444 reserved words inside pragmas. This is necessary to allow the
9445 pragma name Interface to be used in pragma Ignore_Pragma.
9446 * par.adb: Minor comment fix.
9447
9448 2017-04-25 Javier Miranda <miranda@adacore.com>
9449
9450 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
9451 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
9452 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
9453 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
9454 occurrences of RE_Type_Is_Abstract
9455
9456 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9457
9458 * exp_util.adb (Build_Chain): Account for ancestor
9459 subtypes while traversing the derivation chain.
9460
9461 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9462
9463 * sem_attr.adb: minor reformatting.
9464
9465 2017-04-25 Doug Rupp <rupp@adacore.com>
9466
9467 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
9468
9469 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9470
9471 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
9472 the first pass over an assignment statement with target names,
9473 to prevent the generation of subtypes (such as discriminated
9474 record components)that may carry the target name outside of the
9475 tree for the assignment. The subtypes will be generated when
9476 the assignment is reanalyzed in full.
9477 (Analyze_Target_Name): Handle properly class-wide types.
9478
9479 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9480
9481 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
9482 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9483 the purposes of freezing.
9484 * exp_util.adb Update the documentation and structure of the
9485 type map used in class-wide semantics of assertion expressions.
9486 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9487 and resolve the triaged expression because all substitutions
9488 refer to the proper entities. Update the replacement of
9489 references.
9490 (Build_DIC_Procedure_Body): Add formal parameter
9491 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9492 are now only processed when freezing occurs. Build a body only
9493 when one is needed.
9494 (Entity_Hash): Removed.
9495 (Map_Types): New routine.
9496 (Replace_Object_And_Primitive_References): Removed.
9497 (Replace_References): New routine.
9498 (Replace_Type_References): Moved to the library level of Exp_Util.
9499 (Type_Map_Hash): New routine.
9500 (Update_Primitives_Mapping): Update the mapping call.
9501 (Update_Primitives_Mapping_Of_Types): Removed.
9502 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9503 parameter For_Freeze and update the comment on usage.
9504 (Map_Types): New routine.
9505 (Replace_References): New routine.
9506 (Replace_Type_References): Moved to the library level of Exp_Util.
9507 (Update_Primitives_Mapping_Of_Types): Removed.
9508 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9509 properties of the private type to the full view in case the full
9510 view derives from a parent type and inherits a DIC pragma.
9511 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9512 DIC pragma is placed at the top of a declarative region.
9513
9514 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9515
9516 * a-tasatt.adb: Complete previous change and use an unsigned
9517 int to avoid overflow checks.
9518
9519 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9520
9521 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
9522 the error message when the attribute reference is an actual in
9523 a call to a subprogram inherited from a generic formal type with
9524 unknown discriminants, which makes the subprogram and its formal
9525 parameters intrinsic (see RM 6.3.1 (8) and (13)).
9526
9527 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9528
9529 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
9530 sem_prag.adb: Minor reformatting.
9531
9532 2017-04-25 Bob Duff <duff@adacore.com>
9533
9534 * sem_attr.adb (Type_Key): Add code in the
9535 recursive Compute_Type_Key to protect against fetching the source
9536 code for Standard, in case a component of the type is declared
9537 in Standard. There was already code to do this for the original
9538 type, but not for its components.
9539
9540 2017-04-25 Javier Miranda <miranda@adacore.com>
9541
9542 * exp_ch3.adb (Build_Initialization_Call): Handle
9543 subtypes of private types when searching for the underlying full
9544 view of a private type.
9545
9546 2017-04-25 Javier Miranda <miranda@adacore.com>
9547
9548 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
9549 real conditional expression can appear in a fixed-type context
9550 and must be resolved with that context to facilitate the code
9551 generation to the backend.
9552
9553 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9554
9555 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
9556 to indicate whether during inline processing, when some unit U1
9557 appears in the context of a unit U2 compiled for instantiation
9558 or inlining purposes, the body of U1 needs to be compiled as well.
9559 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
9560 context is a package declaration.
9561 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9562 Analyze_Generic_Package_Declaration): ditto.
9563 * inline.adb (Analyze_Inlined_Bodies): Check
9564 Body_Needed_For_Inlining.
9565
9566 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9567
9568 * par.adb (Current_Assign_Node): Global variable use to record
9569 the presence of a target_name in the right hand side of the
9570 assignment being parsed.
9571 * par-ch4.adb (P_Name): If the name is a target_name, mark the
9572 enclosing assignment node accordingly.
9573 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
9574 appropriately.
9575 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
9576 analyzing RHS if the statement has target_names.
9577 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
9578 properly choices that are subtype marks.
9579 * exp_ch5.adb: Code cleanup.
9580
9581 2017-04-25 Bob Duff <duff@adacore.com>
9582
9583 * s-memory.adb: Add a comment regarding efficiency.
9584 * atree.adb: Fix the assertion, and combine 2 assertions into one,
9585 "the source has an extension if and only if the destination does."
9586 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
9587
9588 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
9589
9590 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
9591 conversion.
9592
9593 2017-04-25 Doug Rupp <rupp@adacore.com>
9594
9595 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
9596 handling for ppc64-vx7.
9597 * sigtramp-vxworks-target.inc
9598 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
9599
9600 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9601
9602 * ada_get_targ.adb: New file.
9603
9604 2017-04-25 Bob Duff <duff@adacore.com>
9605
9606 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
9607 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
9608 (UI_GCD): Remove ??? comment involving possible efficiency
9609 improvements. This just isn't important after all these years.
9610 Also minor cleanup.
9611 * uintp.ads: Minor cleanup.
9612
9613 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9614
9615 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
9616 Revert previous changes.
9617 * scng.adb: Minor reformatting.
9618 * s-stratt.ads: Fix unbalanced parens in comment.
9619
9620 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9621
9622 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
9623 Minor reformatting.
9624
9625 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9626
9627 * scng.adb (Scan): Handle '@' appropriately.
9628 * sem_ch5.adb: Code cleanup.
9629
9630 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9631
9632 * freeze.adb (Check_Expression_Function): Do not check for the
9633 use of deferred constants if the freezing of the expression
9634 function is triggered by its generated body, rather than a
9635 premature use.
9636
9637 2017-04-25 Javier Miranda <miranda@adacore.com>
9638
9639 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
9640 subtypes of private types when performing the view conversion.
9641
9642 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9643
9644 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
9645 the purposes of freezing.
9646 * exp_util.adb Update the documentation and structure of the
9647 type map used in class-wide semantics of assertion expressions.
9648 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
9649 and resolve the triaged expression because all substitutions
9650 refer to the proper entities. Update the replacement of
9651 references.
9652 (Build_DIC_Procedure_Body): Add formal parameter
9653 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
9654 are now only processed when freezing occurs. Build a body only
9655 when one is needed.
9656 (Entity_Hash): Removed.
9657 (Map_Types): New routine.
9658 (Replace_Object_And_Primitive_References): Removed.
9659 (Replace_References): New routine.
9660 (Replace_Type_References): Moved to the library level of Exp_Util.
9661 (Type_Map_Hash): New routine.
9662 (Update_Primitives_Mapping): Update the mapping call.
9663 (Update_Primitives_Mapping_Of_Types): Removed.
9664 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
9665 parameter For_Freeze and update the comment on usage.
9666 (Map_Types): New routine.
9667 (Replace_References): New routine.
9668 (Replace_Type_References): Moved to the library level of Exp_Util.
9669 (Update_Primitives_Mapping_Of_Types): Removed.
9670 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
9671 properties of the private type to the full view in case the full
9672 view derives from a parent type and inherits a DIC pragma.
9673 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
9674 DIC pragma is placed at the top of a declarative region.
9675
9676 2017-04-25 Tristan Gingold <gingold@adacore.com>
9677
9678 * s-mmap.ads (Data): Add pragma Inline.
9679
9680 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
9681
9682 * checks.adb (Insert_Valid_Check): Do not use
9683 a renaming to alias a volatile name because this will lead to
9684 multiple evaluations of the volatile name. Use a constant to
9685 capture the value instead.
9686
9687 2017-04-25 Doug Rupp <rupp@adacore.com>
9688
9689 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
9690
9691 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9692
9693 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
9694 Add out parameter to indicate to caller that a wrapper must
9695 be constructed for an inherited primitive whose inherited
9696 pre/postcondition has called to overridden primitives.
9697 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
9698 for inherited primitive that requires it.
9699 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
9700 legal primitive operations and belong to the list of bodies
9701 generated after the freeze point of a type.
9702 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
9703 of Build_Class_Wide_Expression.
9704 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
9705 to construct the specification of the wrapper subprogram created
9706 for an inherited operation.
9707
9708 2017-04-25 Bob Duff <duff@adacore.com>
9709
9710 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
9711 pthread_mutexattr_setprioceiling): Add new interfaces for these
9712 pthread operations.
9713 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
9714 protocols as appropriate for Locking_Policy 'C' and 'I'.
9715 * s-taprop-posix.adb: Minor reformatting to make it more similar
9716 to s-taprop-linux.adb.
9717
9718 2017-04-25 Ed Schonberg <schonberg@adacore.com>
9719
9720 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
9721 Handle properly a multi- level derivation involving both renamed
9722 and constrained parent discriminants, when the type to be
9723 constrained has fewer discriminants that the ultimate ancestor.
9724
9725 2017-04-25 Bob Duff <duff@adacore.com>
9726
9727 * sem_util.adb (Is_Object_Reference): In the
9728 case of N_Explicit_Dereference, return False if it came from a
9729 conditional expression.
9730
9731 2017-04-25 Bob Duff <duff@adacore.com>
9732
9733 * par-ch4.adb (P_Case_Expression): If a semicolon
9734 is followed by "when", assume that ";" was meant to be ",".
9735
9736 2017-04-25 Gary Dismukes <dismukes@adacore.com>
9737
9738 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
9739 fixes.
9740
9741 2017-04-25 Arnaud Charlet <charlet@adacore.com>
9742
9743 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
9744 loading of an entity.
9745 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
9746 previously repeated in the analysis.
9747 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
9748 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
9749 use new procedure SPARK_Implicit_Load.
9750 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
9751 SPARK_Implicit_Load.
9752
9753 2017-04-25 Javier Miranda <miranda@adacore.com>
9754
9755 * sem_util.adb (New_Copy_Tree): By default
9756 copying of defining identifiers is prohibited because
9757 this would introduce an entirely new entity into the
9758 tree. This patch introduces an exception to this general
9759 rule: the declaration of constants and variables located in
9760 Expression_With_Action nodes.
9761 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
9762 (In_Map): New subprogram.
9763 (Visit_Entity): New subprogram.
9764 (Visit_Node): Handle EWA_Level,
9765 EWA_Inner_Scope_Level, and take care of defining entities defined
9766 in Expression_With_Action nodes.
9767
9768 2017-04-25 Thomas Quinot <quinot@adacore.com>
9769
9770 * exp_ch6.adb: minor comment edit.
9771 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
9772 procedure specifications that come from source.
9773 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
9774 Null_Statement attribute.
9775 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
9776 procedure, generate statement SCO for the generated NULL statement.
9777 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
9778 parser, if available.
9779
9780 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9781
9782 * system-linux-s390.ads: Use Long_Integer'Size to define
9783 Memory_Size.
9784
9785 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
9786
9787 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
9788
9789 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
9790
9791 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
9792 * g-socket.adb (To_Host_Entry): Fix typo in comment.
9793 * gnat_ugn.texi: Fix typo.
9794 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
9795 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
9796 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
9797 * sem_util.adb (Mark_Coextensions): Likewise.
9798 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
9799
9800 2017-03-28 Andreas Schwab <schwab@suse.de>
9801
9802 PR ada/80117
9803 * system-linux-aarch64-ilp32.ads: New file.
9804 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
9805 from LIBGNAT_TARGET_PAIRS.
9806 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
9807 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
9808 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
9809 or -mabi=ilp32, resp.
9810
9811 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
9812
9813 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
9814
9815 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
9816
9817 PR ada/79903
9818 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
9819
9820 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
9821
9822 PR ada/79945
9823 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
9824
9825 * system-linux-arm.ads (Default_Bit_Order): Likewise.
9826 * system-linux-mips.ads (Default_Bit_Order): Likewise.
9827 * system-linux-armeb.ads: Delete.
9828 * system-linux-mipsel.ads: Likewise.
9829 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
9830 (ARM/Linux): Likewise.
9831
9832 2017-02-24 Jakub Jelinek <jakub@redhat.com>
9833
9834 PR c/79677
9835 * gcc-interface/misc.c (gnat_handle_option): Pass true to
9836 handle_generated_option GENERATED_P.
9837
9838 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9839
9840 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
9841 around a justified modular type if it doesn't have the same scalar
9842 storage order as the enclosing record type.
9843
9844 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9845
9846 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
9847 of boolean rvalues to function calls.
9848
9849 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9850
9851 * gcc-interface/utils.c (fold_bit_position): New function.
9852 (rest_of_record_type_compilation): Call it instead of bit_position to
9853 compute the field position and remove the call to remove_conversions.
9854 (compute_related_constant): Factor out the multiplication in both
9855 operands, if any, and streamline the final test.
9856
9857 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9858
9859 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
9860
9861 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9862
9863 * gcc-interface/decl.c: Include demangle.h.
9864 (is_cplusplus_method): Return again true for a primitive operation
9865 only if it is dispatching. For a subprogram with an interface name,
9866 call the demangler to get the number of C++ parameters and compare it
9867 with the number of Ada parameters.
9868
9869 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9870
9871 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
9872 there is no end label, put the location of the At_End procedure on
9873 the call to the procedure.
9874
9875 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9876
9877 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
9878 value for array types with TYPE_INDEX_TYPE set on their domain type.
9879 * gcc-interface/utils.c (max_size): For operations and expressions, do
9880 not build a new node if the operands have not changed or are missing.
9881
9882 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
9883
9884 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
9885 argument when recursing on TRUTH_NOT_EXPR.
9886
9887 2017-02-12 John Marino <gnugcc@marino.st>
9888
9889 * system-freebsd-x86.ads: Rename into...
9890 * system-freebsd.ads: ...this.
9891 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
9892 * gcc-interface/Makefile.in: Support aarch64-freebsd.
9893 (x86-64/FreeBSD): Adjust to above renaming.
9894 (i386/FreeBSD): Likewise.
9895
9896 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
9897
9898 * comperr.adb: Update FSF bug reporting URL.
9899
9900 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
9901 Jakub Jelinek <jakub@redhat.com>
9902
9903 PR ada/79309
9904 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
9905
9906 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
9907
9908 PR lto/79061
9909 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
9910 to build_translation_unit_decl.
9911
9912 2017-01-23 Javier Miranda <miranda@adacore.com>
9913
9914 * sem_util.adb (New_Copy_Tree): Code cleanup:
9915 removal of the internal map (ie. variable Actual_Map, its
9916 associated local variables, and all the code handling it).
9917 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
9918 force loading of the System package when processing a task type.
9919 (Analyze_Protected_Type_Declaration): in GNATprove mode force
9920 loading of the System package when processing a protected type.
9921 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
9922 force loading of the System package when processing compilation
9923 unit with a main-like subprogram.
9924 * frontend.adb (Frontend): remove forced loading of the System
9925 package.
9926
9927 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9928
9929 * sem_prag.adb (Default_Initial_Condition): If the desired type
9930 declaration is a derived type declaration with discriminants,
9931 it is rewritten as a private type declaration.
9932 * sem_ch13.adb (Replace_Type_References_Generic,
9933 Visible_Component): A discriminated private type with descriminnts
9934 has components that must be rewritten as selected components
9935 if they appear as identifiers in an aspect expression such as
9936 a Default_Initial_Condition.
9937 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
9938 nodes.
9939
9940 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9941
9942 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
9943 * gnat1drv.adb Generate an empty object file for an ignored
9944 Ghost compilation unit.
9945 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
9946
9947 2017-01-23 Yannick Moy <moy@adacore.com>
9948
9949 * sem_ch4.adb (Analyze_Indexed_Component_Form):
9950 Adapt to inlined prefix with string literal subtype.
9951 * inline.adb (Expand_Inlined_Call): Keep unchecked
9952 conversion inside inlined call when formal type is constrained.
9953
9954 2017-01-23 Javier Miranda <miranda@adacore.com>
9955
9956 * sem_util.adb (New_Copy_Tree): Code cleanup:
9957 removal of global variables. All the global variables, global
9958 functions and tables of this subprogram are now declared locally.
9959
9960 2017-01-23 Gary Dismukes <dismukes@adacore.com>
9961
9962 * exp_strm.ads: Minor reformatting and typo fixes.
9963
9964 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9965
9966 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
9967 exp_aggr.adb: Minor reformatting.
9968 * g-diopit.adb: minor grammar/punctuation fix in comment.
9969 * g-byorma.ads: minor fix of unbalanced parens in comment.
9970
9971 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9972
9973 * par.adb: Update the documentation of component Labl.
9974 * par-ch6.adb (P_Return_Statement): Set the expected label of
9975 an extended return statement to Error.
9976
9977 2017-01-23 Tristan Gingold <gingold@adacore.com>
9978
9979 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
9980
9981 2017-01-23 Ed Schonberg <schonberg@adacore.com>
9982
9983 * expander.adb: Handle N_Delta_Aggregate.
9984
9985 2017-01-23 Javier Miranda <miranda@adacore.com>
9986
9987 * exp_ch6.adb (Expand_Call): Improve the code that
9988 checks if some formal of the called subprogram is a class-wide
9989 interface, to handle subtypes of class-wide interfaces.
9990
9991 2017-01-23 Javier Miranda <miranda@adacore.com>
9992
9993 * checks.adb (Apply_Parameter_Aliasing_Checks):
9994 Remove side effects of the actuals before generating the overlap
9995 check.
9996
9997 2017-01-23 Justin Squirek <squirek@adacore.com>
9998
9999 * exp_strm.ads, exp_strm.ads
10000 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
10001 as to avoid getting the underlying type by default.
10002 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
10003 underlying type in the Iiput and output attribute cases when
10004 building their respective functions.
10005
10006 2017-01-23 Gary Dismukes <dismukes@adacore.com>
10007
10008 * scng.adb: Minor reformatting of error message.
10009
10010 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10011
10012 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
10013 to freeze the return type of an expression funxtion that is a
10014 completion, if the type is a limited view and the non-limited
10015 view is available.
10016
10017 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10018
10019 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
10020 aggregate construct.
10021 (P_Record_Or_Array_Component_Association): An array aggregate
10022 can start with an Iterated_Component_Association.
10023 * scng.adb: Modify error message on improper use of @ in earlier
10024 versions of the language.
10025 * sinfo.ads: New node kind N_Delta_Aggregate.
10026 * sinfo.adb: An N_Delta_Aggregate has component associations and
10027 an expression.
10028 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
10029 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
10030 Create a new index for each one of the choices in the association,
10031 to prevent spurious homonyms in the scope.
10032 (Resolve_Delta_Aggregate): New.
10033 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
10034 * exp_util.adb (Insert_Actions): Take into account
10035 N_Delta_Aggregate.
10036 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
10037 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
10038 and local procedures Expand_Delta_Array_Aggregate and
10039 expand_Delta_Record_Aggregate.
10040 * sprint.adb: Handle N_Delta_Aggregate.
10041
10042 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10043
10044 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
10045 empty name when the exception declaration is subject to pragma
10046 Discard_Names.
10047 (Null_String): New routine.
10048
10049 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10050
10051 * par-ch9.adb (P_Protected_Definition): Parse
10052 any optional and potentially illegal pragmas which appear in
10053 a protected operation declaration list.
10054 (P_Task_Items): Parse
10055 any optional and potentially illegal pragmas which appear in a
10056 task item list.
10057
10058 2017-01-23 Pascal Obry <obry@adacore.com>
10059
10060 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
10061 is needed when a foreign thread call a Win32 API using a thread handle
10062 like GetThreadTimes() for example.
10063
10064 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10065
10066 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10067 allow an 'Address clause to be specified on a prefix of a
10068 class-wide type.
10069
10070 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10071
10072 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10073 attribute 'Valid is a renaming of the original expression when
10074 the expression denotes a name. For all other kinds of expression,
10075 use a constant to capture the value.
10076 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10077 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10078
10079 2017-01-23 Justin Squirek <squirek@adacore.com>
10080
10081 * sem_eval.adb (Eval_Integer_Literal): Add special
10082 case to avoid optimizing out check if the literal appears in
10083 an if-expression.
10084
10085 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10086
10087 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
10088 allow an 'Address clause to be specified on a prefix of a
10089 class-wide type.
10090
10091 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10092
10093 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
10094 attribute 'Valid is a renaming of the original expression when
10095 the expression denotes a name. For all other kinds of expression,
10096 use a constant to capture the value.
10097 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
10098 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
10099
10100 2017-01-23 Justin Squirek <squirek@adacore.com>
10101
10102 * sem_eval.adb (Eval_Integer_Literal): Add special
10103 case to avoid optimizing out check if the literal appears in
10104 an if-expression.
10105
10106 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10107
10108 * sem_ch4.adb (Try_Primitive_Operations,
10109 Is_Valid_First_Argument_Of): argument is valid if it is a derived
10110 type with unknown discriminants that matches its underlying
10111 record view.
10112 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
10113 expression if its type is derived from a limited type with
10114 unknown discriminants, because the expansion (which is a call)
10115 must be expanded in the enclosing context to add the proper build-
10116 in-place parameters to the call.
10117 * lib.ads, exp_ch9.adb: Minor fixes in comments.
10118
10119 2017-01-23 Yannick Moy <moy@adacore.com>
10120
10121 * frontend.adb (Frontend): Do not load runtime
10122 unit for GNATprove when parsing failed.
10123 * exp_ch9.adb: minor removal of extra whitespace
10124 * exp_ch6.adb: minor typo in comment
10125 * sem_util.adb: Code cleanup.
10126 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
10127 * a-ngcefu.adb: minor style fix in whitespace
10128
10129 2017-01-23 Thomas Quinot <quinot@adacore.com>
10130
10131 * scos.ads: Document usage of 'd' as default SCO kind for
10132 declarations.
10133 * par_sco.adb (Traverse_Declarations_Or_Statements.
10134 Traverse_Degenerate_Subprogram): New supporting routine for expression
10135 functions and null procedures.
10136 (Traverse_Declarations_Or_Statements.Traverse_One): Add
10137 N_Expression_Function to the subprogram case; add required
10138 support for null procedures and expression functions.
10139
10140 2017-01-23 Bob Duff <duff@adacore.com>
10141
10142 * namet.ads (Bounded_String): Decrease the size of type
10143 Bounded_String to avoid running out of stack space.
10144 * namet.ads (Append): Don't ignore buffer overflow; raise
10145 Program_Error instead.
10146
10147 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10148
10149 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
10150 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
10151 reformatting.
10152 * exp_ch9.adb: minor style fix in comment.
10153
10154 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10155
10156 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
10157 for a limited record extension with unknown discriminants whose
10158 full view has no discriminants.
10159
10160 2017-01-23 Yannick Moy <moy@adacore.com>
10161
10162 * exp_spark.adb: Alphabetize with clauses.
10163
10164 2017-01-23 Yannick Moy <moy@adacore.com>
10165
10166 * sem_util.adb (Has_Enabled_Property): Treat
10167 protected objects and variables differently from other variables.
10168
10169 2017-01-23 Thomas Quinot <quinot@adacore.com>
10170
10171 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
10172 Split original Ada 95 part off into new subprogram
10173 below. Call that subprogram (instead of proceeding with
10174 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
10175 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
10176 * debug.adb Document new switch -gnatd.p
10177 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
10178 record for reverse bit order if an error has already been posted
10179 on the record type. This avoids generating extraneous "info:"
10180 messages for illegal code.
10181
10182 2017-01-23 Justin Squirek <squirek@adacore.com>
10183
10184 * sem_ch3.adb (Analyze_Declarations): Correct comments
10185 * freeze.adb (Find_Constant): Add detection of deferred constants
10186 so they are not incorrectly flagged as premature.
10187
10188 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10189
10190 * scans.ads: New token At_Sign. Remove '@' from list of illegal
10191 characters for future version of the language. '@' is legal name.
10192 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
10193 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
10194 denotes a Target_Name.
10195 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
10196 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
10197 (Has_Target_Names): New flag on N_Assignment_Statement, to
10198 indicate that RHS has occurrences of N_Target_Name.
10199 * sem.adb: Call Analyze_Target_Name.
10200 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
10201 (urrent_LHS): Global variable that denotes LHS of assignment,
10202 used in the analysis of Target_Name nodes.
10203 * sem_res.adb (Resolve_Target_Name): New procedure.
10204 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
10205 N is an assignment statement whose RHS contains occurences of @
10206 that designate the value of the LHS of the assignment. If the
10207 LHS is side-effect free the target names can be replaced with
10208 a copy of the LHS; otherwise the semantics of the assignment
10209 is described in terms of a procedure with an in-out parameter,
10210 and expanded as such.
10211 (Expand_N_Assignment_Statement): Call
10212 Expand_Assign_With_Target_Names when needed.
10213 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
10214 * sprint.adb: Handle N_Target_Name.
10215
10216 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
10217
10218 * checks.adb: Minor fix in comment.
10219
10220 2017-01-23 Philippe Gil <gil@adacore.com>
10221
10222 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
10223 count in Sort = Memory_Usage or Allocations_Count
10224
10225 2017-01-23 Justin Squirek <squirek@adacore.com>
10226
10227 * sem_ch3.adb: Code cleanup.
10228
10229 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10230
10231 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
10232 variables to the local variable section. Update the profile
10233 of various nested routine that previously had visibility
10234 of those globals. One the matching phase has completed,
10235 remove certain classes of clauses which are considered noise.
10236 (Check_Dependency_Clause): Properly detect a match between two
10237 'Result attributes. Update the various post-match cases to use
10238 Is_Already_Matched as this routine now automatically recognizes
10239 a previously matched 'Result attribute.
10240 (Is_Already_Matched): New routine.
10241 (Remove_Extra_Clauses): New routine.
10242 (Report_Extra_Clauses): Remove the detection of ... => null
10243 clauses as this is now done in Remove_Extra_Clauses.
10244
10245 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10246
10247 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
10248 report on spurious overlaps between values involving a subtype
10249 with a static predicate, because the expansion of such a subtype
10250 into individual ranges in inhibited in ASIS mode.
10251
10252 2017-01-23 Justin Squirek <squirek@adacore.com>
10253
10254 * sem_ch3.adb (Analyze_Declarations): Add detection
10255 of an edge case and delay freezing if it is present.
10256
10257 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10258
10259 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
10260 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
10261
10262 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10263
10264 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
10265 access-to-subprogram types inherit the convention of the
10266 associated subprogram. (Set_Profile_Convention): New routine.
10267 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
10268 of the two entities directly, use Conventions_Match to account
10269 for anonymous access-to-subprogram and subprogram types.
10270 (Conventions_Match): New routine.
10271
10272 2017-01-23 Claire Dross <dross@adacore.com>
10273
10274 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
10275 which return Universal_Integer, force the overflow check flag for
10276 Length and Range_Length for types as big as Long_Long_Integer.
10277
10278 2017-01-23 Claire Dross <dross@adacore.com>
10279
10280 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
10281 attributes which return Universal_Integer, introduce a conversion
10282 to the expected type with the appropriate check flags set.
10283 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
10284 base type if the range is null. It may still be invalid if it
10285 is higher than the lower bound. This is checked later in the
10286 context in which the range appears.
10287
10288 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
10289
10290 * scos.ads: Introduce a constant to represent ignored
10291 dependencies in SCO_Unit_Table_Entry.
10292
10293 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10294
10295 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
10296 spaces from error messages.
10297
10298 2017-01-23 Ed Schonberg <schonberg@adacore.com>
10299
10300 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
10301 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
10302 an object declaration for an array type with a modular index type
10303 with the size of Long_Long_Integer. Special processing is needed
10304 in this case to compute reliably the size of the object, and
10305 eventually to raise Storage_Error, when wrap-around arithmetic
10306 might compute a meangingless size for the object.
10307
10308 2017-01-23 Justin Squirek <squirek@adacore.com>
10309
10310 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
10311 sem_type.adb: Code cleanups.
10312
10313 2017-01-23 Bob Duff <duff@adacore.com>
10314
10315 * sem_res.adb (Resolve_Call): In the part of the code where
10316 it is deciding whether to turn the call into an indexed
10317 component, avoid doing so if the call is to an instance of
10318 Unchecked_Conversion. Otherwise, the compiler turns it into an
10319 indexed component, and resolution of that turns it back into a
10320 function call, and so on, resulting in infinite recursion.
10321 * sem_util.adb (Needs_One_Actual): If the first formal has a
10322 default, then return False.
10323
10324 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
10325
10326 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
10327 optimizations when the type is modular and the offsets are equal.
10328
10329 2017-01-20 Thomas Quinot <quinot@adacore.com>
10330
10331 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
10332 message.
10333
10334 2017-01-20 Nicolas Roche <roche@adacore.com>
10335
10336 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
10337
10338 2017-01-20 Bob Duff <duff@adacore.com>
10339
10340 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
10341 (etc) optimizations when the type is modular.
10342
10343 2017-01-20 Yannick Moy <moy@adacore.com>
10344
10345 * sem_ch6.adb (Move_Pragmas): move some pragmas,
10346 but copy the SPARK_Mode pragma instead of moving it.
10347 (Build_Subprogram_Declaration): Ensure that the generated spec
10348 and original body share the same SPARK_Pragma aspect/pragma.
10349 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
10350 procedure to copy SPARK_Mode aspect.
10351
10352 2017-01-20 Bob Duff <duff@adacore.com>
10353
10354 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
10355 even in ASIS mode.
10356 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
10357 Empty even in ASIS mode.
10358
10359 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10360
10361 * exp_ch9.adb: minor style fixes in comments.
10362 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
10363 relative statement introduces an implicit dependency on
10364 Ada.Real_Time.Clock_Time.
10365 * sem_util.adb: Minor reformatting.
10366
10367 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10368
10369 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
10370 must be treated as delayed aspect even if the expression is
10371 a literal, because the aspect affects the freezing and the
10372 elaboration of the object to which it applies.
10373
10374 2017-01-20 Tristan Gingold <gingold@adacore.com>
10375
10376 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
10377
10378 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10379
10380 * lib-xref.adb (Generate_Reference): Do not warn about the
10381 presence of a pragma Unreferenced if the entity appears as the
10382 actual in a procedure call that does not come from source.
10383
10384 2017-01-20 Pascal Obry <obry@adacore.com>
10385
10386 * expect.c, terminals.c: Fix some warnings about unused variables.
10387 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
10388 of the runtime.
10389
10390 2017-01-20 Bob Duff <duff@adacore.com>
10391
10392 * exp_attr.adb (Constrained): Apply an access check (check that
10393 the prefix is not null) when the prefix denotes an object of an
10394 access type; that is, when there is an implicit dereference.
10395
10396 2017-01-20 Gary Dismukes <dismukes@adacore.com>
10397
10398 * s-rident.ads (constant Profile_Info): Remove
10399 No_Calendar from GNAT_Extended_Ravenscar restrictions.
10400
10401 2017-01-20 Tristan Gingold <gingold@adacore.com>
10402
10403 * s-maccod.ads: Add pragma No_Elaboration_Code_All
10404
10405 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10406
10407 * ghost.adb (Mark_Ghost_Clause): New routine.
10408 (Prune_Node): Do not prune compilation unit nodes.
10409 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
10410 This does not touch the node itself, but does prune all its fields.
10411 * ghost.ads (Mark_Ghost_Clause): New routine.
10412 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
10413 package clause mentions Ghost and non-Ghost packages. Mark a
10414 use package clause as Ghost when it mentions a Ghost package.
10415 (Analyze_Use_Type): Emit an error when a use type clause mentions
10416 Ghost and non-Ghost types. Mark a use type clause as Ghost when
10417 it mentions a Ghost type.
10418 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
10419 Ghost when it withs a Ghost unit.
10420
10421 2017-01-20 Javier Miranda <miranda@adacore.com>
10422
10423 * sem_res.adb (Resolve_Call): If a function call
10424 returns a limited view of a type and at the point of the call the
10425 function is not declared in the extended main unit then replace
10426 it with the non-limited view, which must be available. If the
10427 called function is in the extended main unit then no action is
10428 needed since the back-end handles this case.
10429
10430 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
10431
10432 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
10433 (Contains_Subprograms_Refs): ...this. Adjust comment
10434 for constants. (Is_Subp_Or_Const_Ref): Rename into...
10435 (Is_Subprogram_Ref): ...this.
10436 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
10437 Has_Non_Subprograms_Referencer and adjust comment. Remove
10438 incorrect shortcut for package declarations and bodies.
10439
10440 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10441
10442 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
10443 base type differs from that of the completion and the private
10444 subtype is an itype (created for a constraint on an access
10445 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
10446 anomalies in gigi.
10447
10448 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10449
10450 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10451 When inheriting the SPARK_Mode of a prior expression function,
10452 look at the properly resolved entity rather than the initial
10453 candidate which may denote a homonym.
10454
10455 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10456
10457 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
10458 Precondition or Postcondition, and the context is pragma
10459 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
10460 and suggest the standard names Assertion_Policy /Pre /Post
10461 instead.
10462
10463 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10464
10465 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
10466
10467 2017-01-20 Javier Miranda <miranda@adacore.com>
10468
10469 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
10470 Entity attribute.
10471 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
10472 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
10473 malformed trees.
10474
10475 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10476
10477 * sem_ch13.adb (Analyze_Aspect_Specification, case
10478 Dynamic_Predicate): If the entity E is a subtype that inherits
10479 a static predicate for its parent P,, the inherited and the
10480 new predicate combine in the generated predicate function,
10481 and E only has a dynamic predicate.
10482
10483 2017-01-20 Tristan Gingold <gingold@adacore.com>
10484
10485 * s-boustr.ads, s-boustr.adb: New package.
10486 * Makefile.rtl: Add s-boustr.
10487
10488 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10489
10490 * inline.adb (Process_Formals): Qualify the
10491 expression of a return statement when it yields a universal type.
10492
10493 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10494
10495 * freeze.adb (Freeze_All): Freeze the default
10496 expressions of all eligible formal parameters that appear in
10497 entries, entry families, and protected subprograms.
10498
10499 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10500
10501 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
10502 for illegal inherited Implicit_Dereference aspects with renamed
10503 discriminants.
10504
10505 2017-01-20 Javier Miranda <miranda@adacore.com>
10506
10507 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
10508 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
10509 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
10510 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
10511 Set_Prev, Tree_Read): Adding assertion.
10512 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
10513 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
10514 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
10515 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
10516 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
10517 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
10518 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
10519 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
10520 Set_ListN_With_Parent): Adding assertion.
10521
10522 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10523
10524 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
10525 import that applies to several homograph subprograms. when one
10526 of them is declared by a subprogram body.
10527
10528 2017-01-20 Justin Squirek <squirek@adacore.com>
10529
10530 * exp_ch6.adb (Expand_Call): Remove optimization
10531 that nulls out calls to null procedures.
10532
10533 2017-01-20 Yannick Moy <moy@adacore.com>
10534
10535 * inline.adb (Expand_Inlined_Call): Keep more
10536 precise type of actual for inlining whenever possible. In
10537 particular, do not switch to the formal type in GNATprove mode in
10538 some case where the GNAT backend might require it for visibility.
10539
10540 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10541
10542 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
10543 aspect Implicit_Dereference can be inherited by a full view if
10544 the partial view has no discriminants, because there is no way
10545 to apply the aspect to the partial view.
10546 (Build_Derived_Record_Type): If derived type renames discriminants
10547 of the parent, the new discriminant inherits the aspect from
10548 the old one.
10549 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
10550 call through an access discriminant designating a subprogram.
10551 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
10552 properly a parameterless call through an access discriminant on
10553 the left-hand side of an assignment.
10554 * sem_res.adb (resolve): If an interpreation involves a
10555 discriminant with an implicit dereference and the expression is an
10556 entity, resolution takes place later in the appropriate routine.
10557 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
10558 access discriminants that designate a subprogram type.
10559
10560 2017-01-20 Pascal Obry <obry@adacore.com>
10561
10562 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
10563
10564 2017-01-20 Yannick Moy <moy@adacore.com>
10565
10566 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
10567 on implicitly with'ed units in GNATprove mode.
10568 * sinfo.ads (Implicit_With): Document use of flag for implicitly
10569 with'ed units in GNATprove mode.
10570
10571 2017-01-20 Ed Schonberg <schonberg@adacore.com>
10572
10573 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
10574 unit Do not report an error on a non-static entity that appears
10575 in the context of a spec expression, such as an aspect expression.
10576
10577 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10578
10579 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
10580 (Is_Underlying_Full_View): New routine.
10581 (Set_Is_Underlying_Full_View): New routine.
10582 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
10583 * einfo.ads Add new attribute Is_Underlying_Full_View.
10584 (Is_Underlying_Full_View): New routine along with pragma Inline.
10585 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
10586 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
10587 class-wide types and underlying full views. The first subtype
10588 is used as the working type for all Itypes, not just array base types.
10589 (Build_DIC_Procedure_Declaration): Do not consider
10590 class-wide types and underlying full views. The first subtype
10591 is used as the working type for all Itypes, not just array
10592 base types.
10593 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
10594 view or an underlying full view without clobbering the attributes
10595 of a previous freeze node.
10596 (Inherit_Freeze_Node): New routine.
10597 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
10598 full view as such.
10599 (Build_Underlying_Full_View): Mark an underlying full view as such.
10600 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
10601 full view as such.
10602
10603 2017-01-20 Yannick Moy <moy@adacore.com>
10604
10605 * sinfo.ads: Document lack of Do_Division_Check flag
10606 on float exponentiation.
10607
10608 2017-01-19 Javier Miranda <miranda@adacore.com>
10609
10610 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
10611 identifier attribute of a block-statement node. Required to avoid
10612 assertion failure when building the new containers library.
10613
10614 2017-01-19 Bob Duff <duff@adacore.com>
10615
10616 * exp_ch3.adb: Update comment.
10617
10618 2017-01-19 Vincent Celier <celier@adacore.com>
10619
10620 * gprep.adb (Gnatprep): Parse the definition file without
10621 "replace in comments" even when switch -C is used.
10622
10623 2017-01-19 Justin Squirek <squirek@adacore.com>
10624
10625 * exp_ch9.adb (Is_Pure_Barrier): Create function
10626 Is_Count_Attribute to identify an expansion of the 'Count
10627 attribute.
10628
10629 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10630
10631 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
10632 statements within an element iterator loop are only analyzed
10633 agter the loop is rewritten. Within a generic the analysis must
10634 be performed in any case to complete name capture.
10635
10636 2017-01-19 Bob Duff <duff@adacore.com>
10637
10638 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
10639 before checking for unrecognized pragmas.
10640 Initialize Pname on its declarations; that's always good style.
10641
10642 2017-01-19 Claire Dross <dross@adacore.com>
10643
10644 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
10645 body into the tree for GNATprove by setting its Parent field. The
10646 components invariants of composite types are not checked by
10647 the composite type's invariant procedure in GNATprove mode.
10648 (Build_Invariant_Procedure_Declaration): Semi-insert the
10649 declaration into the tree for GNATprove by setting its Parent
10650 field.
10651 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
10652 the component invariants to the array type invariant procedure
10653 so that the procedure can be used to check the array type
10654 invariants if any.
10655 (Freeze_Record_Type): In GNATprove mode, do
10656 not add the component invariants to the record type invariant
10657 procedure so that the procedure can be used to check the record
10658 type invariants if any.
10659
10660 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10661
10662 * lib-xref-spark_specific.adb: Minor reformatting.
10663 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
10664
10665 2017-01-19 Javier Miranda <miranda@adacore.com>
10666
10667 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
10668 Build_Back_End_Aggregate.
10669 (Generate_Aggregate_For_Derived_Type): Code cleanup.
10670 (Prepend_Stored_Values): Code cleanup.
10671
10672 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10673
10674 * sem_ch6.adb (Analyze_Expression_Function): Check for an
10675 incomplete return type after attempting to freeze it, so that
10676 other freeze actiona are generated in the proper order.
10677
10678 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10679
10680 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
10681 type, ie. a type whose component is a character type, and the
10682 aggregate is positional, do not convert into a string literal
10683 if the index type is not an integer type, because the original
10684 type may be required in an enclosing operation.
10685
10686 2017-01-19 Bob Duff <duff@adacore.com>
10687
10688 * binde.adb, debug.adb: Enable new elaboration order algorithm
10689 by default. -dp switch reverts to the old algorithm.
10690
10691 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10692
10693 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
10694 (Analyze_Declarations): Create the DIC and Invariant
10695 procedure bodies s after all freezing has taken place.
10696 (Build_Assertion_Bodies): New routine.
10697 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
10698 and Exp_Util.
10699 (Analyze_Package_Specification): Remove the
10700 generation of the DIC and Invariant procedure bodies. This is
10701 now done by Analyze_Declarations.
10702 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
10703 procedures are never treated as primitives.
10704
10705 2017-01-19 Yannick Moy <moy@adacore.com>
10706
10707 * frontend.adb: Analyze inlined bodies and check elaboration
10708 rules in GNATprove mode too.
10709 * sem_elab.adb (Delay_Element): Add Boolean component to save
10710 indication that call is in SPARK code. (Check_Elab_Calls):
10711 Check elaboration rules in GNATprove mode, and correctly set
10712 the current value of SPARK_Mode.
10713 * lib-xref-spark_specific.adb
10714 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
10715
10716 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10717
10718 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
10719 checks on the expression for the high bound of concatenation
10720 when checks are disabled, to suppress warnings about potential
10721 constraint errors in restricted runtimes.
10722
10723 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10724
10725 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
10726 representation-to-position function as inlined.
10727 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
10728 the purity of an internally generated entity if it has been
10729 explicitly marked as pure for optimization purposes.
10730 * exp_aggr.adb: Minor reformatting.
10731
10732 2017-01-19 Javier Miranda <miranda@adacore.com>
10733
10734 * exp_ch6.adb (Expand_Call): Remove side effects on
10735 actuals that are allocators with qualified expression since the
10736 initialization of the object is performed by means of individual
10737 statements (and hence it must be done before the call).
10738
10739 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10740
10741 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
10742 (Build_Derived_Enumeration_Type): If the derived type inherits a
10743 dynamic predicate from its parent, the bounds of the type must
10744 freeze because an explicit constraint is constructed for the
10745 type and the corresponding range is elaborated now.
10746
10747 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10748
10749 * sem_attr.ads: minor fix of inconsistent casing in comment
10750 * lib-writ.ads: minor align comments in columns
10751 * sem_ch3.adb: Minor reformatting.
10752 * spark_xrefs.ads: minor fix typo in SPARK-related comment
10753 * table.ads: minor style fix in comment
10754 * lib-xref-spark_specific.adb
10755 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
10756 * sem_ch12.adb: minor whitespace fix
10757 * freeze.adb: Add comment.
10758 * sem_util.adb (Unique_Name): for instances of
10759 generic subprograms ignore the name of the wrapper package.
10760
10761 2017-01-19 Javier Miranda <miranda@adacore.com>
10762
10763 * exp_aggr.adb (Resolve_Record_Aggregate):
10764 Factorize code needed for aggregates of limited and unlimited
10765 types in a new routine.
10766 (Pass_Aggregate_To_Back_End): New subprogram.
10767
10768 2017-01-19 Yannick Moy <moy@adacore.com>
10769
10770 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
10771
10772 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10773
10774 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
10775 public, for use elsewhere.
10776 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
10777 an Inlined_body, recognize a call that uses object notation
10778 and has not been rewritten as a regular call because regular
10779 expansion has not taken place.
10780
10781 2017-01-19 Bob Duff <duff@adacore.com>
10782
10783 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
10784 in case of generic formal discrete types, because it causes crashes in
10785 the compiler when built with assertions on.
10786
10787 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10788
10789 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
10790 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
10791
10792 2017-01-19 Bob Duff <duff@adacore.com>
10793
10794 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
10795 Increment Warnings_Detected. It was decrementing, which is
10796 wrong since we just issued a warning message.
10797 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
10798 these variables to be of subtype Nat instead of Int, because
10799 they should never be negative.
10800
10801 2017-01-19 Javier Miranda <miranda@adacore.com>
10802
10803 * contracts.adb (Build_Postconditions_Procedure): Replace
10804 Generate_C_Code by Modify_Tree_For_C.
10805 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
10806 Replace Generate_C_Code by Modify_Tree_For_C.
10807 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
10808 Modify_Tree_For_C.
10809 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
10810 Generate_C_Code by Modify_Tree_For_C.
10811 * exp_ch4.adb (Expand_Allocator_Expression): Replace
10812 Generate_C_Code by Modify_Tree_For_C.
10813 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
10814 by Modify_Tree_For_C.
10815 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
10816 Generate_C_Code by Modify_Tree_For_C.
10817 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
10818 by Modify_Tree_For_C.
10819 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
10820
10821 2017-01-19 Javier Miranda <miranda@adacore.com>
10822
10823 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
10824 subprogram.
10825 (Is_Inlinable_Expression_Function): New subprogram.
10826 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
10827 to Sem_Util.
10828 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
10829
10830 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10831
10832 * sem_ch4.adb (Diagnose_Call): Improve error message when a
10833 selected component has a prefix that might be interpreted
10834 as a parameterless function call, but none of the candidate
10835 interpretations is parameterless, and there is a hidden homonym
10836 of the prefix that is a package.
10837 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
10838 interpreted as a parameterless function call and its analysis
10839 fails, do not call Analyze_Selected_Component.
10840
10841 2017-01-19 Steve Baird <baird@adacore.com>
10842
10843 * sem_util.ads: Add new Use_Full_View Boolean parameter to
10844 Get_Index_Bounds.
10845 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
10846 calls to a newly-defined Scalar_Range_Of_Right_View function.
10847
10848 2017-01-19 Arnaud Charlet <charlet@adacore.com>
10849
10850 * gnat1drv.adb: minor fix of unbalanced parens in comment
10851 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
10852 to visible part of the package to allow re-use in GNATprove.
10853 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
10854 from repeated code of Traverse_Compilation_Unit.
10855 (Traverse_Declaration_Or_Statement): fixed detection of
10856 generic subprograms and packages; also, iteration over case
10857 statement alternatives rewritten to avoid testing if the first
10858 alternative is present (since it must be present due to Ada
10859 syntax restrictions).
10860
10861 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
10862
10863 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
10864 returning by reference not just for subprogram body stubs,
10865 but for all subprogram cases.
10866 * sem_util.adb: Code reformatting.
10867 (Requires_Transient_Scope): Update the call to Results_Differ.
10868 (Results_Differ): Update the parameter profile and the associated
10869 comment on usage.
10870
10871 2017-01-19 Ed Schonberg <schonberg@adacore.com>
10872
10873 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
10874 identifier nodes that do not come from source, to handle properly
10875 dimensionality check within an inlined body which inclddes both
10876 original operands and rewritten operands. This removes spurious
10877 dimensionality errors in the presence of front-end inlining,
10878 as well as in SPARK mode.
10879
10880 2017-01-16 Jakub Jelinek <jakub@redhat.com>
10881
10882 PR driver/49726
10883 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
10884
10885 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10886
10887 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
10888
10889 2017-01-13 Arnaud Charlet <charlet@adacore.com>
10890
10891 * doc/gnat_ugn/getting_started_with_gnat.rst,
10892 doc/gnat_ugn/inline_assembler.rst,
10893 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
10894 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
10895 doc/gnat_ugn/about_this_guide.rst,
10896 doc/gnat_ugn/platform_specific_information.rst,
10897 doc/gnat_ugn/example_of_binder_output.rst,
10898 doc/gnat_ugn/gnat_and_program_execution.rst,
10899 doc/gnat_ugn/gnat_utility_programs.rst,
10900 doc/gnat_ugn/the_gnat_compilation_model.rst,
10901 doc/gnat_rm/implementation_defined_attributes.rst,
10902 doc/gnat_rm/compatibility_and_porting_guide.rst,
10903 doc/gnat_rm/standard_library_routines.rst,
10904 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
10905 doc/gnat_rm/implementation_defined_pragmas.rst,
10906 doc/gnat_rm/the_gnat_library.rst,
10907 doc/gnat_rm/obsolescent_features.rst,
10908 doc/gnat_rm/about_this_guide.rst,
10909 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
10910 doc/gnat_rm/implementation_of_ada_2012_features.rst,
10911 doc/gnat_rm/interfacing_to_other_languages.rst,
10912 doc/gnat_rm/implementation_defined_aspects.rst,
10913 doc/gnat_rm.rst: Update documentation.
10914 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
10915
10916 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10917
10918 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
10919 * scil_ll.adb: Minor style fix in comment.
10920 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
10921 even if entity is already set, because the node may be renalyzed
10922 after inlining transformations.
10923
10924 2017-01-13 Javier Miranda <miranda@adacore.com>
10925
10926 * sem_res.adb (Resolve_Call): Do not establish a transient scope
10927 for a call to inlinable expression function (since the call will
10928 be replaced by its returned object).
10929 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
10930 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
10931 (Expand_Call): For inlinable expression function call replace the
10932 call by its returned object.
10933 (Is_Inlinable_Expression_Function): New subprogram.
10934
10935 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10936
10937 * checks.adb: Minor typo fix and reformatting.
10938
10939 2017-01-13 Javier Miranda <miranda@adacore.com>
10940
10941 * contracts.adb (Contract_Only_Subprograms): Remove formal.
10942 (Copy_Original_Specification): Removed.
10943 (Skip_Contract_Only_Subprogram): Move here checks previously
10944 located in the caller of this routine (to leave the code more clean).
10945 (Build_Contract_Only_Subprogram): Code cleanup.
10946 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
10947 (Get_Contract_Only_Missing_Body_Name): Removed.
10948
10949 2017-01-13 Javier Miranda <miranda@adacore.com>
10950
10951 * sem_ch6.adb (Cloned_Expression): New subprogram.
10952 (Freeze_Expr_Types): Complete previous patch since the expression
10953 of an expression-function may have iterators and loops with
10954 defining identifiers which, as part of the preanalysis of the
10955 expression, may be left decorated with itypes that will not be
10956 available in the tree passed to the backend.
10957
10958 2017-01-13 Ed Schonberg <schonberg@adacore.com>
10959
10960 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
10961 conversion to Integer of an expression that is an attribute
10962 reference 'Pos on an enumeration type.
10963
10964 2017-01-13 Bob Duff <duff@adacore.com>
10965
10966 * atree.ads: Minor comment fix.
10967
10968 2017-01-13 Justin Squirek <squirek@adacore.com>
10969
10970 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
10971 calls in accessibility check on return statement.
10972
10973 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
10974
10975 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
10976 Ensure that the input body is a subprogram body before trying to
10977 determine whether it denoted an expression function. Note that
10978 subprogram body stubs cannot denote expression functions.
10979
10980 2017-01-13 Gary Dismukes <dismukes@adacore.com>
10981
10982 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
10983 and typo fixes.
10984
10985 2017-01-13 Javier Miranda <miranda@adacore.com>
10986
10987 * einfo.ads (Component_Bit_Offset): Fix documentation.
10988 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
10989 on record holes for components with unknown compile-time offsets.
10990
10991 2017-01-13 Bob Duff <duff@adacore.com>
10992
10993 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10994 * g-locfil.ads: Minor comment fix.
10995
10996 2017-01-13 Bob Duff <duff@adacore.com>
10997
10998 * binde.adb (Elab_New): New elaboration order algorithm
10999 that is expected to cause fewer ABE issues. This is a work in
11000 progress. The new algorithm is currently disabled, and can be
11001 enable by the -dp switch, or by modifying the Do_Old and Do_New
11002 etc. flags and rebuilding. Experimental code is included to
11003 compare the results of the old and new algorithms.
11004 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
11005 can have multiple of these tables, so the old and new algorithms
11006 can coexist.
11007 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
11008 parameter of type array. This avoids the global variable, and
11009 allows bounds checking (which is normally defeated by the tables
11010 packages). It also ensures that the Elab_Order is read-only
11011 to Bindgen.
11012 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
11013 subprograms that need it, as above.
11014 * debug.adb: Document new -dp switch. Modify doc of old -do
11015 switch.
11016 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
11017 and Bindgen. Move writing of closure (-R and -Ra switches)
11018 to Binde; that's more convenient.
11019
11020 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11021
11022 * sem_ch6.adb (Analyze_Expression_Function): If the expression
11023 function is a completion, all entities referenced in the
11024 expression are frozen. As a consequence, a reference to an
11025 uncompleted private type from an enclosing scope is illegal.
11026
11027 2017-01-13 Javier Miranda <miranda@adacore.com>
11028
11029 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
11030 (Analyze_Subprogram_Body_Helper): At the occurrence of an
11031 expression function declaration that is a completion, its
11032 expression causes freezing (AI12-0103).
11033
11034 2017-01-13 Vadim Godunko <godunko@adacore.com>
11035
11036 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
11037 Reference functions of Ada.Containers.Indefinite_Holders.
11038
11039 2017-01-13 Bob Duff <duff@adacore.com>
11040
11041 * s-os_lib.ads: Minor comment fixes.
11042
11043 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11044
11045 * exp_ch3.adb (Default_Initialize_Object): Do not default
11046 initialize an object when it is of a task type and restriction
11047 No_Tasking is in effect because the initialization is obsolete.
11048 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
11049 restriction No_Tasking is in effect.
11050 (Build_Master_Renaming): Do not rename a master when restriction
11051 No_Tasking is in effect.
11052
11053 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11054
11055 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
11056 the legality of An others clause applies as well to a choice in
11057 an Iterated_component_ association.
11058 (Resolve_Iterated_Component_Association): An others choice
11059 is legal.
11060 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
11061 Iterated_Component_Association is not static.
11062
11063 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11064
11065 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
11066 control is passed to the expresion handler before the new mode
11067 is set.
11068 * sem_ch12.adb (Analyze_Package_Instantiation,
11069 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
11070 in case control is passed to the expresion handler before the
11071 new mode is set.
11072
11073 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11074
11075 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
11076 exp_aggr.adb: Minor reformatting.
11077
11078 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11079
11080 * inline.adb: Minor reformatting and typo fix.
11081
11082 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11083
11084 * sem_util.ads, sem_util.adb (Choice_List): Move function here
11085 from sem_aggr.adb, for use elsewhere.
11086 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
11087 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
11088 Iterated_Component_Present.
11089 * exp_aggr.adb: Use Choice_List throughout, to handle
11090 Iterated_Component_Associations.
11091 (Gen_Loop): Generate proper loop for an
11092 Iterated_Component_Association: loop variable has the identifier
11093 of the original association. Generate a loop even for a single
11094 component choice, in order to make loop parameter visible in
11095 expression.
11096 (Flatten): An Iterated_Component_Association is not static.
11097
11098 2017-01-13 Yannick Moy <moy@adacore.com>
11099
11100 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
11101 float exponentiation for statically known small negative values
11102 is the reciprocal of the exponentiation for the opposite value
11103 of the exponent.
11104 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
11105 Ensure that the value of float exponentiation for negative values
11106 is the reciprocal of the exponentiation for the opposite value
11107 of the exponent.
11108 * inline.adb (Expand_Inlined_Call): Fix the count
11109 for the number of generated gotos.
11110
11111 2017-01-13 Yannick Moy <moy@adacore.com>
11112
11113 * inline.adb: Code cleanup.
11114 * sem_util.adb (Is_OK_Volatile_Context): Add
11115 expression in delay statement as OK for volatile context.
11116
11117 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11118
11119 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
11120 mode a choice that is a subtype with a static predicate is
11121 replaced by the values it covers. This transformation must not
11122 be performed in ASIS mode, to preserve the source for analysis.
11123
11124 2017-01-13 Justin Squirek <squirek@adacore.com>
11125
11126 * nlists.ads: Correct minor typo.
11127
11128 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11129
11130 * sem_ch13.adb: Minor reformatting and typo fix.
11131
11132 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11133
11134 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
11135 Iterated_Component_Association is a named association in an
11136 array aggregate.
11137 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
11138 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
11139 and resolve the discrete choices and the expression of the
11140 new construct.
11141 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
11142 Loop_Actions and Box_Present are attributes of
11143 N_Iterated_Component_Association nodes. Box_Present is always
11144 False in this case.
11145 * sprint.adb (Sprint_Node): An Iterated_Component_Association
11146 has a Discrete_Choices list, as specified in the RM. A
11147 Component_Association for aggregate uses instead a Choices list.
11148 We have to live with this small inconsistency because the new
11149 construct also has a defining identifier, and there is no way
11150 to merge the two node structures.
11151
11152 2017-01-13 Yannick Moy <moy@adacore.com>
11153
11154 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
11155 list of pragmas to remove. Remove pragmas from the list of
11156 statements in the body to inline.
11157 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
11158
11159 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11160
11161 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
11162 Analyze_Declarations, to analyze and resolve the expressions of
11163 aspect specifications in the current declarative list, so that
11164 the expressions have proper entity and type info. This is needed
11165 for ASIS when there is no subsequent expansion to generate this
11166 semantic information.
11167 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
11168 original expression, to suppress cascaded errors when expression
11169 has been constant-folded.
11170 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
11171 ASIS mode, because there is no subsequent expansion to decorate
11172 the tree.
11173
11174 2017-01-13 Yannick Moy <moy@adacore.com>
11175
11176 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
11177 New function to detect when a call may be inlined or not in
11178 GNATprove mode.
11179 (Expand_Inlined_Call): Ensure that a temporary
11180 is always created in the cases where a type conversion may be
11181 needed on an input parameter in GNATprove mode, so that GNATprove
11182 sees the check to perform.
11183 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
11184 when not applicable due to actual requiring type conversion
11185 with possible check but no temporary value can be copied for
11186 GNATprove to see the check.
11187
11188 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11189
11190 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
11191 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
11192 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
11193 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
11194 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
11195 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
11196 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
11197 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
11198 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
11199 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
11200 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
11201 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
11202 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
11203 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
11204 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
11205 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
11206 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
11207 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
11208 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
11209 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
11210 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
11211 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
11212 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
11213 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
11214 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
11215 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
11216 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
11217 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
11218 statements to reflect the new style for case alternatives. Various
11219 code clean up and reformatting.
11220
11221 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11222
11223 * exp_util.adb: Minor reformatting.
11224
11225 2017-01-13 Yannick Moy <moy@adacore.com>
11226
11227 * exp_spark.adb: Code cleanup.
11228 * sem_ch9.adb (Analyze_Delay_Until): Resolve
11229 expression so that calls are identified as such inside delay
11230 until.
11231
11232 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11233
11234 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
11235 * par-ch3.adb (P_Discrete_Choice_List): An
11236 Iterated_Component_Association is an array aggregate component.
11237 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
11238 (Is_Quantified_Expression): New function that performs a lookahead
11239 to distinguish quantified expressions from iterated component
11240 associations.
11241 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
11242 associations.
11243 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
11244 * sem.adb (Analyze): Handle Iterated_Component_Association.
11245 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
11246 component associations.
11247 * sinfo.ads, sinfo.adb: Entries for for
11248 N_Iterated_Component_Association and its fields.
11249 * sprint.adb (Sprint_Node_Actual): Handle
11250 N_Iterated_Component_Association.
11251
11252 2017-01-13 Justin Squirek <squirek@adacore.com>
11253
11254 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
11255 of the style check until after preanalysis of acutals.
11256
11257 2017-01-13 Yannick Moy <moy@adacore.com>
11258
11259 * sem_ch13.adb: Minor reformatting.
11260 * par-ch11.adb: minor style fix in whitespace
11261 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
11262 reduced to Add_Artificial_ALI_File; style fix in declaration of
11263 Text; grammar fix in comment.
11264 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
11265 * freeze.adb: Cleanup to pass pragma instead of
11266 expression to call.
11267 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
11268 replace System'To_Address by equivalent call.
11269
11270 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11271
11272 * bindusg.adb: Improve usage output for -f switch.
11273
11274 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11275
11276 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
11277 Minor reformatting.
11278
11279 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11280
11281 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
11282 treat comparisons on strings as legal in a Static_Predicate.
11283 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
11284 a function call that is the expansion of a string comparison.The
11285 function call is built when compiling the corresponding predicate
11286 function, but the expression has been found legal as a static
11287 predicate during earlier analysis.
11288 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
11289 properly a function call that is the expansion of a string
11290 comparison operation, in order to recover the Static_Predicate
11291 expression and apply it to a static argument when needed.
11292
11293 2017-01-13 Tristan Gingold <gingold@adacore.com>
11294
11295 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
11296 (Open_Read): Re-implement using Open_Read_No_Exception.
11297 (Open_Write): Raise exception in case of error.
11298 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
11299 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
11300 reaise exception.
11301 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
11302
11303 2017-01-13 Yannick Moy <moy@adacore.com>
11304
11305 * checks.adb: Code cleanup.
11306
11307 2017-01-13 Yannick Moy <moy@adacore.com>
11308
11309 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
11310 expression instead of unanalyzed aspect expression for checking
11311 the validity of inheriting an operation. Also copy the expression
11312 being passing it to Build_Class_Wide_Expression, as this call
11313 modifies its argument.
11314 * sem_util.ads Fix comment to reference correct function name
11315 New_Copy_Tree.
11316
11317 2017-01-13 Javier Miranda <miranda@adacore.com>
11318
11319 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
11320 when we propagate information about the indexes back to the original
11321 indexing mode and the prefix of the index is a function call, do not
11322 remove any parameter from such call.
11323
11324 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11325
11326 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
11327 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
11328 a build-in-place function whose result type is tagged.
11329
11330 2017-01-13 Yannick Moy <moy@adacore.com>
11331
11332 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11333 Do not generate a wrapper when the only candidate is a class-wide
11334 subprogram.
11335 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
11336 inside a generic context.
11337
11338 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11339
11340 * exp_util.adb (Add_Inherited_Tagged_DIC):
11341 Pass the object parameters of both the parent and the derived
11342 type DIC procedure to the reference replacement circuitry.
11343 (Find_DIC_Type): Modify the circuitry to present the partial
11344 view of a private type in case the private type defines its own
11345 DIC pragma.
11346 (Replace_Object_And_Primitive_References): Add two
11347 optional formal parameters. Update the comment on usage. Update
11348 the replacement of references to object parameters.
11349
11350 2017-01-13 Gary Dismukes <dismukes@adacore.com>
11351
11352 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
11353
11354 2017-01-13 Ed Schonberg <schonberg@adacore.com>
11355
11356 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
11357 an out parameter that is a type conversion, independently of th
11358 range check that may apply to the expression of the conversion,
11359 for use in GNATProve.
11360
11361 2017-01-13 Yannick Moy <moy@adacore.com>
11362
11363 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
11364 GNATprove_Mode here to Frontend.
11365 * frontend.adb (Frontend): Move the implicit with for System
11366 in GNATprove_Mode here as it ismore correct this way; the old
11367 place only worked by chance, since there were no overloaded names.
11368 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
11369 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
11370 four attributes identified in SRM 9(18), add an implicit with
11371 to Ada.Task_Identification.
11372 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
11373 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
11374 mode.
11375 * checks.adb (Apply_Discriminant_Check,
11376 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
11377 In GNATprove mode, we do not apply the checks, but we still
11378 analyze the expression to possibly issue errors on SPARK
11379 code when a run-time error can be detected at compile time.
11380 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
11381 in GNATprove mode.
11382
11383 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11384
11385 * expander.adb (Expand): Add a warning about using return
11386 statements in Ghost management code.
11387 * exp_ch3.adb (Freeze_Type): Add a warning about using return
11388 statements in Ghost management code.
11389 * exp_ch7.adb (Build_Invariant_Procedure_Body,
11390 Build_Invariant_Procedure_Declaration): Add a warning about
11391 using return statements in Ghost management code.
11392 * exp_disp.adb (Make_DT): Add a warning about using return
11393 statements in Ghost management code.
11394 * exp_util.adb (Build_DIC_Procedure_Body,
11395 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
11396 warning about using return statements in Ghost management code.
11397 * freeze.adb (Freeze_Entity): Add a warning about using return
11398 statements in Ghost management code.
11399 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
11400 statements in Ghost management code.
11401 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
11402 a warning about using return statements in Ghost management code.
11403 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
11404 return statements in Ghost management code.
11405 * sem_ch6.adb (Analyze_Procedure_Call,
11406 Analyze_Subprogram_Body_Helper): Add a warning about using return
11407 statements in Ghost management code.
11408 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
11409 using return statements in Ghost management code.
11410 * sem_ch12.adb (Analyze_Package_Instantiation,
11411 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
11412 Instantiate_Subprogram_Body): Add a warning about using return
11413 statements in Ghost management code.
11414 * sem_ch13.adb (Build_Predicate_Functions,
11415 Build_Predicate_Function_Declarations): Add a warning about
11416 using return statements in Ghost management code.
11417 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
11418 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
11419 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
11420 using return statements in Ghost management code.
11421
11422 2017-01-13 Tristan Gingold <gingold@adacore.com>
11423
11424 * s-mmosin-mingw.adb: Fix pragma import.
11425
11426 2017-01-13 Arnaud Charlet <charlet@adacore.com>
11427
11428 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
11429 codepeer mode.
11430
11431 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
11432
11433 * atree.adb (Allocate_Initialize_Node): A newly created node is
11434 no longer marked as Ghost at this level.
11435 (Mark_New_Ghost_Node): New routine.
11436 (New_Copy): Mark the copy as Ghost.
11437 (New_Entity): Mark the entity as Ghost.
11438 (New_Node): Mark the node as Ghost.
11439 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
11440 apply to unanalyzed entities.
11441 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
11442 entities.
11443 (Set_Is_Checked_Ghost_Entity): This attribute now
11444 applies to all entities as well as unanalyzed entities.
11445 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
11446 all entities as well as unanalyzed entities.
11447 * expander.adb Add with and use clauses for Ghost.
11448 (Expand): Install and revert the Ghost region associated with the node
11449 being expanded.
11450 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
11451 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
11452 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
11453 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
11454 (Freeze_Type): Install and revert the Ghost region associated
11455 with the type being frozen.
11456 * exp_ch5.adb Remove with and use clauses for Ghost.
11457 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
11458 * exp_ch6.adb Remove with and use clauses for Ghost.
11459 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
11460 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
11461 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
11462 Ghost region of the working type.
11463 (Build_Invariant_Procedure_Declaration): Install and revert
11464 the Ghost region of the working type.
11465 (Expand_N_Package_Body): Remove all Ghost-related code.
11466 * exp_ch8.adb Remove with and use clauses for Ghost.
11467 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
11468 code.
11469 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
11470 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
11471 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
11472 code.
11473 * exp_ch13.adb Remove with and use clauses for Ghost.
11474 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
11475 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
11476 the tagged type. Move the generation of various entities within
11477 the Ghost region of the type.
11478 * exp_prag.adb Remove with and use clauses for Ghost.
11479 (Expand_Pragma_Check): Remove all Ghost-related code.
11480 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
11481 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
11482 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
11483 * exp_util.adb (Build_DIC_Procedure_Body): Install
11484 and revert the Ghost region of the working types.
11485 (Build_DIC_Procedure_Declaration): Install and revert the
11486 Ghost region of the working type.
11487 (Make_Invariant_Call): Install and revert the Ghost region of the
11488 associated type.
11489 (Make_Predicate_Call): Reimplemented. Install and revert the
11490 Ghost region of the associated type.
11491 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
11492 of the entity being frozen.
11493 (New_Freeze_Node): Removed.
11494 * ghost.adb Remove with and use clauses for Opt.
11495 (Check_Ghost_Completion): Update the parameter profile
11496 and all references to formal parameters.
11497 (Ghost_Entity): Update the comment on usage.
11498 (Install_Ghost_Mode): New routines.
11499 (Is_Ghost_Assignment): New routine.
11500 (Is_Ghost_Declaration): New routine.
11501 (Is_Ghost_Pragma): New routine.
11502 (Is_Ghost_Procedure_Call): New routine.
11503 (Is_Ghost_Renaming): Removed.
11504 (Is_OK_Declaration): Reimplemented.
11505 (Is_OK_Pragma): Reimplemented.
11506 (Is_OK_Statement): Reimplemented.
11507 (Is_Subject_To_Ghost): Update the comment on usage.
11508 (Mark_And_Set_Ghost_Assignment): New routine.
11509 (Mark_And_Set_Ghost_Body): New routine.
11510 (Mark_And_Set_Ghost_Completion): New routine.
11511 (Mark_And_Set_Ghost_Declaration): New routine.
11512 (Mark_And_Set_Ghost_Instantiation): New routine.
11513 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11514 (Mark_Full_View_As_Ghost): Removed.
11515 (Mark_Ghost_Declaration_Or_Body): New routine.
11516 (Mark_Ghost_Pragma): New routine.
11517 (Mark_Ghost_Renaming): New routine.
11518 (Mark_Pragma_As_Ghost): Removed.
11519 (Mark_Renaming_As_Ghost): Removed.
11520 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
11521 (Prune_Node): Freeze nodes no longer need special pruning, they
11522 are processed by the general ignored Ghost code mechanism.
11523 (Restore_Ghost_Mode): New routine.
11524 (Set_Ghost_Mode): Reimplemented.
11525 (Set_Ghost_Mode_From_Entity): Removed.
11526 * ghost.ads Add with and use clauses for Ghost.
11527 (Check_Ghost_Completion): Update the parameter profile
11528 along with the comment on usage.
11529 (Install_Ghost_Mode): New routine.
11530 (Is_Ghost_Assignment): New routine.
11531 (Is_Ghost_Declaration): New routine.
11532 (Is_Ghost_Pragma): New routine.
11533 (Is_Ghost_Procedure_Call): New routine.
11534 (Mark_And_Set_Ghost_Assignment): New routine.
11535 (Mark_And_Set_Ghost_Body): New routine.
11536 (Mark_And_Set_Ghost_Completion): New routine.
11537 (Mark_And_Set_Ghost_Declaration): New routine.
11538 (Mark_And_Set_Ghost_Instantiation): New routine.
11539 (Mark_And_Set_Ghost_Procedure_Call): New routine.
11540 (Mark_Full_View_As_Ghost): Removed.
11541 (Mark_Ghost_Pragma): New routine.
11542 (Mark_Ghost_Renaming): New routine.
11543 (Mark_Pragma_As_Ghost): Removed.
11544 (Mark_Renaming_As_Ghost): Removed.
11545 (Restore_Ghost_Mode): New routine.
11546 (Set_Ghost_Mode): Redefined.
11547 (Set_Ghost_Mode_From_Entity): Removed.
11548 * sem.adb (Analyze): Install and revert the Ghost region of the
11549 node being analyzed.
11550 (Do_Analyze): Change the way a clean Ghost
11551 region is installed and reverted.
11552 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
11553 all Ghost-related code.
11554 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
11555 (Analyze_Number_Declaration): Remove all Ghost-related code.
11556 (Analyze_Object_Declaration): Install and revert the Ghost region of
11557 a deferred object declaration's completion.
11558 (Array_Type_Declaration): Remove all Ghost-related code.
11559 (Build_Derived_Type): Update the comment on
11560 the propagation of Ghost attributes from a parent to a derived type.
11561 (Derive_Subprogram): Remove all Ghost-related code.
11562 (Make_Class_Wide_Type): Remove all Ghost-related code.
11563 (Make_Implicit_Base): Remove all Ghost-related code.
11564 (Process_Full_View): Install and revert the Ghost region of
11565 the partial view. There is no longer need to check the Ghost
11566 completion here.
11567 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
11568 region of the left hand side.
11569 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
11570 all Ghost-related code.
11571 (Analyze_Expression_Function): Remove all Ghost-related code.
11572 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
11573 (Analyze_Procedure_Call): Install and revert the Ghost region of
11574 the procedure being called.
11575 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
11576 region of the spec or body.
11577 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
11578 (Build_Subprogram_Declaration): Remove all Ghost-related code.
11579 (Find_Corresponding_Spec): Remove all Ghost-related code.
11580 (Process_Formals): Remove all Ghost-related code.
11581 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
11582 the Ghost region of the spec.
11583 (Analyze_Package_Declaration): Remove all Ghost-related code.
11584 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
11585 Ghost when it aliases a Ghost entity.
11586 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
11587 a Ghost entity.
11588 (Analyze_Object_Renaming): Mark a renaming as Ghost when
11589 it aliases a Ghost entity.
11590 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
11591 a Ghost entity.
11592 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
11593 aliases a Ghost entity.
11594 * sem_ch11.adb Remove with and use clauses for Ghost.
11595 (Analyze_Exception_Declaration): Remove all Ghost-related code.
11596 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
11597 Ghost-related code.
11598 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
11599 code.
11600 (Analyze_Package_Instantiation): Install and revert the Ghost region
11601 of the package instantiation.
11602 (Analyze_Subprogram_Instantiation): Install
11603 and revert the Ghost region of the subprogram instantiation.
11604 (Instantiate_Package_Body): Code clean up. Install and revert the
11605 Ghost region of the package body.
11606 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
11607 Ghost region of the subprogram body.
11608 * sem_ch13.adb (Build_Predicate_Functions): Install
11609 and revert the Ghost region of the related type.
11610 (Build_Predicate_Function_Declaration): Code clean up. Install
11611 and rever the Ghost region of the related type.
11612 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
11613 Install and revert the Ghost region of the pragma.
11614 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
11615 Ghost region of the pragma.
11616 (Analyze_Pragma): Install and revert the Ghost region of various
11617 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
11618 or encloses a Ghost entity.
11619 (Analyze_Pre_Post_Condition): Install and revert the Ghost
11620 region of the pragma.
11621 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
11622 Ghost region of the pragma.
11623 * sem_res.adb (Resolve): Remove all Ghost-related code.
11624 * sem_util.adb (Is_Declaration): Reimplemented.
11625 (Is_Declaration_Other_Than_Renaming): New routine.
11626 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
11627 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
11628 (Is_Ghost_Pragma): Removed.
11629 (Is_Ignored_Ghost_Pragma): New routine.
11630 (Set_Is_Checked_Ghost_Pragma): New routine.
11631 (Set_Is_Ghost_Pragma): Removed.
11632 (Set_Is_Ignored_Ghost_Pragma): New routine.
11633 * sinfo.ads: Update the documentation on Ghost mode and
11634 Ghost regions. New attributes Is_Checked_Ghost_Pragma
11635 and Is_Ignored_Ghost_Pragma along with usages in nodes.
11636 Remove attribute Is_Ghost_Pragma along with usages in nodes.
11637 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11638 (Is_Ghost_Pragma): Removed along with pragma Inline.
11639 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11640 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
11641 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
11642 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
11643
11644 2017-01-12 Tristan Gingold <gingold@adacore.com>
11645
11646 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
11647 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
11648
11649 2017-01-12 Yannick Moy <moy@adacore.com>
11650
11651 * errout.adb, errout.ads (Initialize): Factor common treatment
11652 in Reset_Warnings.
11653 (Reset_Warnings): New procedure to reset counts related to warnings.
11654 (Record_Compilation_Errors): New variable to store the presence of an
11655 error, used in gnat2why to allow changing the Warning_Mode.
11656 (Compilation_Errors): Use new variable Record_Compilation_Errors to
11657 store the presence of an error.
11658
11659 2017-01-12 Javier Miranda <miranda@adacore.com>
11660
11661 * sem_ch13.adb (Analyze_Aspect_Specifications):
11662 For Interrupt_Handler and Attach_ Handler aspects, decorate the
11663 internally built reference to the protected procedure as coming
11664 from sources and force its analysis.
11665
11666 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11667
11668 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
11669 inherit predicates if any from the first_subtype of the parent,
11670 not from the anonymous parent type.
11671 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
11672 predicate is not a static subtype.
11673
11674 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11675
11676 * freeze.adb (Check_Suspicious_Convention): New procedure
11677 performing a warning check on discriminated record types with
11678 convention C or C++. Factored out of procedure Freeze_Record_Type,
11679 and changed to only apply to base types (to avoid spurious
11680 warnings on subtypes). Minor improvement of warning messages
11681 to refer to discriminated rather than variant record types.
11682 (Freeze_Record_Type): Remove code for performing a suspicious
11683 convention check.
11684 (Freeze_Entity): Only call Freeze_Record_Type
11685 on types that aren't declared within any enclosing generic units
11686 (rather than just excluding the type when the innermost scope
11687 is generic). Call Check_Suspicious_Convention whether or not
11688 the type is declared within a generic unit.
11689 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
11690 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
11691 from Sem_Ch8).
11692
11693 2017-01-12 Tristan Gingold <gingold@adacore.com>
11694
11695 * sysdep.c, adaint.c, rtinit.c, ming32.h:
11696 (__gnat_current_codepage): Renamed from CurrentCodePage
11697 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
11698
11699 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11700
11701 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
11702 quantified expressions, following AI12-050: the loop parameters
11703 of two quantified expressions are conformant if they have the
11704 same identifier.
11705
11706 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11707
11708 * gcc-interface/Makefile.in: Clean up VxWorks targets.
11709
11710 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11711
11712 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
11713 Hnadle properly the attribute reference when it appears as part
11714 of an expression in another loop aspect.
11715
11716 2017-01-12 Ed Schonberg <schonberg@adacore.com>
11717
11718 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
11719 subsidiary of Build_Initialization_Call, to complete generation
11720 of predicate checks on discriminants whose (sub)types have
11721 predicates, and to add checks on variants that do not have an
11722 others clause.
11723 * sem_util.adb (Gather_Components): A missing Others alternative is
11724 not an error when the type of the discriminant is a static predicate
11725 (and coverage has been checked when analyzing the case statement). A
11726 runtime check is generated to verify that a given discriminant
11727 satisfies the predicate (RM 3.8.1. (21.1/2)).
11728
11729 2017-01-12 Yannick Moy <moy@adacore.com>
11730
11731 * gnat1drv.adb (Adjust_Global_Switches): Only
11732 perform checking of exception mechanism when generating code.
11733
11734 2017-01-12 Justin Squirek <squirek@adacore.com>
11735
11736 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
11737 Remove handling of access component with invariant.
11738 (Build_Invariant_Procedure_Declaration): Remove return on class
11739 wide type.
11740 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
11741 conditional exception for component or array so Has_Own_Invariants
11742 flag is not falsly set.
11743 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
11744 wide type to have no invariant flags.
11745
11746 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11747
11748 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
11749 sem_ch13.adb: Minor reformatting.
11750
11751 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11752
11753 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
11754 adjustment primitive when the ancestor type was not properly frozen.
11755 (Gen_Assign): Guard against a missing initialization
11756 primitive when the component type was not properly frozen.
11757 (Initialize_Array_Component): Guard against a missing adjustment
11758 primitive when the component type was not properly frozen.
11759 (Initialize_Record_Component): Guard against a missing adjustment
11760 primitive when the component type was not properly frozen.
11761 (Process_Transient_Component_Completion): The transient object may
11762 not be finalized when its associated type was not properly frozen.
11763 * exp_ch3.adb (Build_Assignment): Guard against a missing
11764 adjustment primitive when the component type was not properly frozen.
11765 (Build_Initialization_Call): Guard against a missing
11766 initialization primitive when the associated type was not properly
11767 frozen.
11768 (Expand_N_Object_Declaration): Guard against a missing
11769 adjustment primitive when the base type was not properly frozen.
11770 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
11771 body when there is no adjustment primitive available. Create an
11772 empty Deep_Finalize body when there is no finalization primitive
11773 available.
11774 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
11775 missing finalization primitive when the designated type was
11776 not properly frozen.
11777 (Expand_N_Allocator): Guard against a missing initialization primitive
11778 when the designated type was not properly frozen.
11779 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
11780 only when the corresponding adjustment primitive is available.
11781 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
11782 adjustment/finalization statements only when there is an available
11783 primitive to carry out the action.
11784 (Build_Initialize_Statements): Generate the initialization/finalization
11785 statements only when there is an available primitive to carry out the
11786 action.
11787 (Make_Adjust_Call): Do not generate a call when the underlying
11788 type is not present due to a possible missing full view.
11789 (Make_Final_Call): Do not generate a call when the underlying
11790 type is not present due to a possible missing full view.
11791 (Make_Finalize_Address_Stmts): Generate an empty body when the
11792 designated type lacks a finalization primitive.
11793 (Make_Init_Call): Do not generate a call when the underlying type is
11794 not present due to a possible missing full view.
11795 (Process_Component_For_Adjust): Add the adjustment call only when the
11796 corresponding adjustment primitive is available.
11797 (Process_Component_For_Finalize): Add the finalization call only when
11798 the corresponding finalization primitive is available.
11799 (Process_Object_Declaration): Use a null statement to emulate a
11800 missing call to the finalization primitive of the object type.
11801 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
11802 (Make_Final_Call): Update the comment on usage.
11803 (Make_Init_Call): Update the comment on usage.
11804 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
11805
11806 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11807
11808 * einfo.ads: Update documentation of Address_Taken.
11809 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
11810 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
11811 for subprograms when setting Address_Taken flag.
11812
11813 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11814
11815 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
11816 Configurable_Run_Time_Mode off when analysing with'ed predefined
11817 libraries.
11818
11819 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11820
11821 * sem_prag.adb: Minor reformatting.
11822 * sem_util.adb (Unique_Entity): fix result for
11823 bodies of entry families.
11824
11825 2017-01-12 Justin Squirek <squirek@adacore.com>
11826
11827 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
11828 Resolve_Suppressible in the pragma Assertion_Policy case.
11829 (Resolve_Suppressible): Created this function to factor out
11830 common code used to resolve Suppress to either Ignore or Check
11831 * snames.ads-tmpl: Add name for Suppressible.
11832
11833 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11834
11835 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
11836 reformatting.
11837 * debug.adb: Minor comment fixes.
11838
11839 2017-01-12 Arnaud Charlet <charlet@adacore.com>
11840
11841 * sem_util.adb (Unique_Entity): For concurrent
11842 bodies that are defined with stubs and complete a declaration
11843 of a single concurrent object return the entity of an implicit
11844 concurrent type, not the entity of the anonymous concurrent
11845 object.
11846 * debug.adb: -gnatd.J is no longer used.
11847 * make.adb (Globalize): Removed, no longer used.
11848 * sem_ch9.adb: minor typo in comment for entry index
11849
11850 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
11851
11852 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
11853 * exp_ch3.adb (Build_Init_Statements): As part of initialising
11854 the value record of a task, set its _Secondary_Stack_Size field
11855 if present.
11856 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
11857 a _Secondary_Stack_Size field in the value record of
11858 the task if a Secondary_Stack_Size rep item is present.
11859 (Make_Task_Create_Call): Include secondary stack size
11860 parameter. If No_Secondary_Stack restriction is in place, passes
11861 stack size of 0.
11862 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
11863 Secondary_Stack_Size.
11864 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
11865 function to define the overhead of the secondary stack.
11866 * s-tarest.adb (Create_Restricted_Task,
11867 Create_Restricted_Task_Sequential): Functions now include
11868 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
11869 * s-tarest.adb (Create_Restricted_Task,
11870 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
11871 include Secondary_Stack_Size parameter.
11872 (Task_Wrapper): Secondary stack now allocated to the size specified by
11873 the Secondary_Stack_Size parameter in the task's ATCB.
11874 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
11875 Secondary_Stack_Size component.
11876 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
11877 Create_Restricted_Task_Sequential): Function now include
11878 Secondary_Stack_Size parameter.
11879 (Task_Wrapper): Secondary stack now allocated to the size
11880 specified by the Secondary_Stack_Size parameter in the task's
11881 ATCB.
11882 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
11883 to include Secondary_Stack_Size parameter.
11884 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
11885 Secondary_Stack_Size aspect, turning the aspect into its corresponding
11886 internal attribute.
11887 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
11888 * snames.adb-tmpl, snames.ads-tmpl: Added names
11889 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
11890 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
11891
11892 2017-01-12 Yannick Moy <moy@adacore.com>
11893
11894 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
11895 subtree.
11896
11897 2017-01-12 Justin Squirek <squirek@adacore.com>
11898
11899 * exp_attr.adb (Expand_N_Attribute_Reference):
11900 Fix Finalization_Size case by properly resolving the type after
11901 rewritting the node.
11902
11903 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11904
11905 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
11906 the tree.
11907 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
11908 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
11909 exp_sel.ads: Minor reformatting.
11910
11911 2017-01-12 Justin Squirek <squirek@adacore.com>
11912
11913 * exp_ch6.adb (Expand_Call): Add guard to prevent
11914 invariant checks from being created for internally generated
11915 subprograms.
11916
11917 2017-01-12 Bob Duff <duff@adacore.com>
11918
11919 * lib-writ.ads: Remove incorrect comment.
11920
11921 2017-01-12 Javier Miranda <miranda@adacore.com>
11922
11923 * debug.adb (-gnatd.K): Enable generation of contract-only
11924 procedures in CodePeer mode.
11925 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
11926 New subprogram.
11927 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
11928 set.
11929 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
11930 subprogram.
11931 (Get_Contract_Only_Missing_Body_Name): New subprogram.
11932 (Get_Contract_Only_Body): New subprogram.
11933 (Set_Contract_Only_Body): New subprogram.
11934 (Is_Contract_Only_Body): New subprogram.
11935 (Set_Is_Contract_Only_Body): New subprogram.
11936 (SCIL_Nodes): Replace table by hash-table.
11937
11938 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11939
11940 * exp_ch6.adb: Minor reformatting.
11941 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
11942
11943 2017-01-12 Bob Duff <duff@adacore.com>
11944
11945 * binde.adb (Forced): New reason for a dependence.
11946 (Force_Elab_Order): Implementation of the new switch.
11947 * binde.ads: Minor comment fixes.
11948 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
11949 long ago that is no longer supported; removed comment about that.
11950 * opt.ads (Force_Elab_Order_File): Name of file specified for
11951 -f switch.
11952 * switch-b.adb: Parse -f switch.
11953
11954 2017-01-12 Justin Squirek <squirek@adacore.com>
11955
11956 * exp_ch6.adb (Check_View_Conversion): Created this function
11957 to properly chain calls to check type invariants that may be
11958 present in a subprogram call after the subprogram.
11959 (Expand_Call): Add a conditional to identify when a view conversion
11960 needs to be checked.
11961 * nlists.adb, nlists.ads (Prepend_New): New routine.
11962 (Prepend_New_To): New routine.
11963
11964 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11965
11966 * sinfo.ads: Minor reformatting.
11967
11968 2017-01-12 Gary Dismukes <dismukes@adacore.com>
11969
11970 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
11971 reformatting.
11972
11973 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
11974
11975 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
11976 variable Definite. Create a local object and pass its 'Access to the
11977 BIP function when the result type is either definite or it does not
11978 require any finalization or secondary stack management.
11979
11980 2017-01-12 Bob Duff <duff@adacore.com>
11981
11982 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
11983 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
11984 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
11985 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
11986 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
11987 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
11988 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
11989 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
11990 Change name to Pragma_Name_Unmapped.
11991 (Pragma_Name_Mapped): Change name to Pragma_Name.
11992 This is because the "mapped" version should be the usual case.
11993
11994 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
11995
11996 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
11997 Is_Default_Init_Cond_Procedure, and
11998 Has_Inherited_Default_Init_Cond. Add uses of flags
11999 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
12000 (Default_Init_Cond_Procedure): Removed.
12001 (DIC_Procedure): New routine.
12002 (Has_Default_Init_Cond): Removed.
12003 (Has_DIC): New routine.
12004 (Has_Inheritable_Invariants): The attribute applies to the base type.
12005 (Has_Inherited_Default_Init_Cond): Removed.
12006 (Has_Inherited_DIC): New routine.
12007 (Has_Inherited_Invariants): The attribute applies to the base type.
12008 (Has_Own_DIC): New routine.
12009 (Has_Own_Invariants): The attribute applies to the base type.
12010 (Is_Default_Init_Cond_Procedure): Removed.
12011 (Is_DIC_Procedure): New routine.
12012 (Set_Default_Init_Cond_Procedure): Removed.
12013 (Set_DIC_Procedure): New routine.
12014 (Set_Has_Default_Init_Cond): Removed.
12015 (Set_Has_Inheritable_Invariants): The attribute applies
12016 to the base type.
12017 (Set_Has_Inherited_Default_Init_Cond): Removed.
12018 (Set_Has_Inherited_DIC): New routine.
12019 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
12020 (Set_Has_Own_DIC): New routine.
12021 (Set_Has_Own_Invariants): The attribute applies to the base type.
12022 (Set_Is_Default_Init_Cond_Procedure): Removed.
12023 (Set_Is_DIC_Procedure): New routine.
12024 (Write_Entity_Flags): Update the output of all flags related to
12025 default initial condition.
12026 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
12027 of the call to the DIC procedure.
12028 (Freeze_Type): Generate the body of the DIC procedure.
12029 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
12030 all occurrences of Create_Append with Append_New_To. Do
12031 not generate an invariant procedure for a class-wide type.
12032 The generated body acts as a freeze action of the working type.
12033 (Build_Invariant_Procedure_Declaration): Do not generate an
12034 invariant procedure for a class-wide type.
12035 (Create_Append): Removed.
12036 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
12037 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
12038 class-wide pre/postcondition description and data structures from
12039 Sem_Prag.
12040 (Build_Class_Wide_Expression): Moved from Sem_Prag.
12041 (Build_DIC_Call): New routine.
12042 (Build_DIC_Procedure_Body): New routine.
12043 (Build_DIC_Procedure_Declaration): New routine.
12044 (Entity_Hash): Moved from Sem_Prag.
12045 (Find_DIC_Type): New routine.
12046 (Update_Primitives_Mapping): Reimplemented.
12047 (Update_Primitives_Mapping_Of_Types): New routine.
12048 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
12049 (Build_DIC_Call): New routine.
12050 (Build_DIC_Procedure_Body): New routine.
12051 (Build_DIC_Procedure_Declaration): New routine.
12052 (Update_Primitives_Mapping): Moved from Sem_Prag.
12053 (Update_Primitives_Mapping_Of_Types): New routine.
12054 * nlists.adb (Append_New): New routine.
12055 (Append_New_To): New routine.
12056 * nlists.ads (Append_New): New routine.
12057 (Append_New_To): New routine.
12058 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
12059 of DIC procedures here. This is now done at the end of the
12060 visible declarations, private declarations, and at the freeze
12061 point of a type.
12062 (Analyze_Private_Extension_Declaration):
12063 A private extension inherits the DIC pragma of a parent type.
12064 (Analyze_Subtype_Declaration): No need to propagate invariant
12065 attributes to a subtype as those apply to the base type.
12066 (Build_Derived_Record_Type): No need to inherit invariants here
12067 as this is now done in Build_Derived_Type.
12068 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
12069 a parent type.
12070 (Process_Full_View): Update the propagation of DIC attributes.
12071 (Propagate_Default_Init_Cond_Attributes): Removed.
12072 * sem_ch7.adb Add with and use clauses for Exp_Util.
12073 (Analyze_Package_Specification): Create the body of the DIC
12074 procedure at the end of the visible and private declarations.
12075 (Preserve_Full_Attributes): Propagate DIC attributes.
12076 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
12077 DIC attributes.
12078 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
12079 * sem_elab.adb (Check_A_Call): Update the call to
12080 Is_Nontrivial_Default_Init_Cond_Procedure.
12081 * sem_prag.adb Remove the with and use clauses for
12082 GNAT.HTable. Move the handling of class- wide pre/postcondition
12083 description and data structures to Exp_Util.
12084 (Analyze_Pragma): Create the declaration of the DIC procedure. There
12085 is no need to propagate invariant-related attributes at this point
12086 as this is done in Build_Invariant_Procedure_Declaration.
12087 (Build_Class_Wide_Expression): Moved to Exp_Util.
12088 (Entity_Hash): Moved to Exp_Util.
12089 (Update_Primitives_Mapping): Moved to Exp_Util.
12090 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
12091 (Update_Primitives_Mapping): Moved to Exp_Util.
12092 * sem_util.adb: Remove with and use clauses for Ghost
12093 and Sem_Ch13.
12094 (Build_Default_Init_Cond_Call): Removed.
12095 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12096 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12097 (Get_Views): Reimplemented.
12098 (Has_Full_Default_Initialization): Reimplement the section on DIC.
12099 (Inherit_Default_Init_Cond_Procedure): Removed.
12100 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12101 (Is_Nontrivial_DIC_Procedure): New routine.
12102 (Is_Verifiable_DIC_Pragma): New routine.
12103 (Propagate_DIC_Attributes): New routine.
12104 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
12105 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
12106 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
12107 (Inherit_Default_Init_Cond_Procedure): Removed.
12108 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
12109 (Is_Nontrivial_DIC_Procedure): New routine.
12110 (Is_Verifiable_DIC_Pragma): New routine.
12111 (Propagate_DIC_Attributes): New routine.
12112 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
12113 on DIC.
12114 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
12115 usage in nodes.
12116 (Expression_Copy): New routine along with pragma Inline.
12117 (Set_Expression_Copy): New routine along with pragma Inline.
12118
12119 2017-01-06 Bob Duff <duff@adacore.com>
12120
12121 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
12122 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
12123 we won't generate the call to s_stalib_adafinal when the main
12124 is not written in Ada.
12125
12126 2017-01-06 Bob Duff <duff@adacore.com>
12127
12128 * sem_prag.adb: Minor: remove pragma Warnings.
12129
12130 2017-01-06 Tristan Gingold <gingold@adacore.com>
12131
12132 * Makefile.rtl: Do not compile s-stchop by default.
12133
12134 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12135
12136 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
12137 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
12138 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
12139 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
12140 Reverted previous change for now.
12141
12142 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12143
12144 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
12145 check to default discriminant value if checks are enabled.
12146 (Build_Assignment): If type of component has static predicate,
12147 apply check to its default value, if any.
12148
12149 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
12150
12151 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
12152 * exp_ch3.adb (Build_Init_Statements): As part of initialising
12153 the value record of a task, set its _Secondary_Stack_Size field
12154 if present.
12155 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
12156 a _Secondary_Stack_Size field in the value record of
12157 the task if a Secondary_Stack_Size rep item is present.
12158 (Make_Task_Create_Call): Include secondary stack size
12159 parameter. If No_Secondary_Stack restriction is in place, passes
12160 stack size of 0.
12161 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
12162 Secondary_Stack_Size.
12163 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
12164 function to define the overhead of the secondary stack.
12165 * s-tarest.adb (Create_Restricted_Task,
12166 Create_Restricted_Task_Sequential): Functions now include
12167 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
12168 * s-tarest.adb (Create_Restricted_Task,
12169 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
12170 now include Secondary_Stack_Size parameter.
12171 (Task_Wrapper):
12172 Secondary stack now allocated to the size specified by the
12173 Secondary_Stack_Size parameter in the task's ATCB.
12174 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
12175 Secondary_Stack_Size component.
12176 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
12177 Create_Restricted_Task_Sequential): Function now include
12178 Secondary_Stack_Size parameter.
12179 (Task_Wrapper): Secondary stack
12180 now allocated to the size specified by the Secondary_Stack_Size
12181 parameter in the task's ATCB.
12182 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
12183 for Secondary_Stack_Size aspect, turning the aspect into its
12184 corresponding internal attribute.
12185 (Analyze_Attribute_Definition):
12186 Process Secondary_Stack_Size attribute.
12187 * snames.adb-tmpl, snames.ads-tmpl: Added names
12188 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
12189 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
12190
12191 2017-01-06 Pascal Obry <obry@adacore.com>
12192
12193 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
12194 Sequential_IO and Direct_IO.
12195
12196 2017-01-06 Bob Duff <duff@adacore.com>
12197
12198 * snames.ads-tmpl (Renamed): New name for the pragma argument.
12199 * par-ch2.adb: Allow the new pragma (with analysis deferred
12200 to Sem_Prag).
12201 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
12202 Keep a mapping from new pragma names to old names.
12203 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
12204 implement it by calling Map_Pragma_Name.
12205 * checks.adb, contracts.adb, einfo.adb, errout.adb,
12206 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
12207 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
12208 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
12209 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
12210 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
12211 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
12212 as appropriate.
12213
12214 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12215
12216 * exp_ch9.adb: Minor reformatting.
12217
12218 2017-01-06 Tristan Gingold <gingold@adacore.com>
12219
12220 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
12221 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
12222 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
12223 (unused).
12224 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
12225 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
12226 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
12227 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
12228
12229 2017-01-06 Bob Duff <duff@adacore.com>
12230
12231 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
12232 dummy implementation of Map_Pragma_Name.
12233
12234 2017-01-06 Tristan Gingold <gingold@adacore.com>
12235
12236 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
12237 entry_body variable constant.
12238 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
12239 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
12240 to constant.
12241 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
12242 now access to constant.
12243
12244 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12245
12246 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
12247 reformatting and typo fixes.
12248
12249 2017-01-06 Bob Duff <duff@adacore.com>
12250
12251 * snames.ads-tmpl: New names for pragma renaming.
12252 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
12253 * par-prag.adb: Add new pragma name to case statement.
12254 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
12255 of the pragma.
12256 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
12257 Dummy implementation of Pragma_Name_Mapped.
12258
12259 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12260
12261 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
12262 better detect call within an entry_wrapper.
12263 * sem_res.adb (Resolve_Call): A protected call within an
12264 entity_wrapper is analyzed in the context of the protected
12265 object but corresponds to a pre-analysis and is not an access
12266 before elaboration.
12267 * sem_attr.adb: Minor reformatting.
12268
12269 2017-01-06 Justin Squirek <squirek@adacore.com>
12270
12271 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
12272 Finalization_Size to allow a prefix of any non-class-wide type.
12273 * sem_attr.ads Modify comment for Finalization_Size to include
12274 definite type use case.
12275
12276 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12277
12278 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
12279 on procedures that are wrappers created for entries that have
12280 preconditions.
12281 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
12282 body is an entry_wrapper, compile it in the context of the
12283 synchronized type, because a precondition may refer to funtions
12284 of the type.
12285 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
12286 body entity.
12287 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
12288 within an Entry_Wrapper this is an external call whose target
12289 is the synchronized object that is the actual in the call to
12290 the wrapper.
12291
12292 2017-01-06 Yannick Moy <moy@adacore.com>
12293
12294 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
12295 in tree, which means not analyzing the previous prefix if the node has
12296 been rewritten into its prefix.
12297
12298 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12299
12300 * s-tpobop.adb: Minor reformatting.
12301
12302 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12303
12304 * checks.adb (Ensure_Valid): Do not generate a validity check
12305 within a generated predicate function, validity checks will have
12306 been applied earlier when required.
12307
12308 2017-01-06 Tristan Gingold <gingold@adacore.com>
12309
12310 * s-tpoben.ads (Protection_Entries): Add comment and reorder
12311 components for performances.
12312 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
12313 semantic.
12314
12315 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12316
12317 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
12318 If expression is compile-time known and obeys a static predicate
12319 it must be labelled as static, to prevent spurious warnings and
12320 run-time errors, e.g. in case statements. This is relevant when
12321 the expression is the result of constant-folding a type conversion
12322 whose expression is a variable with a known static value.
12323
12324 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12325
12326 * exp_attr.adb, sem_attr.ads: Minor reformatting.
12327
12328 2017-01-06 Justin Squirek <squirek@adacore.com>
12329
12330 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
12331 expansion of Finalization_Size attribute.
12332 * sem_attr.adb (Analyze_Attribute): Add entry to check the
12333 semantics of Finalization_Size.
12334 (Eval_Attribute): Add null entry for Finalization_Size.
12335 * sem_attr.ads: Add Finalization_Size to the implementation
12336 dependent attribute list.
12337 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
12338
12339 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12340
12341 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
12342 iterator specification with a serious syntactic error, transform
12343 construct into an infinite loop in order to continue analysis
12344 and prevent a compiler abort.
12345
12346 2017-01-06 Tristan Gingold <gingold@adacore.com>
12347
12348 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
12349 max_queue_lengths_array if unused.
12350
12351 2017-01-06 Bob Duff <duff@adacore.com>
12352
12353 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
12354 array access, in case "\" is at the end of Text.
12355 * stylesw.adb (Set_Style_Check_Options): Don't include input
12356 characters in the error message template, because they could
12357 be control characters such as "\", which Errout will try to
12358 interpret.
12359
12360 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12361
12362 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
12363 For a private type examine the visible declarations that follow
12364 the partial view, not just the private declarations that follow
12365 the full view.
12366
12367 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12368
12369 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
12370 code cleanup.
12371
12372 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12373
12374 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
12375 alias of the inherited op is the parent iterator, no need to
12376 examine dispatch table positions which might not be established
12377 yet if type is not frozen.
12378 * sem_disp.adb (Check_Controlling_Formals): The formal of a
12379 predicate function may be a subtype of a tagged type.
12380 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
12381 of representation items for the completion of a type extension
12382 where a predicate applies to the partial view.
12383 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
12384 parameter that designates function whose actual receives a
12385 predicate check, to improve warning message when the check will
12386 lead to infinite recursion.
12387 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
12388 Apply_Predicate_Check.
12389
12390 2017-01-06 Tristan Gingold <gingold@adacore.com>
12391
12392 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
12393 Gnat_Extended_Ravenscar.
12394 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
12395
12396 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12397
12398 * sem_util.ads: Minor typo fix and reformatting.
12399
12400 2017-01-06 Yannick Moy <moy@adacore.com>
12401
12402 * ghost.adb Minor fixing of references to SPARK RM.
12403 (Check_Ghost_Context): Check whether reference is to a lvalue
12404 before issuing an error about violation of SPARK RM 6.9(13)
12405 when declaration has Ghost policy Check and reference has Ghost
12406 policy Ignore.
12407 * sem_util.adb Minor indentation.
12408 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
12409 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
12410 * sem_util.ads (Unique_Defining_Entity): Document the result
12411 for package body stubs.
12412
12413 2017-01-06 Tristan Gingold <gingold@adacore.com>
12414
12415 * raise-gcc.c (abort): Macro to call Abort_Propagation.
12416 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
12417 constant.
12418 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12419 Do not generate the Entry_Max_Queue_Lengths_Array if all default
12420 values.
12421 * exp_util.adb (Corresponding_Runtime_Package): Consider
12422 Max_Queue_Length pragma.
12423
12424 2017-01-06 Justin Squirek <squirek@adacore.com>
12425
12426 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
12427 Remove declaration generation in the case of
12428 System_Tasking_Protected_Objects_Single_Entry being used,
12429 and add a warning message when this is detected to occur.
12430 (Make_Initialize_Protection): Remove reference pass in the case
12431 of System_Tasking_Protected_Objects_Single_Entry.
12432 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
12433 * s-tposen.adb (Initialize_Protection_Entry): Remove
12434 Entry_Queue_Max parameter.
12435 * s-tposen.ads: Remove the types use to store the entry queue
12436 maximum.
12437 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
12438
12439 2017-01-06 Yannick Moy <moy@adacore.com>
12440
12441 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
12442 behavior of function, to also accept out of range positions
12443 and raise Constraint_Error in such case, and to copy sloc from
12444 literal if No_Location passed as location.
12445 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
12446 of functions to raise Constraint_Error in case of value not in
12447 appropriate range.
12448
12449 2017-01-06 Tristan Gingold <gingold@adacore.com>
12450
12451 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
12452 Invalidate_Stack_Cache.
12453
12454 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
12455
12456 * s-os_lib.adb: Minor fix to the signature of Readlink.
12457
12458 2017-01-06 Javier Miranda <miranda@adacore.com>
12459
12460 * sem_ch6.adb (Conforming_Types): Handle another
12461 confusion between views in a nested instance with an actual
12462 private type whose full view is not in scope.
12463
12464 2017-01-06 Arnaud Charlet <charlet@adacore.com>
12465
12466 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
12467 mark a rewritten if statement as explicit (Comes_From_Source).
12468
12469 2017-01-06 Gary Dismukes <dismukes@adacore.com>
12470
12471 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
12472
12473 2017-01-06 Tristan Gingold <gingold@adacore.com>
12474
12475 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
12476
12477 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12478
12479 * sem_case.adb: Minor reformatting.
12480
12481 2017-01-06 Thomas Quinot <quinot@adacore.com>
12482
12483 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
12484
12485 2017-01-06 Justin Squirek <squirek@adacore.com>
12486
12487 * aspects.adb: Register aspect in Canonical_Aspect.
12488 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
12489 into respective tables.
12490 * einfo.ads, einfo.adb: Add a new attribute for
12491 handling the parameters for Pragma_Max_Entry_Queue
12492 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
12493 for accessing and setting were added as well.
12494 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
12495 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
12496 declaration for pramga arguments and store them in the protected
12497 type node.
12498 (Make_Initialize_Protection): Pass a reference to
12499 the Entry_Max_Queue_Lengths_Array in the protected type node to
12500 the runtime.
12501 * rtsfind.adb: Minor grammar fix.
12502 * rtsfind.ads: Register new types taken from the
12503 runtime libraries RE_Protected_Entry_Queue_Max and
12504 RE_Protected_Entry_Queue_Max_Array
12505 * s-tposen.adb, s-tpoben.adb
12506 (Initialize_Protection_Entry/Initialize_Protection_Entries):
12507 Add extra parameter and add assignment to local object.
12508 * s-tposen.ads, s-tpoben.ads: Add new types to
12509 store entry queue maximums and a field to the entry object record.
12510 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
12511 for Aspect_Max_Queue_Length.
12512 (Check_Aspect_At_Freeze_Point):
12513 Add aspect to list of aspects that don't require delayed analysis.
12514 * sem_prag.adb (Analyze_Pragma): Add case statement for
12515 Pragma_Max_Queue_Length, check semantics, and register arugments
12516 in the respective entry nodes.
12517 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
12518 and Has_Max_Queue_Length
12519 * snames.ads-tmpl: Add constant for the new aspect-name
12520 Name_Max_Queue_Length and corrasponding pragma.
12521
12522 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12523
12524 * exp_util.adb (Is_Controlled_Function_Call):
12525 Reimplemented. Consider any node which has an entity as the
12526 function call may appear in various ways.
12527
12528 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12529
12530 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
12531 an unchecked type conversion when performing a view conversion
12532 to/from a private type. In all other cases use a regular type
12533 conversion to ensure that any relevant checks are properly
12534 installed.
12535
12536 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
12537
12538 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
12539
12540 2017-01-06 Ed Schonberg <schonberg@adacore.com>
12541
12542 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
12543 error on case expression that is an entity, when coverage is
12544 incomplete and entity has a static value obtained by local
12545 propagation.
12546 (Handle_Static_Predicate): New procedure, subsidiary of
12547 Check_Choices, to handle case alternatives that are either
12548 subtype names or subtype indications involving subtypes that
12549 have static predicates.
12550
12551 2017-01-06 Thomas Quinot <quinot@adacore.com>
12552
12553 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
12554 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
12555
12556 2017-01-06 Bob Duff <duff@adacore.com>
12557
12558 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
12559 Elaborate_All(P) to P itself. That could happen in obscure cases,
12560 and always introduced a cycle (P body must be elaborated before
12561 P body).
12562 * lib-writ.ads: Comment clarification.
12563 * ali-util.ads: Minor comment fix.
12564 * ali.adb: Minor reformatting.
12565
12566 2017-01-06 Tristan Gingold <gingold@adacore.com>
12567
12568 * a-exexpr-gcc.adb: Improve comment.
12569
12570 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12571
12572 * s-linux-mips.ads: Use correct signal and errno constants.
12573 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
12574
12575 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
12576
12577 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
12578 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
12579 sections.
12580
12581 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
12582
12583 * gnatvsn.ads: Bump copyright year.
12584
12585 2017-01-01 Jakub Jelinek <jakub@redhat.com>
12586
12587 * gnat_ugn.texi: Bump @copying's copyright year.
12588 * gnat_rm.texi: Likewise.
12589 \f
12590 Copyright (C) 2017 Free Software Foundation, Inc.
12591
12592 Copying and distribution of this file, with or without modification,
12593 are permitted in any medium without royalty provided the copyright
12594 notice and this notice are preserved.