1 2018-07-26 Release Manager
5 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
7 * gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with
8 an operand of Character type. Factor out range generation to the end.
9 Check that the bounds are literals and convert them to the type of the
10 operand before building the ranges.
11 * gcc-interface/utils.c (make_dummy_type): Minor tweak.
12 (make_packable_type): Propagate TYPE_DEBUG_TYPE.
13 (maybe_pad_type): Likewise.
15 2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
17 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
18 more rvalues in the expression of a renaming.
20 2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
22 * libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
23 (ZCX_By_Default): Set to True.
25 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
27 * gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
28 using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
29 (TYPE_ALIGN_OK): Move around.
30 (TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
31 * gcc-interface/decl.c (change_qualified_type): Move to...
32 (gnat_to_gnu_entity): Adjust comment.
33 * gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
34 (ceil_pow2): Use ceil_log2.
35 * gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
36 and do not set TREE_SIDE_EFFECTS.
37 (handle_noreturn_attribute): Use change_qualified_type.
39 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
41 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
42 the expression of a dispatch table that is not being defined.
43 <E_Record_Subtype>: Remove obsolete kludge.
45 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
47 * gcc-interface/decl.c (warn_on_field_placement): Use specific wording
49 (warn_on_list_placement): New static function.
50 (components_to_record): Use it to warn on multiple fields in list.
52 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
54 Backport from mainline
55 2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
57 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
58 existing fields of a dummy fat pointer type, if any. Clear the
59 TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
61 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
63 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
64 not a definition, retrieve the expression only if it's a compile-time
65 known value if we are just annotating types.
67 * gcc-interface/utils.c (convert): Do not try to upcast properly for a
68 conversion between tagged types in type_annotate_only mode.
70 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
72 Backport from mainline
73 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
75 * gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
76 the type of the parameter is an unconstrained array type, convert
77 to the type of the actual before the type of the formal only if the
78 conversion was suppressed earlier. Use in_param and gnu_actual_type
79 local variables throughout, and uniform spelling for In Out or Out.
80 Also remove dead code in the component-by-reference case.
82 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
84 * gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
85 * gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
86 type built for an aliased component with variable size.
88 2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
90 Backport from mainline
91 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
93 * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
94 there is no target, also create a temporary for the return value for
95 an allocator if the type is an unconstrained record type with default
98 2018-05-04 John Marino <gnugcc@marino.st>
101 * link.c (BSD platforms): Add missing backslash.
103 2018-05-04 Eric Botcazou <ebotcazou@adacore.com>
106 * init.c (__gnat_handle_vms_condition): Add missing parentheses.
108 2018-05-02 Release Manager
110 * GCC 8.1.0 released.
112 2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
115 * gnat_ugn.texi: Regenerate.
117 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
120 * gnatlink.adb (Gnatlink): Remove handling of -b switch.
121 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
122 Remove documentation of -b switch.
124 2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
127 * gnatlink.adb (Process_Args): Drop existing link switches if multiple
128 switches are passed for --LINK.
130 2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
133 * gcc-interface/misc.c (gnat_post_options): Disable string overflow
136 2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
138 * gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
139 Consider only entities for objects.
141 2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
143 * gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
145 (OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
147 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
149 * gcc-interface/trans.c (convert_with_check): Fix typo in the condition
150 guarding the overflow check emitted for the upper bound of a floating-
153 2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
155 * gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
157 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
159 * libgnat/i-cexten.ads (Float_128): New type.
161 2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
163 * gcc-interface/decl.c (array_type_has_nonaliased_component): Return
164 false if the component type is a pointer.
166 2018-01-11 Gary Dismukes <dismukes@adacore.com>
168 * exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
169 result of Get_Simple_Init_Value and pass the source location of the
170 object declaration's object_definition.
172 2018-01-11 Ed Schonberg <schonberg@adacore.com>
174 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
175 properly object declarations with initializations that are
176 build-in-place function calls, when there is an address specification,
177 either as an aspect specification or an explicit attribute
178 specification clause, for the initialized object.
179 * freeze.adb (Check_Address_Clause): Do not remove side-effects from
180 initial expressions in the case of a build-in-place call.
182 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
184 * sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
185 private (sub)type; refactor to avoid early return statement.
186 (Not_Null_Range): Same as above.
188 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
190 * freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
191 concurrent, nor effectively volatile.
192 * ghost.adb (Check_Ghost_Type): New routine.
193 * ghost.ads (Check_Ghost_Type): New routine.
194 * sem_util.adb (Is_Declaration): Reimplemented. The routine can now
195 consider specific subsets of declarations.
196 (Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
197 replicated by Is_Declaration.
198 * sem_util.ads (Is_Declaration): New parameter profile. Update the
200 (Is_Declaration_Other_Than_Renaming): Removed.
202 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
204 * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
205 as Part_Of consituents of single protected types are illegal when they
206 take place inside a protected function.
207 (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
209 (Is_Protected_Part_Of_Constituent): New routine.
210 (Within_Function): New routine.
212 2018-01-11 Arnaud Charlet <charlet@adacore.com>
214 Bump copyright notices to 2018.
216 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
218 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
221 2018-01-11 Justin Squirek <squirek@adacore.com>
223 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
224 to make sure a given expression function is properly parenthesized.
226 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
228 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
229 categorization of a subprogram body which does not complete a previous
232 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
234 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
235 scope of package Ada is Standard.
237 2018-01-11 Ed Schonberg <schonberg@adacore.com>
239 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
240 subcomponent of the current entity when building the body for a dynamic
241 predicate function for a record with composite subcomponents.
243 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
245 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
246 Establish_Transient_Scope.
247 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
248 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
249 * exp_ch6.adb (Expand_Call_Helper): Update the call to
250 Establish_Transient_Scope.
251 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
252 Establish_Transient_Scope.
253 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
254 management of the secondary stack to an enclosing scope if there is no
255 suitable construct to wrap, and the transient scope was intended to
256 manage the secondary stack.
257 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
258 is a valid boundary for a transient expression which comes from the
259 statements of the alternative, otherwise alternatives cannot be
260 wrapped. Assignments of controlled objects which have controlled
261 actions suppressed now stop the traversal as there is no point in
262 looking for an enclosing construct. Add several N_xxx_Body choices to
263 the termination conditions for completeness.
264 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
265 and the associated comment on usage.
266 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
267 Establish_Transient_Scope.
268 (Add_Write_After): Update the call to Establish_Transient_Scope.
269 * sem_res.adb (Check_Initialization_Call): Removed.
270 (Resolve_Actuals): Account for additional cases where finalization
271 actions are required by utilizing predicate Needs_Finalization rather
273 (Resolve_Call): Type initialization procedures can now utilize
274 transient scopes to manage the secondary stack, thus preventing leaks
275 during initialization. Remove the previous kludgy algorithm which
276 attempts to manage the secondary stack at the object creation site.
278 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
280 * libgnat/g-soliop__qnx.ads: New.
281 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
284 2018-01-11 Bob Duff <duff@adacore.com>
286 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
287 a null procedure occurs in a protected definition.
289 2018-01-11 Bob Duff <duff@adacore.com>
291 * binderr.ads, namet.ads: Minor reformatting.
293 2018-01-11 Bob Duff <duff@adacore.com>
295 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
298 2018-01-11 Bob Duff <duff@adacore.com>
300 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
303 2018-01-11 Ed Schonberg <schonberg@adacore.com>
305 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
306 controlling argument of a dispatching call. freeze the corresponding
309 2018-01-11 Ben Brosgol <brosgol@adacore.com>
311 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
313 2018-01-11 Ben Brosgol <brosgol@adacore.com>
315 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
317 * gnat_rm.texi: Regenerate.
319 2018-01-11 Ed Schonberg <schonberg@adacore.com>
321 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
322 formsl type corresponding to the actual fixed point type is private,
323 because in this case there can be no suspicious arithmetic operations
324 in the generic unless they reference a formal subprogram. Clarify
327 2018-01-11 Javier Miranda <miranda@adacore.com>
329 * exp_util.adb (Remove_Side_Effects): No action done for functions
330 returning class-wide types since it requires generating code using
331 'reference and the CCG target has no secondary stack.
332 * gnat1drv.adb: Disable building static dispatch tables when generating
335 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
337 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
338 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
339 (File_Type): Add Default_Initial_Condition aspect.
341 2018-01-11 Pascal Obry <obry@adacore.com>
343 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
345 2018-01-11 Bob Duff <duff@adacore.com>
347 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
348 to match what the Libadalang-based version does.
349 * doc/gnat_ugn/about_this_guide.rst: Update reference.
351 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
353 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
354 if it contains at least one component declaration employing a function
355 call returning on the secondary stack.
357 2018-01-11 Yannick Moy <moy@adacore.com>
359 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
360 Update description of restriction SPARK_05 with SPARK 2014.
361 * gnat_rm.texi: Regenerate.
363 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
365 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
367 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
369 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
370 sem_res.adb, sem_util.adb: Minor reformatting.
372 2018-01-11 Ed Schonberg <schonberg@adacore.com>
374 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
375 has a delayed aspect which must be processed at the point the type is
376 frozen. This mimics what is done when the predicate is provided by a
379 2018-01-11 Doug Rupp <rupp@adacore.com>
381 * init.c (vxworks): Add macro checks for __aarch64__.
383 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
385 * exp_util.adb (Add_Failure_Expression): New routine.
386 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
387 * sem_util.adb (Is_Current_Instance): Code cleanup.
389 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
391 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
392 Default_Sec_Stack_Size.
393 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
394 limit check so that the integer index does not overflow. Check the
395 dynamic stack allocation does not cause the secondary stack pointer to
397 (SS_Info): Align colons.
398 (SS_Init): Cover the case when bootstraping with an old compiler that
399 does not set Default_SS_Size.
401 2018-01-11 Ed Schonberg <schonberg@adacore.com>
403 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
404 legality of an inherited operation that may require overriding, ignore
405 primitive_wrappers that correspond to explicit operations that override
406 an interface primitive.
407 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
408 operation to which the class-wide expression applies is a protected op.
409 with a primitive_wrapper, verify that the updated inherited expression
410 does not contain an internal call to a protected function. This
411 completes the implementation of AI12-0166.
413 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
415 * ali.adb: Document the remaining letters available for ALI lines.
416 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
417 * ali.ads: Update type With_Record. Field
418 Implicit_With_From_Instantiation is no longer in use. Add field
420 * csinfo.adb (CSinfo): Remove the setup for attribute
421 Implicit_With_From_Instantiation.
422 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
423 either implicitly or explicitly withed.
424 (Is_Implicit_With_Clause): New routine.
425 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
426 confusion with the with clause attribute by the same name.
427 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
428 * rtsfind.adb (Maybe_Add_With): Code cleanup.
429 * sem_ch8.adb (Present_System_Aux): Code cleanup.
430 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
432 (Implicit_With_On_Parent): Mark the with clause as generated for a
434 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
435 instantiation are no longer marked as Implicit_With_From_Instantiation
436 because they are already marked as implicit.
437 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
438 which marks implicit with clauses as related to an instantiation.
439 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
440 (Parent_With): New routine.
441 (Set_Implicit_With_From_Instantiation): Removed.
442 (Set_Parent_With): New routine.
443 * sinfo.ads: Update the documentation of attribute Implicit_With.
444 Remove attribute Implicit_With_From_Instantiation along with
445 occurrences in nodes. Add attribute Parent_With along with occurrences
447 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
448 (Parent_With): New routine along with pragma Inline.
449 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
450 (Set_Parent_With): New routine along with pragma Inline.
452 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
454 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
455 entity when the enclosing construct is a body.
457 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
459 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
460 Secondary_Stack_Size handling as a pragma is now generated for the
461 corresponding aspect instead of an attribute. Pragma expression is
462 relocated instead of evaluated. Discriminant of the corresponding
463 record type is referenced rather than the type discriminant.
464 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
465 Secondary_Stack_Size rep item checks to only look for the pragma rep.
466 * sem_ch13.adb (Analyze_One_Aspect): Transform
467 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
468 because the attribute does not have visibility on a task type's
469 discriminants when the type's definition is expanded.
470 (Analyze_Attribute_Definition_Clause): Remove handling of
471 Attribute_Secondary_Stack_Size.
472 * snames.adb-tmpl, snames.ads-tmpl: Remove
473 Attribute_Secondary_Stack_Size, no longer used.
475 2018-01-11 Justin Squirek <squirek@adacore.com>
477 * sem_ch8.adb: Minor comment fix.
479 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
481 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
482 individual action because the action may denote a complex expression,
483 such as a case statement, which in turn may contain additional
486 2018-01-11 Ed Schonberg <schonberg@adacore.com>
488 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
489 analysis on a copy of the expression with a copy of the index variable,
490 because full expansion will rewrite construct into a loop with the
491 original loop variable.
492 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
493 expression is an iterated component association. Full analysis takes
494 place when construct is rewritten as a loop.
495 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
496 is not safe for in-place assignment.
497 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
498 entity with no homonym and no other entity in the scope.
500 2018-01-11 Justin Squirek <squirek@adacore.com>
502 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
503 message to be printed on the pragma argument identifier.
505 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
507 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
508 entity of the generated invariant procedure in order to construct a
511 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
513 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
516 2018-01-11 Arnaud Charlet <charlet@adacore.com>
518 * einfo.ads, einfo.adb (Activation_Record_Component,
519 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
520 Allow E_Discriminant.
522 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
524 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
525 for atomic access once the component size is taken into account and
526 also do it if the component type is Atomic or Volatile_Full_Access.
528 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
530 * gnatvsn.ads: Bump copyright year.
532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
533 Alan Hayward <alan.hayward@arm.com>
534 David Sherwood <david.sherwood@arm.com>
536 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
540 Alan Hayward <alan.hayward@arm.com>
541 David Sherwood <david.sherwood@arm.com>
543 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
547 Alan Hayward <alan.hayward@arm.com>
548 David Sherwood <david.sherwood@arm.com>
550 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
551 polynomial TYPE_VECTOR_SUBPARTS.
553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
554 Alan Hayward <alan.hayward@arm.com>
555 David Sherwood <david.sherwood@arm.com>
557 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
560 2018-01-03 Jakub Jelinek <jakub@redhat.com>
562 Update copyright years.
564 * gnat_ugn.texi: Bump @copying's copyright year.
565 * gnat_rm.texi: Likewise.
567 Copyright (C) 2018 Free Software Foundation, Inc.
569 Copying and distribution of this file, with or without modification,
570 are permitted in any medium without royalty provided the copyright
571 notice and this notice are preserved.