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