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