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