1 2018-04-04 Hristian Kirtchev <kirtchev@adacore.com>
3 * exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
4 delegate the secondary stack management when there is no suitable
5 transient context, and the transient scope was intended to manage the
6 secondary stack because this causes premature reclamation. Change the
7 transient scope creation logic by special casing assignment statements
8 of controlled components for type initialization procedures.
9 (Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
11 (Find_Transient_Context): Change the initinte loop into a while loop.
12 Iterations schemes and iterator specifications are not valid transient
13 contexts because they rely on special processing. Assignment statements
14 are now treated as a normal transient context, special cases are
15 handled by the caller. Add special processing for pragma Check.
16 (Is_OK_Construct): Removed. Its functionality has been merged in
17 routine Find_Transient_Context.
18 * sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
19 retrieve the subprogram being invoked. Use a more accurate predicate
20 (Requires_Transient_Scope) to determine that the function will emply
23 2018-04-04 Piotr Trojanek <trojanek@adacore.com>
25 * ada_get_targ.adb: Fix subprogram body headers.
26 * adabkend.adb: Likewise.
27 * checks.adb: Likewise.
28 * exp_ch3.adb: Likewise.
29 * exp_ch5.adb: Likewise.
30 * exp_ch9.adb: Likewise.
31 * exp_dist.adb: Likewise.
32 * exp_tss.adb: Likewise.
33 * inline.adb: Likewise.
34 * lib-writ.adb: Likewise.
35 * lib-xref-spark_specific.adb: Likewise.
36 * libgnarl/s-osinte__darwin.adb: Likewise.
37 * libgnarl/s-stusta.adb: Likewise.
38 * libgnarl/s-taprop__solaris.adb: Likewise.
39 * libgnarl/s-tposen.adb: Likewise.
40 * libgnarl/s-vxwext__kernel-smp.adb: Likewise.
41 * libgnarl/s-vxwext__kernel.adb: Likewise.
42 * libgnat/a-btgbso.adb: Likewise.
43 * libgnat/a-cfdlli.adb: Likewise.
44 * libgnat/a-cfhama.adb: Likewise.
45 * libgnat/a-cfinve.adb: Likewise.
46 * libgnat/a-cimutr.adb: Likewise.
47 * libgnat/a-coboho.adb: Likewise.
48 * libgnat/a-cofove.adb: Likewise.
49 * libgnat/a-cofuve.adb: Likewise.
50 * libgnat/a-comutr.adb: Likewise.
51 * libgnat/a-exexda.adb: Likewise.
52 * libgnat/a-tags.adb: Likewise.
53 * libgnat/a-tideau.adb: Likewise.
54 * libgnat/a-wtdeau.adb: Likewise.
55 * libgnat/a-ztdeau.adb: Likewise.
56 * libgnat/g-alleve.adb: Likewise.
57 * libgnat/s-excdeb.adb: Likewise.
58 * libgnat/s-parint.adb: Likewise.
59 * libgnat/s-shasto.adb: Likewise.
60 * libgnat/s-traceb__hpux.adb: Likewise.
61 * prepcomp.adb: Likewise.
62 * sem_ch4.adb: Likewise.
63 * sem_ch6.adb: Likewise.
64 * sem_dist.adb: Likewise.
65 * sem_prag.adb: Likewise.
66 * sem_util.adb: Likewise.
67 * sinfo.adb: Likewise.
68 * switch.adb: Likewise.
70 2018-05-04 John Marino <gnugcc@marino.st>
73 * link.c (BSD platforms): Add missing backslash.
75 2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
78 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
80 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
83 * gnat_ugn.texi: Regenerate.
85 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
88 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
89 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
90 Remove documentation of -b switch.
92 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
95 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
96 switches are passed for --LINK.
98 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
101 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
104 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
106 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
107 Consider only entities for objects.
109 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
111 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
113 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
115 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
117 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
118 guarding the overflow check emitted for the upper bound of a floating-
121 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
123 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
125 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
127 * libgnat/i-cexten.ads (Float_128): New type.
129 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
131 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
132 false if the component type is a pointer.
134 2018-01-11 Gary Dismukes <dismukes@adacore.com>
136 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
137 result of Get_Simple_Init_Value and pass the source location of the
138 object declaration's object_definition.
140 2018-01-11 Ed Schonberg <schonberg@adacore.com>
142 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
143 properly object declarations with initializations that are
144 build-in-place function calls, when there is an address specification,
145 either as an aspect specification or an explicit attribute
146 specification clause, for the initialized object.
147 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
148 initial expressions in the case of a build-in-place call.
150 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
152 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
153 private (sub)type; refactor to avoid early return statement.
154 (Not_Null_Range): Same as above.
156 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
158 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
159 concurrent, nor effectively volatile.
160 * ghost.adb (Check_Ghost_Type): New routine.
161 * ghost.ads (Check_Ghost_Type): New routine.
162 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
163 consider specific subsets of declarations.
164 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
165 replicated by Is_Declaration.
166 * sem_util.ads (Is_Declaration): New parameter profile. Update the
168 (Is_Declaration_Other_Than_Renaming): Removed.
170 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
172 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
173 as Part_Of consituents of single protected types are illegal when they
174 take place inside a protected function.
175 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
177 (Is_Protected_Part_Of_Constituent): New routine.
178 (Within_Function): New routine.
180 2018-01-11 Arnaud Charlet <charlet@adacore.com>
182 Bump copyright notices to 2018.
184 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
186 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
189 2018-01-11 Justin Squirek <squirek@adacore.com>
191 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
192 to make sure a given expression function is properly parenthesized.
194 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
196 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
197 categorization of a subprogram body which does not complete a previous
200 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
202 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
203 scope of package Ada is Standard.
205 2018-01-11 Ed Schonberg <schonberg@adacore.com>
207 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
208 subcomponent of the current entity when building the body for a dynamic
209 predicate function for a record with composite subcomponents.
211 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
213 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
214 Establish_Transient_Scope.
215 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
216 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
217 * exp_ch6.adb (Expand_Call_Helper): Update the call to
218 Establish_Transient_Scope.
219 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
220 Establish_Transient_Scope.
221 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
222 management of the secondary stack to an enclosing scope if there is no
223 suitable construct to wrap, and the transient scope was intended to
224 manage the secondary stack.
225 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
226 is a valid boundary for a transient expression which comes from the
227 statements of the alternative, otherwise alternatives cannot be
228 wrapped. Assignments of controlled objects which have controlled
229 actions suppressed now stop the traversal as there is no point in
230 looking for an enclosing construct. Add several N_xxx_Body choices to
231 the termination conditions for completeness.
232 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
233 and the associated comment on usage.
234 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
235 Establish_Transient_Scope.
236 (Add_Write_After): Update the call to Establish_Transient_Scope.
237 * sem_res.adb (Check_Initialization_Call): Removed.
238 (Resolve_Actuals): Account for additional cases where finalization
239 actions are required by utilizing predicate Needs_Finalization rather
241 (Resolve_Call): Type initialization procedures can now utilize
242 transient scopes to manage the secondary stack, thus preventing leaks
243 during initialization. Remove the previous kludgy algorithm which
244 attempts to manage the secondary stack at the object creation site.
246 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
248 * libgnat/g-soliop__qnx.ads: New.
249 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
252 2018-01-11 Bob Duff <duff@adacore.com>
254 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
255 a null procedure occurs in a protected definition.
257 2018-01-11 Bob Duff <duff@adacore.com>
259 * binderr.ads, namet.ads: Minor reformatting.
261 2018-01-11 Bob Duff <duff@adacore.com>
263 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
266 2018-01-11 Bob Duff <duff@adacore.com>
268 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
271 2018-01-11 Ed Schonberg <schonberg@adacore.com>
273 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
274 controlling argument of a dispatching call. freeze the corresponding
277 2018-01-11 Ben Brosgol <brosgol@adacore.com>
279 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
281 2018-01-11 Ben Brosgol <brosgol@adacore.com>
283 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
285 * gnat_rm.texi: Regenerate.
287 2018-01-11 Ed Schonberg <schonberg@adacore.com>
289 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
290 formsl type corresponding to the actual fixed point type is private,
291 because in this case there can be no suspicious arithmetic operations
292 in the generic unless they reference a formal subprogram. Clarify
295 2018-01-11 Javier Miranda <miranda@adacore.com>
297 * exp_util.adb (Remove_Side_Effects): No action done for functions
298 returning class-wide types since it requires generating code using
299 'reference and the CCG target has no secondary stack.
300 * gnat1drv.adb: Disable building static dispatch tables when generating
303 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
305 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
306 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
307 (File_Type): Add Default_Initial_Condition aspect.
309 2018-01-11 Pascal Obry <obry@adacore.com>
311 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
313 2018-01-11 Bob Duff <duff@adacore.com>
315 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
316 to match what the Libadalang-based version does.
317 * doc/gnat_ugn/about_this_guide.rst: Update reference.
319 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
321 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
322 if it contains at least one component declaration employing a function
323 call returning on the secondary stack.
325 2018-01-11 Yannick Moy <moy@adacore.com>
327 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
328 Update description of restriction SPARK_05 with SPARK 2014.
329 * gnat_rm.texi: Regenerate.
331 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
333 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
335 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
337 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
338 sem_res.adb, sem_util.adb: Minor reformatting.
340 2018-01-11 Ed Schonberg <schonberg@adacore.com>
342 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
343 has a delayed aspect which must be processed at the point the type is
344 frozen. This mimics what is done when the predicate is provided by a
347 2018-01-11 Doug Rupp <rupp@adacore.com>
349 * init.c (vxworks): Add macro checks for __aarch64__.
351 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
353 * exp_util.adb (Add_Failure_Expression): New routine.
354 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
355 * sem_util.adb (Is_Current_Instance): Code cleanup.
357 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
359 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
360 Default_Sec_Stack_Size.
361 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
362 limit check so that the integer index does not overflow. Check the
363 dynamic stack allocation does not cause the secondary stack pointer to
365 (SS_Info): Align colons.
366 (SS_Init): Cover the case when bootstraping with an old compiler that
367 does not set Default_SS_Size.
369 2018-01-11 Ed Schonberg <schonberg@adacore.com>
371 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
372 legality of an inherited operation that may require overriding, ignore
373 primitive_wrappers that correspond to explicit operations that override
374 an interface primitive.
375 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
376 operation to which the class-wide expression applies is a protected op.
377 with a primitive_wrapper, verify that the updated inherited expression
378 does not contain an internal call to a protected function. This
379 completes the implementation of AI12-0166.
381 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
383 * ali.adb: Document the remaining letters available for ALI lines.
384 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
385 * ali.ads: Update type With_Record. Field
386 Implicit_With_From_Instantiation is no longer in use. Add field
388 * csinfo.adb (CSinfo): Remove the setup for attribute
389 Implicit_With_From_Instantiation.
390 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
391 either implicitly or explicitly withed.
392 (Is_Implicit_With_Clause): New routine.
393 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
394 confusion with the with clause attribute by the same name.
395 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
396 * rtsfind.adb (Maybe_Add_With): Code cleanup.
397 * sem_ch8.adb (Present_System_Aux): Code cleanup.
398 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
400 (Implicit_With_On_Parent): Mark the with clause as generated for a
402 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
403 instantiation are no longer marked as Implicit_With_From_Instantiation
404 because they are already marked as implicit.
405 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
406 which marks implicit with clauses as related to an instantiation.
407 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
408 (Parent_With): New routine.
409 (Set_Implicit_With_From_Instantiation): Removed.
410 (Set_Parent_With): New routine.
411 * sinfo.ads: Update the documentation of attribute Implicit_With.
412 Remove attribute Implicit_With_From_Instantiation along with
413 occurrences in nodes. Add attribute Parent_With along with occurrences
415 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
416 (Parent_With): New routine along with pragma Inline.
417 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
418 (Set_Parent_With): New routine along with pragma Inline.
420 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
422 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
423 entity when the enclosing construct is a body.
425 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
427 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
428 Secondary_Stack_Size handling as a pragma is now generated for the
429 corresponding aspect instead of an attribute. Pragma expression is
430 relocated instead of evaluated. Discriminant of the corresponding
431 record type is referenced rather than the type discriminant.
432 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
433 Secondary_Stack_Size rep item checks to only look for the pragma rep.
434 * sem_ch13.adb (Analyze_One_Aspect): Transform
435 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
436 because the attribute does not have visibility on a task type's
437 discriminants when the type's definition is expanded.
438 (Analyze_Attribute_Definition_Clause): Remove handling of
439 Attribute_Secondary_Stack_Size.
440 * snames.adb-tmpl, snames.ads-tmpl: Remove
441 Attribute_Secondary_Stack_Size, no longer used.
443 2018-01-11 Justin Squirek <squirek@adacore.com>
445 * sem_ch8.adb: Minor comment fix.
447 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
449 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
450 individual action because the action may denote a complex expression,
451 such as a case statement, which in turn may contain additional
454 2018-01-11 Ed Schonberg <schonberg@adacore.com>
456 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
457 analysis on a copy of the expression with a copy of the index variable,
458 because full expansion will rewrite construct into a loop with the
459 original loop variable.
460 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
461 expression is an iterated component association. Full analysis takes
462 place when construct is rewritten as a loop.
463 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
464 is not safe for in-place assignment.
465 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
466 entity with no homonym and no other entity in the scope.
468 2018-01-11 Justin Squirek <squirek@adacore.com>
470 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
471 message to be printed on the pragma argument identifier.
473 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
475 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
476 entity of the generated invariant procedure in order to construct a
479 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
481 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
484 2018-01-11 Arnaud Charlet <charlet@adacore.com>
486 * einfo.ads, einfo.adb (Activation_Record_Component,
487 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
488 Allow E_Discriminant.
490 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
493 for atomic access once the component size is taken into account and
494 also do it if the component type is Atomic or Volatile_Full_Access.
496 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
498 * gnatvsn.ads: Bump copyright year.
500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
501 Alan Hayward <alan.hayward@arm.com>
502 David Sherwood <david.sherwood@arm.com>
504 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
508 Alan Hayward <alan.hayward@arm.com>
509 David Sherwood <david.sherwood@arm.com>
511 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
515 Alan Hayward <alan.hayward@arm.com>
516 David Sherwood <david.sherwood@arm.com>
518 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
519 polynomial TYPE_VECTOR_SUBPARTS.
521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
522 Alan Hayward <alan.hayward@arm.com>
523 David Sherwood <david.sherwood@arm.com>
525 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
528 2018-01-03 Jakub Jelinek <jakub@redhat.com>
530 Update copyright years.
532 * gnat_ugn.texi: Bump @copying's copyright year.
533 * gnat_rm.texi: Likewise.
535 Copyright (C) 2018 Free Software Foundation, Inc.
537 Copying and distribution of this file, with or without modification,
538 are permitted in any medium without royalty provided the copyright
539 notice and this notice are preserved.