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