1 2018-05-22 Ed Schonberg <schonberg@adacore.com>
3 * einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
4 defined on packages that are actuals for formal packages, in order to
5 set/reset the visibility of the formals of a formal package with given
6 actuals, when there are subsequent uses of those formals in the
7 enclosing generic, as required by RN 12.7 (10).
8 * atree.ads, atree.adb: Add operations for Elist30.
9 * atree.h: Add Elist30.
10 * sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
11 that are not defaulted and are thus not visible within the current
13 (Check_Formal_Packages): Reset visibility of formals of a formal
14 package that are not defaulted, on exit from current instance.
16 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
18 * sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
19 non-'Result output appears in the output list of a function.
21 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
23 * exp_attr.adb (Build_Array_VS_Func): Reimplemented.
24 (Build_Record_VS_Func): Reimplemented.
25 (Expand_N_Attribute): Reimplement the handling of attribute
27 * sem_attr.adb (Analyze_Attribute): Reimplement the handling of
28 attribute 'Valid_Scalars.
29 * sem_util.adb (Scalar_Part_Present): Reimplemented.
30 (Validated_View): New routine.
31 * sem_util.ads (Scalar_Part_Present): Update the parameter profile and
33 (Validated_View): New routine.
34 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
35 documentation of attribute 'Valid_Scalars.
36 * gnat_rm.texi: Regenerate.
38 2018-05-22 Bob Duff <duff@adacore.com>
40 * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
41 the spec of a SAL_Interface package.
43 2018-05-22 Ed Schonberg <schonberg@adacore.com>
45 * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
46 entity E within a generic unit, indicate that there are no remaining
47 delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
48 entity E is not frozen yet but the aspects should not be reanalyzed at
49 the freeze point, which may be outside of the generic and may not have
50 the proper visibility.
52 2018-05-22 Bob Duff <duff@adacore.com>
54 * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
55 the new --split-line-before-record, --indent-named-statements and
56 --no-align-modes gnatpp switches.
58 2018-05-22 Ed Schonberg <schonberg@adacore.com>
60 * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
61 a second argument that is a constant of a given string value.
63 2018-05-22 Doug Rupp <rupp@adacore.com>
65 * sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
67 2018-05-22 Jerome Lambourg <lambourg@adacore.com>
69 * sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
71 2018-05-22 Ed Schonberg <schonberg@adacore.com>
73 * freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
74 delayed aspects, analyze them now, os that the representation of the
75 type (size, bounds) can be computed and validated.
77 2018-05-22 Olivier Hainque <hainque@adacore.com>
79 * libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
80 executable code section boundaries.
82 2018-05-22 Javier Miranda <miranda@adacore.com>
84 * locales.c: New implementation for the Ada.Locales package.
85 * libgnat/a-locale.ads: Remove comment indicating that this is not
87 * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
88 that this is not implemented.
89 * gnat_rm.texi: Regenerate.
91 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
93 * exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
96 2018-05-22 Justin Squirek <squirek@adacore.com>
98 * sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
99 (Freeze_Subprogram_Body, Install_Body): Modify calls to
100 In_Same_Declarative_Part.
101 * sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
102 verify pragma declaration is within the same declarative list with
103 corresponding error message.
104 * sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
105 sem_ch12.adb and generalized to be useful outside the scope of
108 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
110 * sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
111 categorization of the unit after processing the aspects in case one of
112 its aspects is converted into a categorization pragma.
114 2018-05-21 Ed Schonberg <schonberg@adacore.com>
116 * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
117 declaration with an explicit address clause and a type with default
118 initialization, if the declaration carries an aspect
119 Suppress_Initialization.
121 2018-05-21 Daniel Mercier <mercier@adacore.com>
123 * pprint.adb: Use mixed case for attribute names.
125 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
127 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
128 Analyze_Aspect_Specifications_On_Body_Or_Stub.
129 (Analyze_Subprogram_Body_Helper): Rename the calls to
130 Analyze_Aspect_Specifications_On_Body_Or_Stub.
131 * sem_ch9.adb (Analyze_Entry_Body): Rename the call to
132 Analyze_Aspect_Specifications_On_Body_Or_Stub.
133 * sem_ch10.adb: Add with and use clause for Sem_Ch13.
134 (Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
135 prior to analyzing its aspects.
136 (Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
137 stub prior to analyzing its aspects. Save and restore the configuration
139 (Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
140 prior to analyzing its aspects.
141 * sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
142 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
143 * sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
144 to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
145 * sem_prag.adb: Code reformatting.
146 (Analyze_Refined_Depends_Global_Post): Consider task body stubs.
148 2018-05-21 Jerome Lambourg <lambourg@adacore.com>
150 * gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
153 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
155 * exp_cg.adb: Remove with and use clause for Exp_Disp.
156 * exp_ch9.adb: Remove with and use clause for Exp_Disp.
157 * exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
158 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
159 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
160 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
161 (Is_Predefined_Interface_Primitive): Moved to Sem_Util.
162 (Is_Predefined_Internal_Operation): Moved to Sem_Util.
163 * exp_dist.adb: Remove with and use clause for Exp_Disp.
164 * freeze.adb: Remove with and use clause for Exp_Disp.
165 * sem_cat.adb: Remove with and use clause for Exp_Disp.
166 * sem_ch6.adb: Remove with and use clause for Exp_Disp.
167 * sem_ch12.adb: Remove with and use clause for Exp_Disp.
168 * sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
170 * sem_util.adb: Remove with and use clause for Exp_Disp.
171 (Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
172 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
173 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
174 * sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
176 (Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
177 (Is_Predefined_Internal_Operation): Moved from Exp_Disp.
179 2018-05-21 Ed Schonberg <schonberg@adacore.com>
181 * sem_res.adb (Valid_Conversion): Improve error message on an illegal
182 type conversion whose expression has a limited view of a type.
184 2018-05-21 Ed Schonberg <schonberg@adacore.com>
186 * exp_ch5.adb (Build_Formal_Container_Iteration): If source has
187 explicit name for iterator loop, preserve that name in expanded
188 construct, for possible use in exit statements.
190 2018-05-21 Javier Miranda <miranda@adacore.com>
192 * sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
193 spec of a unit has Ada 2012 membership tests with multiple choices and
194 the unit body is not compiled under Ada 2012 mode.
196 2018-05-21 Doug Rupp <rupp@adacore.com>
198 * sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
200 (CFI_COMMON_REGS): Restore LR jic probed from prologue.
201 (REGNO_PC_OFFSET): Change to correct value for Aarch64.
203 2018-05-21 Jose Ruiz <ruiz@adacore.com>
205 * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
206 libgnarl/s-tassta.adb: Minor typo fixes
208 2018-05-21 Ed Schonberg <schonberg@adacore.com>
210 * sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
211 indexed call originally in prefix forn is itself the prefix of a
214 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
216 * sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
218 (Not_Null_Range): Same as above.
220 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
222 * exp_ch3.adb: Minor reformatting.
223 * exp_ch6.adb: Likewise.
224 * freeze.adb: Likewise.
225 * inline.adb: Likewise.
226 * sem_util.adb: Likewise.
228 2018-05-21 Yannick Moy <moy@adacore.com>
230 * inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
231 conversion instead of an unchecked type conversion when inlining a
232 return statement, unless type qualification is required (for character
233 and string literal) or no check can result from the conversion (for
235 * opt.ads: Update comment.
237 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
239 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
240 model of the compilation unit spec, if any.
241 * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
242 model of the compilation unit spec, if any.
243 * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
244 parent compilation unit spec, if any.
245 * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
246 model of the main unit.
247 (Is_Same_Unit): The routine now uses Unit_Entity.
248 (Is_Subunit): Removed.
249 (Normalize_Unit): Removed.
250 (Unit_Entity): New routine.
251 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
252 Elaboration_Checks. The analysis now ensures that the pragma appears at
253 the configuration level, and on the initial declaration of a unit.
254 Other placements are either flagged as illegal, or ignored.
255 (Check_Duplicate_Elaboration_Checks_Pragma): New routine.
256 (Ignore_Elaboration_Checks_Pragma): New routine.
257 * sem_util.adb (Install_Elaboration_Model): New routine.
258 * sem_util.ads (Install_Elaboration_Model): New routine.
259 * doc/gnat_rm/implementation_defined_pragmas.rst: Update the
260 documentation of pragma Elaboration_Checks.
261 * gnat_rm.texi: Regenerate.
263 2018-05-21 Olivier Hainque <hainque@adacore.com>
265 * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
266 of empty string when argv[0] couldn't be found on PATH.
267 (Enable_Cache): Raise Program_Error instead of attempting a null
268 pointer dereference when the Exec_Module initialization failed.
270 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
272 * libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
273 * libgnarl/a-taside.ads (Tasking_State): Likewise.
274 * libgnat/a-calend.ads (Clock_Time): Likewise.
276 2018-05-21 Yannick Moy <moy@adacore.com>
278 * sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
279 call notation in inlined call in GNATprove mode.
281 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
283 * einfo.adb (Is_External_State): An abstract state is also external
284 when it is declared with option "synchronous".
285 * einfo.ads: Update the documentation of synthesized attribute
287 * sem_util.adb (Find_Simple_Properties): New routine.
288 (Is_Enabled_External_Property): New routine.
289 (State_Has_Enabled_Property): Reimplemented. The two flavors of option
290 External have precedence over option Synchronous when determining
291 whether a property is in effect.
293 2018-05-21 Yannick Moy <moy@adacore.com>
295 * sem_eval.adb (Static_Length): Take into account case of variable of
296 subtype string literal.
298 2018-05-21 Olivier Hainque <hainque@adacore.com>
300 * libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
301 (Object_Section): Rename Flag_Alloc component as Flag_Xcode.
302 * libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
304 (Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
305 * libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
308 2018-05-21 Olivier Hainque <hainque@adacore.com>
310 * libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
311 Address, and type of Low, High to Storage_Offset.
312 (Low): Rename as Low_Address and convey that the return value is a
313 runtime reference accounting for a load address.
314 * libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
315 address/offset type changes.
316 (Aranges_Lookup): Likewise.
317 (Symbolic_Address): Likewise.
318 (Symbolic_Traceback): Likewise.
319 (Dump_Cache): Likewise.
320 (Is_Inside): Likewise.
322 (Set_Load_Address): Likewise.
323 (Low_Address): Likewise, and account for C.Load_Address.
324 * libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
325 (Multi_Module_Symbolic_Traceback): Compare address in traceback
326 with module Low_Address instead of Low.
328 2018-05-21 Olivier Hainque <hainque@adacore.com>
330 * libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
332 * libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
333 (Set_Load_Address): Likewise.
334 (Symbolic_Traceback): Likewise.
336 2018-05-21 Olivier Hainque <hainque@adacore.com>
338 * libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
339 Load_Address argument and pass it down to Init_Module.
340 * libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
341 lm.l_addr as the Load_Address to Add_Module_To_Cache.
343 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
345 * einfo.adb (Has_Discriminants): Stronger assertion.
346 (Set_Has_Discriminants): Stronger assertion.
347 * sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
348 the stronger assertion on Has_Discriminant.
349 (Uninstall_Discriminants_And_Pop_Scope): Same as above.
350 * sem_util.adb (New_Copy_Tree): Same as above.
351 * sem_ch7.adb (Generate_Parent_References): Prevent calls to
352 Has_Discriminant on non-type entities that might happen when the
353 compiled code has errors.
354 * sem_ch3.adb (Derived_Type_Declaration): Only call
355 Set_Has_Discriminant on type entities.
357 2018-05-21 Arnaud Charlet <charlet@adacore.com>
359 * exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
362 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
364 * lib.ads: Fix typo in enumeration in comment.
366 2018-05-21 Ed Schonberg <schonberg@adacore.com>
368 * sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
369 attribute reference is legal within a generic unit when the prefix is a
372 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
374 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
375 delegate the secondary stack management when there is no suitable
376 transient context, and the transient scope was intended to manage the
377 secondary stack because this causes premature reclamation. Change the
378 transient scope creation logic by special casing assignment statements
379 of controlled components for type initialization procedures.
380 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
381 the comment on usage.
382 (Find_Transient_Context): Change the initinte loop into a while loop.
383 Iterations schemes and iterator specifications are not valid transient
384 contexts because they rely on special processing. Assignment statements
385 are now treated as a normal transient context, special cases are
386 handled by the caller. Add special processing for pragma Check.
387 (Is_OK_Construct): Removed. Its functionality has been merged in
388 routine Find_Transient_Context.
389 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
390 retrieve the subprogram being invoked. Use a more accurate predicate
391 (Requires_Transient_Scope) to determine that the function will emply
394 2018-05-21 Piotr Trojanek <trojanek@adacore.com>
396 * ada_get_targ.adb: Fix subprogram body headers.
397 * adabkend.adb: Likewise.
398 * checks.adb: Likewise.
399 * exp_ch3.adb: Likewise.
400 * exp_ch5.adb: Likewise.
401 * exp_ch9.adb: Likewise.
402 * exp_dist.adb: Likewise.
403 * exp_tss.adb: Likewise.
404 * inline.adb: Likewise.
405 * lib-writ.adb: Likewise.
406 * lib-xref-spark_specific.adb: Likewise.
407 * libgnarl/s-osinte__darwin.adb: Likewise.
408 * libgnarl/s-stusta.adb: Likewise.
409 * libgnarl/s-taprop__solaris.adb: Likewise.
410 * libgnarl/s-tposen.adb: Likewise.
411 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
412 * libgnarl/s-vxwext__kernel.adb: Likewise.
413 * libgnat/a-btgbso.adb: Likewise.
414 * libgnat/a-cfdlli.adb: Likewise.
415 * libgnat/a-cfhama.adb: Likewise.
416 * libgnat/a-cfinve.adb: Likewise.
417 * libgnat/a-cimutr.adb: Likewise.
418 * libgnat/a-coboho.adb: Likewise.
419 * libgnat/a-cofove.adb: Likewise.
420 * libgnat/a-cofuve.adb: Likewise.
421 * libgnat/a-comutr.adb: Likewise.
422 * libgnat/a-exexda.adb: Likewise.
423 * libgnat/a-tags.adb: Likewise.
424 * libgnat/a-tideau.adb: Likewise.
425 * libgnat/a-wtdeau.adb: Likewise.
426 * libgnat/a-ztdeau.adb: Likewise.
427 * libgnat/g-alleve.adb: Likewise.
428 * libgnat/s-excdeb.adb: Likewise.
429 * libgnat/s-parint.adb: Likewise.
430 * libgnat/s-shasto.adb: Likewise.
431 * libgnat/s-traceb__hpux.adb: Likewise.
432 * prepcomp.adb: Likewise.
433 * sem_ch4.adb: Likewise.
434 * sem_ch6.adb: Likewise.
435 * sem_dist.adb: Likewise.
436 * sem_prag.adb: Likewise.
437 * sem_util.adb: Likewise.
438 * sinfo.adb: Likewise.
439 * switch.adb: Likewise.
441 2018-05-04 John Marino <gnugcc@marino.st>
444 * link.c (BSD platforms): Add missing backslash.
446 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
449 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
451 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
454 * gnat_ugn.texi: Regenerate.
456 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
459 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
460 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
461 Remove documentation of -b switch.
463 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
466 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
467 switches are passed for --LINK.
469 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
472 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
475 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
477 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
478 Consider only entities for objects.
480 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
482 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
484 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
486 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
488 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
489 guarding the overflow check emitted for the upper bound of a floating-
492 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
494 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
496 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
498 * libgnat/i-cexten.ads (Float_128): New type.
500 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
502 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
503 false if the component type is a pointer.
505 2018-01-11 Gary Dismukes <dismukes@adacore.com>
507 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
508 result of Get_Simple_Init_Value and pass the source location of the
509 object declaration's object_definition.
511 2018-01-11 Ed Schonberg <schonberg@adacore.com>
513 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
514 properly object declarations with initializations that are
515 build-in-place function calls, when there is an address specification,
516 either as an aspect specification or an explicit attribute
517 specification clause, for the initialized object.
518 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
519 initial expressions in the case of a build-in-place call.
521 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
523 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
524 private (sub)type; refactor to avoid early return statement.
525 (Not_Null_Range): Same as above.
527 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
529 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
530 concurrent, nor effectively volatile.
531 * ghost.adb (Check_Ghost_Type): New routine.
532 * ghost.ads (Check_Ghost_Type): New routine.
533 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
534 consider specific subsets of declarations.
535 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
536 replicated by Is_Declaration.
537 * sem_util.ads (Is_Declaration): New parameter profile. Update the
539 (Is_Declaration_Other_Than_Renaming): Removed.
541 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
543 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
544 as Part_Of consituents of single protected types are illegal when they
545 take place inside a protected function.
546 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
548 (Is_Protected_Part_Of_Constituent): New routine.
549 (Within_Function): New routine.
551 2018-01-11 Arnaud Charlet <charlet@adacore.com>
553 Bump copyright notices to 2018.
555 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
557 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
560 2018-01-11 Justin Squirek <squirek@adacore.com>
562 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
563 to make sure a given expression function is properly parenthesized.
565 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
567 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
568 categorization of a subprogram body which does not complete a previous
571 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
573 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
574 scope of package Ada is Standard.
576 2018-01-11 Ed Schonberg <schonberg@adacore.com>
578 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
579 subcomponent of the current entity when building the body for a dynamic
580 predicate function for a record with composite subcomponents.
582 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
584 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
585 Establish_Transient_Scope.
586 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
587 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
588 * exp_ch6.adb (Expand_Call_Helper): Update the call to
589 Establish_Transient_Scope.
590 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
591 Establish_Transient_Scope.
592 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
593 management of the secondary stack to an enclosing scope if there is no
594 suitable construct to wrap, and the transient scope was intended to
595 manage the secondary stack.
596 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
597 is a valid boundary for a transient expression which comes from the
598 statements of the alternative, otherwise alternatives cannot be
599 wrapped. Assignments of controlled objects which have controlled
600 actions suppressed now stop the traversal as there is no point in
601 looking for an enclosing construct. Add several N_xxx_Body choices to
602 the termination conditions for completeness.
603 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
604 and the associated comment on usage.
605 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
606 Establish_Transient_Scope.
607 (Add_Write_After): Update the call to Establish_Transient_Scope.
608 * sem_res.adb (Check_Initialization_Call): Removed.
609 (Resolve_Actuals): Account for additional cases where finalization
610 actions are required by utilizing predicate Needs_Finalization rather
612 (Resolve_Call): Type initialization procedures can now utilize
613 transient scopes to manage the secondary stack, thus preventing leaks
614 during initialization. Remove the previous kludgy algorithm which
615 attempts to manage the secondary stack at the object creation site.
617 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
619 * libgnat/g-soliop__qnx.ads: New.
620 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
623 2018-01-11 Bob Duff <duff@adacore.com>
625 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
626 a null procedure occurs in a protected definition.
628 2018-01-11 Bob Duff <duff@adacore.com>
630 * binderr.ads, namet.ads: Minor reformatting.
632 2018-01-11 Bob Duff <duff@adacore.com>
634 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
637 2018-01-11 Bob Duff <duff@adacore.com>
639 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
642 2018-01-11 Ed Schonberg <schonberg@adacore.com>
644 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
645 controlling argument of a dispatching call. freeze the corresponding
648 2018-01-11 Ben Brosgol <brosgol@adacore.com>
650 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
652 2018-01-11 Ben Brosgol <brosgol@adacore.com>
654 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
656 * gnat_rm.texi: Regenerate.
658 2018-01-11 Ed Schonberg <schonberg@adacore.com>
660 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
661 formsl type corresponding to the actual fixed point type is private,
662 because in this case there can be no suspicious arithmetic operations
663 in the generic unless they reference a formal subprogram. Clarify
666 2018-01-11 Javier Miranda <miranda@adacore.com>
668 * exp_util.adb (Remove_Side_Effects): No action done for functions
669 returning class-wide types since it requires generating code using
670 'reference and the CCG target has no secondary stack.
671 * gnat1drv.adb: Disable building static dispatch tables when generating
674 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
676 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
677 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
678 (File_Type): Add Default_Initial_Condition aspect.
680 2018-01-11 Pascal Obry <obry@adacore.com>
682 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
684 2018-01-11 Bob Duff <duff@adacore.com>
686 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
687 to match what the Libadalang-based version does.
688 * doc/gnat_ugn/about_this_guide.rst: Update reference.
690 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
692 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
693 if it contains at least one component declaration employing a function
694 call returning on the secondary stack.
696 2018-01-11 Yannick Moy <moy@adacore.com>
698 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
699 Update description of restriction SPARK_05 with SPARK 2014.
700 * gnat_rm.texi: Regenerate.
702 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
704 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
706 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
708 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
709 sem_res.adb, sem_util.adb: Minor reformatting.
711 2018-01-11 Ed Schonberg <schonberg@adacore.com>
713 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
714 has a delayed aspect which must be processed at the point the type is
715 frozen. This mimics what is done when the predicate is provided by a
718 2018-01-11 Doug Rupp <rupp@adacore.com>
720 * init.c (vxworks): Add macro checks for __aarch64__.
722 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
724 * exp_util.adb (Add_Failure_Expression): New routine.
725 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
726 * sem_util.adb (Is_Current_Instance): Code cleanup.
728 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
730 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
731 Default_Sec_Stack_Size.
732 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
733 limit check so that the integer index does not overflow. Check the
734 dynamic stack allocation does not cause the secondary stack pointer to
736 (SS_Info): Align colons.
737 (SS_Init): Cover the case when bootstraping with an old compiler that
738 does not set Default_SS_Size.
740 2018-01-11 Ed Schonberg <schonberg@adacore.com>
742 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
743 legality of an inherited operation that may require overriding, ignore
744 primitive_wrappers that correspond to explicit operations that override
745 an interface primitive.
746 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
747 operation to which the class-wide expression applies is a protected op.
748 with a primitive_wrapper, verify that the updated inherited expression
749 does not contain an internal call to a protected function. This
750 completes the implementation of AI12-0166.
752 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
754 * ali.adb: Document the remaining letters available for ALI lines.
755 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
756 * ali.ads: Update type With_Record. Field
757 Implicit_With_From_Instantiation is no longer in use. Add field
759 * csinfo.adb (CSinfo): Remove the setup for attribute
760 Implicit_With_From_Instantiation.
761 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
762 either implicitly or explicitly withed.
763 (Is_Implicit_With_Clause): New routine.
764 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
765 confusion with the with clause attribute by the same name.
766 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
767 * rtsfind.adb (Maybe_Add_With): Code cleanup.
768 * sem_ch8.adb (Present_System_Aux): Code cleanup.
769 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
771 (Implicit_With_On_Parent): Mark the with clause as generated for a
773 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
774 instantiation are no longer marked as Implicit_With_From_Instantiation
775 because they are already marked as implicit.
776 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
777 which marks implicit with clauses as related to an instantiation.
778 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
779 (Parent_With): New routine.
780 (Set_Implicit_With_From_Instantiation): Removed.
781 (Set_Parent_With): New routine.
782 * sinfo.ads: Update the documentation of attribute Implicit_With.
783 Remove attribute Implicit_With_From_Instantiation along with
784 occurrences in nodes. Add attribute Parent_With along with occurrences
786 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
787 (Parent_With): New routine along with pragma Inline.
788 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
789 (Set_Parent_With): New routine along with pragma Inline.
791 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
793 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
794 entity when the enclosing construct is a body.
796 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
798 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
799 Secondary_Stack_Size handling as a pragma is now generated for the
800 corresponding aspect instead of an attribute. Pragma expression is
801 relocated instead of evaluated. Discriminant of the corresponding
802 record type is referenced rather than the type discriminant.
803 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
804 Secondary_Stack_Size rep item checks to only look for the pragma rep.
805 * sem_ch13.adb (Analyze_One_Aspect): Transform
806 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
807 because the attribute does not have visibility on a task type's
808 discriminants when the type's definition is expanded.
809 (Analyze_Attribute_Definition_Clause): Remove handling of
810 Attribute_Secondary_Stack_Size.
811 * snames.adb-tmpl, snames.ads-tmpl: Remove
812 Attribute_Secondary_Stack_Size, no longer used.
814 2018-01-11 Justin Squirek <squirek@adacore.com>
816 * sem_ch8.adb: Minor comment fix.
818 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
820 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
821 individual action because the action may denote a complex expression,
822 such as a case statement, which in turn may contain additional
825 2018-01-11 Ed Schonberg <schonberg@adacore.com>
827 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
828 analysis on a copy of the expression with a copy of the index variable,
829 because full expansion will rewrite construct into a loop with the
830 original loop variable.
831 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
832 expression is an iterated component association. Full analysis takes
833 place when construct is rewritten as a loop.
834 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
835 is not safe for in-place assignment.
836 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
837 entity with no homonym and no other entity in the scope.
839 2018-01-11 Justin Squirek <squirek@adacore.com>
841 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
842 message to be printed on the pragma argument identifier.
844 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
846 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
847 entity of the generated invariant procedure in order to construct a
850 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
852 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
855 2018-01-11 Arnaud Charlet <charlet@adacore.com>
857 * einfo.ads, einfo.adb (Activation_Record_Component,
858 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
859 Allow E_Discriminant.
861 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
863 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
864 for atomic access once the component size is taken into account and
865 also do it if the component type is Atomic or Volatile_Full_Access.
867 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
869 * gnatvsn.ads: Bump copyright year.
871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
872 Alan Hayward <alan.hayward@arm.com>
873 David Sherwood <david.sherwood@arm.com>
875 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
879 Alan Hayward <alan.hayward@arm.com>
880 David Sherwood <david.sherwood@arm.com>
882 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
886 Alan Hayward <alan.hayward@arm.com>
887 David Sherwood <david.sherwood@arm.com>
889 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
890 polynomial TYPE_VECTOR_SUBPARTS.
892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
893 Alan Hayward <alan.hayward@arm.com>
894 David Sherwood <david.sherwood@arm.com>
896 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
899 2018-01-03 Jakub Jelinek <jakub@redhat.com>
901 Update copyright years.
903 * gnat_ugn.texi: Bump @copying's copyright year.
904 * gnat_rm.texi: Likewise.
906 Copyright (C) 2018 Free Software Foundation, Inc.
908 Copying and distribution of this file, with or without modification,
909 are permitted in any medium without royalty provided the copyright
910 notice and this notice are preserved.