6be83416933d05a1dbedc985eacd033a303b2c8f
[gcc.git] / gcc / ada / ChangeLog
1 2018-11-14 Ed Schonberg <schonberg@adacore.com>
2
3 * exp_ch3.adb: (Expand_N_Object_Declaration): If the expression
4 is a limited aggregate its resolution is delayed until the
5 object declaration is expanded.
6 * sem_ch3.adb: (Analyze_Object_Declaration): If the expression
7 is a limited aggregate and the declaration has a following
8 address clause indicate that resolution of the aggregate (which
9 must be built in place) must be delayed.
10
11 2018-11-14 Bob Duff <duff@adacore.com>
12
13 * sem_attr.adb (To_Address): Simplify setting of
14 Is_Static_Expression. Remove second (unconditional) call to
15 Set_Is_Static_Expression -- surely it's not static if the
16 operand is not. Initialize Static on declaration. Do not try
17 to fold 'To_Address, even though it's static.
18 * exp_attr.adb (To_Address): Preserve Is_Static_Expression.
19 * sinfo.ads, sem_eval.ads, sem_eval.adb (Is_Static_Expression,
20 Is_OK_Static_Expression, Raises_Constraint_Error): Simplify
21 documentation. There was too much repetition and redundancy.
22
23 2018-11-14 Ed Schonberg <schonberg@adacore.com>
24
25 * sem_ch3.adb (Analyze_Object_Declaration): Use the
26 Actual_Subtype to preserve information about a constant
27 initialized with a non-static entity that is known to be valid,
28 when the type of the entity has a narrower range than that of
29 the nominal subtype of the constant.
30 * checks.adb (Determine_Range): If the expression is a constant
31 entity that is known-valid and has a defined Actual_Subtype, use
32 it to determine the actual bounds of the value, to enable
33 additional optimizations.
34
35 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
36
37 * back_end.adb, checks.adb, exp_ch3.adb, exp_ch4.adb,
38 exp_ch7.adb, exp_disp.adb, exp_unst.adb, exp_util.adb,
39 freeze.adb, sem_ch13.adb, sem_ch6.adb, sem_ch7.adb,
40 sem_prag.adb, sem_spark.adb, sem_util.adb: Minor reformatting.
41
42 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
43
44 * exp_ch4.adb (Find_Aliased_Equality): New routine.
45 (Find_Equality): Reimplemented.
46 (Is_Equality): New routine.
47
48 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
49
50 * ghost.adb (Ghost_Entity): New routine.
51 (Mark_And_Set_Ghost_Assignment): Reimplemented.
52 * sem_ch5.adb (Analyze_Assignment): Assess whether the target of
53 the assignment is an ignored Ghost entity before analyzing the
54 left hand side.
55 * sem_ch8.adb (Find_Direct_Name): Update the subprogram
56 signature. Do not generate markers and references when they are
57 not desired.
58 (Nvis_Messages): Do not execute when errors are not desired.
59 (Undefined): Do not emit errors when they are not desired.
60 * sem_ch8.ads (Find_Direct_Name): Update the subprogram
61 signature and comment on usage.
62 * sem_util.adb (Ultimate_Prefix): New routine.
63 * sem_util.ads (Ultimate_Prefix): New routine.
64
65 2018-11-14 Justin Squirek <squirek@adacore.com>
66
67 * sem_ch7.adb (Uninstall_Declarations): Add conditional to avoid
68 uninstalling potential visibility during freezing on enumeration
69 literals.
70
71 2018-11-14 Jerome Lambourg <lambourg@adacore.com>
72
73 * env.c: Do not include crt_externs.h on iOS, as it does not
74 exist there. This is also true for the iPhone Simulator SDK.
75
76 2018-11-14 Ed Schonberg <schonberg@adacore.com>
77
78 * exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure
79 to transform blocks that appear in the declarative part of a
80 package body into subprograms if they contain generated
81 subprograms (such as finalization routines). Needed to generate
82 the proper upward references in unnesting mode.
83
84 2018-11-14 Ed Schonberg <schonberg@adacore.com>
85
86 * freeze.adb (Freeze_Fixed_Point_Type): If the given low bound
87 of the type is less than the nearest model number, do not expand
88 the range of the type to include the model number below the
89 bound. Similar adjustment if the upper bound is larger than the
90 nearest model number.
91
92 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
93
94 * checks.adb (Install_Primitive_Elaboration_Check): Do not
95 create the check when exceptions cannot be used.
96 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not raise
97 Program_Errror when exceptions cannot be used. Analyze the
98 generated code with all checks suppressed.
99 * exp_ch7.adb (Build_Finalizer): Remove the declaration of
100 Exceptions_OK.
101 (Make_Deep_Array_Body): Remove the declaration of Exceptions_OK.
102 (Make_Deep_Record_Body): Remove the declaration of
103 Exceptions_OK.
104 (Process_Transients_In_Scope): Remove the declaration of
105 Exceptions_OK.
106 * exp_util.adb (Exceptions_In_Finalization_OK): Renamed to
107 Exceptions_OK.
108 * exp_util.ads (Exceptions_In_Finalization_OK): Renamed to
109 Exceptions_OK.
110
111 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
112
113 * exp_ch4.adb (Expand_N_Op_Eq): Remove duplicated code and use
114 routine Find_Equality instead.
115 (Find_Equality): New routine.
116
117 2018-11-14 Piotr Trojanek <trojanek@adacore.com>
118
119 * sem_util.adb (First_From_Global_List): Do not expect
120 N_Selected_Component in the Global contract; simplify assertion
121 with Nam_In.
122
123 2018-11-14 Piotr Trojanek <trojanek@adacore.com>
124
125 * sem_ch12.adb (Instantiate_Object): Set
126 Corresponding_Generic_Association on generic actuals with
127 default expression.
128 * sinfo.ads (Corresponding_Generic_Association): Update comment.
129
130 2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
131
132 * exp_ch4.adb (Expand_Concatenate): Use the proper routine to
133 set the need for debug info.
134 * exp_dbug.adb (Build_Subprogram_Instance_Renamings): Use the
135 proper routine to set the need for debug info.
136 * exp_prag.adb (Expand_Pragma_Initial_Condition): Use the proper
137 routine to set the need for debug info.
138 * exp_util.adb (Build_DIC_Procedure_Declaration): Use the proper
139 routine to set the need for debug info.
140 (Build_Invariant_Procedure_Declaration): Use the proper routine
141 to set the need for debug info.
142 * ghost.adb (Record_Ignored_Ghost_Node): Add statements as a
143 whole class to the list of top level ignored Ghost nodes.
144 * sem_util.adb (Set_Debug_Info_Needed): Do not generate debug
145 info for an ignored Ghost entity.
146
147 2018-11-14 Piotr Trojanek <trojanek@adacore.com>
148
149 * bindgen.adb, exp_cg.adb, repinfo.adb, sprint.adb: Minor reuse
150 Cancel_Special_Output where possible.
151
152 2018-11-14 Piotr Trojanek <trojanek@adacore.com>
153
154 * exp_dbug.ads, sem_util.ads: Minor fixes in comments.
155
156 2018-11-14 Arnaud Charlet <charlet@adacore.com>
157
158 * adabkend.adb (Scan_Back_End_Switches): Handle -gx switches
159 explicitly.
160
161 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
162
163 * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
164 for the runtime on platforms where System.Machine_Overflow is true.
165
166 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
167
168 * fe.h (Suppress_Checks): Declare.
169 * gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
170 only if checks are not suppressed and -faggressive-loop-optimizations
171 only if they are.
172 * gcc-interface/trans.c (struct loop_info_d): Remove has_checks and
173 warned_aggressive_loop_optimizations fields.
174 (gigi): Do not clear warn_aggressive_loop_optimizations here.
175 (Raise_Error_to_gnu): Do not set has_checks.
176 (gnat_to_gnu) <N_Indexed_Component>: Remove support for aggressive
177 loop optimizations.
178
179 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
180
181 * gcc-interface/decl.c (components_to_record): Remove obsolete kludge.
182 * gcc-interface/utils.c (make_packable_type): Set TYPE_PACKED on the
183 new type but do not take into account the setting on the old type for
184 the new fields. Rename a local variable.
185 (finish_record_type): Clear DECL_BIT_FIELD_TYPE on a variant part at
186 offset 0, if any.
187 (create_field_decl): Tweak comment.
188
189 2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
190
191 * gcc-interface/utils.c (unchecked_convert): Use local variables for
192 the biased and reverse SSO attributes of both types.
193 Further extend the processing of integral types in the presence of
194 reverse SSO to all scalar types.
195
196 2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
197
198 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Inspection_Point>: Use
199 a simple memory constraint in all cases.
200
201 * gcc-interface/lang-specs.h: Bump copyright year.
202
203 2018-10-17 David Malcolm <dmalcolm@redhat.com>
204
205 * gcc-interface/Make-lang.in (selftest-ada): New.
206
207 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
208
209 * exp_ch3.adb (Is_Null_Statement_List): New predicate.
210 (Build_Array_Init_Proc): Use it to find out whether the
211 initialization procedure Is_Null_Init_Proc; if so, set
212 Warnings_Off on the parameter.
213 (Build_Init_Procedure): Likewise.
214 (Init_Formals): Use an in/out first parameter only for
215 unconstrained arrays and for records either containing or built
216 for proteced types or task types; use an out parameter in all
217 the other cases.
218 * fe.h (Is_Init_Proc): Declare.
219 * gcc-interface/decl.c (type_requires_init_of_formal): Do not
220 return true for a discriminant in an unchecked union.
221 (gnat_to_gnu_param): Do not create a PARM_DECL for the Out
222 parameter of an initialization procedure.
223
224 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
225
226 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If
227 this is not a definition, retrieve the expression in all cases
228 even if we are just annotating types.
229 * gcc-interface/trans.c (gnat_to_gnu): Also translate Size
230 attribute for constrained types in this mode.
231
232 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
233
234 * adaint.c (__gnat_get_executable_suffix_ptr): Add new line.
235 (__gnat_locate_exec): Check that HOST_EXECUTABLE_SUFFIX is not
236 empty before doing a string search for it.
237 * socket.c (ATTRIBUTE_UNUSED): Define.
238 (__gnat_disable_sigpipe): Add ATTRIBUTE_UNUSED on parameter.
239 * terminals.c (ATTRIBUTE_UNUSED): Move around.
240 (__gnat_setup_child_communication): Add ATTRIBUTE_UNUSED on
241 parameter.
242 (__gnat_send_header): Add ATTRIBUTE_UNUSED on parameters.
243
244 2018-10-09 Yannick Moy <moy@adacore.com>
245
246 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Rewrite
247 pragmas as null statements in GNATprove mode.
248
249 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
250
251 * exp_ch6.adb (Add_Call_By_Copy_Code): Initialize the temporary
252 made for an Out parameter if the formal type has discriminants.
253
254 2018-10-09 Maroua Maalej <maalej@adacore.com>
255
256 * sem_spark.adb (Check_Declaration): fix bug related to non
257 access object permissions.
258
259 2018-10-09 Doug Rupp <rupp@adacore.com>
260
261 * libgnat/a-ncelfu.ads: Fix name in header to match package.
262
263 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
264
265 * exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Set
266 Warnings_Off on the B out parameter.
267
268 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
269
270 * einfo.ads: Small comment fix.
271
272 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
273
274 * sem_ch7.adb (Has_Referencer): Add comment for the
275 N_Freeze_Entity case. Do not rely on
276 Has_Referencer_Of_Non_Subprograms to clear the Is_Public flag on
277 subprogram entities.
278
279 2018-10-09 Ed Schonberg <schonberg@adacore.com>
280
281 * exp_unst.adb (In_Synchronized_Call): Handle properly private
282 types whose full views are synchronized types, in order to
283 recognize generated subprograms whose bodies must be considered
284 reachable even if no direct calls to them are visible in the
285 source.
286
287 2018-10-09 Ed Schonberg <schonberg@adacore.com>
288
289 * exp_ch4.adb (Expand_Modular_Op): When expanding an operation
290 on nonbinary modular types, convert the opersnds to an integer
291 type that is large enough to hold the modulus of the type, which
292 may be larger than Integer'Last.
293
294 2018-10-09 Ed Schonberg <schonberg@adacore.com>
295
296 * exp_unst.adb (Unnest_Subprogram): When an uplevel reference
297 is to an unconstrained formal, the 'Access reference that is
298 created to initialize the corresponding component of the
299 activation record must be wrapped in an unchecked conversion to
300 the generated type of the component. Otherwise, spurious suvtype
301 conformance errors will be generated when the code is within an
302 instantiation and the type of the formal is a formal type of the
303 enclosing generic. Note that during unnesting there is no simple
304 way to determine that the code appears within an instance
305 because ther is no scope stack.
306
307 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
308
309 * gcc-interface/decl.c (type_requires_init_of_formal): New
310 predicate.
311 (gnat_to_gnu_param): Use it to determine whether a PARM_DECL
312 must be created for an Out parameter passed by copy.
313
314 2018-10-09 Arnaud Charlet <charlet@adacore.com>
315
316 * libgnat/a-coboho.ads (Storage_Element): Fix a typo.
317
318 2018-10-09 Claire Dross <dross@adacore.com>
319
320 * libgnat/a-cfinve.ads: Remove default value for
321 Max_Size_In_Storage_Elements as it was not supported in SPARK.
322
323 2018-10-09 Ed Schonberg <schonberg@adacore.com>
324
325 * exp_ch6.adb (Add_Call_By_Copy_Node,
326 Add_Simple_Call_By_Copy_Node, Expand_Call_Helper): Reset
327 Is_True_Constant on entities used as Out or In_Out parameters in
328 calls.
329
330 2018-10-09 Ed Schonberg <schonberg@adacore.com>
331
332 * exp_unst.adb (Unnest_Subprogram): Do not load System to obtain
333 the Address entity unless an activation record is being built.
334 Removes useless with_clauses for System when nested subprograms
335 do not have uplevel references, and therefore do not need
336 activation records.
337
338 2018-10-09 Ed Schonberg <schonberg@adacore.com>
339
340 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
341 the conformance check on an aspect expression that includes a
342 call to an instance of Unchecked_Conversion, or more generally a
343 call to an intrinsic operation.
344
345 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
346
347 * repinfo.adb: Remove with/use clause for Stand.
348 (List_Mechanisms): List the mechanism of functions only.
349
350 2018-10-09 Bob Duff <duff@adacore.com>
351
352 * doc/gnat_ugn/gnat_utility_programs.rst: Correct spelling of
353 --eol switch. Document the language-version switches. Update
354 description for --no-exception.
355
356 2018-10-09 Vasiliy Fofanov <fofanov@adacore.com>
357
358 * libgnat/s-os_lib.ads (Normalize_Pathname): Fix incorrect
359 comment.
360
361 2018-10-09 Arnaud Charlet <charlet@adacore.com>
362
363 * vxlink.adb: Remove pragma Annotate, no longer needed.
364
365 2018-10-09 Ed Schonberg <schonberg@adacore.com>
366
367 * checks.adb (Apply_Type_Conversion_Checks): Use GNATprove_Mode
368 rather than SPARK_mode in order to preserve the Do_Range_Check
369 flag for verification purposes.
370
371 2018-10-09 Ed Schonberg <schonberg@adacore.com>
372
373 * exp_aggr.adb (Expand_Array_Aggregate): If it is not possible
374 to build in place an aggregate with component associations, set
375 the Warnings_Off flag on the generated temporary, to prevent
376 spurious warnings from the backend when compiling with the
377 -Wuninitialized gcc flag.
378
379 2018-09-30 Alexandre Oliva <oliva@adacore.com>
380
381 * gcc-interface/lang-specs.h (default_compilers): When given
382 fcompare-debug-second, adjust auxbase like cc1, and pass
383 gnatd_A.
384 * gcc-interface/misc.c (flag_compare_debug): Remove variable.
385 (gnat_post_options): Do not set it.
386 * lib-writ.adb (flag_compare_debug): Remove import.
387 (Write_ALI): Do not test it.
388
389 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
390 Pierre-Marie de Rodat <derodat@adacore.com>
391
392 * gcc-interface/decl.c (is_cplusplus_method): Do not require C++
393 convention on Interfaces.
394 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Try to create a
395 bona-fide thunk and hand it over to the middle-end.
396 (get_controlling_type): New function.
397 (use_alias_for_thunk_p): Likewise.
398 (thunk_labelno): New static variable.
399 (make_covariant_thunk): New function.
400 (maybe_make_gnu_thunk): Likewise.
401 * gcc-interface/utils.c (finish_subprog_decl): Set DECL_CONTEXT of the
402 result DECL here instead of...
403 (end_subprog_body): ...here.
404
405 2018-09-27 Martin Sebor <msebor@redhat.com>
406
407 * gcc-interface/utils.c (make_packable_type): Introduce a temporary
408 to avoid -Wnonnull.
409 (unchecked_convert): Same.
410
411 2018-09-26 Elisa Barboni <barboni@adacore.com>
412
413 * sem_prag.adb (Check_Refined_Global_Item): Improve error
414 message.
415
416 2018-09-26 Thomas Quinot <quinot@adacore.com>
417
418 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a
419 representation item that is an N_Aspect_Definition, retrieve the
420 entity it applies to using the Entity attribute.
421
422 2018-09-26 Justin Squirek <squirek@adacore.com>
423
424 * sem_ch8.adb (Analyze_Subprogram_Renaming): Add extra condition
425 to check for unmarked subprogram references coming from
426 renamings.
427
428 2018-09-26 Arnaud Charlet <charlet@adacore.com>
429
430 * back_end.adb (Scan_Compiler_Arguments): Store -G xxx switches.
431
432 2018-09-26 Yannick Moy <moy@adacore.com>
433
434 * errout.ads: Update comment for insertion character '?'.
435 * inline.adb: Use simple insertion character '?' for GNATprove
436 info messages.
437 * sem_res.adb (Resolve_Call): Issue an info message on inlining
438 in GNATprove mode.
439
440 2018-09-26 Ed Schonberg <schonberg@adacore.com>
441
442 * checks.adb (Apply_Type_Conversion_Checks): Do not generate a
443 range check on the expression of the conversion if it involves a
444 fixed-point type, as such conversions are handled specially
445 during expansion.
446 * exp_ch4.adb (Expand_N_Type_Conversion): In a conversion from
447 Fixed to Integer, use the base type of the expression to ensure
448 that the caller will generate the proper constraint check when
449 needed.
450
451 2018-09-26 Maroua Maalej <maalej@adacore.com>
452
453 * sem_spark.adb (Check_Loop_Statement): Fix a bug related to
454 loop exit environment.
455 (Check_Statement): fixing a bug when comparing the source and
456 target in an assignment statement.
457
458 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
459
460 * sem_ch12.adb (Instantiate_Package_Body): Capture and restore
461 the full compilation context.
462 (Instantiate_Subprogram_Body): Capture and restore the full
463 compilation context.
464
465 2018-09-26 Yannick Moy <moy@adacore.com>
466
467 * debug.adb: Add use for -gnatd_f switch.
468 * inline.adb (Cannot_Inline): Only issue info message for
469 failure to inline in GNATprove mode when switch -gnatd_f is
470 used.
471
472 2018-09-26 Javier Miranda <miranda@adacore.com>
473
474 * exp_disp.adb (Expand_Interface_Conversion): No displacement of
475 the pointer needed when the type of the operand is an interface
476 type that maches the target type and we are compiling under
477 configurable runtime. Adding also documentation explaining why
478 this cannot be done when compiling with the full runtime.
479 * exp_intr.adb: Update comment.
480
481 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
482
483 * sem_ch5.adb (Wrap_Loop_Statement): Annotate as No_Return.
484
485 2018-09-26 Ed Schonberg <schonberg@adacore.com>
486
487 * exp_util.adb (Make_Predicate_Call): Use OK_Convert_To when
488 applying a predicate check to prevent spurious errors when
489 private ancestors are involved.
490
491 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
492
493 * exp_ch4.adb (Expand_N_Allocator): Ensure that the use of the
494 secondary stack does not clash with restriction
495 No_Secondary_Stack.
496 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Ensure that
497 the use of the secondary stack does not clash with restriction
498 No_Secondary_Stack.
499 * sem_ch5.adb (Analyze_Loop_Statement): Wrap the loop in a block
500 prior to analysis in order to either provide a local scope for
501 an iterator, or ensure that the secondary stack is properly
502 managed.
503 (Check_Call): Account for the case where the tree may be
504 unanalyzed or contain prior errors.
505 (Has_Call_Using_Secondary_Stack): Renamed to Has_Sec_Stack_Call.
506 Update all uses of the subprogram.
507 (Prepare_Loop_Statement): New routine.
508
509 2018-09-26 Javier Miranda <miranda@adacore.com>
510
511 * sem_res.adb (Resolve_Actuals): If the formal is a class-wide
512 type conversion then do not skip resolving and expanding the
513 conversion; required to displace the pointer to the object and
514 reference the dispatch table associated with the target
515 interface type.
516
517 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
518
519 * libgnat/g-dynhta.adb (Prepend_Or_Replace): Update the number
520 of key-value pairs in the hash table only when adding a brand
521 new pair.
522
523 2018-09-26 Sergey Rybin <rybin@adacore.com>
524
525 * doc/gnat_ugn/gnat_utility_programs.rst: Add note about
526 processing of aggregate projects in gnatmetric and gnatstub.
527
528 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
529
530 * contracts.adb, exp_unst.adb, exp_util.adb, gnat1drv.adb,
531 opt.ads, par-prag.adb, sem_ch3.adb, sem_ch5.adb, sem_prag.adb,
532 sinfo.ads, snames.ads-tmpl: Minor reformatting.
533
534 2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
535
536 * gcc-interface/Make-lang.in: Add unit GNAT.Sets to the list of
537 front end sources.
538 * impunit.adb: Add unit GNAT.Sets to the list of predefined
539 units.
540 * Makefile.rtl: Add unit GNAT.Sets to the list of non-tasking
541 units.
542 * libgnat/g-sets.adb: New unit.
543 * libgnat/g-sets.ads: New unit.
544 * libgnat/g-dynhta.adb (Minimum_Size): Decrease to 8 in order to
545 allow for small sets. Update all occurrences of Table_Locked to
546 Iterated.
547 (Ensure_Unlocked): Query the number of iterators.
548 (Find_Node): Use the supplied equality.
549 (Is_Empty): New routine.
550 (Lock): Update the number of iterators.
551 (Prepend_Or_Replace): Use the supplied equality.
552 (Size): Update the return type.
553 (Unlock): Update the number of iterators.
554 * libgnat/g-dynhta.ads: Update all occurrences of Table_Locked
555 to Iterated. Rename formal subprogram Equivalent_Keys to "=".
556 (Bucket_Range_Type, Pair_Count_Type): Remove types.
557 (Not_Created, Table_Locked, Iterator_Exhausted): Remove
558 exceptions.
559 (Hash_Table): Update to store the number of iterators rather
560 than locks.
561 (Is_Empty): New routine.
562 (Size): Update the return type.
563 * libgnat/g-lists.adb: Update all occurrences of List_Locked to
564 Iterated.
565 (Ensure_Unlocked): Query the number of iterators.
566 (Length): Remove.
567 (Lock): Update the number of iterators.
568 (Size): New routine.
569 (Unlock): Update the number of iterators.
570 * libgnat/g-lists.ads: Update all occurrences of List_Locked to
571 Iterated.
572 (Element_Count_Type): Remove type.
573 (Not_Created, Table_Locked, Iterator_Exhausted): Remove
574 exceptions.
575 (Linked_List): Update type to store the number of iterators
576 rather than locks.
577 (Length): Remove.
578 (Size): New routine.
579 * libgnat/gnat.ads (Bucket_Range_Type): New type.
580 (Iterated, Iterator_Exhausted, and Not_Created): New exceptions.
581
582 2018-09-26 Javier Miranda <miranda@adacore.com>
583
584 * checks.adb (Install_Null_Excluding_Check): Do not add
585 null-excluding checks when the tree may not be fully decorated.
586 This patch cascade errors.
587
588 2018-09-26 Gary Dismukes <dismukes@adacore.com>
589
590 * sem_ch3.adb (Analyze_Object_Declaration): Remove test for
591 Comes_From_Source, which prevented implicit conversions from
592 being applied to anonymous access-to-subprogram formals in
593 constant declartions that arise from instance associations for
594 generic formal objects. Add RM and AARM references to comment.
595
596 2018-09-26 Olivier Hainque <hainque@adacore.com>
597
598 * opt.ads (OpenAcc_Enabled): New flag. False by default. True
599 when OpenACC pragmas are requested to be honored, when -fopenacc
600 is found on the command line.
601 * back_end.adb (Scan_Compiler_Arguments): Set OpenACC_Enabled if
602 -fopenacc is seen on the command line.
603 * sinfo.adb, sinfo.ads (Is_OpenAcc_Environment): New
604 flag/predicate on Loop statements which embed an Acc_Kernels,
605 Acc_Parallel or Acc_Data pragma.
606 (Is_OpenAcc_Loop): New flag/predicate on Loop statements which
607 embed an Acc_Loop pragma.
608 (Set_Is_OpenAcc_Environment, Set_Is_OpenAcc_Loop): Setters for
609 the new flags.
610 * par-prag.adb (Prag): Handle Acc_Data, Acc_Loop, Acc_Parallel
611 and Acc_Kernels pragmas. Nothing to do here, all handled by
612 sem_prag.
613 * sem_prag.adb (Acc_First, Acc_Next,
614 Validate_Acc_Condition_Clause, Validate_Acc_Data_Clause,
615 Validate_Acc_Int_Expr_Clause, Validate_Acc_Int_Expr_List_Clause,
616 Validate_Acc_Loop_Collapse, Validate_Acc_Loop_Gang,
617 Validate_Acc_Loop_Vector, Validate_Acc_Loop_Worker,
618 Validate_Acc_Name_Reduction, Validate_Acc_Size_Expressions): New
619 helper for Analyze_Pragma, to handle OpenACC pragmas.
620 (Analyze_Pragma): Handle Acc_Data, Acc_Loop, Acc_Parallel and
621 Acc_Kernels pragmas.
622 * sem_ch5.adb (Disable_Constant): Unset Is_True_Constant on
623 variable entity, action for ...
624 (Disable_Constants): Helper for Analyze_Loop_Statement, to ...
625 (Analyze_Loop_Statement): Disable True_Constant on variables
626 referenced within an OpenACC environment.
627 * snames.ads-tmpl: Declare Name_Ids for the OpenACC directives
628 and clauses we can handle. Remove an exraneous whitespace before
629 columns, preventing line length overflow in the generated spec
630 with Ids now reaching beyond 999.
631 * doc/gnat_rm/implementation_defined_pragmas.rst: Document
632 pragma Acc_Parallel, Acc_Loop, Acc_Kernels and Acc_Data.
633 * gnat_rm.texi: Regenerate.
634
635 2018-09-26 Ed Schonberg <schonberg@adacore.com>
636
637 * sem_ch3.adb (Is_Onown_Limited): A derived type whose parent P
638 is a derived limited record is not itself limited if P is a
639 derived limited interface.
640
641 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
642
643 * sem_ch7.adb (Has_Referencer): Remove Top_Level parameter and
644 add In_Nested_Instance and
645 Has_Outer_Referencer_Of_Non_Subprograms parameters. Rename
646 Has_Non_Subprograms_Referencer variable into
647 Has_Referencer_Of_Non_Subprograms and initialize it with the new
648 third parameter. Adjust recursive calls and to the renaming.
649 Replace test on Top_Level with test on In_Nested_Instance to
650 decide whether to clear the Is_Public flag on entities.
651 (Hide_Public_Entities): Adjust call to Has_Referencer.
652
653 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
654
655 * exp_disp.adb (Expand_Interface_Conversion): Use Present test.
656 (Expand_Interface_Thunk): Propagate debug info setting from
657 target.
658 * exp_util.ads (Find_Interface_Tag): Adjust comment.
659 * exp_util.adb (Find_Interface_Tag): Remove assertions of
660 success.
661 * sem_util.adb (Is_Variable_Size_Record): Only look at
662 components and robustify the implementation.
663 * fe.h (Find_Interface_Tag): Declare.
664 (Is_Variable_Size_Record): Likewise.
665
666 2018-09-26 Thomas Quinot <quinot@adacore.com>
667
668 * exp_util.adb (Make_CW_Equivalent_Type): Propagate bit order
669 and scalar storage order from root type to classwide equivalent
670 type, to prevent rejection of the equivalent type by the
671 freezing circuitry.
672
673 2018-09-26 Justin Squirek <squirek@adacore.com>
674
675 * sem_ch5.adb (Analyze_Iterator_Specification): Add conditional
676 to freeze called functions within iterator specifications during
677 full analysis.
678 (Preanalyze_Range): Minor typo fix.
679
680 2018-09-26 Ed Schonberg <schonberg@adacore.com>
681
682 * sem_ch6.adb (Analyze_Function_Return): If the return type has
683 a dynamic_predicate, apply a Predicate_Check to the expression,
684 given that it is implicitly converted to the return type.
685 Exclude case expressions from the check, because in this context
686 the expression is expanded into individual return statements.
687
688 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
689
690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: In
691 -gnatct mode, process the discriminants only for a definition.
692
693 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
694
695 * repinfo.adb (List_Record_Layout): Be prepared for JSON output.
696 (List_Record_Info): Use the flat representation for record
697 subtypes in the JSON format.
698
699 2018-09-26 Justin Squirek <squirek@adacore.com>
700
701 * lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
702 documentation and an extra conditional check for RCI units so
703 that generated ali files will list the spec only instead of a
704 body when a body is not found.
705
706 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
707
708 * gcc-interface/gigi.h (error_gnat_node): Delete.
709 * gcc-interface/trans.c (error_gnat_node): Likewise.
710 (gigi): Replace it with Current_Error_Node.
711 (gnat_to_gnu): Likewise.
712 * gcc-interface/utils.c (rest_of_subprog_body_compilation):
713 Likewise.
714 * gcc-interface/misc.c (internal_error_function): Do not set it.
715
716 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
717
718 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Adjust
719 code retrieving the address when a clause has already been
720 processed.
721 * gcc-interface/trans.c (gnat_to_gnu)
722 <N_Attribute_Definition_Clause>: For an object with a Freeze
723 node, build a meaningful expression.
724
725 2018-09-26 Arnaud Charlet <charlet@adacore.com>
726
727 * gnat1drv.adb (Adjust_Global_Switches): -gnatd_A sets
728 Opt.Disable_ALI_File.
729 * debug.adb: Update debug flags documentation.
730
731 2018-09-26 Ed Schonberg <schonberg@adacore.com>
732
733 * contracts.adb (Analyze_Entry_Or_Subprogram_Contract): The
734 analysis of preconditions specified by pragmas (rather than
735 aspects) is not delayed, and therefore expressions functions
736 that are completions do not need special handling during
737 expansion.
738
739 2018-09-26 Ed Schonberg <schonberg@adacore.com>
740
741 * exp_unst.adb: Fix handling of up level references for entries.
742
743 2018-09-26 Ed Schonberg <schonberg@adacore.com>
744
745 * contracts.adb (Expand_Subprogram_Contract,
746 Process_Preconditions_For): Apply Freeze_Expr_Types to the
747 expression for a precondition of an expression function that is
748 a completion, when the completion appears in the private part
749 and the declaration it completes is in the visible part of the
750 same package.
751 * freeze.adb (Freeze_Expr_Types): Do not establish the scope of
752 the operation if it is already installed, as will be the case
753 when called to analyze the contract oc the subprogram (which
754 happens when generating code inside the subprogram body).
755
756 2018-09-26 Maroua Maalej <maalej@adacore.com>
757
758 * sem_spark.adb (Check_Param_In, Setup_Parameter_Or_Global):
759 Change the operation associated to assigning to an IN parameter.
760 In SPARK, IN access-to-variable is an observe operation for a
761 function, and borrow operation for a procedure.
762
763 2018-09-26 Arnaud Charlet <charlet@adacore.com>
764
765 * vxlink.adb: Minor reformatting.
766
767 2018-09-26 Gary Dismukes <dismukes@adacore.com>
768
769 * exp_ch9.adb, layout.adb, sem_attr.adb, sem_res.adb: Fix
770 miscellaneous typos.
771
772 2018-09-26 Jerome Lambourg <lambourg@adacore.com>
773
774 * vxlink.adb: Kill a CodePeer warning.
775
776 2018-09-24 Eric Botcazou <ebotcazou@adacore.com>
777
778 PR ada/87396
779 * fe.h (Get_Attribute_Definition_Clause): Use 'unsigned char' instead
780 of 'char' as the type of the second parameter.
781
782 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
783
784 * Makefile.rtl (arm% linux-gnueabi%): Always set EH_MECHANISM to -arm.
785
786 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
787
788 PR ada/81103
789 * terminals.c: Do not include termio.h.
790
791 2018-08-27 Martin Liska <mliska@suse.cz>
792
793 * gcc-interface/decl.c (update_profile): Use new function
794 fndecl_built_in_p and remove check for FUNCTION_DECL if
795 possible.
796 * gcc-interface/gigi.h (call_is_atomic_load): Likewise.
797 * gcc-interface/utils.c (gnat_pushdecl): Likewise.
798
799 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
800
801 * exp_unst.ads: Fix typo 'exapnded' to 'expanded'.
802
803 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
804
805 * checks.adb, contracts.adb, exp_aggr.adb, exp_attr.adb,
806 exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb,
807 exp_util.adb, freeze.adb, gnatlink.adb, layout.adb,
808 lib-writ.adb, lib-xref-spark_specific.adb, sem_ch13.adb,
809 sem_ch3.adb, sem_ch6.adb, sem_res.adb, sem_util.adb, sinfo.ads,
810 sprint.adb: Minor reformatting.
811
812 2018-08-21 Jerome Lambourg <lambourg@adacore.com>
813
814 * vxlink-bind.adb, vxlink-bind.ads, vxlink-link.adb,
815 vxlink-link.ads, vxlink-main.adb, vxlink.adb, vxlink.ads: Add a
816 new tool vxlink to handle VxWorks constructors in DKMs.
817 * gcc-interface/Makefile.in: add rules to build vxlink
818
819 2018-08-21 Ed Schonberg <schonberg@adacore.com>
820
821 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Mask_Type):
822 Refine the handling of freezing types for expression functions
823 that are not completions, when analyzing the generated body for
824 the function: the body is inserted at the end of the enclosing
825 declarative part, and its analysis may freeze types declared in
826 the same scope that have not been frozen yet.
827
828 2018-08-21 Ed Schonberg <schonberg@adacore.com>
829
830 * sem_ch6.adb: Remove Freeze_Expr_Types.
831 * freeze.ads, freeze.adb (Freeze_Expr_Types): Moved from
832 sem_ch6.adb, and extended to handle other expressions that may
833 contain unfrozen types that must be frozen in their proper
834 scopes.
835 * contracts.adb (Analyze_Entry_Or_Subprogram_Contract): If the
836 contract is for the generated body of an expression function
837 that is a completion, traverse the expressions for pre- and
838 postconditions to freeze all types before adding the contract
839 code within the subprogram body.
840
841 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
842
843 * sem_ch10.adb: Remove the with and use clause for unit Ghost.
844 (Analyze_With_Clause): Do not mark a with clause which mentions
845 an ignored Ghost code for elimination.
846
847 2018-08-21 Javier Miranda <miranda@adacore.com>
848
849 * lib-writ.adb (Write_Unit_Information): Handle pragmas removed
850 by the expander.
851
852 2018-08-21 Ed Schonberg <schonberg@adacore.com>
853
854 * sem_ch6.adb (Check_Synchronized_Overriding): The conformance
855 between an overriding protected operation and the overridden
856 abstract progenitor operation requires subtype conformance;
857 requiring equality of return types in the case of a function is
858 too restrictive and leads to spurious errors when the return
859 type is a generic actual.
860
861 2018-08-21 Ed Schonberg <schonberg@adacore.com>
862
863 * exp_ch9.adb (Expand_N_Timed_Entry_Call,
864 Expand_Conditional_Entry_Call): Use Reset_Scopes_Of to set
865 properly the scope of all entities created in blocks generated
866 by the expansion of these constructs.
867
868 2018-08-21 Ed Schonberg <schonberg@adacore.com>
869
870 * sem_ch13.adb (Build_Predicate_Functioss): Apply
871 Reset_Quantified_Variables_Scope after predicate function has
872 been analyzed, so that the scope can be reset on the generated
873 loop statements that have replaced the quantified expressions.
874
875 2018-08-21 Bob Duff <duff@adacore.com>
876
877 * einfo.ads, einfo.adb (Private_View, Shadow_Entities): Remove
878 obsolete code.
879
880 2018-08-21 Maroua Maalej <maalej@adacore.com>
881
882 * sem_spark.adb (Check_Call_Statement): Check global and formal
883 parameter permissions at call sites.
884 (Check_Callable_Body): Assume permissions on globals and
885 parameters depending on their modes then analyse the body
886 operations.
887 (Check_Declaration): Consider both deep (including elementary
888 access) object declarations and normal variables. First check
889 whether the deep object is of Ownership Aspec True or not, then,
890 depending on its initialization, assign the appropriate state.
891 Check related to non access type variables deal with
892 initialization value permissions.
893 (Check_Expression): Check nodes used in the expression being
894 analyzed.
895 (Check_Globals): Call by Check_Call_Statement to perform the
896 check on globals.
897 (Check_List): Call Check_Node on each element of the list.
898 (Check_Loop_Statement): Check the Iteration_Scheme and loop
899 statements.
900 (Check_Node): Main traversal procedure to check safe pointer usage.
901 (Check_Package_Body): Check subprogram's body.
902 (Check_Param_In): Take a formal and an actual parameter and
903 Check the permission of every in-mode parameter.
904 (Check_Param_Out): Take a formal and an actual parameter and
905 check the state of out-mode and in out-mode parameters.
906 (Check_Statement): Check statements other than procedure call.
907 (Get_Perm, Get_Perm_Or_Tree, Get_Perm_Tree): Find out the state
908 related to the given name.
909 (Is_Deep): Return True if an object is of access type or has
910 subfields of access type.
911 (Perm_Error, Perm_Error_Subprogram_End): Add an error message
912 whenever the found state on the given name is different from the
913 one expected (in the statement being analyzed).
914 (Process_Path): Given an operation and a current state, call
915 Perm_Error if there is any mismatch.
916 (Return_Declarations, Return_Globals, Return_The_Global): Check
917 the state of a given name at the end of the subprogram. These
918 procedures may change depending on how we shall finally deal
919 with globals and the rhs state in a move operation.
920 (Set_Perm_Extensions, Set_Perm_Prefixes_Borrow,
921 Set_Perm_Prefixes, Setup_Globals, Setup_Parameter_Or_Global,
922 Setup_Parameters): Set up the new states to the given node and
923 up and down the tree after an operation.
924 (Has_Ownership_Aspect_True): This function may disappear later
925 when the Ownership Aspect will be implemented in the FE.
926
927 2018-08-21 Ed Schonberg <schonberg@adacore.com>
928
929 * sem_res.adb (Resolve_Call): Resolve correctly a parameterless
930 call that returns an access type whose designated type is the
931 component type of an array, when the function has no defaulted
932 parameters.
933
934 2018-08-21 Yannick Moy <moy@adacore.com>
935
936 * doc/gnat_ugn/building_executable_programs_with_gnat.rst:
937 Document entries of the target parametrization file.
938 * gnat_ugn.texi: Regenerate.
939
940 2018-08-21 Ed Schonberg <schonberg@adacore.com>
941
942 * sem_attr.adb: Set scope of elaboration flag for 'Access.
943
944 2018-08-21 Ed Schonberg <schonberg@adacore.com>
945
946 * sprint.adb: Add guard on printing aspects.
947
948 2018-08-21 Javier Miranda <miranda@adacore.com>
949
950 * exp_cg.adb (Generate_CG_Output): Handle calls removed by the
951 expander.
952
953 2018-08-21 Ed Schonberg <schonberg@adacore.com>
954
955 * layout.adb: Do not set size of access subprogram if unnesting.
956
957 2018-08-21 Ed Schonberg <schonberg@adacore.com>
958
959 * freeze.adb: Remove warnings for access to subprograms when
960 unnesting is active.
961
962 2018-08-21 Ed Schonberg <schonberg@adacore.com>
963
964 * exp_aggr.adb (Expand_Array_Aggregate): If the component type
965 is limited, the array must be constructed in place, so set flag
966 In_Place_Assign_OK_For_Declaration accordingly. This prevents
967 improper copying of an array of tasks during initialization.
968
969 2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
970
971 * gcc-interface/trans.c (Call_to_gnu): Always suppress an
972 unchecked conversion around the actual for an In parameter
973 passed by copy.
974
975 2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
976
977 * exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a
978 selected component inherited in a record extension and subject
979 to a representation clause, retrieve the position and size from
980 the original record component.
981
982 2018-08-21 Ed Schonberg <schonberg@adacore.com>
983
984 * sem_util.ads, sem_util.adb (New_External_Entity): Type of
985 Suffix_Index must be Int, not Nat, so that a negative value can
986 be used to generate a unique name for an external object, as
987 specified in Tbuild.New_External_Name.
988 (Scope_Within): Handle private type whose completion is a
989 synchronized type (For unnesting).
990 * itypes.ads, itypes.adb (Create_Itype): Ditto
991 * sem_ch3.adb (Constrain_Corresponding_Record): Generate a
992 unique name for the created subtype, because there may be
993 several discriminated tasks present in the same scope, and each
994 needs its distinct corresponding record subtype.
995
996 2018-08-21 Yannick Moy <moy@adacore.com>
997
998 * doc/gnat_ugn/gnat_and_program_execution.rst: Update
999 documentation of dimensionality analysis.
1000 * gnat_ugn.texi: Regenerate.
1001 * Makefile.rtl, impunit.adb: Consider the new units.
1002 * libgnat/s-dfmkio.ads, libgnat/s-dfmopr.ads,
1003 libgnat/s-diflmk.ads: New units based on Float.
1004 * libgnat/s-dilomk.ads, libgnat/s-dlmkio.ads,
1005 libgnat/s-dlmopr.ads: New units based on Long_Float.
1006 * libgnat/s-dmotpr.ads: Rename to libgnat/s-dgmgop.ads and turn
1007 into an instance of
1008 System.Dim.Generic_Mks.Generic_Other_Prefixes.
1009 * libgnat/s-dimmks.ads: Rename to libgnat/s-digemk.ads and turn
1010 into an instance of System.Dim.Generic_Mks.
1011
1012 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
1013
1014 * impunit.adb: Add g-lists to the set of non-implementation
1015 units.
1016 * libgnat/g-lists.adb, libgnat/g-lists.ads: New unit.
1017 * Makefile.rtl: Add g-lists to the set of non-tasking units.
1018 * gcc-interface/Make-lang.in: Add g-lists to the set of files
1019 used by gnat1.
1020
1021 2018-08-21 Ed Schonberg <schonberg@adacore.com>
1022
1023 * exp_ch9.adb (Reset_Scopes): Do not recurse into type
1024 declarations when resetting the scope of entities declared the
1025 procedures generated for entry bodies and accept alternatives.
1026 Use the entity of the procedure declaration, not its body, as
1027 the new scope.
1028
1029 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
1030
1031 * einfo.adb (Elaboration_Entity): Include entries and entry
1032 families in the set of legal entities.
1033 (Elaboration_Entity_Required): Include entries and entry
1034 families in the set of legal entities.
1035 (Set_Elaboration_Entity): Include entries and entry families in
1036 the set of legal entities.
1037 (Set_Elaboration_Entity_Required): Include entries and entry
1038 families in the set of legal entities.
1039 (Write_Field13_Name): Update the output of attribute
1040 Elaboration_Entity.
1041 * einfo.ads: Attributes Elaboration_Entity and
1042 Elaboration_Entity_Required now apply to entries and entry
1043 families.
1044
1045 2018-08-21 Arnaud Charlet <charlet@adacore.com>
1046
1047 * set_targ.adb: Mark some CodePeer message as Intentional.
1048
1049 2018-08-21 Ed Schonberg <schonberg@adacore.com>
1050
1051 * sem_res.adb (Resolve_Call): Force the freezing of an
1052 expression function that is called to provide a default value
1053 for a defaulted discriminant in an object initialization.
1054
1055 2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
1056
1057 * libgnat/g-dynhta.adb, libgnat/g-dynhta.ads: New package
1058 Dynamic_HTable.
1059
1060 2018-08-21 Javier Miranda <miranda@adacore.com>
1061
1062 * checks.ads (Determine_Range): Adding documentation.
1063 * checks.adb (Determine_Range): Don't deal with enumerated types
1064 with non-standard representation.
1065 (Convert_And_Check_Range): For conversion of enumeration types
1066 with non standard representation to an integer type perform a
1067 direct conversion to the target integer type.
1068
1069 2018-08-21 Piotr Trojanek <trojanek@adacore.com>
1070
1071 * lib-xref.ads, lib-xref-spark_specific.adb
1072 (Enclosing_Subprogram_Or_Library_Package): Now roughtly works
1073 for pragmas that come from aspect specifications.
1074
1075 2018-08-21 Pierre-Marie de Rodat <derodat@adacore.com>
1076
1077 * sa_messages.ads, sa_messages.adb: New source files.
1078
1079 2018-08-03 Pierre-Marie de Rodat <derodat@adacore.com>
1080
1081 Reverts
1082 2018-07-06 Jim Wilson <jimw@sifive.com>
1083
1084 * Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
1085 (einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
1086 * gcc-interface/Makefile.in (xoscons): Likewise.
1087
1088 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1089 Olivier Hainque <hainque@adacore.com>
1090
1091 * gcc-interface/trans.c: Include debug.h.
1092 (file_map): New static variable.
1093 (gigi): Set it. Create decl_to_instance_map when needed.
1094 (Subprogram_Body_to_gnu): Pass gnu_subprog_decl to...
1095 (Sloc_to_locus): ... this. Add decl parm, map it to instance.
1096 * gcc-interface/gigi.h (Sloc_to_locus): Adjust declaration.
1097
1098 2018-07-31 Arnaud Charlet <charlet@adacore.com>
1099
1100 * clean.adb, gnatchop.adb, gnatfind.adb, gnatls.adb,
1101 gnatmake.ads, gnatxref.adb, make.adb, make.ads, make_util.ads,
1102 sfn_scan.adb, vxaddr2line.adb, xeinfo.adb, xoscons.adb,
1103 xr_tabls.adb, xref_lib.adb: Address CodePeer messages.
1104
1105 2018-07-31 Arnaud Charlet <charlet@adacore.com>
1106
1107 * gnatlink.adb: Fix potential Constraint_Error if
1108 Library_Version is too long.
1109
1110 2018-07-31 Arnaud Charlet <charlet@adacore.com>
1111
1112 * sem_elab.adb: Remove duplicate condition detected by CodePeer.
1113
1114 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1115
1116 * exp_unst.adb (Subp_Index): In the case of a protected
1117 operation, the relevant entry is the generated
1118 protected_subprogram_body into which the original body is
1119 rewritten. Assorted cleanup and optimizations.
1120
1121 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1122
1123 * exp_attr.adb (Expand_Attribute, case Fixed_Value): Set the
1124 base type of the result to ensure that proper overflow and range
1125 checks are generated. If the target is a fixed-point tyoe,
1126 generate the required overflow and range checks explicitly,
1127 rather than relying on Apply_Type_Conversion_Checks, which might
1128 simply set the Do_Range_Check flag and rely on the backend to
1129 add the check.
1130
1131 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1132
1133 * sem_res.adb (Resolve_Call): Establish a transient scope to
1134 manage the secondary stack when the designated type of an
1135 access-to-subprogram requires it.
1136
1137 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1138
1139 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): To find local
1140 subprograms in the elaboration code for a package body, recurse
1141 through nested statement sequences because a compiler-generated
1142 procedure may appear within a condition statement.
1143
1144 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1145
1146 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Handle
1147 properly a protected call that includes a default parameter that
1148 is a call to a protected function of the same type.
1149
1150 2018-07-31 Justin Squirek <squirek@adacore.com>
1151
1152 * lib-writ.adb (Write_With_Lines): Modfiy the generation of
1153 dependencies within ali files so that source unit bodies are
1154 properly listed even if said bodies are missing. Perform legacy
1155 behavior in GNATprove mode.
1156 * lib-writ.ads: Modify documentation to reflect current behavior.
1157
1158 2018-07-31 Eric Botcazou <ebotcazou@adacore.com>
1159
1160 * libgnarl/s-osinte__solaris.ads (upad64_t): New private type.
1161 (mutex_t): Use it for 'lock' and 'data' components.
1162 (cond_t): Likewise for 'data' and use single 'flags' component.
1163
1164 2018-07-31 Justin Squirek <squirek@adacore.com>
1165
1166 * exp_ch5.adb (Make_Field_Assign): Force temporarily generated
1167 objects for assignment of overlaid user objects to be renamings
1168 instead of constant declarations.
1169
1170 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1171
1172 * exp_ch9.adb (Analyze_Pragmas): New routine.
1173 (Build_Private_Protected_Declaration): Code clean up. Relocate
1174 relevant aspects and pragmas from the stand-alone body to the
1175 newly created spec. Explicitly analyze any pragmas that have
1176 been either relocated or produced by the analysis of the
1177 aspects.
1178 (Move_Pragmas): New routine.
1179 * sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the
1180 case where a pragma applies to the internally created spec for a
1181 stand-along subprogram body declared in a protected body.
1182
1183 2018-07-31 Gary Dismukes <dismukes@adacore.com>
1184
1185 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace
1186 calls to Current_Scope in three assertions with calls to
1187 Current_Subprogram.
1188
1189 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1190
1191 * sem_eval.adb (Check_Non_Static_Context): Do not warn on an
1192 integer literal greater than the upper bound of
1193 Universal_Integer'Last when expansion is disabled, to avoid a
1194 spurious warning over ranges involving 64-bit modular types.
1195
1196 2018-07-31 Arnaud Charlet <charlet@adacore.com>
1197
1198 * einfo.adb (Write_Entity_Flags): Also print
1199 Is_Activation_Record flag.
1200
1201 2018-07-31 Piotr Trojanek <trojanek@adacore.com>
1202
1203 * exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
1204 repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
1205 with a wrapper routine.
1206
1207 2018-07-31 Piotr Trojanek <trojanek@adacore.com>
1208
1209 * ali.adb (Known_ALI_Lines): Remove 'F' as a prefix for lines
1210 related to the FORMAL analysis done by GNATprove.
1211
1212 2018-07-31 Javier Miranda <miranda@adacore.com>
1213
1214 * sem.ads (Inside_Preanalysis_Without_Freezing): New global
1215 counter.
1216 * sem.adb (Semantics): This subprogram has now the
1217 responsibility of resetting the counter before analyzing a unit,
1218 and restoring its previous value before returning.
1219 * freeze.adb (Freeze_Entity): Do not freeze if we are
1220 preanalyzing without freezing.
1221 * sem_res.adb (Preanalyze_And_Resolve): Set & restore
1222 In_Preanalysis_Without_Freezing.
1223
1224 2018-07-31 Ed Schonberg <schonberg@adacore.com>
1225
1226 * sem_ch4.adb (Traverse_Homonyms): Consider generic actuals that
1227 may rename a matching class-wide operation only if the renaming
1228 declaration for that actual is in an enclosing scope (i.e.
1229 within the corrresponding instance).
1230
1231 2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1232
1233 * checks.adb, contracts.adb, exp_aggr.adb, exp_ch5.adb,
1234 exp_disp.adb, make.adb, sem_ch4.adb, sem_eval.adb, sem_res.adb,
1235 usage.adb: Minor reformatting.
1236
1237 2018-07-31 Bob Duff <duff@adacore.com>
1238
1239 * sem_res.adb (Resolve_Allocator): Do not complain about the
1240 implicit allocator that occurs in the expansion of a return
1241 statement for a build-in-place function.
1242
1243 2018-07-20 Martin Sebor <msebor@redhat.com>
1244
1245 PR middle-end/82063
1246 * gcc-interface/misc.c (gnat_handle_option): Change function argument
1247 to HOST_WIDE_INT.
1248
1249 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with
1252 an operand of Character type. Factor out range generation to the end.
1253 Check that the bounds are literals and convert them to the type of the
1254 operand before building the ranges.
1255 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
1256 (make_packable_type): Propagate TYPE_DEBUG_TYPE.
1257 (maybe_pad_type): Likewise.
1258
1259 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1260
1261 * sem_ch4.adb (Try_Object_Operation): Handle properly a prefixed call
1262 in an instance, when the generic parameters include an interface type
1263 and a abstract operation of that type, and the actuals in the instance
1264 include an interface type and a corresponding abstract operation of it,
1265 with a different name than the corresponding generic subprogram
1266 parameter.
1267
1268 2018-07-17 Arnaud Charlet <charlet@adacore.com>
1269
1270 * sem_eval.adb (Rewrite_In_Raise_CE): Keep the original reason in more
1271 cases.
1272
1273 2018-07-17 Arnaud Charlet <charlet@adacore.com>
1274
1275 * checks.adb (Apply_Division_Check): Add provision for floating-point
1276 checks.
1277
1278 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1279
1280 * exp_aggr.adb (Component_OK_For_Backend): If an array component of the
1281 enclosing record has a bound that is out of range (and that has been
1282 rewritten as a raise statement) the aggregate is not OK for any back
1283 end, and should be expanded into individual assignments.
1284
1285 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1286
1287 * atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.
1288
1289 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1290
1291 * sem_util.ads (Denotes_Same_Object): Likewise.
1292 * sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references.
1293
1294 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
1295
1296 * exp_disp.adb (Make_Tags): When the type has user-defined primitives,
1297 build the access type that is later used by Build_Get_Prim_Op_Address
1298 as pointing to a subtype of Ada.Tags.Address_Array.
1299
1300 2018-07-17 Patrick Bernardi <bernardi@adacore.com>
1301
1302 * libgnat/s-memory__mingw.adb: Remove.
1303 * Makefile.rtl: Remove s-memory.adb target pair from the Cygwin/Mingw32
1304 section.
1305
1306 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1307
1308 * frontend.adb (Frontend): The removal of ignored Ghost code must be
1309 the last semantic operation performed on the tree.
1310
1311 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1312
1313 * frontend.adb (Frontend): Update the call to Register_Config_Switches.
1314 * inline.ads: Add new component Config_Switches to record
1315 Pending_Body_Info which captures the configuration state of the pending
1316 body. Remove components Version, Version_Pragma, SPARK_Mode, and
1317 SPARK_Mode_Pragma from record Pending_Body_Info because they are
1318 already captured in component Config_Switches.
1319 * opt.adb (Register_Opt_Config_Switches): Rename to
1320 Register_Config_Switches.
1321 (Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
1322 (Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
1323 routine is now a function, and returns the saved configuration state as
1324 an aggregate to avoid missing an attribute.
1325 (Set_Opt_Config_Switches): Rename to Set_Config_Switches.
1326 * opt.ads (Register_Opt_Config_Switches): Rename to
1327 Register_Config_Switches.
1328 (Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
1329 (Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
1330 routine is now a function.
1331 (Set_Opt_Config_Switches): Rename to Set_Config_Switches.
1332 * par.adb (Par): Update the calls to configuration switch-related
1333 subprograms.
1334 * sem.adb (Semantics): Update the calls to configuration switch-related
1335 subprograms.
1336 * sem_ch10.adb (Analyze_Package_Body_Stub): Update the calls to
1337 configuration switch-related subprograms.
1338 (Analyze_Protected_Body_Stub): Update the calls to configuration
1339 switch-related subprograms.
1340 (Analyze_Subprogram_Body_Stub): Update calls to configuration
1341 switch-related subprograms.
1342 * sem_ch12.adb (Add_Pending_Instantiation): Update the capture of
1343 pending instantiation attributes.
1344 (Inline_Instance_Body): Update the capture of pending instantiation
1345 attributes. It is no longer needed to explicitly manipulate the SPARK
1346 mode.
1347 (Instantiate_Package_Body): Update the restoration of the context
1348 attributes.
1349 (Instantiate_Subprogram_Body): Update the restoration of context
1350 attributes.
1351 (Load_Parent_Of_Generic): Update the capture of pending instantiation
1352 attributes.
1353 (Set_Instance_Env): Update the way relevant configuration attributes
1354 are saved and restored.
1355
1356 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
1357
1358 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
1359 more rvalues in the expression of a renaming.
1360
1361 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
1362
1363 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Define for
1364 METHOD_TYPE too.
1365 (TYPE_RETURN_UNCONSTRAINED_P): Likewise.
1366 (TYPE_CI_CO_LIST): Likewise.
1367 * gcc-interface/gigi.h (is_cplusplus_method): Delete.
1368 (fntype_same_flags_p): Adjust comment.
1369 * gcc-interface/decl.c (Has_Thiscall_Convention): Delete.
1370 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not set the "thiscall"
1371 attribute directly.
1372 (is_cplusplus_method): Make static and adjust head comment.
1373 (gnat_to_gnu_param): Return a pointer for the "this" parameter of
1374 C++ constructors.
1375 (gnat_to_gnu_subprog_type): Turn imported C++ constructors into their
1376 callable form. Generate a METHOD_TYPE node for imported C++ methods.
1377 Set param_list at the very end of the processing.
1378 (substitute_in_type) <METHOD_TYPE>: New case.
1379 * gcc-interface/misc.c (gnat_print_type) <METHOD_TYPE>: Likewise.
1380 (gnat_type_hash_eq): Accept METHOD_TYPE.
1381 * gcc-interface/trans.c (Identifier_to_gnu): Deal with METHOD_TYPE.
1382 (Attribute_to_gnu): Likewise.
1383 (Call_to_gnu): Likewise.
1384 (process_freeze_entity): Likewise.
1385 * gcc-interface/utils.c (create_subprog_decl): Adjust head comment.
1386 (fntype_same_flags_p): Likewise.
1387
1388 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1389
1390 * inline.adb (Expand_Inlined_Call): Remove extra parentheses.
1391
1392 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
1393
1394 * exp_disp.adb (Gen_Parameters_Profile): Make the _Init parameter an
1395 In/Out parameter.
1396 (Set_CPP_Constructors): Adjust comment accordingly.
1397
1398 2018-07-17 Bob Duff <duff@adacore.com>
1399
1400 * exp_disp.adb (Build_Class_Wide_Check): Return early if the
1401 precondition is supposed to be ignored.
1402
1403 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1404
1405 * sem_ch6.adb (Check_Untagged_Equality): Extend check to operations
1406 declared in the same scope as the operand type, when that scope is a
1407 procedure.
1408
1409 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1410
1411 * exp_unst.adb (Unnest_Subprograms): Do nothing if the expander is not
1412 active. Don't use Get_Actual_Subtype for record subtypes. Ignore
1413 rewritten identifiers and uplevel references to bounds of types that
1414 come from the original type reference.
1415
1416 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1417
1418 * exp_ch13.adb, exp_ch7.adb, exp_unst.adb, freeze.adb,
1419 libgnat/s-os_lib.adb, sem_ch3.adb, sem_ch3.ads, sem_ch5.adb,
1420 sem_eval.adb, sem_res.adb, sem_util.adb: Minor reformatting.
1421
1422 2018-07-17 Javier Miranda <miranda@adacore.com>
1423
1424 * exp_ch13.adb (Expand_N_Freeze_Entity): Handle subtype declared for an
1425 iterator.
1426 * freeze.adb (Freeze_Expression): Handle freeze of an entity defined
1427 outside of a subprogram body. This case was previously handled during
1428 preanalysis; the frozen entities were remembered and left pending until
1429 we continued freezeing entities outside of the subprogram. Now, when
1430 climbing the parents chain to locate the correct placement for the
1431 freezeing node, we check if the entity can be frozen and only when no
1432 enclosing node is marked as Must_Not_Freeze the entity is frozen.
1433 * sem_ch3.ads (Preanalyze_Default_Expression): Declaration moved to the
1434 package body.
1435 * sem_ch3.adb (Preanalyze_Default_Expression): Code adjusted to invoke
1436 the new subprogram Preanalyze_With_Freezing_And_Resolve.
1437 * sem_ch6.adb (Preanalyze_Formal_Expression): New subprogram.
1438 (Analyze_Expression_Function, Process_Formals): Invoke
1439 Preanalyze_Formal_Expression instead of Preanalyze_Spec_Expression
1440 since the analysis of the formals may freeze entities.
1441 (Analyze_Subprogram_Body_Helper): Skip building the body of the
1442 class-wide clone for eliminated subprograms.
1443 * sem_res.ads, sem_res.adb (Preanalyze_And_Resolve): New subprogram.
1444 Its code is basically the previous version of this routine but extended
1445 with an additional parameter which is used to specify if during
1446 preanalysis we are allowed to freeze entities. If the new parameter is
1447 True then the subtree root node is marked as Must_Not_Freeze and no
1448 entities are frozen during preanalysis.
1449 (Preanalyze_And_Resolve): Invokes the internal version of
1450 Preanalyze_And_Resolve without entity freezing.
1451 (Preanalyze_With_Freezing_And_Resolve): Invokes the internal version of
1452 Prenalyze_And_Resolve with freezing enabled.
1453
1454 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1455
1456 * einfo.ads, libgnat/g-comlin.ads: Minor change "ie" to "i.e." in docs
1457 and comments.
1458
1459 2018-07-17 Justin Squirek <squirek@adacore.com>
1460
1461 * libgnat/s-os_lib.adb (Argument_String_To_List): Fix trimming of
1462 whitespace.
1463
1464 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1465
1466 * sem_prag.adb (Has_Visible_State): Do not consider constants as
1467 visible state because it is not possible to determine whether a
1468 constant depends on variable input.
1469 (Propagate_Part_Of): Add comment clarifying the behavior with respect
1470 to constant.
1471
1472 2018-07-17 Yannick Moy <moy@adacore.com>
1473
1474 * gnat1drv.adb (Gnat1drv): Do not issue warning about exception not
1475 being propagated in GNATprove mode.
1476
1477 2018-07-17 Dmitriy Anisimkov <anisimko@adacore.com>
1478
1479 * libgnat/g-socket.adb, libgnat/g-socket.ads: Reorganize and make
1480 public components of Inet_Addr_Type. Introduce public binary
1481 operations.
1482
1483 2018-07-17 Javier Miranda <miranda@adacore.com>
1484
1485 * exp_ch7.adb (Make_Transient_Block): When determining whether an
1486 enclosing scope already handles the secondary stack, take into account
1487 transient blocks nested in a block that do not manage the secondary
1488 stack and are located within a loop.
1489
1490 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1491
1492 * sem_util.adb (Enclosing_Subprogram): Protected entries and task
1493 entries must be treated separately: task entries are within the
1494 enclosing subprogram of the task type, while protected entries are
1495 transformed into the corresponding Protected_Body_Subprogram, which is
1496 the enclosing_subprogram of any subprogram declared within the entry
1497 body.
1498
1499 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1500
1501 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add missing
1502 sections on -gnatH and -gnatJ compiler switches.
1503 * gnat_ugn.texi: Regenerate.
1504
1505 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1506
1507 * alloc.ads: Update the allocation metrics of the ignored Ghost nodes
1508 table.
1509 * atree.adb: Add a soft link for a procedure which is invoked whenever
1510 an ignored Ghost node or entity is created.
1511 (Change_Node): Preserve relevant attributes which come from the Flags
1512 table.
1513 (Mark_New_Ghost_Node): Record a newly created ignored Ghost node or
1514 entity.
1515 (Rewrite): Preserve relevant attributes which come from the Flags
1516 table.
1517 (Set_Ignored_Ghost_Recording_Proc): New routine.
1518 * atree.ads: Define an access-to-suprogram type for a soft link which
1519 records a newly created ignored Ghost node or entity.
1520 (Set_Ignored_Ghost_Recording_Proc): New routine.
1521 * ghost.adb: Remove with and use clause for Lib. Remove table
1522 Ignored_Ghost_Units. Add new table Ignored_Ghost_Nodes.
1523 (Add_Ignored_Ghost_Unit): Removed.
1524 (Initialize): Initialize the table which stores ignored Ghost nodes.
1525 Set the soft link which allows Atree.Mark_New_Ghost_Node to record an
1526 ignored Ghost node.
1527 (Is_Ignored_Ghost_Unit): Use the ultimate original node when checking
1528 an eliminated ignored Ghost unit.
1529 (Lock): Release and lock the table which stores ignored Ghost nodes.
1530 (Mark_And_Set_Ghost_Assignment): Record rather than propagate ignored
1531 Ghost nodes.
1532 (Mark_And_Set_Ghost_Procedure_Call): Record rather than propagate
1533 ignored Ghost nodes.
1534 (Mark_Ghost_Clause): Record rather than propagate ignored Ghost nodes.
1535 (Mark_Ghost_Declaration_Or_Body): Record rather than propagate ignored
1536 Ghost nodes.
1537 (Mark_Ghost_Pragma): Record rather than propagate ignored Ghost nodes.
1538 (Propagate_Ignored_Ghost_Code): Removed.
1539 (Record_Ignored_Ghost_Node): New routine.
1540 (Remove_Ignored_Ghost_Code): Reimplemented.
1541 (Remove_Ignored_Ghost_Node): New routine.
1542 (Ultimate_Original_Node): New routine.
1543 * ghost.ads (Check_Ghost_Completion): Removed.
1544 * sem_ch8.adb (Analyze_Use_Package): Remove obsolete code. Mark a use
1545 package clause as ignored Ghost if applicable.
1546 * sem_util.adb (Is_Body_Or_Package_Declaration): Reimplemented.
1547
1548 2018-07-17 Javier Miranda <miranda@adacore.com>
1549
1550 * sem_ch5.adb (Has_Call_Using_Secondary_Stack): Moved to library level
1551 to reuse it.
1552 (Analyze_Loop_Statement): Wrap the loop in a block when the evaluation
1553 of the loop iterator relies on the secondary stack.
1554
1555 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1556
1557 * sem_util.adb (Next_Actual): If the parent is a N_Null_Statement,
1558 which happens for inlined calls, then fetch the next actual from the
1559 original AST.
1560
1561 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1562
1563 * einfo.ads: Update documentation for Scalar_Range.
1564
1565 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1566
1567 * lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to
1568 the Standard package.
1569
1570 2018-07-17 Piotr Trojanek <trojanek@adacore.com>
1571
1572 * einfo.adb (Is_Wrapper_Package): Remove extra parentheses.
1573
1574 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1575
1576 * sem_util.adb (Enclosing_Subprogram): Handle properly entries, and
1577 synchronized types that are completions of limited types or private
1578 extensions.
1579 (Scope_Within): Handle properly accept statements in task bodies.
1580
1581 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1582
1583 * sem_prag.adb (Has_Visible_State): Do not consider generic formals
1584 because they are not part of the visible state space. Add constants to
1585 the list of acceptable visible states.
1586 (Propagate_Part_Of): Do not consider generic formals when propagating
1587 the Part_Of indicator.
1588 * sem_util.adb (Entity_Of): Do not follow renaming chains which go
1589 through a generic formal because they are not visible for SPARK
1590 purposes.
1591 * sem_util.ads (Entity_Of): Update the comment on usage.
1592
1593 2018-07-17 Ed Schonberg <schonberg@adacore.com>
1594
1595 * sem_util.adb (Gather_Components): A discriminant of an ancestor may
1596 have been constrained by a later ancestor, so when looking for the
1597 value of that hidden discriminant we must examine the stored constraint
1598 of other ancestors than the immediate parent type.
1599
1600 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
1601
1602 * exp_ch6.adb (Build_Heap_Or_Pool_Allocator): Ensure that scoping
1603 constructs and entities within receive new entities when replicating a
1604 tree.
1605 (Expand_N_Extended_Return_Statement): Ensure that scoping constructs
1606 and entities within receive new entities when replicating a tree.
1607 * sem_util.adb (New_Copy_Tree): Add new formal Scopes_In_EWA_OK.
1608 (Visit_Entity): Visit entities within scoping constructs inside
1609 expression with actions nodes when requested by the caller. Add blocks,
1610 labels, and procedures to the list of entities which need replication.
1611 * sem_util.ads (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. Update
1612 the comment on usage.
1613
1614 2018-07-17 Arnaud Charlet <charlet@adacore.com>
1615
1616 * doc/gnat_ugn/about_this_guide.rst,
1617 doc/gnat_ugn/gnat_and_program_execution.rst: Remove references to gcov.
1618 * gnat_ugn.texi: Regenerate.
1619
1620 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1621
1622 * contracts.adb (Analyze_Contracts): Add specialized processing for
1623 package instantiation contracts.
1624 (Analyze_Package_Contract): Remove the verification of a missing
1625 Part_Of indicator.
1626 (Analyze_Package_Instantiation_Contract): New routine.
1627 * contracts.ads (Analyze_Package_Contract): Update the comment on
1628 usage.
1629 * sem_prag.adb (Check_Missing_Part_Of): Ensure that the entity of the
1630 instance is being examined when trying to determine whether a package
1631 instantiation needs a Part_Of indicator.
1632
1633 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1634
1635 * einfo.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb, inline.adb,
1636 sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_eval.adb,
1637 sem_util.adb: Minor reformatting.
1638
1639 2018-07-16 Arnaud Charlet <charlet@adacore.com>
1640
1641 * frontend.adb: Only unnest subprograms if no previous errors were
1642 detected.
1643
1644 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1645
1646 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that
1647 contain blocks in the elaboration code for a package body. Create the
1648 elaboration subprogram wrapper only if there is a subprogram
1649 declaration in a block or loop.
1650
1651 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1652
1653 * exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a
1654 deep copy of the left operand when building each conjuct of the
1655 expanded membership operation, to avoid sharing nodes between them.
1656 This sharing interferes with the unnesting machinery and is generally
1657 undesirable.
1658
1659 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1660
1661 * exp_unst.adb (Visit_Node): Handle 'Address references that are
1662 calls.
1663
1664 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1665
1666 * exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field
1667 in relevant nodes: Allocate, Free, and return statements.
1668
1669 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1670
1671 * sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an
1672 instance that carries an aspect Default_Storage_Pool that overrides a
1673 default storage pool that applies to the generic unit. The aspect in
1674 the generic unit was removed before copying it in the instance, rather
1675 than removing it from the copy of the aspects that are appended to the
1676 aspects in the instance.
1677
1678 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1679
1680 * einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on
1681 loop parameters.
1682 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram
1683 bodies.
1684 * exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an
1685 entry body to be the corresponding generated subprogram, for correct
1686 analysis of uplevel references.
1687 * exp_unst.adb (Visit_Node): Handle properly binary and unary operators
1688 Ignore pragmas, fix component associations.
1689 (Register_Subprograms): Subprograms in synchronized types must be
1690 treated as reachable.
1691
1692 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1693
1694 * sem_util.adb (Check_No_Hidden_State): Ignore internally-generated
1695 states and variables.
1696
1697 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
1698
1699 * sinfo.ads, sinfo.adb (Withed_Body): Remove.
1700 (Set_Withed_Body): Remove.
1701
1702 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
1703
1704 * sem.adb (Walk_Library_Items): Skip units with configuration pragmas
1705 when printing debug info.
1706
1707 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
1708
1709 * sem.adb (Walk_Library_Items): Reuse local constant.
1710 (Is_Subunit_Of_Main): Turn condition to positive and flip the
1711 IF-THEN-ELSE branches; avoid potentially ineffective assignment to the
1712 Lib variable.
1713
1714 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
1715
1716 * sem.adb (Walk_Library_Items): Deconstruct dead code.
1717
1718 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1719
1720 * exp_ch4.adb (Expand_N_Op_Xor): Use common routine
1721 Expand_Nonbinary_Modular_Op. Needed for unnesting.
1722
1723 2018-07-16 Ed Schonberg <schonberg@adacore.com>
1724
1725 * sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
1726 static predicate (for example True) but has no
1727 static_discrete_predicate.
1728
1729 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1730
1731 * exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
1732 class-wide types and record extensions.
1733
1734 2018-07-16 Justin Squirek <squirek@adacore.com>
1735
1736 * sem_eval.adb (Eval_Integer_Literal): Add exception for avoiding
1737 checks on expanded literals within if and case expressions.
1738
1739 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1740
1741 * libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
1742 longest sequence factor. Code clean up.
1743 (Wide_Wide_String_To_String): Use the appropriate longest sequence
1744 factor. Code clean up.
1745
1746 2018-07-16 Javier Miranda <miranda@adacore.com>
1747
1748 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Report an error
1749 on Bit_Order when defined for a record extension.
1750
1751 2018-07-16 Arnaud Charlet <charlet@adacore.com>
1752
1753 * libgnat/s-objrea.ads: Minor code clean up.
1754
1755 2018-07-16 Piotr Trojanek <trojanek@adacore.com>
1756
1757 * sem_ch3.adb (Process_Discriminants): Adjust reference to the SPARM RM
1758 rule.
1759
1760 2018-07-16 Arnaud Charlet <charlet@adacore.com>
1761
1762 * adaint.c (__gnat_set_file_time_name): Code clean up.
1763
1764 2018-07-16 Javier Miranda <miranda@adacore.com>
1765
1766 * inline.adb (Build_Body_To_Inline): Minor code reorganization that
1767 ensures that calls to function Has_Single_Return() pass a decorated
1768 tree.
1769 (Has_Single_Return.Check_Return): Peform checks on entities (instead on
1770 relying on their characters).
1771
1772 2018-07-16 Javier Miranda <miranda@adacore.com>
1773
1774 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Code cleanup. Required
1775 to avoid generating an ill-formed tree that confuses gnatprove causing
1776 it to blowup.
1777
1778 2018-07-16 Yannick Moy <moy@adacore.com>
1779
1780 * inline.adb (Has_Single_Return): Rewrap comment.
1781
1782 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1783
1784 * einfo.ads: Minor tweak in comment.
1785
1786 2018-07-16 Javier Miranda <miranda@adacore.com>
1787
1788 * sem_ch4.adb (Analyze_Membership_Op): Code cleanup.
1789
1790 2018-07-16 Javier Miranda <miranda@adacore.com>
1791
1792 * exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
1793 transform 'Count into a function call if the current scope has been
1794 eliminated.
1795
1796 2018-07-16 Javier Miranda <miranda@adacore.com>
1797
1798 * sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
1799 public part of this package.
1800
1801 2018-07-16 Yannick Moy <moy@adacore.com>
1802
1803 * sem_res.adb (Resolve_Call): Do not inline calls inside
1804 compiler-generated functions translated as predicates in GNATprove.
1805
1806 2018-07-16 Gary Dismukes <dismukes@adacore.com>
1807
1808 * exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
1809 addition to the existing test for no Storage_Pool as a condition
1810 enabling generation of the call to Check_Standard_Allocator when the
1811 restriction No_Standard_Allocators_After_Elaboration is active.
1812 * libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
1813 say that Storage_Error will be raised (rather than Program_Error).
1814 * libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
1815 rather than Program_Error when Elaboration_In_Progress is False.
1816
1817 2018-07-16 Gary Dismukes <dismukes@adacore.com>
1818
1819 * sem_eval.adb: Fix spelling for compile-time-known.
1820
1821 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
1822
1823 * sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
1824 the compiler from entering infinite recursion when trying to determine
1825 whether a deferred constant has a compile time known value, and the
1826 initialization expression of the constant is a reference to the
1827 constant itself.
1828
1829 2018-07-16 Nicolas Roche <roche@adacore.com>
1830
1831 * libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
1832 factor from 1/32 to 1/2 for Unbounded_String.
1833
1834 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1835
1836 * gcc-interface/lang.opt (funsigned-char): New option.
1837 * gcc-interface/misc.c (gnat_handle_option): Accept it.
1838 * gcc-interface/utils.c (finish_character_type): Tweak comment.
1839
1840 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1841
1842 * gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
1843 variable and use it throughout.
1844 <E_Variable>: If the nominal subtype of the object is unconstrained,
1845 compute the Ada size separately and put in on the padding type if the
1846 size is not fixed.
1847 <E_Record_Type>: Minor tweak.
1848 * gcc-interface/misc.c (gnat_type_max_size): Rename max_size_unit
1849 into max_size_unit throughout.
1850
1851 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1852
1853 * gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
1854 * gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
1855 * gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
1856 (add_decl_expr): Change type of second parameter and rename it.
1857 (renaming_from_instantiation_p): New function moved from...
1858 (set_expr_location_from_node): Test for exceptions here and add one
1859 for actual subtypes built for unconstrained composite actuals.
1860 * gcc-interface/utils.c (renaming_from_instantiation_p): ...here.
1861
1862 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1863
1864 * gcc-interface/trans.c (lvalue_required_p): Remove ALIASED parameter
1865 and adjust recursive calls.
1866 (Identifier_to_gnu): Adjust calls to lvalue_required_p.
1867 (gnat_to_gnu): Likewise.
1868
1869 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1870
1871 * gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
1872 (gnat_to_gnu_subprog_type): New pure_flag local variable. Set it for
1873 a pure Ada function with a by-ref In parameter. Propagate it onto the
1874 function type by means of the TYPE_QUAL_RESTRICT flag.
1875 * gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
1876 function type has the TYPE_QUAL_RESTRICT flag set.
1877
1878 2018-07-06 Jim Wilson <jimw@sifive.com>
1879
1880 * Makefile.rtl: Add riscv*-linux* support.
1881 * libgnarl/s-linux__riscv.ads: New.
1882 * libgnat/system-linux-riscv.ads: New.
1883
1884 * Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
1885 (einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
1886 * gcc-interface/Makefile.in (xoscons): Likewise.
1887
1888 2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
1889
1890 * libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
1891 (ZCX_By_Default): Set to True.
1892
1893 2018-07-02 Martin Liska <mliska@suse.cz>
1894
1895 * gnatvsn.ads: Bump Library_Version to 9.
1896
1897 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
1898
1899 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
1900 using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
1901 (TYPE_ALIGN_OK): Move around.
1902 (TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
1903 * gcc-interface/decl.c (change_qualified_type): Move to...
1904 (gnat_to_gnu_entity): Adjust comment.
1905 * gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
1906 (ceil_pow2): Use ceil_log2.
1907 * gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
1908 and do not set TREE_SIDE_EFFECTS.
1909 (handle_noreturn_attribute): Use change_qualified_type.
1910
1911 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
1912
1913 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
1914 the expression of a dispatch table that is not being defined.
1915 <E_Record_Subtype>: Remove obsolete kludge.
1916
1917 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
1918
1919 * gcc-interface/decl.c (warn_on_field_placement): Use specific wording
1920 for discriminants.
1921 (warn_on_list_placement): New static function.
1922 (components_to_record): Use it to warn on multiple fields in list.
1923
1924 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
1925
1926 * gcc-interface/decl.c (variant_desc): Add AUX field.
1927 (gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
1928 directly.
1929 (reverse_sort_field_list): New static function.
1930 (components_to_record): Place the variant part at the beginning of the
1931 field list when there is an obvious order of increasing position.
1932 (build_variant_list): Initialize it.
1933 (create_variant_part_from): Do not call compute_record_mode directly.
1934 (copy_and_substitute_in_layout): Likewise. Always sort the fields with
1935 fixed position in order of increasing position, in the record and all
1936 the variants, in any. Call reverse_sort_field_list.
1937 * gcc-interface/utils.c (make_packable_type): Compute the sizes before
1938 calling finish_record_type. Do not call compute_record_mode directly.
1939 (finish_record_type): Overhaul final processing depending on REP_LEVEL
1940 and call finish_bitfield_layout if it is equal to one or two.
1941
1942 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
1943
1944 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
1945 existing fields of a dummy fat pointer type, if any. Clear the
1946 TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
1947
1948 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1949
1950 * contracts.adb (Process_Body_Postconditions): Expand only checked
1951 postconditions.
1952 (Process_Contract_Cases_For): Expand only checked contract cases.
1953 (Process_Inherited_Preconditions): Ignored class-wide preconditions are
1954 partially expanded because some of their semantic checks are tied to
1955 the expansion.
1956 (Process_Preconditions_For): Expand only checked preconditions.
1957 (Process_Spec_Postconditions): Expand only checked preconditions.
1958 Ignored class-wide preconditions are partially expanded because some of
1959 their semantic checks are tied to the expansion.
1960 * exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
1961 assertion pragmas.
1962 * exp_util.adb (Add_Inherited_Invariants): Code clean up.
1963 * sem_util.adb (Propagate_Invariant_Attributes): Code clean up.
1964
1965 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1966
1967 * exp_ch9.adb, exp_unst.adb, inline.adb, libgnat/a-ciorma.adb,
1968 libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb,
1969 libgnat/a-coormu.adb, libgnat/a-coorse.adb, sem_prag.adb: Minor
1970 reformatting.
1971
1972 2018-06-11 Gary Dismukes <dismukes@adacore.com>
1973
1974 * exp_unst.ads, exp_unst.adb: Typo fixes and minor reformatting.
1975
1976 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
1977
1978 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do
1979 not add any actuals when the size of the object is known, and the
1980 caller will allocate it.
1981 (Build_Heap_Allocator): Rename to Build_Heap_Or_Pool_Allocator to
1982 better illustrate its functionality. Update the comment on the
1983 generated code. Generate a branch for the heap and pool cases where
1984 the object is not necessarity controlled.
1985 (Expand_N_Extended_Return_Statement): Expand the extended return
1986 statement into four branches depending the requested mode if the caller
1987 will not allocate the object on its side.
1988 (Make_Build_In_Place_Call_In_Allocator): Do not allocate a controlled
1989 object on the caller side because this will violate the semantics of
1990 finalizable types. Instead notify the function to allocate the object
1991 on the heap or a user-defined storage pool.
1992 (Needs_BIP_Alloc_Form): A build-in-place function needs to be notified
1993 which of the four modes to employ when returning a limited controlled
1994 result.
1995 * exp_util.adb (Build_Allocate_Deallocate_Proc): Remove a redundant
1996 guard which is already covered in Needs_Finalization.
1997
1998 2018-06-11 Olivier Hainque <hainque@adacore.com>
1999
2000 * libgnat/s-excmac*.ads: Factorize Unwind_Action definitions ...
2001 * libgnat/a-exexpr.adb: ... Here, then add comments describing the
2002 major datastructures associated with the current exception raised.
2003 (Setup_Current_Excep): Accept a "Phase" argument conveying the
2004 unwinding phase during which this subprogram is called. For an Ada
2005 exception, don't update the current exception buffer from the raised
2006 exception object during SEARCH_PHASE, as this is redundant with the
2007 call now issued just before propagation starts.
2008 (Propagate_GCC_Exception): Move call to Setup_Current_Excep ahead of
2009 the unwinding start, conveying Phase 0.
2010 (Unhandled_Except_Handler): Pass UA_CLEANUP_PHASE as the Phase value on
2011 the call to Setup_Current_Excep.
2012 * raise-gcc.c (personality_body): Pass uw_phases as the Phase argument
2013 on calls to Setup_Current_Excep.
2014
2015 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2016
2017 * exp_unst.ads, exp_unst.adb (Needs_Fat_Pointer,
2018 Build_Access_Type_Decl): New subprograms to handle uplevel references
2019 to formals of an unconstrained array type. The activation record
2020 component for these is an access type, and the reference is rewritten
2021 as an explicit derefenrence of that component.
2022
2023 2018-06-11 Bob Duff <duff@adacore.com>
2024
2025 * libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb,
2026 libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb:
2027 (Element): Add code to detect dangling cursors in some cases.
2028
2029 2018-06-11 Yannick Moy <moy@adacore.com>
2030
2031 * sem_ch6.adb (Build_Subprogram_Declaration): Mark parameters as coming
2032 from source.
2033
2034 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2035
2036 * sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
2037 that its parent is already frozen so that its predicate function, if
2038 any, has already been constructed.
2039
2040 2018-06-11 Yannick Moy <moy@adacore.com>
2041
2042 * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
2043 possible task unit as the enclosing context.
2044
2045 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
2046
2047 * gnat1drv.adb: Remove use clause for Repinfo.
2048 (Gnat1drv): Beef up comment about the interplay between -gnatc and
2049 back-end annotations. Use full qualified name for List_Rep_Info.
2050
2051 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2052
2053 * libgnat/g-arrspl.ads: Add pragma Preelaborate.
2054
2055 2018-06-11 Arnaud Charlet <charlet@adacore.com>
2056
2057 * exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
2058 then" and general logical "ada" in codepeer mode.
2059
2060 2018-06-11 Javier Miranda <miranda@adacore.com>
2061
2062 * exp_ch9.adb (Expand_N_Protected_Body): Add missing handling of
2063 N_Call_Marker nodes.
2064
2065 2018-06-11 Arnaud Charlet <charlet@adacore.com>
2066
2067 * exp_ch3.adb, exp_unst.adb, inline.adb, sem_prag.adb: Minor
2068 reformatting.
2069
2070 2018-06-11 Yannick Moy <moy@adacore.com>
2071
2072 * doc/gnat_rm/implementation_defined_pragmas.rst: Add Suppressible
2073 argument to Assertion_Policy
2074 * gnat_rm.texi: Regenerate.
2075
2076 2018-06-11 Yannick Moy <moy@adacore.com>
2077
2078 * gnat1drv.adb: Do not check representation information in CodePeer and
2079 GNATprove modes, as these modes call a special backend instead of gigi,
2080 so do not have the information.
2081
2082 2018-06-11 Yannick Moy <moy@adacore.com>
2083
2084 * inline.adb (Build_Body_To_Inline): Consider case of extended return
2085 of unconstrained type as one case where inlining is not supported.
2086 (Expand_Inlined_Call): Remove special case for body as extended return
2087 of unconstrained type.
2088
2089 2018-06-11 Yannick Moy <moy@adacore.com>
2090
2091 * sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
2092 unit.
2093 (Check_Missing_Part_Of): Do not force Part_Of on generic unit.
2094
2095 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
2096
2097 * sem_ch13.adb (Analyze_Aspect_Specifications): Don't split AND THEN
2098 expressions in Pre/Post contracts while in GNATprove_Mode.
2099
2100 2018-06-11 Piotr Trojanek <trojanek@adacore.com>
2101
2102 * sem_util.adb (Is_Potentially_Unevaluated): Fix detection of contracts
2103 with AND THEN expressions broken down into individual conjuncts.
2104
2105 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2106
2107 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.
2108
2109 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2110
2111 * exp_unst.adb (Visit_Node): Skip generic associations.
2112
2113 2018-06-11 Arnaud Charlet <charlet@adacore.com>
2114
2115 * libgnat/memtrack.adb (fwrite): Remove second definition.
2116
2117 2018-06-11 Javier Miranda <miranda@adacore.com>
2118
2119 * sinfo.ads (Is_Dynamic_Coextension): Adding documentation.
2120 (Is_Static_Coextension): Adding documentation.
2121 * sinfo.adb (Is_Dynamic_Coextension): Extending the assertion.
2122 (Is_Static_Coextension): Extending the assertion.
2123 * sem_util.adb (Mark_Allocator): Clear Is_Static_Coextension when
2124 setting flag Is_Dynamic_Coextension (and vice versa).
2125
2126 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2127
2128 * exp_unst.adb (Search_Subprograms): Handle explicitly stubs at the top
2129 level of a compilation unit, becuase they may contain nested
2130 subprograms that need an activation record.
2131
2132 2018-06-11 Arnaud Charlet <charlet@adacore.com>
2133
2134 * Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).
2135
2136 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2137
2138 * exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
2139 Minor reformatting.
2140 * sinfo.ads: Fix a typo.
2141
2142 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2143
2144 * inline.adb (Expand_Inlined_Call): If no optimization level is
2145 specified, the expansion of a call to an Inline_Always function is
2146 fully performed in the front-end even on a target that support back-end
2147 inlining.
2148
2149 2018-06-11 Arnaud Charlet <charlet@adacore.com>
2150
2151 * bindgen.adb (Gen_Adainit): Protect reference to System.Parameters
2152 with Sec_Stack_Used.
2153
2154 2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
2155
2156 * sem_ch8.adb (Find_Direct_Name): Mode the declaration of
2157 Is_Assignment_LHS further in. Use predicate
2158 Needs_Variable_Reference_Marker to determine whether to create a
2159 variable marker.
2160 (Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
2161 in. Use predicate Needs_Variable_Reference_Marker to determine whether
2162 to create a variable marker.
2163 * sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
2164 checks that determine whether the identifier or expanded name is a
2165 suitable variable reference. The checks are now performed by
2166 Needs_Variable_Reference_Marker.
2167 * sem_res.adb (Resolve_Actuals): Use predicate
2168 Needs_Variable_Reference_Marker to determine whether to create a
2169 variable marker.
2170 * sem_util.adb (Needs_Variable_Reference_Marker): New routine.
2171 * sem_util.ads (Needs_Variable_Reference_Marker): New routine.
2172
2173 2018-06-11 Valentine Reboul <reboul@adacore.com>
2174
2175 * doc/gnat_rm.rst, doc/gnat_ugn.rst: Rename "GPL Edition" into
2176 "Community Edition".
2177
2178 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2179
2180 * sem_ch12.adb (Install_Body): In order to determine the placement of
2181 the freeze node for an instance of a generic nested within another
2182 instance, take into account that the outer instance may be declared in
2183 the visible part of a package and the inner intance may be in the
2184 private part of the same package.
2185
2186 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
2187
2188 * errout.adb (Special_Msg_Delete): Remove handling of Atomic and VFA.
2189
2190 2018-06-11 Nicolas Roche <roche@adacore.com>
2191
2192 * libgnat/s-valuti.adb (Bad_Value): Ensure that we do not generate a
2193 stack overflow while raising a constraint error.
2194
2195 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
2196
2197 * repinfo.ads (Rep_Value): Use a single line.
2198 * repinfo.adb (Rep_Value): Likewise.
2199 (List_Attr): Do not use string concatenation.
2200
2201 2018-06-11 Ed Schonberg <schonberg@adacore.com>
2202
2203 * exp_unst.adb (Visit_Node): Check reference to formal parameter of
2204 current procedure, because the bounds of its type may be uplevel
2205 references.
2206
2207 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
2208
2209 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
2210 not a definition, retrieve the expression only if it's a compile-time
2211 known value if we are just annotating types.
2212
2213 * gcc-interface/utils.c (convert): Do not try to upcast properly for a
2214 conversion between tagged types in type_annotate_only mode.
2215
2216 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
2217
2218 * gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
2219 * gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
2220 type built for an aliased component with variable size.
2221
2222 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
2223
2224 * doc/gnat_ugn/project-manager-figure.png: Delete.
2225
2226 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
2227
2228 * vxworks-arm-link.spec, vxworks-e500-link.spec,
2229 vxworks-gnat-crtbe-link.spec, vxworks-smp-arm-link.spec,
2230 vxworks-smp-e500-link.spec, vxworks-smp-ppc-link.spec,
2231 vxworks-smp-x86-link.spec: New files.
2232
2233 2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
2234
2235 * gnatvsn.adb: Re-center the copyright header.
2236 * indepsw-darwin.adb: Adjust the starting copyright year to 2011.
2237
2238 2018-05-31 Fedor Rybin <frybin@adacore.com>
2239
2240 * doc/gnat_ugn/gnat_utility_programs.rst: Document Stubs_Subdir in
2241 gnattest section on user guide.
2242
2243 2018-05-31 Ed Schonberg <schonberg@adacore.com>
2244
2245 * sem_res.adb (Resolve_String_Literal): If the type is a string type
2246 whose component subtype has a static predicate, ensure that the
2247 predicate is applied to each character by expanding the string into the
2248 equivalent aggregate. This is also done if the component subtype is
2249 constrained.
2250
2251 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2252
2253 * gcc-interface/trans.c (Call_to_gnu): Remove obsolete code.
2254
2255 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
2256
2257 * sem_ch6.adb (Check_Missing_Return): Handle procedures with no
2258 explicit spec.
2259
2260 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2261
2262 * gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
2263 the type of the parameter is an unconstrained array type, convert
2264 to the type of the actual before the type of the formal only if the
2265 conversion was suppressed earlier. Use in_param and gnu_actual_type
2266 local variables throughout, and uniform spelling for In Out or Out.
2267 Also remove dead code in the component-by-reference case.
2268
2269 2018-05-31 Frederic Konrad <konrad@adacore.com>
2270
2271 * tracebak.c (STOP_FRAME): Harden condition.
2272 (is_return_from, EXTRA_STOP_CONDITION): New helpers for VxWorks in RTP
2273 mode.
2274
2275 2018-05-31 Ed Schonberg <schonberg@adacore.com>
2276
2277 * checks.adb (Apply_Discriminant_Check): Do not apply discriminant
2278 check to a call to a build-in-place function, given that the return
2279 object is limited and cannot be copied.
2280
2281 2018-05-31 Olivier Hainque <hainque@adacore.com>
2282
2283 * libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
2284 builtins.
2285
2286 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2287
2288 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
2289 there is no target, also create a temporary for the return value for
2290 an allocator if the type is an unconstrained record type with default
2291 discriminant.
2292
2293 2018-05-31 Hristian Kirtchev <kirtchev@adacore.com>
2294
2295 * exp_ch7.adb (Find_Transient_Context): An iteration scheme is a valid
2296 boudary for a transient scope.
2297
2298 2018-05-31 Valentine Reboul <reboul@adacore.com>
2299
2300 * gnatvsn.ads: Rename "GPL" version to "Community".
2301
2302 2018-05-31 Ed Schonberg <schonberg@adacore.com>
2303
2304 * einfo.ads: Improve documentation for the Is_Unsigned_Type entity
2305 flag.
2306
2307 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
2308
2309 * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
2310 with a semantically equivalent call to Defining_Entity.
2311
2312 2018-05-31 Piotr Trojanek <trojanek@adacore.com>
2313
2314 * sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
2315 Max_Queue_Length expression.
2316
2317 2018-05-31 Sergey Rybin <rybin@adacore.com>
2318
2319 * doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
2320 that the main unit to be built before the call, now it computes the
2321 closure of the main unit itself.
2322 * gnat_ugn.texi: Regenerate.
2323
2324 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2325
2326 * repinfo.adb (List_Structural_Record_Layout): Set First to false
2327 after having listed the fields of the parent type, if any.
2328
2329 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2330
2331 * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
2332 deal with the ___XP suffix for packed array types here...
2333 <E_Array_Subtype>: ...or here when processing the implementation type
2334 but when processing the original type instead. Do not reuse the DECL
2335 of the implementation type for the original type. Tidy up.
2336
2337 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
2338
2339 * einfo.ads (Object_Size_Clause): Declare.
2340 * einfo.adb (Object_Size_Clause): New function.
2341 * gcc-interface/utils.c (maybe_pad_type): Test Has_Size_Clause before
2342 retrieving Size_Clause and post the warning on the object size clause
2343 if Has_Object_Size_Clause is true.
2344
2345 2018-05-31 Javier Miranda <miranda@adacore.com>
2346
2347 * sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
2348 * exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
2349 Find_Primitive_Eq to search for the primitive of types whose underlying
2350 type is a tagged type.
2351
2352 2018-05-31 Yannick Moy <moy@adacore.com>
2353
2354 * sem_prag.adb (Analyze_Pragma.Check_Loop_Pragma_Placement): Inverse
2355 order of treatment between nodes recognized as loop pragmas (or
2356 generated from one) and block statements.
2357
2358 2018-05-31 Doug Rupp <rupp@adacore.com>
2359
2360 * libgnat/s-osprim__posix2008.adb (Clock): Implement using
2361 clock_gettime.
2362
2363 2018-05-31 Ed Schonberg <schonberg@adacore.com>
2364
2365 * exp_unst.ads, exp_unst.adb (In_Synchronized_Unit): New predicate to
2366 mark subprograms that cannot be eliminated because they must be treated
2367 as reachable from outside the current unit. This includes entry bodies
2368 and protected operations.
2369
2370 2018-05-31 Ed Schonberg <schonberg@adacore.com>
2371
2372 * exp_ch4.adb (Expand_Modular_Addition, Expand_Modular_Subtraction):
2373 Convert all operands of the generated code to Standard.Unsigned, to
2374 prevent spurious visibility errors. This is needed when the generated
2375 expansion involves a modular index type of an array type, and the index
2376 type is not immediately visible.
2377
2378 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
2379
2380 * einfo.ads (Package_Instantiation): Update comment after a routine
2381 that uses this field has been renamed.
2382
2383 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2384
2385 * exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
2386 if the local raise statement includes a string expression. This
2387 expression might be picked up by an outer handler or discarded, but
2388 plays no role in this transformation.
2389
2390 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2391
2392 * exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
2393 reformatting.
2394
2395 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2396
2397 * exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
2398 field in relevant nodes: Allocate, Free, and return statements.
2399
2400 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2401
2402 * exp_unst.adb (Visit_Node): Do not traverse a Component_Association
2403 that has not been analyzed, as will be the case for a nested aggregate
2404 that is expanded into individual assignments.
2405
2406 2018-05-30 Justin Squirek <squirek@adacore.com>
2407
2408 * aspects.adb, aspects.ads: Register new aspect.
2409 * par-prag.adb (Prag): Register new pragma.
2410 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
2411 aspect similar to Aspect_Max_Queue_Length.
2412 * sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
2413 set it to use the same processing as Pragma_Max_Queue_Length.
2414 * snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
2415 that it can be processed as a pragma in addition to a restriction and
2416 add an entry for the pragma itself.
2417
2418 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2419
2420 * freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
2421 is now legal on a variable of composite type initialized with an
2422 aggregate that is fully static and requires no elaboration code.
2423 * exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
2424 nested aggregates that are compile-time static, so they can be used to
2425 initialize variables declared with Threqd_Local_Storage.
2426 * doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
2427 Thread_Local_Storage.
2428 * gnat_rm.texi: Regenerate.
2429
2430 2018-05-30 Yannick Moy <moy@adacore.com>
2431
2432 * sem_util.adb (Policy_In_Effect): Take into account CodePeer and
2433 GNATprove modes.
2434
2435 2018-05-30 Justin Squirek <squirek@adacore.com>
2436
2437 * libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
2438 Add implementation.
2439 (Start_Search): Modify to use Start_Search_Internal
2440 (Start_Search_Internal): Add to break out an extra flag for searching
2441 case insensative due to the potential for directories within the same
2442 OS to allow different casing schemes.
2443 * sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
2444 for when the more precise solution fails.
2445
2446 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2447
2448 * checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
2449 Minor reformatting.
2450
2451 2018-05-30 Pascal Obry <obry@adacore.com>
2452
2453 * libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
2454 * libgnat/g-comlin.adb: Add corresponding implementation.
2455
2456 2018-05-30 Gary Dismukes <dismukes@adacore.com>
2457
2458 * sem_res.adb, sem_util.adb: Fix several typos.
2459
2460 2018-05-30 Olivier Hainque <hainque@adacore.com>
2461
2462 * vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
2463 (eh_registration_ctors, eh_registration_tors): New static variables,
2464 forced in a .ctors/.dtors section, respectively, with priority.
2465
2466 2018-05-30 Bob Duff <duff@adacore.com>
2467
2468 * aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
2469 freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
2470 sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
2471 sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
2472 sinfo.ads: Spell preanalysis, preanalyze correctly.
2473
2474 2018-05-30 Bob Duff <duff@adacore.com>
2475
2476 * libgnat/g-sestin.ads: Rework documentation comments.
2477
2478 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
2479
2480 * errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
2481 sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
2482 (Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
2483
2484 2018-05-30 Piotr Trojanek <trojanek@adacore.com>
2485
2486 * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
2487
2488 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2489
2490 * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
2491 in a separate routine.
2492 (Is_Atomic_Object_Entity): New routine.
2493 (Is_Atomic_Prefix): Cleaned up.
2494 (Is_Synchronized_Object): Check that the object is atomic, or its type
2495 is atomic.
2496 (Object_Has_Atomic_Components): Removed.
2497 * sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
2498 (Is_Atomic_Object_Entity): New routine.
2499
2500 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2501
2502 * sem_ch3.adb (Access_Subprogram_Declaration): The flag
2503 Needs_Activation_Record is only needed on a subprogram type, not on a
2504 pointer to such.
2505 * sem_res.adb (Resolve_Selected_Component): If the context type and the
2506 component type are anonymous access to subprograms, use the component
2507 type to obtain the proper value of Needs_Activation_Record flag for the
2508 expression.
2509
2510 2018-05-30 Eric Botcazou <ebotcazou@adacore.com>
2511
2512 * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
2513 comment about the memset case.
2514
2515 2018-05-30 Bob Duff <duff@adacore.com>
2516
2517 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
2518 to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
2519 We need to analyze it as part of analyzing the block, so that if the
2520 call to Element that initializes Elmt_Decl returns on the secondary
2521 stack, the block will ss_mark/ss_release. This block is inside the
2522 loop; we don't want to leak memory until the loop exits. The purpose
2523 of analyzing Elmt_Decl first was to catch the error of modifying it,
2524 which is illegal because it's a loop parameter. The above causes us to
2525 miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
2526 it on the Element entity, so we end up with an E_Variable node with the
2527 flag set.
2528 * einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
2529 * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
2530 parameter not allowed" error if Is_Loop_Parameter.
2531 * sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
2532 trigger the call to Diagnose_Non_Variable_Lhs.
2533
2534 2018-05-30 Arnaud Charlet <charlet@adacore.com>
2535
2536 * checks.adb (Apply_Scalar_Range_Check):
2537 * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
2538 range values for System.Priority in CodePeer mode since the actual
2539 target compiler may provide a wider range.
2540
2541 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2542
2543 * exp_unst.adb: Search specification of main unit as well, for
2544 unnesting.
2545
2546 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2547
2548 * exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
2549 a package body that is a compilation unit may contain blocks that
2550 declare local subprograms. In Subprogram_Unnesting Mode such
2551 subprograms must be handled as nested inside the (implicit) elaboration
2552 procedure that executes that statement part. To handle properly uplevel
2553 references we construct that subprogram explicitly, to contain blocks
2554 and inner subprograms, The statement part of the compilation unit
2555 becomes a call to this subprogram. This is only done if blocks are
2556 present in the statement list of the body.
2557
2558 2018-05-30 Bob Duff <duff@adacore.com>
2559
2560 * exp_ch7.adb: Minor comment fix.
2561
2562 2018-05-30 Ed Schonberg <schonberg@adacore.com>
2563
2564 * exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
2565 that have no corresponding body and appear as attributes of the
2566 corresponding wrapper package declaration.
2567 (Register_Subprogram): New subprogram, used for subprogram bodies and
2568 for subprogram instantiations to enter callable entity into Subp table.
2569
2570 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2571
2572 * libgnat/s-secsta.adb: Reimplement the secondary stack support.
2573 * libgnat/s-secsta.ads: Update the documentation of all routines in the
2574 public part of the package. Reimplement the private part of the
2575 package to account for the new secondary stack structure. Add types
2576 and subprograms for testing purposes. Add several documentation
2577 sections.
2578
2579 2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
2580
2581 * exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
2582 exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
2583 libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
2584 sem_disp.ads, sem_util.adb: Minor reformatting.
2585
2586 2018-05-30 Arnaud Charlet <charlet@adacore.com>
2587
2588 * gcc-interface/Makefile.in: Move special flags for Ada runtime files
2589 from here...
2590 * Makefile.rtl: ... to here. Update comments. Protect call to
2591 "GCC_FOR_TARGET" in case target_os isn't defined.
2592
2593 2018-05-30 Arnaud Charlet <charlet@adacore.com>
2594
2595 * gcc-interface/Makefile.in: Move target pair settings from here...
2596 * Makefile.rtl: ... to here.
2597 (setup-rts): New target.
2598
2599 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2600
2601 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
2602 List of All Switches): Replace "modules" with "units".
2603 (Subprogram Inlining Control): Likewise.
2604 * gnat_ugn.texi: Regenerate.
2605 * usage.adb (Usage): Fix description of -gnatn switch.
2606
2607 2018-05-29 Arnaud Charlet <charlet@adacore.com>
2608
2609 * gcc-interface/Makefile.in: Fix typos.
2610
2611 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2612
2613 * exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
2614 the finalizer procedure in the At_End handler, for use in LLVM
2615 generation.
2616
2617 2018-05-29 Javier Miranda <miranda@adacore.com>
2618
2619 * exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
2620 subprogram Inherits_From_Tagged_Full_View to identify more reliably
2621 untagged private types completed with a derivation of an untagged
2622 private whose full view is a tagged type.
2623 * sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
2624 subprogram.
2625 (Collect_Primitive_Operations): Handle untagged private types completed
2626 with a derivation of an untagged private type whose full view is a
2627 tagged type. In such case, collecting the list of primitives we may
2628 find two equality primitives: one associated with the untagged private
2629 and another associated with the ultimate tagged type (and we must
2630 remove from the returned list this latter one).
2631
2632 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2633
2634 * exp_unst.adb (Visit_Node): Handle statement sequences that include an
2635 At_End handler.
2636
2637 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2638
2639 * repinfo.adb (List_Entities): Also recurse into blocks without label.
2640
2641 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2642
2643 * exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
2644 exceptions if subprogram unnesting is in effect, because these branch
2645 nodes are relevant only in the presence of nested subprograms.
2646
2647 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2648
2649 * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
2650 unconditionally when applied to the largest positive (resp. largest
2651 negative) value of a floating-point type.
2652
2653 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2654
2655 * einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
2656 discriminants and exceptions are never components of such. The flag
2657 Needs_Activation_Record is set on subprogram types, not on access to
2658 them.
2659
2660 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2661
2662 * sem_ch3.adb: Set scope of component of subtype.
2663
2664 2018-05-29 Ed Schonberg <schonberg@adacore.com>
2665
2666 * exp_unst.adb (Visit_Node): Exclude selected components whose prefix
2667 carry no type. Such selected components appear in unit names that are
2668 child units, both in the specification and possibly in an end label for
2669 the unit, and they do not contain any relevant uplevel references.
2670
2671 2018-05-29 Arnaud Charlet <charlet@adacore.com>
2672
2673 * libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
2674 function.
2675
2676 2018-05-29 Olivier Hainque <hainque@adacore.com>
2677
2678 * libgnat/system-vxworks7-ppc-rtp.ads: New file.
2679 * libgnat/system-vxworks7-ppc-kernel.ads: New file.
2680 * libgnat/system-vxworks7-e500-rtp.ads: New file.
2681 * libgnat/system-vxworks7-e500-kernel.ads: New file.
2682 * libgnat/system-vxworks7-x86-rtp.ads: New file.
2683 * libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
2684 * libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
2685 gnat-crtbe link spec to use the vx7 variant.
2686
2687 2018-05-29 Olivier Hainque <hainque@adacore.com>
2688
2689 * vx_crtbegin.inc: Use a consistent naming convention for the
2690 registration/deregistration functions across RTP or kernel. Remove the
2691 ctor/dtor attribute setting based on RTP/kernel, expect the optional
2692 attribute extension to be provided by includers instead.
2693 * vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
2694 extension for the registration/deregistration functions.
2695 * vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
2696 constructor/destructor attribute extensions.
2697 * vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
2698 attribute extensions and declare _ctors/_dtors arrays.
2699 * vx_crtbegin_auto.c: Remove.
2700 * libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
2701 vxworks7-gnat-crtbe-link.spec.
2702 * libgnat/system-vxworks7-aarch64.ads: Likewise.
2703 * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
2704 * libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
2705 * libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
2706 * libgnat/system-vxworks7-x86-kernel.ads: Likewise.
2707 * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
2708 * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
2709 * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
2710
2711 2018-05-29 Piotr Trojanek <trojanek@adacore.com>
2712
2713 * ali.adb: Minor reformatting.
2714
2715 2018-05-29 Joel Brobecker <brobecker@adacore.com>
2716
2717 * doc/gnat_ugn/platform_specific_information.rst: Update package
2718 requirements for 32bit GNAT on x86_64-linux.
2719 * gnat_ugn.texi: Regenerate.
2720
2721 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2722
2723 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
2724 Control): Adjust description of -gnatRj.
2725 * gnat_ugn.texi: Regenerate.
2726 * opt.ads (List_Representation_Info_To_JSON): Likewise.
2727 * repinfo.adb (List_Rep_Info): Do not automatically create a file
2728 if List_Representation_Info_To_JSON is true.
2729 * switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
2730 check between -gnatRj and -gnatRs.
2731 * usage.adb (Usage): Adjust description of -gnatRj.
2732
2733 2018-05-29 Pascal Obry <obry@adacore.com>
2734
2735 * libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
2736 the root directory.
2737
2738 2018-05-29 Pascal Obry <obry@adacore.com>
2739
2740 * libgnat/s-os_lib.adb: Minor reformatting.
2741
2742 2018-05-29 Doug Rupp <rupp@adacore.com>
2743
2744 * libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
2745 * libgnat/a-calend.ads (Epoch_Offset): to private part of spec
2746 * libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
2747 * libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
2748
2749 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2750
2751 * repinfo.ads (JSON format): Document new pair for components.
2752 * repinfo.adb (Derived_Discriminant): New function.
2753 (List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
2754 in recursive calls. If the record type is the parent of an extension,
2755 find and list the derived discriminant from the extension, if any.
2756 (List_Component_Layout): List the Discriminant_Number in JSON mode.
2757 (List_Record_Info): Adjust call to List_Structural_Record_Layout.
2758
2759 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2760
2761 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
2762 List of All Switches): Document -gnatRj.
2763 (Debugging Control): Likewise.
2764 * gnat_ugn.texi: Regenerate.
2765 * opt.ads (List_Representation_Info_To_JSON): New boolean variable.
2766 * osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
2767 extension if List_Representation_Info_To_JSON is true.
2768 * repinfo.ads: Document the JSON output format.
2769 * repinfo.adb (List_Location): New procedure.
2770 (List_Array_Info): Add support for JSON output.
2771 (List_Entities): Likewise.
2772 (Unop): Likewise.
2773 (Binop): Likewise.
2774 (Print_Expr): Likewise.
2775 (List_Linker_Section): Likewise.
2776 (List_Mechanisms): Likewise.
2777 (List_Name): Likewise.
2778 (List_Object_Info): Likewise.
2779 (List_Record_Info): Likewise.
2780 (List_Component_Layout): Likewise. Add Indent parameter.
2781 (List_Structural_Record_Layout): New procedure.
2782 (List_Attr): Add support for JSON output.
2783 (List_Type_Info): Likewise.
2784 (Write_Unknown_Val): Likewise.
2785 * switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
2786 * usage.adb (Usage): List -gnatRj.
2787
2788 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2789
2790 * repinfo.adb (List_Component_Layout): New procedure extracted from...
2791 (List_Record_Layout): ...here. Invoke it.
2792
2793 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2794
2795 * repinfo.adb (Write_Unknown_Val): New procedure.
2796 (List_GCC_Expression): Call it.
2797 (List_Record_Layout): Likewise.
2798 (Write_Val): Likewise.
2799
2800 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2801
2802 * exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
2803 code to do check.
2804
2805 2018-05-29 Arnaud Charlet <charlet@adacore.com>
2806
2807 * lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
2808 This breaks build of cross compilers with older versions of GNAT, so
2809 better avoid it.
2810
2811 2018-05-29 Doug Rupp <rupp@adacore.com>
2812
2813 * libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
2814 reflect reality.
2815
2816 2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2817
2818 * exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
2819
2820 2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
2821
2822 * repinfo.adb (List_Entities): Do not list the Linker_Section for
2823 subprograms here...
2824 (List_Mechanisms): ...but here instead. Use consistent name output
2825 and formatting conventions.
2826
2827 2018-05-29 Bob Duff <duff@adacore.com>
2828
2829 * lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
2830 To_Lower function.
2831 * libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
2832 To_Mixed): New functions.
2833 * osint.adb: Cleanup: use Is_Directory_Separator, which correctly
2834 allows both '\' and '/' on Windows.
2835
2836 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2837
2838 * repinfo.ads: Minor fixes and tweaks in comments.
2839
2840 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2841
2842 * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
2843 it with calls to Unop.
2844
2845 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2846
2847 * repinfo.ads (TCode): Adjust range.
2848 (Truth_Andif_Expr): Remove.
2849 (Truth_Orif_Expr): Likewise.
2850 (Truth_And_Expr .. Dynamic_Val): Adjust value.
2851 * repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
2852 (Rep_Value): Likewise.
2853 * repinfo.h (Truth_Andif_Expr): Remove.
2854 (Truth_Orif_Expr): Likewise.
2855 (Truth_And_Expr .. Dynamic_Val): Adjust value.
2856 * gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
2857 through to TRUTH_AND_EXPR case.
2858 <TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
2859
2860 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2861
2862 * exp_unst.adb (Visit_Node): For indexed components and attribute
2863 references, examine index expressions or associated expressions as well
2864 to record uplevel references.
2865 (Vist_Node): For function and procedure calls, if a formal is an
2866 unconstrained array and the actual is constrained, check whether bounds
2867 of actual have uplevel references.
2868
2869 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2870
2871 * einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
2872 they can appear as components of activation records.
2873 * exp_unst.adb (Visit_Node): A reference to an exception may be an
2874 uplevel reference.
2875
2876 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2877
2878 * exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
2879 depends on a discriminant manually instead of using the predicate
2880 Size_Depends_On_Discriminant in the array type case.
2881
2882 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2883
2884 * exp_unst.adb (Check_Static_Type): For a record subtype, check
2885 discriminant constraints as well.
2886 (Visit_Node): For a selected component, check type of prefix, as is
2887 done for indexed components and slices.
2888
2889 2018-05-28 Javier Miranda <miranda@adacore.com>
2890
2891 * exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
2892 value when converting a float value to a fixed-point value. This is
2893 required for CCG because it handles fixed-point types by means of
2894 unsigned integer type variables. The range check is now performed using
2895 the integer value stored in this temporary.
2896
2897 2018-05-28 Yannick Moy <moy@adacore.com>
2898
2899 * sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
2900 Length as valid non-interfering contexts for SPARK.
2901
2902 2018-05-28 Claire Dross <dross@adacore.com>
2903
2904 * sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
2905 generic inheritance utilities.
2906 (Generic_Inherited_Subprograms): Generic version of
2907 Inherited_Subprograms, generic in Find_Dispatching_Type function.
2908 (Generic_Is_Overriding_Subprogram): Generic version of
2909 Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
2910 (Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
2911 Sem_Disp.Find_Dispatching_Type.
2912 (Is_Overriding_Subprogram): Instance of
2913 Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
2914 (Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
2915 with Sem_Disp.Find_Dispatching_Type.
2916
2917 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
2918
2919 * exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
2920 component type, do not expand array equality using the unconstrained
2921 base type, except for the case where the bounds of the type depend on a
2922 discriminant.
2923
2924 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2925
2926 * einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
2927 access-to-subprogram types, to indicate that an indirect call through
2928 such a type requires an activation record when compiling for LLVM.
2929 * sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
2930
2931 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2932
2933 * exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
2934 when bounds of fixed type are static, to remove some spuerfluous
2935 implicit conversions and provide an accurate result when converting
2936 back and forth between the fixed point type and a floating point type.
2937
2938 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2939
2940 * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
2941 activation records.
2942
2943 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2944
2945 * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
2946 replaced, if any; all callers changed.
2947 (Note_Uplevel_Ref): Likewise. Also replace reference to deferred
2948 constant with private view so we take the address of that entity.
2949 (Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
2950 any; all callers changed. Handle N_Indexed_Component like
2951 N_Attribute_Reference. Add N_Type_Conversion case.
2952 (Visit_Node): Indexed references can be uplevel if the type isn't
2953 static.
2954 (Unnest_Subprograms): Don't rewrite if no reference given. If call has
2955 been relocated, set first_named pointer in original node as well.
2956
2957 2018-05-28 Ed Schonberg <schonberg@adacore.com>
2958
2959 * exp_aggr.adb (Flatten): Copy tree of expression in a component
2960 association with a range or a set of discrete choices, rather than
2961 relocating the node. This avoids inconsistencies in the tree when
2962 handling nested subprograms with uplevel references for LLVM.
2963
2964 2018-05-28 Arnaud Charlet <charlet@adacore.com>
2965
2966 * exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
2967 codepeer mode.
2968
2969 2018-05-28 Arnaud Charlet <charlet@adacore.com>
2970
2971 * exp_unst.adb: Fix typo.
2972
2973 2018-05-28 Bob Duff <duff@adacore.com>
2974
2975 * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
2976 unnecessary use of 'Unrestricted_Access.
2977
2978 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
2979
2980 * repinfo.adb (Expr_Value_S): New routine.
2981 (List_Linker_Section): Properly extract the value of the section
2982 argument.
2983
2984 2018-05-28 Patrick Bernardi <bernardi@adacore.com>
2985
2986 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
2987 description of the -D binder switch to reflect current usage.
2988 * gnat_ugn.texi: Regenerate.
2989
2990 2018-05-28 Gary Dismukes <dismukes@adacore.com>
2991
2992 * exp_ch3.adb: Minor reformatting
2993
2994 2018-05-28 Justin Squirek <squirek@adacore.com>
2995
2996 * exp_ch3.adb
2997 (Build_Initialization_Call): Add logic to pass the appropriate actual to match
2998 new formal.
2999 (Init_Formals): Add new formal *_skip_null_excluding_check
3000 * exp_util.adb, exp_util.ads
3001 (Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
3002 scope.
3003 (Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
3004 (Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
3005 used to determine how to generate an Init_Proc for a given type.
3006 (Needs_Constant_Address): Minor reformatting
3007 * sem_res.adb
3008 (Resolve_Null): Add logic to generate a conditional check in certain cases
3009
3010 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
3011
3012 * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
3013 Minor reformatting.
3014
3015 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
3016
3017 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
3018 the declarations of single concurrent types because they fall in the
3019 category of full type and object declarations.
3020
3021 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
3022
3023 * repinfo.adb (Compute_Max_Length): Skip _Parent component.
3024 (List_Record_Layout): Likewise.
3025
3026 2018-05-28 Ed Schonberg <schonberg@adacore.com>
3027
3028 * sem_util.adb (Is_Function_Result): Add a warning if a postcondition
3029 includes a call to function to which it applies. This may mean an
3030 omission of an attribute reference 'Result, in particular if the
3031 function is pqrameterless.
3032
3033 2018-05-28 Justin Squirek <squirek@adacore.com>
3034
3035 * sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
3036 misresolved package name is not a case of mistaken identity.
3037
3038 2018-05-28 Yannick Moy <moy@adacore.com>
3039
3040 * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
3041 GNATprove mode, as the order of resolution (low then high) means that
3042 all the information is not available when resolving the low bound the
3043 first time.
3044
3045 2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
3046
3047 * repinfo.adb (List_Array_Info): Start with an explicit blank line and
3048 end with the linker section, if any.
3049 (List_Entities): Do not output the linker section for record types,
3050 array types and variables.
3051 (Print_Expr): Factor out common processing for unary operators and
3052 special values. Adjust and reorder the various cases.
3053 (List_Object_Info): End with the linker section, if any.
3054 (List_Record_Info): Likewise.
3055 (List_Type_Info): Do not start with a blank line.
3056
3057 2018-05-25 Nicolas Roche <roche@adacore.com>
3058
3059 * libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
3060 that the result will be either -infinite or +infinite.
3061
3062 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
3063
3064 * libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
3065 libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
3066 Expand range of type to match the address space of the target.
3067 (Task_Storage_Size): Remove unused type.
3068
3069 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3070
3071 * sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
3072 of a fixed point type and the parent is a multiplying operation,
3073 resolve the operand with its own type because the context will impose a
3074 resulting type on the result of the multiplication by means of
3075 approriate conversion.
3076
3077 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
3078
3079 * exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
3080 the in-place initialization aggregate created for pragmas
3081 Initialize_Scalars or Normalize_Scalars is performed with checks
3082 suppressed.
3083
3084 2018-05-25 Arnaud Charlet <charlet@adacore.com>
3085
3086 * exp_aggr.adb (Convert_To_Positional): Bump default for
3087 Max_Others_Replicate to 32. Update comments.
3088 * osint.ads (Unknown_Attributes): No longer pretend this is a constant.
3089 (No_File_Info_Cache): Initialize separately.
3090 * osint.adb (No_File_Info_Cache): Update initializer.
3091
3092 2018-05-25 Javier Miranda <miranda@adacore.com>
3093
3094 * sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
3095 test when the left operand is a class-wide interface and the right
3096 operand is not a class-wide type.
3097 * exp_ch4.adb (Tagged_Membership): Adding support for interface as the
3098 left operand.
3099
3100 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3101
3102 * exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
3103 in an others clause to prevent visibility issues with the generated
3104 loop variable.
3105 (Component_OK_For_Backend): Return false for a quantified expression.
3106 (Check_Static_Component): Ditto.
3107
3108 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
3109
3110 * libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
3111 (SS_Allocate_Dynamic): New routine. The allocation logic is now split
3112 into three distring cases rather than in one loop which attempts to
3113 handle all three cases. This rewrite eliminates an issue where the last
3114 frame of the stack cannot be freed, thus causing the memory range of a
3115 new frame to approach the overflow point of the memory index type.
3116 Since the overflow is logically treated as a
3117 too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
3118 (SS_Allocate_Static): New routine. The routine factorizes the static
3119 secondary stack-related code from the former SS_Allocate.
3120
3121 2018-05-25 Sergey Rybin <rybin@adacore.com>
3122
3123 * doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
3124 option for gnatelim.
3125
3126 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3127
3128 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
3129 Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
3130 is created when the proper body of the stub is analyzed.
3131 * sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
3132 is the proper body of a subunit, the cloned body must be inserted in
3133 the declarative list that contains the stub.
3134
3135 2018-05-25 Justin Squirek <squirek@adacore.com>
3136
3137 * exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
3138 generate code for 6.5(8-10) so that we don't get an assertion error
3139 when dealing with an incomplete return type.
3140
3141 2018-05-25 Arnaud Charlet <charlet@adacore.com>
3142
3143 * pprint.adb (Expression_Name): Strip too long expressions to avoid
3144 carrying very large strings.
3145
3146 2018-05-25 Patrick Bernardi <bernardi@adacore.com>
3147
3148 * switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
3149 numbers.
3150
3151 2018-05-25 Doug Rupp <rupp@adacore.com>
3152
3153 * tracebak.c (aarch64-linux): Implement.
3154
3155 2018-05-25 Justin Squirek <squirek@adacore.com>
3156
3157 * sem_ch8.adb: Minor reformatting.
3158
3159 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
3160
3161 * sem_util.adb (Iterate_Call_Parameters): Fix code convention and
3162 assertions.
3163
3164 2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
3165
3166 * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
3167 pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
3168 Minor reformatting.
3169
3170 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3171
3172 * sem_ch12.adb (Instance_Exists): New function, subsidiary of
3173 Validate_Derived_Type_Instance, to verify that all interfaces
3174 implemented by the formal type are also implemented by the actual. The
3175 verification is complicated when an interface of the formal is declared
3176 in a generic unit and the actual is declared in an instance of it.
3177 There is currently no mechanism to relate an interface declared within
3178 a generic to the corresponding interface in an instance, so we must
3179 traverse the list of interfaces of the actual, looking for a name
3180 match, and verifying that that interface is declared in an instance.
3181
3182 2018-05-25 Piotr Trojanek <trojanek@adacore.com>
3183
3184 * sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
3185 assertions; replace function versions of Next_Formal/Next_Actual with
3186 their procedural versions (which are more concise).
3187
3188 2018-05-25 Doug Rupp <rupp@adacore.com>
3189
3190 * libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
3191 libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
3192 libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
3193 libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
3194 libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
3195 (Relative_Timed_Wait): Remove.
3196 * libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
3197 for incremental looping. Remove references to Rel_Time and
3198 Relative_Timed_Wait.
3199 * libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
3200 (Timed_Delay): Make separate.
3201 * libgnat/s-optide.adb: New separate procedure.
3202 * libgnat/s-osprim.ads (Max_System_Delay): New constant.
3203 * libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
3204 (Max_System_Delay): New constant.
3205
3206 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3207
3208 * sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
3209 for a formal derived type implements all the interfaces declared for
3210 the formal.
3211
3212 2018-05-25 Yannick Moy <moy@adacore.com>
3213
3214 * sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
3215 and GNATprove modes when applicable policy is Ignore.
3216
3217 2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
3218
3219 * freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
3220 boolean type with convention C.
3221 * libgnat/i-cexten.ads (bool): Change to boolean with convention C.
3222 * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
3223 FOREIGN and use it throughout the function.
3224 <E_Enumeration_Type>: Set precision 1 on boolean types with foreign
3225 convention.
3226 <E_Enumeration_Subtype>: Likewise for subtypes.
3227 <E_Record_Type>: Force the size of a storage unit on empty classes.
3228 * gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
3229 boolean types with precision 1 if the size is the expected one.
3230
3231 2018-05-25 Arnaud Charlet <charlet@adacore.com>
3232
3233 * pprint.adb (Expression_Name): Do not print non ASCII characters.
3234
3235 2018-05-25 Bob Duff <duff@adacore.com>
3236
3237 * libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
3238 libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
3239
3240 2018-05-25 Bob Duff <duff@adacore.com>
3241
3242 * sem_util.ads: Minor comment fix.
3243
3244 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3245
3246 * exp_unst.adb (Visit_Node): Restrict check for uplevel references in
3247 prefixes of array attributes, to prefixes that are entity names whose
3248 type is constrained.
3249 (Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
3250 subprogram, as itype created for loops in pre/postcondition may appear
3251 in loops at the library level.
3252
3253 2018-05-25 Ed Schonberg <schonberg@adacore.com>
3254
3255 * sem_ch13.adb (Build_Predicate_Functions): The predicate function
3256 declaration is inserted into the tree and analyzed at that point, so
3257 should not be reinserted when the body is constructed. Inside a
3258 generic, ensure that the body is not inserted twice in the tree.
3259
3260 2018-05-25 Yannick Moy <moy@adacore.com>
3261
3262 * sem_prag.adb (Check_Grouping): Modify test to ignore statements and
3263 declarations not coming from source.
3264
3265 2018-05-25 Fedor Rybin <frybin@adacore.com>
3266
3267 * doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
3268 --copy-environment for gnattest.
3269
3270 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
3271
3272 * sem_elab.adb (Non_Private_View): Simplify by removing a local Result
3273 variable.
3274 * sem_prag.adb (Get_Base_Subprogram): Same as above.
3275
3276 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
3277
3278 * fe.h (Set_Normalized_First_Bit): Declare.
3279 (Set_Normalized_Position): Likewise.
3280 * repinfo.adb (List_Record_Layout): Do not use irregular output for a
3281 variable position. Fix minor spacing issue.
3282 * gcc-interface/decl.c (annotate_rep): If a field has a variable
3283 offset, compute the normalized position and annotate it in addition to
3284 the bit offset.
3285
3286 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
3287
3288 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
3289 Constify and rename variables. Fix formatting.
3290 (gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
3291 <N_Raise_Statement>: Likewise.
3292
3293 2018-05-24 Javier Miranda <miranda@adacore.com>
3294
3295 * exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
3296 body of a variant record equality renaming.
3297 (Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
3298 implementation of Build_Body_For_Renaming.
3299 * exp_ch3.ads (Build_Variant_Record_Equality): New library level
3300 function that factorizes the functionality needed by
3301 Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
3302 of a variant record equality subprogram.
3303 * exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
3304 (Build_Variant_Record_Equality): New local procedure of
3305 Expand_Freeze_Record_Type containing all the code specific for freezing
3306 the record type that cannot be place in the new library level function.
3307
3308 2018-05-24 Ed Schonberg <schonberg@adacore.com>
3309
3310 * einfo.ads, einfo.adb (Is_Activation_Record): New flag on
3311 in_parameters, used when unesting subprograms for LLVM, to indicate
3312 that a generated parameter carries the activation record from the
3313 enclosing subprogram.
3314 * exp_unst.adb (Check_Static_Type): Handle array attributes of types
3315 whose bounds may contain up-level references that need to be added to
3316 an activation recoord.
3317 (Add_Extra_Formal): Set Is_Activation_Record on new formal.
3318
3319 2018-05-24 Yannick Moy <moy@adacore.com>
3320
3321 * pprint.adb (Expression_Image): Improve the printing of expressions,
3322 by taking more cases into account, in particular qualified expressions
3323 and aggregates. Also count more the number of parentheses to close
3324 after the expression.
3325
3326 2018-05-24 Javier Miranda <miranda@adacore.com>
3327
3328 * sem_ch3.adb (Is_Visible_Component): For untagged types add missing
3329 check for renamed discriminants.
3330 * sem_ch4.adb (Analyze_Overloaded_Selected_Component,
3331 Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
3332 Is_Visible_Component pass the associated selector node to allow
3333 checking renamed discriminants on untagged types.
3334
3335 2018-05-24 Ed Schonberg <schonberg@adacore.com>
3336
3337 * sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
3338 link to a use_type clause if this would cause an infinite loop in the
3339 machinery that detects redundant use clauses. This may happen when the
3340 redundant clauses appear in the context of a child unit and the context
3341 of its parent.
3342
3343 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
3344
3345 * sinfo.ads: Fix grammar in comment.
3346
3347 2018-05-24 Justin Squirek <squirek@adacore.com>
3348
3349 * einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
3350 and manage doubly-linked entity chain.
3351 (Nested_Scenarios): Removed entity field used for optimization during
3352 elaboration to make room for the new field Prev_Entity.
3353 (Link_Entities): Added to replace redundant calls to Set_Next_Entity
3354 and Set_Prev_Entity as well as centralize changes to the entity chain.
3355 (Predicated_Parent): Modified to use Node38.
3356 (Prev_Entity): Added to fetch new node field Prev_Entity in all entity
3357 types.
3358 (Remove_Entity): Moved from sem_util.
3359 (Set_Nested_Scenarios): Deleted.
3360 (Set_Predicated_Parent): Modified to use Node38.
3361 (Set_Prev_Entity): Added to set Prev_Entity field.
3362 (Set_Validated_Object): Modified to use Node38.
3363 (Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
3364 action is required.
3365 (Validated_Object): Modified to use Node38.
3366 (Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
3367 predicated parent cases.
3368 (Write_Field38_Name): Add predicated parent and Validated_Object cases.
3369 * sem_ch3.adb (Process_Subtype): Add guard to protect against
3370 inappropriate marking of Predicated_Parent to non-itype subtypes.
3371 (Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
3372 (Copy_And_Swap): Add setting of Prev_Entity.
3373 (Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
3374 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
3375 w/ Link_Entities.
3376 (New_Overloaded_Entity): Remove block created to search for previous
3377 entities in the entity chain with relevant calls to Prev_Entity as well
3378 as replace duplicated code from Remove_Entity_And_Homonym with a call
3379 to that subprogram.
3380 * sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
3381 Link_Entities.
3382 * sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
3383 initial subprogram declarations related to Nested_Scenarios.
3384 (Process_Nested_Scenarios): Deleted.
3385 (Save_Scenario): Deleted.
3386 (Traverse_Body): Remove optimization for Nested_Scenarios so as to free
3387 node space in the entity tree.
3388 * sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
3389 (Remove_Entity_And_Homonym): Added to separate functionality of
3390 Remove_Entity from the homonym chain directly.
3391 * exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
3392 w/ Link_Entities and Unlink_Next_Entity.
3393 * exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
3394 Link_Entities.
3395 * exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
3396 Set_Next_Entity w/ Link_Entities.
3397 * exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
3398 Link_Entities and Unlink_Next_Entity.
3399 * exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
3400 call to Remove_Entity with its new incarnation.
3401 * exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
3402 * freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
3403 Link_Entities.
3404
3405 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3406
3407 * sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
3408 Install_Limited_Withed_Unit.
3409 (Expand_With_Clause): Update the call to Install_Withed_Unit.
3410 (Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
3411 (Install_Context_Clauses): Update the call to Install_Withed_Unit.
3412 (Install_Limited_Context_Clauses): Update the calls to
3413 Install_Limited_Withed_Unit.
3414 (Install_Limited_Withed_Unit): Renamed to better illustrate its
3415 purpose.
3416 (Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
3417 and Install_Limited_Withed_Unit.
3418 (Install_With_Clause): Uninstall a limited with clause if a [private]
3419 with clause is given for the same package.
3420 (Install_Withed_Unit): Renamed to better illustrate its purpose.
3421 (Remove_Limited_With_Unit): New routine.
3422
3423 2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
3424
3425 * raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
3426 (__gnat_personality_seh0): Adjust and beef up comments, and
3427 fix formatting throughout.
3428 (__gnat_adjust_context): Deal minimally with version 2.
3429 * seh_init.c (__gnat_map_SEH): Fix formatting.
3430 (_gnat_SEH_error_handler): Adjust comments.
3431 (__gnat_install_SEH_handler): Fix formatting.
3432
3433 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3434
3435 * exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
3436
3437 2018-05-24 Ed Schonberg <schonberg@adacore.com>
3438
3439 * exp_aggr.adb (Flatten): Add a warning on an others clause in an array
3440 aggregate with static bounds when named associations cover all index
3441 positions and the others clause is redundant.
3442
3443 2018-05-24 Raphael Amiard <amiard@adacore.com>
3444
3445 * libgnat/a-cohama.ads: Add documentation.
3446
3447 2018-05-24 Raphael Amiard <amiard@adacore.com>
3448
3449 * libgnat/a-convec.ads: Add documentation.
3450
3451 2018-05-24 Justin Squirek <squirek@adacore.com>
3452
3453 * exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
3454 expansion for limited tagged types when the node to be expanded is a
3455 raise expression due to it not representing a valid object.
3456 * exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
3457 message regarding assignments to limited types to ignore genereated
3458 code.
3459
3460 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3461
3462 * exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
3463 Ghost-related attributes of the class-wide subtype because the copy
3464 clobbers them.
3465
3466 2018-05-24 Justin Squirek <squirek@adacore.com>
3467
3468 * sem_res.adb (Resolve_Entity_Name): Add guard to protect against
3469 marking use clauses as effective when the reference appears within
3470 generated code.
3471
3472 2018-05-24 Cyrille Comar <comar@adacore.com>
3473
3474 * doc/gnat_rm/the_gnat_library.rst: Fix typos.
3475 * gnat_rm.texi: Regenerate.
3476
3477 2018-05-24 Bob Duff <duff@adacore.com>
3478
3479 * exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
3480 for build-in-place functions with a caller-unknown-size result.
3481 (Create_Finalizer): For build-in-place functions with a
3482 caller-unknown-size result, check at run time whether we need to
3483 release the secondary stack.
3484
3485 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3486
3487 * sem_prag.adb (Analyze_Pragma): Use the full view of an internally
3488 generated incomplete type.
3489
3490 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3491
3492 * expander.adb (Expand): Update the save and restore of the Ghost
3493 region.
3494 * exp_ch3.adb (Freeze_Type): Likewise.
3495 * exp_disp.adb (Make_DT): Likewise.
3496 * exp_util.adb (Build_DIC_Procedure_Body): Likewise.
3497 (Build_DIC_Procedure_Declaration): Likewise.
3498 (Build_Invariant_Procedure_Body): Likewise.
3499 (Build_Invariant_Procedure_Declaration): Likewise.
3500 (Make_Predicate_Call): Likewise.
3501 * freeze.adb (Add_To_Result): Insert the freeze action of a living
3502 entity prior to the start of the enclosing ignored Ghost region.
3503 (Freeze_Entity): Update the save and restore of the Ghost region.
3504 * ghost.adb (Install_Ghost_Mode): Reimplemented.
3505 (Install_Ghost_Region): New routine.
3506 (Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
3507 (Mark_And_Set_Ghost_Body): Likewise.
3508 (Mark_And_Set_Ghost_Completion): Likewise.
3509 (Mark_And_Set_Ghost_Declaration): Likewise.
3510 (Mark_And_Set_Ghost_Instantiation): Likewise.
3511 (Mark_And_Set_Ghost_Procedure_Call): Likewise.
3512 (Name_To_Ghost_Mode): New routine.
3513 (Restore_Ghost_Region): New routine.
3514 * ghost.ads (Install_Ghost_Region): New routine.
3515 (Restore_Ghost_Region): New routine.
3516 * opt.ads: Add new global variable Ignored_Ghost_Region.
3517 * rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
3518 region. Install a clean region.
3519 * sem.adb (Analyze): Likewise.
3520 (Do_Analyze): Likewise.
3521 * sem_ch3.adb (Analyze_Object_Declaration): Likewise
3522 (Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
3523 capture the ultimate alias of the current primitive.
3524 (Process_Full_View): Update the save and restore of the Ghost region.
3525 Do not inherit DIC and invariant procedures.
3526 * sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
3527 Ghost region.
3528 * sem_ch6.adb (Analyze_Procedure_Call): Likewise.
3529 (Analyze_Subprogram_Body_Helper): Likewise.
3530 * sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
3531 * sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
3532 (Analyze_Subprogram_Instantiation): Likewise.
3533 (Instantiate_Package_Body): Likewise.
3534 (Instantiate_Subprogram_Body): Likewise.
3535 * sem_ch13.adb (Build_Predicate_Functions): Likewise.
3536 (Build_Predicate_Function_Declaration): Likewise.
3537 * sem_disp.adb
3538 (Add_Dispatching_Operation): Do not consider DIC and invariant
3539 procedures.
3540 (Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
3541 a dispatching subprogram.
3542 (Check_Operation_From_Private_View): Likewise.
3543 (Override_Dispatching_Operation): Likewise.
3544 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
3545 and restore of the Ghost region.
3546 (Analyze_Initial_Condition_In_Decl_Part): Likewise.
3547 (Analyze_Pragma): Update the save and restore of the Ghost region.
3548 (Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
3549 * sem_util.adb (Is_Suitable_Primitive): New routine.
3550 * sem_util.ads (Is_Suitable_Primitive): New routine.
3551 * sinfo.ads: Update the section of Ghost regions.
3552
3553 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
3554
3555 * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
3556 Change "condition" to "case guard" after renaming in the contract
3557 grammar.
3558 * gnat_rm.texi: Regenerate.
3559
3560 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3561
3562 * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
3563 construct with discrete choices no longer contains a subtype with
3564 predicates since the expansion already handled this case.
3565
3566 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3567
3568 * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
3569 conversion to the return type to avoid a side effect where an imported
3570 relocated function generates a new anonymous access type, whose
3571 accessibility level does not agree with with that of the wrapper.
3572
3573 2018-05-24 Javier Miranda <miranda@adacore.com>
3574
3575 * sem_util.adb (Abstract_Interface_List): Add missing support for
3576 private types whose full view is a synchronized type.
3577 * sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
3578 derivation of a private type parent type is a task type with
3579 discriminants as gigi does not use such type directly.
3580
3581 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
3582
3583 * sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
3584 variable marker when the reference appears in the formal part of a
3585 compilation unit instance because there is no place to insert it.
3586 (In_Compilation_Instance_Formal_Part): New routine.
3587
3588 2018-05-24 Piotr Trojanek <trojanek@adacore.com>
3589
3590 * layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
3591 configuration parameter.
3592
3593 2018-05-24 Doug Rupp <rupp@adacore.com>
3594
3595 * argv-lynxos178-raven-cert.c: New file.
3596 * libgnat/system-lynxos178-x86.ads: New file.
3597
3598 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3599
3600 * exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
3601 Minor reformattings.
3602
3603 2018-05-23 Pascal Obry <obry@adacore.com>
3604
3605 * adaint.c (win32_wait): Properly free the handle/pid lists when
3606 WaitForMultipleObjects fails (return WAIT_FAILED).
3607
3608 2018-05-23 Pascal Obry <obry@adacore.com>
3609
3610 * adaint.c (win32_wait): Add missing parentheses.
3611
3612 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3613
3614 * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
3615 (Expand_N_Object_Declaration): Do not check for a large modular array
3616 here.
3617 * freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
3618 (Freeze_Object_Declaration): Code cleanup. Check for a large modular
3619 array.
3620 * sem_ch3.adb: Minor reformatting.
3621
3622 2018-05-23 Ed Schonberg <schonberg@adacore.com>
3623
3624 * einfo.ads: New attribute on types: Predicated_Parent, to simplify the
3625 retrieval of the applicable predicate function to an itype created for
3626 a constrained array component.
3627 * einfo.adb: Subprograms for Predicated_Parent.
3628 (Predicate_Function): Use new attribute.
3629 * exp_util.adb (Make_Predicate_Call): If the predicate function is not
3630 available for a subtype, retrieve it from the base type, which may have
3631 been frozen after the subtype declaration and not captured by the
3632 subtype declaration.
3633 * sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
3634 legal within a generated initiqlization procedure, as may happen with a
3635 predicate check on a component, when the predicate function applies to
3636 the base type of the component.
3637 * sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
3638 predicates for subtype declarations and for subtype indications in
3639 other contexts.
3640 (Process_Subtype): Likewise. Handle properly the case of a private type
3641 with unknown discriminants whose full view is an unconstrained array.
3642 Use Predicated_Parent to indicate source of predicate function on an
3643 itype whose parent is itself an itype.
3644 (Complete_Private_Subtype): If the private view has unknown
3645 discriminants and the full view is an unconstrained array, set base
3646 type of completion to the full view of parent.
3647 (Inherit_Predicate_Flags): Prevent double assignment of predicate
3648 function and flags.
3649 (Build_Subtype): For a constrained array component, propagate predicate
3650 information from original component type declaration.
3651
3652 2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
3653
3654 * libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
3655
3656 2018-05-23 Arnaud Charlet <charlet@adacore.com>
3657
3658 * checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
3659 Hi.
3660 * sem_elab.adb: Make "out" parameters instead of "in out" when
3661 relevant.
3662
3663 2018-05-23 Bob Duff <duff@adacore.com>
3664
3665 * gnatbind.adb (List_Applicable_Restrictions): Add
3666 No_Implementation_Restrictions to the list of restrictions not to list.
3667 Remove double negative "not No_Restriction_List". Comment the
3668 commentary that is output, so it won't cause errors if used directly in
3669 a gnat.adc.
3670
3671 2018-05-23 Ed Schonberg <schonberg@adacore.com>
3672
3673 * sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
3674 class-wide precondition on a type extension when ancestor does not have
3675 a class-wide precondition. Previously the compiler accepted such a
3676 precondition when the ancestor had a class-wide postcondition.
3677
3678 2018-05-23 Javier Miranda <miranda@adacore.com>
3679
3680 * sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
3681 the warning on occurrences of this attribute whose evaluation is always
3682 true (since that subprogram aborts processing the attribute). In
3683 addition, replace the node by its boolean result 'True' (required
3684 because the backend has no knowledge of this attribute).
3685
3686 2018-05-23 Bob Duff <duff@adacore.com>
3687
3688 * libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
3689 code in question is not reachable in the case where Count_Type'Last is
3690 out of range.
3691
3692 2018-05-23 Yannick Moy <moy@adacore.com>
3693
3694 * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
3695 local pragma Warnings Off without On.
3696 * gnat_rm.texi: Regenerate.
3697
3698 2018-05-23 Olivier Hainque <hainque@adacore.com>
3699
3700 * libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
3701 * libgnat/g-excact.adb: Implement.
3702
3703 2018-05-23 Ed Schonberg <schonberg@adacore.com>
3704
3705 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
3706 is present, verify its legality when the domain of iteration is a
3707 GNAT-specific formal container, as is already done for arrays and
3708 predefined containers.
3709
3710 2018-05-23 Yannick Moy <moy@adacore.com>
3711
3712 * sem_util.adb (Enclosing_Declaration): Fix the case of a named number
3713 declaration, which was not taken into account.
3714
3715 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3716
3717 * debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
3718 synchronized suspension.
3719 * rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
3720 Ada.Synchronous_Task_Control and routines Suspend_Until_True and
3721 Wait_For_Release.
3722 * sem_elab.adb: Document switch -gnatd_s.
3723 (In_Task_Body): New routine.
3724 (Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
3725 body when the current construct denotes a synchronous suspension call,
3726 and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
3727 is in effect.
3728 (Is_Synchronous_Suspension_Call): New routine.
3729 * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
3730 -gnatd_s.
3731
3732 2018-05-23 Javier Miranda <miranda@adacore.com>
3733
3734 * exp_disp.adb (Make_DT): Restrict the initialization of
3735 External_Tag and Expanded_Name to an empty string to the case where
3736 both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
3737 restricted runtimes are compiled with pragma Discard_Names.
3738 * doc/gnat_rm/implementation_defined_pragmas.rst,
3739 doc/gnat_rm/implementation_defined_characteristics.rst: Add
3740 documentation.
3741 * gnat_rm.texi: Regenerate.
3742
3743 2018-05-23 Maroua Maalej <maalej@adacore.com>
3744
3745 * sem_spark.adb: Fix of some permission rules of pointers in SPARK.
3746
3747 2018-05-23 Ed Schonberg <schonberg@adacore.com>
3748
3749 * sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
3750 iteration of an Ada2012 loop is performed to determine the type of the
3751 domain, but full analysis is performed once the loop is rewritten as a
3752 while-loop during expansion. The pre-analysis suppresses expansion; it
3753 must also suppress the generation of freeze nodes, which may otherwise
3754 appear in the wrong scope before rewritting.
3755
3756 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3757
3758 * sem_elab.adb: Update the section on suppressing elaboration warnings.
3759
3760 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3761
3762 * einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
3763 Is_Elaboration_Target.
3764 (Is_Elaboration_Target): New routine.
3765 (Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
3766 (Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
3767 (Set_Is_Elaboration_Warnings_OK_Id): Use predicate
3768 Is_Elaboration_Target.
3769 * einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
3770 with occurrences in nodes.
3771 (Is_Elaboration_Target): New routine.
3772 * sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
3773 elaboration target is subject to pragma Warnings (Off, ...).
3774
3775 2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
3776
3777 * repinfo.adb (List_Type_Info): Remove obsolete stuff.
3778
3779 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3780
3781 * einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
3782 (Is_Elaboration_Warnings_OK_Id): New routine.
3783 (Set_Is_Elaboration_Warnings_OK_Id): New routine.
3784 (Write_Entity_Flags): Output Flag304.
3785 * einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
3786 occurrences in entities.
3787 (Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
3788 (Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
3789 Inline.
3790 * sem_attr.adb (Analyze_Access_Attribute): Capture the state of
3791 elaboration warnings.
3792 * sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
3793 elaboration warnings.
3794 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
3795 state of elaboration warnings.
3796 (Analyze_Subprogram_Body_Helper): Capture the state of elaboration
3797 warnings.
3798 (Analyze_Subprogram_Declaration): Capture the state of elaboration
3799 warnings.
3800 * sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
3801 elaboration warnings.
3802 (Analyze_Single_Task_Declaration): Capture the state of elaboration
3803 warnings.
3804 (Analyze_Task_Type_Declaration): Capture the state of elaboration
3805 warnings.
3806 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
3807 of elaboration warnings.
3808 (Analyze_Generic_Subprogram_Declaration): Capture the state of
3809 elaboration warnings.
3810 * sem_elab.adb: Add a section on suppressing elaboration warnings.
3811 Type Processing_Attributes includes component Suppress_Warnings
3812 intended to suppress any elaboration warnings along a path in the
3813 graph. Update Initial_State to include a value for this component.
3814 Types Target_Attributes and Task_Attriutes include component
3815 Elab_Warnings_OK to indicate whether the target or task has elaboration
3816 warnings enabled. component Elab_Warnings_OK.
3817 (Build_Access_Marker): Propagate attribute
3818 Is_Elaboration_Warnings_OK_Node from the attribute to the generated
3819 call marker.
3820 (Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
3821 (Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
3822 (Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
3823 (Process_Conditional_ABE_Access): Suppress futher elaboration warnings
3824 when already in this mode or when the attribute or target have warnings
3825 suppressed.
3826 (Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
3827 if warnings are suppressed.
3828 (Process_Conditional_ABE_Call): Suppress further elaboration warnings
3829 when already in this mode, or the target or call have warnings
3830 suppressed.
3831 (Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
3832 warnings are suppressed.
3833 (Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
3834 warnings are suppressed.
3835 (Process_Conditional_ABE_Instantiation): Suppress further elaboration
3836 warnings when already in this mode or when the instantiation has
3837 warnings suppressed.
3838 (Process_Conditional_ABE_Instantiation_Ada): Do not emit any
3839 diagnostics if warnings are suppressed.
3840 (Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
3841 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
3842 (Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
3843 specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
3844 (Process_Task_Object): Suppress further elaboration warnings when
3845 already in this mode, or when the object, activation call, or task type
3846 have warnings suppressed. Update the processing state to indicate that
3847 the path goes through a task body.
3848 * sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
3849 references.
3850 (Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
3851 * sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
3852 attribute references.
3853
3854 2018-05-23 Piotr Trojanek <trojanek@adacore.com>
3855
3856 * einfo.ads: Minor reformatting.
3857
3858 2018-05-23 Ed Schonberg <schonberg@adacore.com>
3859
3860 * sem_ch3.adb (Analyze_Object_Declaration): If expression is an
3861 anonymous_access_to_ subprogram formal, apply a conversion to force an
3862 accsssibility check that will fail statically, enforcing 3.10.2 (13).
3863
3864 2018-05-23 Daniel Mercier <mercier@adacore.com>
3865
3866 * gnat1drv.adb: Turn off length expansion in CodePeer mode.
3867
3868 2018-05-23 Bob Duff <duff@adacore.com>
3869
3870 * freeze.adb: (Check_Address_Clause): Deal with build-in-place
3871 aggregates in addition to build-in-place calls.
3872
3873 2018-05-23 Bob Duff <duff@adacore.com>
3874
3875 * einfo.ads: Minor reformatting.
3876 * sem_ch3.adb: Likewise.
3877 * sinfo.ads: Likewise.
3878
3879 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3880
3881 * exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
3882 initialization when the component type has predicates.
3883 * exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
3884 allocation when the component type has predicates.
3885
3886 2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
3887
3888 * einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
3889 Minor reformatting.
3890
3891 2018-05-22 Justin Squirek <squirek@adacore.com>
3892
3893 * sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
3894 original function spec into the generated function spec due to
3895 expansion of expression functions during analysis.
3896 (Analyze_Subprogram_Body_Helper): Modify check on formal parameter
3897 references from the body to the subprogram spec in the case of
3898 expression functions because of inconsistances related to having a
3899 generated body.
3900 * libgnarl/s-osinte__android.ads: Flag parameters as unused.
3901 * libgnarl/s-osinte__lynxos178e.ads: Likewise.
3902 * libgnarl/s-osinte__qnx.adb: Likewise.
3903 * libgnarl/s-osinte__qnx.ads: Likewise.
3904
3905 2018-05-22 Doug Rupp <rupp@adacore.com>
3906
3907 * init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
3908 AArch64.
3909
3910 2018-05-22 Olivier Hainque <hainque@adacore.com>
3911
3912 * libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
3913 Expect an Exception_Occurence object, not an Access.
3914 (Complete_And_Propagate_Occurrence): Adjust accordingly.
3915 (Raise_From_Signal_Handler): Likewise.
3916 (Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
3917 available in the provided occurrence object, just re-propagate the
3918 latter as a bare "raise;" would do.
3919 * libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
3920 * libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
3921 to null, to mark that the occurrence we're crafting from the stream
3922 contents is not being propagated (yet).
3923
3924 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3925
3926 * exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
3927 code for a transient component in line with the rest of the
3928 initialization code, rather than before the aggregate. This ensures
3929 that the component has proper visibility of the discriminants.
3930
3931 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
3932
3933 * adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
3934 number of CPUs.
3935
3936 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
3937
3938 * sigtramp-qnx.c: Properly restore link register in signal trampoline.
3939
3940 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3941
3942 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
3943 conversions before extracting the value of the expression.
3944 * exp_ch3.adb (Default_Initialize_Object): Optimize the default
3945 initialization of an array of scalars.
3946 (Get_Simple_Init_Val): Add processing for array types. Remove the
3947 processing of strings because this case is already handled by the array
3948 case.
3949 (Needs_Simple_Initialization): Moved to Sem_Util.
3950 (Simple_Init_Array_Type): New routine.
3951 (Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
3952 facilities from Sem_Util.
3953 (Simple_Initialization_OK): New routine.
3954 * exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
3955 * exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
3956 an array of scalars.
3957 * sem_prag.adb (Analyze_Float_Value): New routine.
3958 (Analyze_Integer_Value): New routine.
3959 (Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
3960 to handled the extended form of the pragma.
3961 (Analyze_Type_Value_Pair): New routine.
3962 * sem_util.adb: Add invalid value-related data structures.
3963 (Examine_Array_Bounds): New routine.
3964 (Has_Static_Array_Bounds): Reimplemented.
3965 (Has_Static_Non_Empty_Array_Bounds): New routine.
3966 (Invalid_Scalar_Value): New routine.
3967 (Needs_Simple_Initialization): Moved from Exp_Ch3.
3968 (Set_Invalid_Scalar_Value): New routines.
3969 * sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
3970 (Invalid_Scalar_Value): New routine.
3971 (Needs_Simple_Initialization): Moved from Exp_Ch3.
3972 (Set_Invalid_Scalar_Value): New routines.
3973 * snames.ads-tmpl: Add names for the salar type families used by pragma
3974 Initialize_Scalars.
3975
3976 2018-05-22 Javier Miranda <miranda@adacore.com>
3977
3978 * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
3979 string when pragma No_Tagged_Streams is applicable to the tagged type,
3980 and initialize the Expanded_Name with an empty string when pragma
3981 Discard_Names is applicable to the tagged type.
3982
3983 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3984
3985 * sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
3986 formal subprogram is never subtype conformqnt, and thus cannot be the
3987 prefix of 'Access. Reject as well the attribute when applied to a
3988 renaming of a formal subprogram.
3989
3990 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
3991
3992 * exp_ch3.adb (Build_Array_Init_Proc): Update the call to
3993 Needs_Simple_Initialization.
3994 (Build_Init_Statements): Update the call to Get_Simple_Init_Val.
3995 (Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
3996 profile and comment on usage.
3997 (Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
3998 Sloc of a value obtained from aspect Default_Value because this could
3999 potentially replicate large trees. The proper Sloc is now set in
4000 Get_Simple_Init_Val.
4001 (Get_Simple_Init_Val): Reorganized by breaking the various cases into
4002 separate routines. Eliminate the use of global variables.
4003 (Init_Component): Update the call to Get_Simple_Init_Val.
4004 (Needs_Simple_Initialization): Update the parameter profile and all
4005 uses of T.
4006 (Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
4007 and set the proper Sloc.
4008 * exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
4009 comment on usage.
4010 (Needs_Simple_Initialization): Update the parameter profile.
4011
4012 2018-05-22 Patrick Bernardi <bernardi@adacore.com>
4013
4014 * sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
4015 user tries to use a subtype indication as a discriminant constraint.
4016
4017 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4018
4019 * exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
4020 of N_Reduction_Expression and N_Reduction_Expression_Parameter.
4021 * par-ch4.adb: Remove parsing routines for reduction expressions.
4022 * sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
4023 sem_spark.adb, sprint.adb: Remove analysis routines for reduction
4024 expressions.
4025
4026 2018-05-22 Arnaud Charlet <charlet@adacore.com>
4027
4028 * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
4029 Relaxed_RM_Semantics mode.
4030
4031 2018-05-22 Arnaud Charlet <charlet@adacore.com>
4032
4033 * comperr.adb (Delete_SCIL_Files): Take into account
4034 N_Generic_Package_Renaming_Declaration.
4035
4036 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4037
4038 * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
4039 private, use the full view if available, because it may include renamed
4040 discriminants whose values are stored in the corresponding
4041 Stored_Constraint.
4042
4043 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4044
4045 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
4046 defined on packages that are actuals for formal packages, in order to
4047 set/reset the visibility of the formals of a formal package with given
4048 actuals, when there are subsequent uses of those formals in the
4049 enclosing generic, as required by RN 12.7 (10).
4050 * atree.ads, atree.adb: Add operations for Elist30.
4051 * atree.h: Add Elist30.
4052 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
4053 that are not defaulted and are thus not visible within the current
4054 instance.
4055 (Check_Formal_Packages): Reset visibility of formals of a formal
4056 package that are not defaulted, on exit from current instance.
4057
4058 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4059
4060 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
4061 non-'Result output appears in the output list of a function.
4062
4063 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4064
4065 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
4066 (Build_Record_VS_Func): Reimplemented.
4067 (Expand_N_Attribute): Reimplement the handling of attribute
4068 'Valid_Scalars.
4069 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
4070 attribute 'Valid_Scalars.
4071 * sem_util.adb (Scalar_Part_Present): Reimplemented.
4072 (Validated_View): New routine.
4073 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
4074 comment on usage.
4075 (Validated_View): New routine.
4076 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
4077 documentation of attribute 'Valid_Scalars.
4078 * gnat_rm.texi: Regenerate.
4079
4080 2018-05-22 Bob Duff <duff@adacore.com>
4081
4082 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
4083 the spec of a SAL_Interface package.
4084
4085 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4086
4087 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
4088 entity E within a generic unit, indicate that there are no remaining
4089 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
4090 entity E is not frozen yet but the aspects should not be reanalyzed at
4091 the freeze point, which may be outside of the generic and may not have
4092 the proper visibility.
4093
4094 2018-05-22 Bob Duff <duff@adacore.com>
4095
4096 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
4097 the new --split-line-before-record, --indent-named-statements and
4098 --no-align-modes gnatpp switches.
4099
4100 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4101
4102 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
4103 a second argument that is a constant of a given string value.
4104
4105 2018-05-22 Doug Rupp <rupp@adacore.com>
4106
4107 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
4108
4109 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
4110
4111 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
4112
4113 2018-05-22 Ed Schonberg <schonberg@adacore.com>
4114
4115 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
4116 delayed aspects, analyze them now, os that the representation of the
4117 type (size, bounds) can be computed and validated.
4118
4119 2018-05-22 Olivier Hainque <hainque@adacore.com>
4120
4121 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
4122 executable code section boundaries.
4123
4124 2018-05-22 Javier Miranda <miranda@adacore.com>
4125
4126 * locales.c: New implementation for the Ada.Locales package.
4127 * libgnat/a-locale.ads: Remove comment indicating that this is not
4128 implemented.
4129 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
4130 that this is not implemented.
4131 * gnat_rm.texi: Regenerate.
4132
4133 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4134
4135 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
4136 reformattings.
4137
4138 2018-05-22 Justin Squirek <squirek@adacore.com>
4139
4140 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
4141 (Freeze_Subprogram_Body, Install_Body): Modify calls to
4142 In_Same_Declarative_Part.
4143 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
4144 verify pragma declaration is within the same declarative list with
4145 corresponding error message.
4146 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
4147 sem_ch12.adb and generalized to be useful outside the scope of
4148 freezing.
4149
4150 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
4151
4152 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
4153 categorization of the unit after processing the aspects in case one of
4154 its aspects is converted into a categorization pragma.
4155
4156 2018-05-21 Ed Schonberg <schonberg@adacore.com>
4157
4158 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
4159 declaration with an explicit address clause and a type with default
4160 initialization, if the declaration carries an aspect
4161 Suppress_Initialization.
4162
4163 2018-05-21 Daniel Mercier <mercier@adacore.com>
4164
4165 * pprint.adb: Use mixed case for attribute names.
4166
4167 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4168
4169 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
4170 Analyze_Aspect_Specifications_On_Body_Or_Stub.
4171 (Analyze_Subprogram_Body_Helper): Rename the calls to
4172 Analyze_Aspect_Specifications_On_Body_Or_Stub.
4173 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
4174 Analyze_Aspect_Specifications_On_Body_Or_Stub.
4175 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
4176 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
4177 prior to analyzing its aspects.
4178 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
4179 stub prior to analyzing its aspects. Save and restore the configuration
4180 switches.
4181 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
4182 prior to analyzing its aspects.
4183 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
4184 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
4185 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
4186 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
4187 * sem_prag.adb: Code reformatting.
4188 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
4189
4190 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
4191
4192 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
4193 for QNX.
4194
4195 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4196
4197 * exp_cg.adb: Remove with and use clause for Exp_Disp.
4198 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
4199 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
4200 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
4201 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
4202 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
4203 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
4204 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
4205 * exp_dist.adb: Remove with and use clause for Exp_Disp.
4206 * freeze.adb: Remove with and use clause for Exp_Disp.
4207 * sem_cat.adb: Remove with and use clause for Exp_Disp.
4208 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
4209 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
4210 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
4211 primitives.
4212 * sem_util.adb: Remove with and use clause for Exp_Disp.
4213 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
4214 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
4215 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
4216 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
4217 Exp_Disp.
4218 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
4219 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
4220
4221 2018-05-21 Ed Schonberg <schonberg@adacore.com>
4222
4223 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
4224 type conversion whose expression has a limited view of a type.
4225
4226 2018-05-21 Ed Schonberg <schonberg@adacore.com>
4227
4228 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
4229 explicit name for iterator loop, preserve that name in expanded
4230 construct, for possible use in exit statements.
4231
4232 2018-05-21 Javier Miranda <miranda@adacore.com>
4233
4234 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
4235 spec of a unit has Ada 2012 membership tests with multiple choices and
4236 the unit body is not compiled under Ada 2012 mode.
4237
4238 2018-05-21 Doug Rupp <rupp@adacore.com>
4239
4240 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
4241 pregs.
4242 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
4243 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
4244
4245 2018-05-21 Jose Ruiz <ruiz@adacore.com>
4246
4247 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
4248 libgnarl/s-tassta.adb: Minor typo fixes
4249
4250 2018-05-21 Ed Schonberg <schonberg@adacore.com>
4251
4252 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
4253 indexed call originally in prefix forn is itself the prefix of a
4254 further call.
4255
4256 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
4257
4258 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
4259 type.
4260 (Not_Null_Range): Same as above.
4261
4262 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4263
4264 * exp_ch3.adb: Minor reformatting.
4265 * exp_ch6.adb: Likewise.
4266 * freeze.adb: Likewise.
4267 * inline.adb: Likewise.
4268 * sem_util.adb: Likewise.
4269
4270 2018-05-21 Yannick Moy <moy@adacore.com>
4271
4272 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
4273 conversion instead of an unchecked type conversion when inlining a
4274 return statement, unless type qualification is required (for character
4275 and string literal) or no check can result from the conversion (for
4276 access types).
4277 * opt.ads: Update comment.
4278
4279 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4280
4281 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
4282 model of the compilation unit spec, if any.
4283 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
4284 model of the compilation unit spec, if any.
4285 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
4286 parent compilation unit spec, if any.
4287 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
4288 model of the main unit.
4289 (Is_Same_Unit): The routine now uses Unit_Entity.
4290 (Is_Subunit): Removed.
4291 (Normalize_Unit): Removed.
4292 (Unit_Entity): New routine.
4293 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
4294 Elaboration_Checks. The analysis now ensures that the pragma appears at
4295 the configuration level, and on the initial declaration of a unit.
4296 Other placements are either flagged as illegal, or ignored.
4297 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
4298 (Ignore_Elaboration_Checks_Pragma): New routine.
4299 * sem_util.adb (Install_Elaboration_Model): New routine.
4300 * sem_util.ads (Install_Elaboration_Model): New routine.
4301 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
4302 documentation of pragma Elaboration_Checks.
4303 * gnat_rm.texi: Regenerate.
4304
4305 2018-05-21 Olivier Hainque <hainque@adacore.com>
4306
4307 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
4308 of empty string when argv[0] couldn't be found on PATH.
4309 (Enable_Cache): Raise Program_Error instead of attempting a null
4310 pointer dereference when the Exec_Module initialization failed.
4311
4312 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
4313
4314 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
4315 * libgnarl/a-taside.ads (Tasking_State): Likewise.
4316 * libgnat/a-calend.ads (Clock_Time): Likewise.
4317
4318 2018-05-21 Yannick Moy <moy@adacore.com>
4319
4320 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
4321 call notation in inlined call in GNATprove mode.
4322
4323 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4324
4325 * einfo.adb (Is_External_State): An abstract state is also external
4326 when it is declared with option "synchronous".
4327 * einfo.ads: Update the documentation of synthesized attribute
4328 Is_External_State.
4329 * sem_util.adb (Find_Simple_Properties): New routine.
4330 (Is_Enabled_External_Property): New routine.
4331 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
4332 External have precedence over option Synchronous when determining
4333 whether a property is in effect.
4334
4335 2018-05-21 Yannick Moy <moy@adacore.com>
4336
4337 * sem_eval.adb (Static_Length): Take into account case of variable of
4338 subtype string literal.
4339
4340 2018-05-21 Olivier Hainque <hainque@adacore.com>
4341
4342 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
4343 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
4344 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
4345 component name.
4346 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
4347 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
4348 change.
4349
4350 2018-05-21 Olivier Hainque <hainque@adacore.com>
4351
4352 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
4353 Address, and type of Low, High to Storage_Offset.
4354 (Low): Rename as Low_Address and convey that the return value is a
4355 runtime reference accounting for a load address.
4356 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
4357 address/offset type changes.
4358 (Aranges_Lookup): Likewise.
4359 (Symbolic_Address): Likewise.
4360 (Symbolic_Traceback): Likewise.
4361 (Dump_Cache): Likewise.
4362 (Is_Inside): Likewise.
4363 (Open): Likewise.
4364 (Set_Load_Address): Likewise.
4365 (Low_Address): Likewise, and account for C.Load_Address.
4366 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
4367 (Multi_Module_Symbolic_Traceback): Compare address in traceback
4368 with module Low_Address instead of Low.
4369
4370 2018-05-21 Olivier Hainque <hainque@adacore.com>
4371
4372 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
4373 Load_Address.
4374 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
4375 (Set_Load_Address): Likewise.
4376 (Symbolic_Traceback): Likewise.
4377
4378 2018-05-21 Olivier Hainque <hainque@adacore.com>
4379
4380 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
4381 Load_Address argument and pass it down to Init_Module.
4382 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
4383 lm.l_addr as the Load_Address to Add_Module_To_Cache.
4384
4385 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
4386
4387 * einfo.adb (Has_Discriminants): Stronger assertion.
4388 (Set_Has_Discriminants): Stronger assertion.
4389 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
4390 the stronger assertion on Has_Discriminant.
4391 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
4392 * sem_util.adb (New_Copy_Tree): Same as above.
4393 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
4394 Has_Discriminant on non-type entities that might happen when the
4395 compiled code has errors.
4396 * sem_ch3.adb (Derived_Type_Declaration): Only call
4397 Set_Has_Discriminant on type entities.
4398
4399 2018-05-21 Arnaud Charlet <charlet@adacore.com>
4400
4401 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
4402 code generation.
4403
4404 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
4405
4406 * lib.ads: Fix typo in enumeration in comment.
4407
4408 2018-05-21 Ed Schonberg <schonberg@adacore.com>
4409
4410 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
4411 attribute reference is legal within a generic unit when the prefix is a
4412 formal private type.
4413
4414 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4415
4416 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
4417 delegate the secondary stack management when there is no suitable
4418 transient context, and the transient scope was intended to manage the
4419 secondary stack because this causes premature reclamation. Change the
4420 transient scope creation logic by special casing assignment statements
4421 of controlled components for type initialization procedures.
4422 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
4423 the comment on usage.
4424 (Find_Transient_Context): Change the initinte loop into a while loop.
4425 Iterations schemes and iterator specifications are not valid transient
4426 contexts because they rely on special processing. Assignment statements
4427 are now treated as a normal transient context, special cases are
4428 handled by the caller. Add special processing for pragma Check.
4429 (Is_OK_Construct): Removed. Its functionality has been merged in
4430 routine Find_Transient_Context.
4431 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
4432 retrieve the subprogram being invoked. Use a more accurate predicate
4433 (Requires_Transient_Scope) to determine that the function will emply
4434 the secondary stack.
4435
4436 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
4437
4438 * ada_get_targ.adb: Fix subprogram body headers.
4439 * adabkend.adb: Likewise.
4440 * checks.adb: Likewise.
4441 * exp_ch3.adb: Likewise.
4442 * exp_ch5.adb: Likewise.
4443 * exp_ch9.adb: Likewise.
4444 * exp_dist.adb: Likewise.
4445 * exp_tss.adb: Likewise.
4446 * inline.adb: Likewise.
4447 * lib-writ.adb: Likewise.
4448 * lib-xref-spark_specific.adb: Likewise.
4449 * libgnarl/s-osinte__darwin.adb: Likewise.
4450 * libgnarl/s-stusta.adb: Likewise.
4451 * libgnarl/s-taprop__solaris.adb: Likewise.
4452 * libgnarl/s-tposen.adb: Likewise.
4453 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
4454 * libgnarl/s-vxwext__kernel.adb: Likewise.
4455 * libgnat/a-btgbso.adb: Likewise.
4456 * libgnat/a-cfdlli.adb: Likewise.
4457 * libgnat/a-cfhama.adb: Likewise.
4458 * libgnat/a-cfinve.adb: Likewise.
4459 * libgnat/a-cimutr.adb: Likewise.
4460 * libgnat/a-coboho.adb: Likewise.
4461 * libgnat/a-cofove.adb: Likewise.
4462 * libgnat/a-cofuve.adb: Likewise.
4463 * libgnat/a-comutr.adb: Likewise.
4464 * libgnat/a-exexda.adb: Likewise.
4465 * libgnat/a-tags.adb: Likewise.
4466 * libgnat/a-tideau.adb: Likewise.
4467 * libgnat/a-wtdeau.adb: Likewise.
4468 * libgnat/a-ztdeau.adb: Likewise.
4469 * libgnat/g-alleve.adb: Likewise.
4470 * libgnat/s-excdeb.adb: Likewise.
4471 * libgnat/s-parint.adb: Likewise.
4472 * libgnat/s-shasto.adb: Likewise.
4473 * libgnat/s-traceb__hpux.adb: Likewise.
4474 * prepcomp.adb: Likewise.
4475 * sem_ch4.adb: Likewise.
4476 * sem_ch6.adb: Likewise.
4477 * sem_dist.adb: Likewise.
4478 * sem_prag.adb: Likewise.
4479 * sem_util.adb: Likewise.
4480 * sinfo.adb: Likewise.
4481 * switch.adb: Likewise.
4482
4483 2018-05-04 John Marino <gnugcc@marino.st>
4484
4485 PR ada/85635
4486 * link.c (BSD platforms): Add missing backslash.
4487
4488 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
4489
4490 PR ada/85540
4491 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
4492
4493 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
4494
4495 PR ada/85007
4496 * gnat_ugn.texi: Regenerate.
4497
4498 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
4499
4500 PR ada/85007
4501 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
4502 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
4503 Remove documentation of -b switch.
4504
4505 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
4506
4507 PR ada/85036
4508 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
4509 switches are passed for --LINK.
4510
4511 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
4512
4513 PR ada/82813
4514 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
4515 warnings.
4516
4517 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
4518
4519 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
4520 Consider only entities for objects.
4521
4522 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
4523
4524 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
4525 $(GNATLIBCFLAGS).
4526 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
4527
4528 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
4529
4530 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
4531 guarding the overflow check emitted for the upper bound of a floating-
4532 point conversion.
4533
4534 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
4535
4536 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
4537
4538 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4539
4540 * libgnat/i-cexten.ads (Float_128): New type.
4541
4542 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
4543
4544 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
4545 false if the component type is a pointer.
4546
4547 2018-01-11 Gary Dismukes <dismukes@adacore.com>
4548
4549 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
4550 result of Get_Simple_Init_Value and pass the source location of the
4551 object declaration's object_definition.
4552
4553 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4554
4555 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
4556 properly object declarations with initializations that are
4557 build-in-place function calls, when there is an address specification,
4558 either as an aspect specification or an explicit attribute
4559 specification clause, for the initialized object.
4560 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
4561 initial expressions in the case of a build-in-place call.
4562
4563 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
4564
4565 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
4566 private (sub)type; refactor to avoid early return statement.
4567 (Not_Null_Range): Same as above.
4568
4569 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4570
4571 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
4572 concurrent, nor effectively volatile.
4573 * ghost.adb (Check_Ghost_Type): New routine.
4574 * ghost.ads (Check_Ghost_Type): New routine.
4575 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
4576 consider specific subsets of declarations.
4577 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
4578 replicated by Is_Declaration.
4579 * sem_util.ads (Is_Declaration): New parameter profile. Update the
4580 comment on usage.
4581 (Is_Declaration_Other_Than_Renaming): Removed.
4582
4583 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4584
4585 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
4586 as Part_Of consituents of single protected types are illegal when they
4587 take place inside a protected function.
4588 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
4589 enclosing function.
4590 (Is_Protected_Part_Of_Constituent): New routine.
4591 (Within_Function): New routine.
4592
4593 2018-01-11 Arnaud Charlet <charlet@adacore.com>
4594
4595 Bump copyright notices to 2018.
4596
4597 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4598
4599 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
4600 Minor reformatting.
4601
4602 2018-01-11 Justin Squirek <squirek@adacore.com>
4603
4604 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
4605 to make sure a given expression function is properly parenthesized.
4606
4607 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4608
4609 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
4610 categorization of a subprogram body which does not complete a previous
4611 declaration.
4612
4613 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4614
4615 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
4616 scope of package Ada is Standard.
4617
4618 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4619
4620 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
4621 subcomponent of the current entity when building the body for a dynamic
4622 predicate function for a record with composite subcomponents.
4623
4624 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4625
4626 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
4627 Establish_Transient_Scope.
4628 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
4629 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
4630 * exp_ch6.adb (Expand_Call_Helper): Update the call to
4631 Establish_Transient_Scope.
4632 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
4633 Establish_Transient_Scope.
4634 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
4635 management of the secondary stack to an enclosing scope if there is no
4636 suitable construct to wrap, and the transient scope was intended to
4637 manage the secondary stack.
4638 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
4639 is a valid boundary for a transient expression which comes from the
4640 statements of the alternative, otherwise alternatives cannot be
4641 wrapped. Assignments of controlled objects which have controlled
4642 actions suppressed now stop the traversal as there is no point in
4643 looking for an enclosing construct. Add several N_xxx_Body choices to
4644 the termination conditions for completeness.
4645 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
4646 and the associated comment on usage.
4647 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
4648 Establish_Transient_Scope.
4649 (Add_Write_After): Update the call to Establish_Transient_Scope.
4650 * sem_res.adb (Check_Initialization_Call): Removed.
4651 (Resolve_Actuals): Account for additional cases where finalization
4652 actions are required by utilizing predicate Needs_Finalization rather
4653 than Is_Controlled.
4654 (Resolve_Call): Type initialization procedures can now utilize
4655 transient scopes to manage the secondary stack, thus preventing leaks
4656 during initialization. Remove the previous kludgy algorithm which
4657 attempts to manage the secondary stack at the object creation site.
4658
4659 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
4660
4661 * libgnat/g-soliop__qnx.ads: New.
4662 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
4663 for QNX.
4664
4665 2018-01-11 Bob Duff <duff@adacore.com>
4666
4667 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
4668 a null procedure occurs in a protected definition.
4669
4670 2018-01-11 Bob Duff <duff@adacore.com>
4671
4672 * binderr.ads, namet.ads: Minor reformatting.
4673
4674 2018-01-11 Bob Duff <duff@adacore.com>
4675
4676 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
4677 xml2gnat.
4678
4679 2018-01-11 Bob Duff <duff@adacore.com>
4680
4681 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
4682 unit names.
4683
4684 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4685
4686 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
4687 controlling argument of a dispatching call. freeze the corresponding
4688 designated type.
4689
4690 2018-01-11 Ben Brosgol <brosgol@adacore.com>
4691
4692 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
4693
4694 2018-01-11 Ben Brosgol <brosgol@adacore.com>
4695
4696 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
4697 corrections.
4698 * gnat_rm.texi: Regenerate.
4699
4700 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4701
4702 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
4703 formsl type corresponding to the actual fixed point type is private,
4704 because in this case there can be no suspicious arithmetic operations
4705 in the generic unless they reference a formal subprogram. Clarify
4706 warning.
4707
4708 2018-01-11 Javier Miranda <miranda@adacore.com>
4709
4710 * exp_util.adb (Remove_Side_Effects): No action done for functions
4711 returning class-wide types since it requires generating code using
4712 'reference and the CCG target has no secondary stack.
4713 * gnat1drv.adb: Disable building static dispatch tables when generating
4714 C code.
4715
4716 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
4717
4718 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
4719 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
4720 (File_Type): Add Default_Initial_Condition aspect.
4721
4722 2018-01-11 Pascal Obry <obry@adacore.com>
4723
4724 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
4725
4726 2018-01-11 Bob Duff <duff@adacore.com>
4727
4728 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
4729 to match what the Libadalang-based version does.
4730 * doc/gnat_ugn/about_this_guide.rst: Update reference.
4731
4732 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4733
4734 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
4735 if it contains at least one component declaration employing a function
4736 call returning on the secondary stack.
4737
4738 2018-01-11 Yannick Moy <moy@adacore.com>
4739
4740 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
4741 Update description of restriction SPARK_05 with SPARK 2014.
4742 * gnat_rm.texi: Regenerate.
4743
4744 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
4745
4746 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
4747
4748 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4749
4750 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
4751 sem_res.adb, sem_util.adb: Minor reformatting.
4752
4753 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4754
4755 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
4756 has a delayed aspect which must be processed at the point the type is
4757 frozen. This mimics what is done when the predicate is provided by a
4758 source aspect.
4759
4760 2018-01-11 Doug Rupp <rupp@adacore.com>
4761
4762 * init.c (vxworks): Add macro checks for __aarch64__.
4763
4764 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4765
4766 * exp_util.adb (Add_Failure_Expression): New routine.
4767 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
4768 * sem_util.adb (Is_Current_Instance): Code cleanup.
4769
4770 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
4771
4772 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
4773 Default_Sec_Stack_Size.
4774 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
4775 limit check so that the integer index does not overflow. Check the
4776 dynamic stack allocation does not cause the secondary stack pointer to
4777 overflow.
4778 (SS_Info): Align colons.
4779 (SS_Init): Cover the case when bootstraping with an old compiler that
4780 does not set Default_SS_Size.
4781
4782 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4783
4784 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
4785 legality of an inherited operation that may require overriding, ignore
4786 primitive_wrappers that correspond to explicit operations that override
4787 an interface primitive.
4788 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
4789 operation to which the class-wide expression applies is a protected op.
4790 with a primitive_wrapper, verify that the updated inherited expression
4791 does not contain an internal call to a protected function. This
4792 completes the implementation of AI12-0166.
4793
4794 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4795
4796 * ali.adb: Document the remaining letters available for ALI lines.
4797 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
4798 * ali.ads: Update type With_Record. Field
4799 Implicit_With_From_Instantiation is no longer in use. Add field
4800 Implicit_With.
4801 * csinfo.adb (CSinfo): Remove the setup for attribute
4802 Implicit_With_From_Instantiation.
4803 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
4804 either implicitly or explicitly withed.
4805 (Is_Implicit_With_Clause): New routine.
4806 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
4807 confusion with the with clause attribute by the same name.
4808 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
4809 * rtsfind.adb (Maybe_Add_With): Code cleanup.
4810 * sem_ch8.adb (Present_System_Aux): Code cleanup.
4811 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
4812 for a parent unit.
4813 (Implicit_With_On_Parent): Mark the with clause as generated for a
4814 parent unit.
4815 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
4816 instantiation are no longer marked as Implicit_With_From_Instantiation
4817 because they are already marked as implicit.
4818 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
4819 which marks implicit with clauses as related to an instantiation.
4820 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
4821 (Parent_With): New routine.
4822 (Set_Implicit_With_From_Instantiation): Removed.
4823 (Set_Parent_With): New routine.
4824 * sinfo.ads: Update the documentation of attribute Implicit_With.
4825 Remove attribute Implicit_With_From_Instantiation along with
4826 occurrences in nodes. Add attribute Parent_With along with occurrences
4827 in nodes.
4828 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
4829 (Parent_With): New routine along with pragma Inline.
4830 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
4831 (Set_Parent_With): New routine along with pragma Inline.
4832
4833 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4834
4835 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
4836 entity when the enclosing construct is a body.
4837
4838 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
4839
4840 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
4841 Secondary_Stack_Size handling as a pragma is now generated for the
4842 corresponding aspect instead of an attribute. Pragma expression is
4843 relocated instead of evaluated. Discriminant of the corresponding
4844 record type is referenced rather than the type discriminant.
4845 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
4846 Secondary_Stack_Size rep item checks to only look for the pragma rep.
4847 * sem_ch13.adb (Analyze_One_Aspect): Transform
4848 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
4849 because the attribute does not have visibility on a task type's
4850 discriminants when the type's definition is expanded.
4851 (Analyze_Attribute_Definition_Clause): Remove handling of
4852 Attribute_Secondary_Stack_Size.
4853 * snames.adb-tmpl, snames.ads-tmpl: Remove
4854 Attribute_Secondary_Stack_Size, no longer used.
4855
4856 2018-01-11 Justin Squirek <squirek@adacore.com>
4857
4858 * sem_ch8.adb: Minor comment fix.
4859
4860 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4861
4862 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
4863 individual action because the action may denote a complex expression,
4864 such as a case statement, which in turn may contain additional
4865 transient objects.
4866
4867 2018-01-11 Ed Schonberg <schonberg@adacore.com>
4868
4869 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
4870 analysis on a copy of the expression with a copy of the index variable,
4871 because full expansion will rewrite construct into a loop with the
4872 original loop variable.
4873 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
4874 expression is an iterated component association. Full analysis takes
4875 place when construct is rewritten as a loop.
4876 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
4877 is not safe for in-place assignment.
4878 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
4879 entity with no homonym and no other entity in the scope.
4880
4881 2018-01-11 Justin Squirek <squirek@adacore.com>
4882
4883 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
4884 message to be printed on the pragma argument identifier.
4885
4886 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
4887
4888 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
4889 entity of the generated invariant procedure in order to construct a
4890 proper entity chain.
4891
4892 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
4893
4894 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
4895 comment.
4896
4897 2018-01-11 Arnaud Charlet <charlet@adacore.com>
4898
4899 * einfo.ads, einfo.adb (Activation_Record_Component,
4900 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
4901 Allow E_Discriminant.
4902
4903 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4904
4905 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
4906 for atomic access once the component size is taken into account and
4907 also do it if the component type is Atomic or Volatile_Full_Access.
4908
4909 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
4910
4911 * gnatvsn.ads: Bump copyright year.
4912
4913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4914 Alan Hayward <alan.hayward@arm.com>
4915 David Sherwood <david.sherwood@arm.com>
4916
4917 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
4918 as polynomial.
4919
4920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4921 Alan Hayward <alan.hayward@arm.com>
4922 David Sherwood <david.sherwood@arm.com>
4923
4924 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
4925 as polynomial.
4926
4927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4928 Alan Hayward <alan.hayward@arm.com>
4929 David Sherwood <david.sherwood@arm.com>
4930
4931 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
4932 polynomial TYPE_VECTOR_SUBPARTS.
4933
4934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4935 Alan Hayward <alan.hayward@arm.com>
4936 David Sherwood <david.sherwood@arm.com>
4937
4938 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
4939 GET_MODE_NUNITS.
4940
4941 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4942
4943 Update copyright years.
4944
4945 * gnat_ugn.texi: Bump @copying's copyright year.
4946 * gnat_rm.texi: Likewise.
4947 \f
4948 Copyright (C) 2018 Free Software Foundation, Inc.
4949
4950 Copying and distribution of this file, with or without modification,
4951 are permitted in any medium without royalty provided the copyright
4952 notice and this notice are preserved.