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