1 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
3 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
5 2016-04-27 Nicolas Roche <roche@adacore.com>
7 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
9 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
11 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
12 cleanup. Check the original node when trying to determine the node kind
13 of pragma Volatile's argument to account for untagged derivations
14 where the type is transformed into a constrained subtype.
16 2016-04-27 Olivier Hainque <hainque@adacore.com>
18 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
19 consistent posix interface on the caller side.
21 2016-04-27 Ed Schonberg <schonberg@adacore.com>
23 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
24 is a limited view of a type, initialize the Limited_Dependents
25 field to catch misuses of the type in a client unit.
27 2016-04-27 Thomas Quinot <quinot@adacore.com>
29 * a-strunb-shared.adb (Finalize): add missing Reference call.
30 * s-strhas.adb: minor grammar fix and extension of comment
31 * sem_ch8.adb: minor whitespace fixes
33 2016-04-27 Ed Schonberg <schonberg@adacore.com>
35 * lib-xref.adb (Get_Type_Reference): Handle properly the case
36 of an object declaration whose type definition is a class-wide
37 subtype and whose expression is a function call that returns a
40 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
42 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
43 (Output_Name): New routine.
45 2016-04-27 Bob Duff <duff@adacore.com>
47 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
49 2016-04-27 Vincent Celier <celier@adacore.com>
51 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
52 --unchecked-shared-lib-imports and set the flag
53 Opt.Unchecked_Shared_Lib_Imports accordingly.
55 2016-04-27 Ed Schonberg <schonberg@adacore.com>
57 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
58 A generic subprogram is never a primitive operation, and thus
59 a classwide condition for it is not legal.
61 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
63 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
66 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
68 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
69 (Resolve_Actuals): Flag effectively volatile objects with enabled
70 property Async_Writers or Effective_Reads as illegal.
71 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
73 2016-04-27 Javier Miranda <miranda@adacore.com>
75 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
76 Do not generate the profile of the equality operator if it has
77 been explicitly defined as abstract in the parent type. Required
78 to avoid reporting an spurious error.
80 2016-04-27 Ed Schonberg <schonberg@adacore.com>
82 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
83 procedure to compute the dimension vector of a scalar expression
84 and compare it with the dimensions if its expected subtype. Used
85 for the ultimate components of a multidimensional aggregate,
86 whose components typically are themselves aggregates that are
87 expanded separately. Previous to this patch, dimensionality
88 checking on such aggregates generated spurious errors.
89 * sem_aggr.adb (Resolve_Array_Aggregate): Use
90 Check_Expression_Dimensions when needed.
92 2016-04-27 Javier Miranda <miranda@adacore.com>
94 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
95 (applicable to E_Procedure).
96 (Corresponding_Procedure): New attribute (applicable to E_Function).
97 * exp_util.adb (Build_Procedure_Form): Link the function with
98 its internally built proc and viceversa.
99 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
100 attribute Rewritten_For_C and Corresponding_Procedure to the body.
101 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
102 (Rewritten_For_C_Proc_Id): Removed.
103 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
104 locate the corresponding procedure.
106 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
108 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
109 corresponding pragma.
111 2016-04-27 Bob Duff <duff@adacore.com>
113 * exp_ch3.adb: Minor comment improvement.
115 2016-04-27 Ed Schonberg <schonberg@adacore.com>
117 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
118 return type is an untagged limited record with only access
119 discriminants and no controlled components, the return value does not
120 need to use the secondary stack.
122 2016-04-27 Javier Miranda <miranda@adacore.com>
124 * exp_util.adb (Remove_Side_Effects): When
125 generating C code handle object declarations that have
126 discriminants and are initialized by means of a call to a
129 2016-04-27 Ed Schonberg <schonberg@adacore.com>
131 * a-textio.adb (Get_Line function): Handle properly the case of
132 a line that has the same length as the buffer (or a multiple
133 thereof) and there is no line terminator.
134 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
135 in the string when there is no previous line terminator and we
136 need at most one additional character.
138 2016-04-27 Arnaud Charlet <charlet@adacore.com>
140 * s-rident.ads: Make No_Implicit_Loops non partition wide.
142 2016-04-27 Arnaud Charlet <charlet@adacore.com>
144 * sem_ch11.adb (Analyze_Handled_Statements): check useless
145 assignments also in entries and task bodies, not only in
146 procedures and declaration blocks.
147 * sem_ch5.adb (Analyze_Block_Statement): check useless
148 assignements in declaration blocks as part of processing their
149 handled statement sequence, just like it was done for procedures
150 and now is also done for entries and task bodies.
151 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
152 of entries and task bodies just like of procedures.
154 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
156 * sem_util.adb (Is_Volatile_Function): Recognize
157 a function declared within a protected type as well as the
158 protected/unprotected version of a function.
160 2016-04-27 Bob Duff <duff@adacore.com>
162 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
163 declaration of the form "X : T := Func (...);", where T is
164 controlled, as a renaming.
165 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
166 to be an empty string, instead of null-ing out the Reference.
167 * exp_util.adb (Needs_Finalization): Remove redundant code.
169 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
171 * aspects.ads Aspects Export and Import do not require delay. They
172 were classified as delayed aspects, but treated as non-delayed
173 by the analysis of aspects.
174 * freeze.adb (Copy_Import_Pragma): New routine.
175 (Wrap_Imported_Subprogram): Copy the import pragma by first
176 resetting all semantic fields to avoid an infinite loop when
178 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
179 comment on the processing of aspects Export and Import
181 (Analyze_Aspect_Convention: New routine.
182 (Analyze_Aspect_Export_Import): New routine.
183 (Analyze_Aspect_External_Link_Name): New routine.
184 (Analyze_Aspect_External_Or_Link_Name): Removed.
185 (Analyze_Aspect_Specifications): Factor out the analysis of
186 aspects Convention, Export, External_Name, Import, and Link_Name
187 in their respective routines. Aspects Export and Import should
188 not generate a Boolean pragma because their corresponding pragmas
189 have a very different syntax.
190 (Build_Export_Import_Pragma): New routine.
191 (Get_Interfacing_Aspects): New routine.
193 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
195 * inline.adb (Add_Inlined_Body): Overhaul implementation,
196 robustify handling of -gnatn1, add special treatment for
197 expression functions.
199 2016-04-27 Doug Rupp <rupp@adacore.com>
201 * g-traceb.ads: Update comment.
202 * exp_ch2.adb: minor style fix in object declaration
204 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
206 * sem_elab.adb (Check_Internal_Call): Do not
207 consider a call when it appears within pragma Initial_Condition
208 since the pragma is part of the elaboration statements of a
209 package body and may only call external subprograms or subprograms
210 whose body is already available.
211 (Within_Initial_Condition): New routine.
213 2016-04-27 Ed Schonberg <schonberg@adacore.com>
215 * exp_util.adb (Build_Procedure_Form): Prevent double generation
216 of the procedure form when dealing with an expression function
217 whose return type is an array.
218 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
219 * exp_ch6.adb: Proper conversion for inherited operation in C.
220 * sem_ch6.adb: Code cleanup.
222 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
224 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
225 * g-socket.adb: Minor reformatting.
226 * sinfo.ads: Minor comment correction.
227 * sem_warn.ads: minor grammar fix in comment
229 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
231 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
232 (maybe_pad_type): Adjust comment.
233 (finish_record_type): Likewise.
234 (rest_of_record_type_compilation): Likewise.
235 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
236 parameter from integer to boolean. Adjust recursive calls.
237 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
238 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
239 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
240 Pass false to finish_record_type. Set the debug type later.
241 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
242 (gnat_to_gnu_component_type): Fix formatting.
243 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
244 (gnat_to_gnu_type): Likewise.
245 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
246 (Loop_Statement_to_gnu): Likewise.
247 (Subprogram_Body_to_gnu): Likewise.
248 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
249 (Exception_Handler_to_gnu_gcc): Likewise.
250 (Compilation_Unit_to_gnu): Likewise.
251 (gnat_to_gnu): Likewise.
252 (push_exception_label_stack): Likewise.
253 (elaborate_all_entities_for_package): Likewise.
254 (process_freeze_entity): Likewise.
255 (process_decls): Likewise.
256 (process_type): Likewise.
257 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
258 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
259 call to rest_of_record_type_compilation.
260 (rest_of_record_type_compilation): Use copy_type.
261 (copy_type): Use correctly typed constants.
262 (gnat_signed_or_unsigned_type_for): Use copy_type.
263 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
264 (build_goto_raise): Adjust call tognat_to_gnu_entity.
266 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
268 * gcc-interface/misc.c (gnat_init): Do not call
269 internal_reference_types.
271 2016-04-27 Svante Signell <svante.signell@gmail.com>
273 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
274 * s-osinte-gnu.ads: Small tweaks.
275 * s-osinte-gnu.adb: New file.
277 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
279 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
280 constituent even if it is not to prevent spurious errors.
282 2016-04-21 Gary Dismukes <dismukes@adacore.com>
284 * sem_ch4.adb: Minor typo fixes and reformatting.
286 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
288 * g-calend.ads (No_Time): The same value in any timezone.
289 * g-socket.adb (Raise_Host_Error): Remove ending
290 dot from original error message before append colon delimited
293 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
295 * sem_ch3.adb: Code cleanup.
296 * sem_ch6.adb: Code cleanup.
297 (Is_Matching_Limited_View): New routine.
298 (Matches_Limited_With_View): Reimplemented.
299 * sem_ch10.adb (Decorate_Type): Code cleanup.
301 2016-04-21 Doug Rupp <rupp@adacore.com>
303 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
305 2016-04-21 Ed Schonberg <schonberg@adacore.com>
307 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
308 indexing functions, collect all overloadings of the call firts,
309 and then transfer them to indexing node, to prevent interleaving
310 of the set of interpretations of the nodes involved.
311 * sem_res.adb (Resolve): Suppress cascaded errors that report
312 ambiguities when one of the actuals in an overloaded generatlized
313 indexing operation is illegal and has type Any_Type, as is done
314 for similar cascaded errors in subprogram calls.
315 (Valid_Tagged_Conversion): Cleanup conversion checks when one
316 of the types involved is a class-wide subtype.
318 2016-04-21 Ed Schonberg <schonberg@adacore.com>
320 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
321 subprogram declaration within a wrapper package, skip pragmas
322 that may have been generated by aspect specifications on the
325 2016-04-21 Javier Miranda <miranda@adacore.com>
327 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
328 code return True for array identifiers since the backend needs
329 to initialize such component by means of memcpy().
331 2016-04-21 Arnaud Charlet <charlet@adacore.com>
333 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
334 potentially uninitialized memory.
335 * sem_ch3.adb: Minor style fix in comment.
337 2016-04-21 Arnaud Charlet <charlet@adacore.com>
339 * gnat_rm.texi, gnat_ugn.texi,
340 doc/gnat_ugn/gnat_project_manager.rst,
341 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
342 doc/gnat_ugn/gnat_and_program_execution.rst,
343 doc/gnat_ugn/gnat_utility_programs.rst,
344 doc/gnat_ugn/the_gnat_compilation_model.rst,
345 doc/gnat_rm/implementation_defined_attributes.rst,
346 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
347 doc/gnat_rm/implementation_defined_pragmas.rst,
348 doc/gnat_rm/the_gnat_library.rst,
349 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
350 * doc/Makefile: Cleanups.
352 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
354 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
356 2016-04-21 Ed Schonberg <schonberg@adacore.com>
358 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
359 disambiguate local variables that may be hidden from inner visibility
360 by nested block declarations or loop variables.
362 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
364 * s-soflin.adb: Initialize the Stack_Limit global variable.
366 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
368 * lib-writ.adb: Minor reformatting.
370 2016-04-21 Ed Schonberg <schonberg@adacore.com>
372 * exp_pakd.adb (Compute_Number_Components): New function to
373 build an expression that computes the number of a components of
374 an array that may be multidimensional.
375 (Expan_Packed_Eq): Use it.
377 2016-04-21 Arnaud Charlet <charlet@adacore.com>
379 * g-traceb.ads: Update list of supported platforms.
381 2016-04-21 Ed Schonberg <schonberg@adacore.com>
383 * sem_ch13.adb (Add_Predicates): if the type is declared in
384 an inner package it may be frozen outside of the package, and
385 the generated pragma has not been analyzed yet, the expression
386 for the predicate must be captured and added to the predicate
387 function at this point.
389 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
391 * contracts.adb (Analyze_Package_Body_Contract): Do not check
392 for a missing package refinement because 1) packages do not have
393 "refinement" and 2) the check for proper state refinement is
394 performed in a different place.
395 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
396 (Has_Null_Visible_Refinement): Reimplemented.
397 * sem_ch3.adb (Analyze_Declarations): Determine whether all
398 abstract states have received a refinement and if not, emit
400 * sem_ch7.adb (Analyze_Package_Declaration): Code
401 cleanup. Determine whether all abstract states of the
402 package and any nested packages have received a refinement
403 and if not, emit errors.
404 (Requires_Completion_In_Body): Add new formal parameter
405 Do_Abstract_States. Update the comment on usage. Propagate the
406 Do_Abstract_States flag to all Unit_Requires_Body calls.
407 (Unit_Requires_Body): Remove formal
408 parameter Ignore_Abstract_States. Add new formal paramter
409 Do_Abstract_States. Propagate the Do_Abstract_States flag to
410 all Requires_Completion_In calls.
411 * sem_ch7.ads (Unit_Requires_Body): Remove formal
412 parameter Ignore_Abstract_States. Add new formal paramter
413 Do_Abstract_States. Update the comment on usage.
414 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
415 not initialize the constituent list as this is now done on a
416 need-to-add-element basis.
417 (Analyze_Single_Task_Declaration):
418 Do not initialize the constituent list as this is now done on
419 a need-to-add-element basis.
420 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
421 lists as this is now done on a need-to-add-element basis.
422 * sem_prag.adb (Analyze_Constituent): Set the
423 refinement constituents when adding a new element.
424 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
425 adding a new element.
426 (Analyze_Part_Of_Option): Set the Part_Of
427 constituents when adding a new element.
428 (Analyze_Pragma): Set the Part_Of constituents when adding a new
430 (Check_Constituent_Usage (all versions)): Reimplemented.
431 (Collect_Constituent): Set the refinement constituents when adding
433 (Create_Abstract_State): Do not initialize the
434 constituent lists as this is now done on a need-to-add-element basis.
435 (Propagate_Part_Of): Set the Part_Of constituents when
436 adding a new element.
437 * sem_util.adb (Check_State_Refinements): New routine.
438 (Has_Non_Null_Refinement): Reimplemented.
439 (Has_Null_Refinement): Reimplemented.
440 (Requires_State_Refinement): Removed.
441 * sem_util.ads (Check_State_Refinements): New routine.
442 (Requires_State_Refinement): Removed.
444 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
446 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
447 * sem.adb: Fix comment.
449 2016-04-21 Ed Schonberg <schonberg@adacore.com>
451 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
452 declaration with no aspects, whose subtype_mark is a subtype
453 with predicates, inherits the list of subprograms for the type.
455 2016-04-21 Arnaud Charlet <charlet@adacore.com>
457 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
460 2016-04-21 Thomas Quinot <quinot@adacore.com>
462 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
464 2016-04-21 Ed Schonberg <schonberg@adacore.com>
466 * lib-writ.adb (Write_ALI): Do not record in ali file units
467 that are present in the files table but not analyzed. These
468 units are present because they appear in the context of units
469 named in limited_with clauses, and the unit being compiled does
470 not depend semantically on them.
472 2016-04-21 Ed Schonberg <schonberg@adacore.com>
474 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
475 create the procedure body for an function returning an array type,
476 when generating C code. Reuse the subprogram body rather than
477 creating a new one, both as an efficiency measure and because
478 in an instance the body may contain global references that must
481 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
483 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
486 2016-04-21 Javier Miranda <miranda@adacore.com>
488 * exp_aggr.adb (Component_Check): Extend
489 the check that verifies that the aggregate has no function
490 calls to handle transformations performed by the frontend.
491 (Ultimate_Original_Expression): New subprogram.
493 2016-04-21 Philippe Gil <gil@adacore.com>
495 * krunch.adb (Krunch): Fix krunching of i-java.
497 2016-04-21 Arnaud Charlet <charlet@adacore.com>
499 * exp_ch8.adb (Evaluation_Required): Always return
500 True when Modify_Tree_For_C.
502 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
504 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
505 * alloc.ads: Minor comment fixes.
506 * einfo.ads: Fix typo.
508 2016-04-21 Arnaud Charlet <charlet@adacore.com>
510 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
511 changes to handle all cases of components depending on the
512 discriminant, not just string literals.
514 2016-04-21 Ed Schonberg <schonberg@adacore.com>
516 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
517 declaration is the generated declaration for a generic actual,
518 inherit predicates from the actual if it is a predicated subtype.
520 2016-04-21 Ed Schonberg <schonberg@adacore.com>
522 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
523 inherited and its result is controlling, introduce a conversion
524 on the actual for the corresponding procedure call, to avoid
525 spurious type errors.
527 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
529 * krunch.adb (Krunch): Fix krunching of i-vxworks.
531 2016-04-21 Gary Dismukes <dismukes@adacore.com>
533 * exp_aggr.adb: Minor reformatting and code cleanup.
535 2016-04-21 Ed Schonberg <schonberg@adacore.com>
537 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
538 resolution, because they introduce local names. Full resolution
539 will take place when predicate function is constructed.
541 2016-04-21 Arnaud Charlet <charlet@adacore.com>
543 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
544 change to take into account Per_Object_Constraint field rather
545 than special casing strings.
546 * exp_ch6.adb: Fix typo in Replace_Returns.
548 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
550 * sem_ch5.adb: Minor reformatting.
552 2016-04-21 Arnaud Charlet <charlet@adacore.com>
554 * exp_aggr.adb (Backend_Processing_Possible): Return False
555 when generating C and aggregate contains function calls.
557 2016-04-21 Tristan Gingold <gingold@adacore.com>
559 * krunch.adb (Krunch): Only partially krunch children of
560 Interfaces that aren't known.
562 2016-04-21 Ed Schonberg <schonberg@adacore.com>
564 * sem_prag.adb (Make_Inline): Handle properly the instantiation
565 of a generic subpprogram that carries an Inline aspect. Place
566 inline info on the anonymous subprogram that is constructed in
568 (Analyze_Pragma, case Pure): Do not check placement if pragma
569 appears within an instantiation, which can be nested at any level.
570 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
571 node from anonymous subprogram to its visible renaming. The
572 freeze node will be constructed if the subprogram carries
574 (Set_Global): Preserve dimension information if present (from
577 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
579 * gnatlink.adb: Change wording of the warning message on
580 problematic filenames to be more neutral. Add a new substring
581 "patch" introduced on Windows 10.
583 2016-04-21 Philippe Gil <gil@adacore.com>
585 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
587 2016-04-21 Javier Miranda <miranda@adacore.com>
589 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
592 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
594 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
595 * einfo.ads New synthesized attribute
596 Has_Non_Null_Abstract_State along with occurrences in entities.
597 (Has_Non_Null_Abstract_State): New routine.
598 * sem_ch7.adb (Unit_Requires_Body): Add local variable
599 Requires_Body. A package declaring an abstract state requires
600 a body only when the state is non-null and the package contains
601 at least one other construct that requires completion in a body.
602 * sem_util.adb (Mode_Is_Off): Removed.
603 (Requires_State_Refinement): Remove an obsolete check. Code
606 2016-04-21 Bob Duff <duff@adacore.com>
608 * sem_attr.adb (Analyze_Attribute): In processing
609 the 'Old attribute, a warning is given for infinite recursion. Fix
610 the code to not crash when the prefix of 'Old denotes a protected
612 * sem_ch5.adb (Analyze_Iterator_Specification):
613 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
614 where the parameter would not be an object.
616 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
618 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
619 Etype or Underlying_Type of the operands.
621 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
623 * atree.adb (Print_Statistics): Protect against overflows and
624 print the memory consumption in bytes.
625 * table.adb (Reallocate): Do the intermediate calculation of the new
626 size using the Memory.size_t type.
628 2016-04-21 Gary Dismukes <dismukes@adacore.com>
630 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
631 expansion of Attribute_Machine and Attribute_Model for AAMP.
633 2016-04-21 Ed Schonberg <schonberg@adacore.com>
635 * freeze.adb: Disable previous change for now.
637 2016-04-21 Ed Schonberg <schonberg@adacore.com>
639 * sem_ch8.adb (Find_Selected_Component): If prefix has an
640 access type and designated type is a limited view, introduce
641 an explicit dereference before continuing the analysis, and
642 set its type to the non-limited view of the designated type,
643 if we are in context where it is available.
645 2016-04-21 Ed Schonberg <schonberg@adacore.com>
647 * freeze.adb: Freeze profile in ASIS mode.
649 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
651 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
652 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
654 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
656 * exp_ch6.adb: Minor reformatting.
658 2016-04-21 Ed Schonberg <schonberg@adacore.com>
660 * sem_ch13.adb: Minor comment update.
662 2016-04-21 Ed Schonberg <schonberg@adacore.com>
664 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
665 boolean parameter to determine whether freezing an overloadable
666 entity freezes its profile as well. This is required by
667 AI05-019. The call to Freeze_Profile within Freeze_Entity is
668 conditioned by the value of this flag, whose default is True.
669 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
670 reference freezes the prefix, but it the prefix is a subprogram
671 it does not freeze its profile.
673 2016-04-21 Javier Miranda <miranda@adacore.com>
675 * exp_util.adb (Build_Procedure_Form): No action needed for
676 subprogram renamings since the backend can generate the call
677 using the renamed subprogram. This leaves the tree more clean
679 * exp_ch6.adb (Expand_Call): Extend previous patch for
680 rewritten-for-c entities to handle subprogram renamings.
681 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
683 2016-04-21 Ed Schonberg <schonberg@adacore.com>
685 * sem_ch13.adb: Code cleanup.
687 2016-04-21 Ed Schonberg <schonberg@adacore.com>
689 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
690 created for SPARK_To_C, the entity must remain invisible so it
691 does not overload subsequent references to the original function.
692 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
693 Handle Extended_Return_Statements by replacing it with a block
694 with assignments and a simple return statement.
695 * exp_util.adb (Build_Procedure_Form): Make procedure entity
696 invisible after analyzing declaration, to prevent improper
699 2016-04-21 Javier Miranda <miranda@adacore.com>
701 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
702 attribute Rewritten_For_C to the body since since the expander
703 may generate calls using that entity.
704 * exp_ch6.adb (Expand_Call): For internally generated
705 calls ensure that they reference the entity of the spec
706 of the called function.
707 (Rewritten_For_C_Func_Id): New subprogram.
708 (Rewritten_For_C_Proc_Id): New subprogram.
709 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
710 ensure that we skip freezing entities.
711 * exp_util.adb (Build_Procedure_Form): No action needed if the
712 procedure was already built.
714 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
716 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
719 2016-04-21 Ed Schonberg <schonberg@adacore.com>
721 * sem_util.adb (Denotes_Iterator): Use root type to determine
722 whether the ultimate ancestor is the predefined iterator
724 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
725 and avoid reuse of Pack local variable.
727 2016-04-21 Olivier Hainque <hainque@adacore.com>
729 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
730 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
731 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
732 Executable_Extension to ".out".
734 2016-04-21 Javier Miranda <miranda@adacore.com>
736 * frontend.adb: Update call to Unnest_Subprograms.
737 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
738 (Unnest_Subprograms): Moved to package exp_unst.
739 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
741 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
742 enumeration literals when generating C code.
744 2016-04-21 Javier Miranda <miranda@adacore.com>
746 * frontend.adb: Remove call to initialize Exp_Ch6.
747 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
748 (Unest_Entry/Unest_Bodies): Removed.
749 (Unnest_Subprograms): Code cleanup.
751 2016-04-21 Arnaud Charlet <charlet@adacore.com>
753 * set_targ.adb (Read_Target_Dependent_Values):
754 close target description file once its contents is read.
755 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
756 and Stderr_File): Close local file descriptors before spawning
758 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
759 local variables to make the code easier to understand and avoid
760 duplicated calls to Parent and Generic_Parent.
762 2016-04-20 Bob Duff <duff@adacore.com>
764 * s-os_lib.ads: Minor comment fix.
766 2016-04-20 Ed Schonberg <schonberg@adacore.com>
768 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
769 a discriminant check for a type whose partial view has unknown
770 discriminants when the full view has discriminants with defaults.
772 2016-04-20 Javier Miranda <miranda@adacore.com>
774 * exp_util.adb (Remove_Side_Effects): When generating C code
775 remove side effect of type conversion of access to unconstrained
777 (Side_Effect_Free): Return false for the type
778 conversion of access to unconstrained array type when generating
780 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
781 of access to unconstrained array type conversion when generating
784 2016-04-20 Ed Schonberg <schonberg@adacore.com>
786 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
787 function, to construct the declaration of a predicate function
788 at the end of the current declarative part rather than at the
789 (possibly later) freeze point of the type. This also allows uses
790 of a type with predicates in instantiations elsewhere.
791 (Resolve_Aspect_Expression): New procedure to detect visiblity
792 errors in aspect expressions, at the end of the declarative part
793 that includes the type declaration.
794 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
795 predicate function from private to full view.
796 * einfo.adb (Predicate_Function): Refine search for predicate
797 function when type has a full view and predicate function may
798 be defined on either view.
800 2016-04-20 Javier Miranda <miranda@adacore.com>
802 * frontend.adb: Passing the root of the tree to
803 Unnest_Subprograms().
804 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
805 took care of adding subprograms to the Unest_Bodies table since
806 performing such action too early disables the ability to process
807 generic instantiations.
808 (Unnest_Subprograms): Adding parameter.
809 (Search_Unnesting_Subprograms): New subprogram.
810 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
812 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
814 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
816 2016-04-20 Ed Schonberg <schonberg@adacore.com>
818 * exp_unst.adb (Check_Static_Type): For a private type, check
821 2016-04-20 Ed Schonberg <schonberg@adacore.com>
823 * sem_attr.adb (Check_Type): Reject an attribute reference in
824 an aspect expression, when the prefix of the reference is the
825 current instance of the type to which the aspect applies.
827 2016-04-20 Bob Duff <duff@adacore.com>
829 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
830 hiding unless we're actually hiding something. The previous
831 code would (for example) warn about a "<" on a record type
832 because it incorrectly thought it was hiding the "<" on Boolean
833 in Standard. We need to check that the homonym S is in fact a
834 homograph of a predefined operator.
836 2016-04-20 Ed Schonberg <schonberg@adacore.com>
838 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
839 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
840 procedure equivalent to a function returning an array, when this
841 construction is deferred to the freeze point of the function.
842 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
843 function that renames an instance of Unchecked_Conversion.
844 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
845 declaration for a function returning an array.
846 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
848 2016-04-20 Ed Schonberg <schonberg@adacore.com>
850 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
851 New predicate to determine that in a context with full run-time,
852 a function call is an expansion of a reference to attribute
854 * sem_ch5.adb (Analyze_Function_Call): use it.
855 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
857 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
859 * einfo.adb Flag286 is now used as Is_Exception_Handler.
860 (Is_Exception_Handler): New routine.
861 (Set_Is_Exception_Handler): New routine.
862 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
863 * einfo.ads New attribute Is_Exception_Handler along with
864 occurrences in entities.
865 (Is_Exception_Handler): New routine along with pragma Inline.
866 (Set_Is_Exception_Handler): New routine along with pragma Inline.
867 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
868 for exception handlers with a choice parameter.
869 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
870 generated for a choice parameter as an exception handler.
872 2016-04-20 Ed Schonberg <schonberg@adacore.com>
874 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
875 (Constrain_Discriminated_Type): In an instance, if the type has
876 unknown discriminants, use its full view.
877 (Process_Subtype): Check that the base type is private before
878 adding subtype to Private_Dependents list.
880 2016-04-20 Bob Duff <duff@adacore.com>
882 * sem_ch13.adb: Minor comment fix.
884 2016-04-20 Yannick Moy <moy@adacore.com>
886 * sem_ch4.adb: Fix typos in comments.
887 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
889 2016-04-20 Ed Schonberg <schonberg@adacore.com>
891 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
892 current instance of a task type is legal if the prefix is an
893 expression of that task type and the selector is an entry or
896 2016-04-20 Arnaud Charlet <charlet@adacore.com>
898 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
899 varsize field at the end for efficiency.
901 2016-04-20 Vincent Celier <celier@adacore.com>
903 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
904 ls" includes the switch -V.
905 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
907 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
910 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
912 * sem_ch12.adb (Qualify_Type): Do not perform
913 partial qualification when the immediate scope is a generic unit.
915 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
917 * exp_unst.adb: Minor reformatting.
919 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
921 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
922 tag assignment and adjustment preceed the accessibility check.
923 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
925 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
927 * exp_prag.adb (Expand_Attributes): Ensure that
928 the temporary used to capture the value of attribute 'Old's
929 prefix is properly initialized.
931 2016-04-20 Javier Miranda <miranda@adacore.com>
933 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
936 2016-04-20 Arnaud Charlet <charlet@adacore.com>
938 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
941 2016-04-20 Vincent Celier <celier@adacore.com>
943 * make.adb: Code cleanup.
945 2016-04-20 Arnaud Charlet <charlet@adacore.com>
947 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
950 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
952 * sem_ch12.adb (Copy_Generic_Node): Handle the special
953 qualification installed for universal literals that act as
954 operands in binary or unary operators. (Qualify_Operand): Mark
955 the qualification to signal the instantiation mechanism how to
956 handle global reference propagation.
957 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
958 (Set_Is_Qualified_Universal_Literal): New routine.
959 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
960 with occurrences in nodes.
961 (Is_Qualified_Universal_Literal):
962 New routine along with pragma Inline.
963 (Set_Is_Qualified_Universal_Literal): New routine along with
966 2016-04-20 Ed Schonberg <schonberg@adacore.com>
968 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
969 so that the corresponding checks are preserved across compilations
970 that include System.Constants in their context.
972 2016-04-20 Gary Dismukes <dismukes@adacore.com>
974 * sem_type.adb: Minor typo fix and reformatting.
975 * a-conhel.ads: Update comment.
977 2016-04-20 Bob Duff <duff@adacore.com>
979 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
980 code so it doesn't trigger an "uninit var" warning.
982 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
984 * sem_attr.ads Add new table Universal_Type_Attribute.
985 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
988 2016-04-20 Ed Schonberg <schonberg@adacore.com>
990 * exp_aggr.adb (Init_Stored_Discriminants,
991 Init_Visible_Discriminants): New procedures, subsidiary of
992 Build_Record_Aggr_Code, to handle properly the construction
993 of aggregates for a derived type that constrains some parent
994 discriminants and renames others.
996 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
998 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
999 (Save_References_In_Operator): Add explicit qualifications in
1000 the generic template for all operands of universal type.
1001 * sem_type.adb (Disambiguate): Update the call to Matches.
1002 (Matches): Reimplemented.
1003 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
1005 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1007 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
1008 an illegal aspect that freezes the entity to which it applies.
1010 2016-04-20 Bob Duff <duff@adacore.com>
1012 * a-stwibo.ads, a-stzbou.ads
1013 ("="): Add overriding keyword before function to avoid crash when
1014 compiler is called with -gnatyO (check overriding indicators).
1016 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1018 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
1019 is a configuration pragma and it uses the ARG syntax, insert
1020 the rewritten pragma after the current one rather than using
1023 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1025 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
1028 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1030 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
1031 s-imglli.adb: Minor reformatting.
1033 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1035 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
1036 renamed operator when the associated node appears within a
1038 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
1040 2016-04-20 Yannick Moy <moy@adacore.com>
1042 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
1043 * einfo.adb (Set_Overridden_Operation): Add assertion.
1044 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
1047 2016-04-20 Javier Miranda <miranda@adacore.com>
1049 * exp_unst.adb (Append_Unique_Call): New subprogram.
1050 (Unnest_Subprogram): Replace the unique occurrence
1051 of Call.Append() by Append_Unique_Call() which protects us from
1052 adding to the Calls table duplicated entries.
1054 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1056 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
1057 * xref_lib.ads (Dependencies_Tables): instantiate
1058 Table package with types that guarantee its safe use.
1059 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
1062 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1064 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
1065 Disable expansion when generating C code.
1066 * sinfo.ads, inline.ads: Minor editing.
1068 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1070 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
1073 2016-04-20 Javier Miranda <miranda@adacore.com>
1075 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
1076 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
1077 declaration of the internally built _postcondition procedure.
1079 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1081 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
1083 * sem_util.adb (Is_Unchecked_Conversion_Instance):
1084 defense against library-level renamings of other functions,
1085 which are never instances of Unchecked_Conversion.
1086 * einfo.ads: minor fix of casing in comment
1088 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1090 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
1091 that has been analyzed and expanded already. Qualify the names
1092 in the proper body for use in the generation of C code.
1094 2016-04-20 Javier Miranda <miranda@adacore.com>
1096 * contracts.adb (Build_Postconditions_Procedure): Force its
1097 inlining when generating C code.
1098 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
1099 _postconditions when generating C code.
1100 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
1101 _postconditions when generating C code.
1102 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
1103 types of return value and argument changed from Node_Id to
1106 2016-04-20 Vincent Celier <celier@adacore.com>
1108 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
1110 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
1112 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
1113 the Has_Delayed_Freeze flag on the anonymous instance node.
1115 2016-04-20 Javier Miranda <miranda@adacore.com>
1117 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
1118 scope associated with the renaming object declaration.
1119 * exp_util.adb (Insert_Actions): Remove handling of iterator
1120 loop marked as requiring the secondary stack.
1122 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1124 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
1125 AI12-0124, which extends the functionality of the attribute so it
1126 reflects the semantics of GNAT 'Img when applied to scalar types.
1127 * lib-xref.adb: minor whitespace layout fix.
1129 2016-04-20 Vincent Celier <celier@adacore.com>
1131 * clean.adb (Gnatclean): Fail if project file specified and
1132 gprclean is not available.
1133 * gnatname.adb: Fail is -P is used and gprname is not available.
1134 * make.adb (Initialize): Fail if project file specified and
1135 gprbuild is not available.
1137 2016-04-20 Bob Duff <duff@adacore.com>
1139 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
1140 stack when possible.
1142 2016-04-20 Gary Dismukes <dismukes@adacore.com>
1144 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
1147 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1149 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
1150 If the pragma comes from an aspect specification, verify that
1151 the aspect applies to an entity with a declarative part.
1152 * exp_ch5.adb: Code cleanup.
1154 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1156 * sem_res.adb (Resolve_If_Expression): If first expression is
1157 universal, resolve subsequent ones with the corresponding class
1158 type (Any_Integer or Any_Real).
1160 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1162 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
1163 disabled, complete the analysis of the iterator name to ensure
1164 that reference for entities within are properly generated.
1166 2016-04-20 Arnaud Charlet <charlet@adacore.com>
1168 * a-dispat.ads (Yield): add Global contract.
1169 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
1170 * a-taside.adb: Added Initializes => Tasking_State.
1172 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1174 * sem_ch13.adb (Build_Invariant_Procedure):
1175 Reimplement the invariant procedure spec and body insertion.
1177 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1179 * sem_ch13.adb (Add_Invariant): Do not replace
1180 the saved expression of an invariatn aspect when inheriting
1181 a class-wide type invariant as this clobbers the existing
1182 expression. Do not use New_Copy_List as it is unnecessary
1183 and leaves the parent pointers referencing the wrong part of
1184 the tree. Do not replace the type references for ASIS when
1185 inheriting a class-wide type invariant as this clobbers the
1186 existing replacement.
1188 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1190 * sem_util.adb (Build_Explicit_Dereference): If the designated
1191 expression is an entity name, generate reference to the entity
1192 because it will not be resolved again.
1194 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1196 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1197 gnat_rm.texi: Update documentation.
1199 2016-04-19 Olivier Hainque <hainque@adacore.com>
1201 * par_sco.adb (Traverse_One, case N_Case_Statement):
1202 Skip pragmas before the first alternative.
1203 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
1205 2016-04-19 Tristan Gingold <gingold@adacore.com>
1207 * adaint.c (__gnat_lwp_self): New function (for darwin).
1208 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
1211 2016-04-19 Olivier Hainque <hainque@adacore.com>
1213 * sem_util.adb (Build_Elaboration_Entity): Always request an
1214 elab counter when preserving control-flow.
1216 2016-04-19 Olivier Hainque <hainque@adacore.com>
1218 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
1219 Needs_Debug_Info when producing SCOs.
1220 * par_sco.adb (Traverse_Aspects): Fix categorization of
1221 Type_Invariant to match actual processing as activated depending
1222 on pragma Assertion_Policy.
1223 * sem_prag.adb (Analyze_Pragma): Remove special case for
1224 Name_Invariant regarding SCO generation, which completely disabled
1225 the production of SCOs for Invariant pragmas and aspects.
1227 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1229 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
1232 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1234 * freeze.adb (Freeze_Profile): Refine predicate that checks
1235 whether a function that returns a limited view is declared in
1236 another unit and cannot be frozen at this point.
1238 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1240 * exp_aggr.adb (Component_Count): Handle properly superflat
1241 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
1242 return value of the function is Natural, rather than leaving
1243 the handling of such arrays to the caller of this function.
1245 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1247 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
1248 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
1249 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
1250 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
1251 to publicly visible routine in Sem_Util.
1253 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1255 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
1256 the check if the type of the actual is By_Reference.
1258 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1260 * sem_res.adb (Within_Subprogram_Call): Detect
1261 also nodes that appear in entry calls.
1262 (Resolve_Actuals, Insert_Default): Propagate
1263 dimension information if any, from default expression to the
1264 copy that appears in the list of actuals.
1265 * uintp.ads: minor whitespace fix in comment.
1266 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
1268 * set_targ.adb (Set_Targ): convert directly from
1269 Natural to Pos, without intermediate conversion to Int.
1271 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1273 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
1274 SPARK RM in comment.
1275 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
1277 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
1278 to SPARK RM in both comment and error message.
1280 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
1282 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
1283 CW type, then the subprogram must have a delayed freeze. This
1284 ensures that the backend can properly recover the full view when
1285 elaborating the access subprogram declaration.
1287 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1289 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
1290 overloadable entity if originally overloaded.
1292 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1294 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
1295 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
1296 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
1297 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
1300 2016-04-19 Arnaud Charlet <charlet@adacore.com>
1302 * sem_util.adb (Copy_Node_With_Replacement):
1303 use Set_Comes_From_Source instead of directly manipulating
1304 internals of the node table.
1305 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
1306 * sem_aux.adb (Get_Rep_Pragma,
1307 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
1308 do not change as constants and initialize them in the declaration.
1309 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
1310 variables that do not change as constants and initialize them
1313 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1315 * sem_res.adb (Resolve_Entry_Call): If the entry has
1316 preconditions it is rewritten by means of a wrapper that
1317 incorporates the original call. Before rewriting generate a
1318 reference to the entry being called to prevent spurious warnings
1319 and provide correct cross-reference information.
1321 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1323 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
1324 local constant Scop. Ignore any internally generated loops when
1325 performing the check concerning an abstract subprogram call
1326 without a controlling argument.
1327 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
1329 2016-04-19 Bob Duff <duff@adacore.com>
1331 * sem_elab.adb (Check_A_Call): There are cases where we have No
1332 (Ent) after the Alias loop, even when there was no previous error,
1333 so we can't assert that there was an error.
1335 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1337 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
1338 Reject use of type name as a prefix to 'access within an aggregate
1339 in a context that is not the declarative region of a type.
1341 2016-04-19 Vincent Celier <celier@adacore.com>
1343 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
1344 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
1345 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
1346 Remove anything related to project files
1347 * g-mbdira.adb: minor whitespace cleanup
1348 * g-spipat.adb: minor removal of extra spaces after closing paren
1350 2016-04-19 Ed Schonberg <schonberg@adacore.com>
1352 * exp_ch6.adb (Expand_Actuals): If post-statements are present
1353 and the enclosing context is a function call or indexing, build
1354 an Expression_With_Actions for the call.
1356 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
1358 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
1359 a with line for an ignored Ghost unit.
1360 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
1361 Par. A child package is Ghost when its parent is Ghost.
1362 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
1363 a subprogram declaration that acts as a compilation unit.
1365 2016-04-18 Michael Matz <matz@suse.de>
1367 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
1368 (gnat_to_gnu_field): Ditto.
1369 (components_to_record): Ditto.
1370 (create_variant_part_from): Ditto.
1371 (copy_and_substitute_in_size): Ditto.
1372 (substitute_in_type): Ditto.
1373 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
1374 (make_packable_type): Ditto.
1375 (maybe_pad_type): Ditto.
1376 (finish_fat_pointer_type): Ditto.
1377 (finish_record_type): Ditto and use SET_DECL_ALIGN.
1378 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
1379 (create_field_decl): Use SET_DECL_ALIGN.
1381 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1383 * einfo.adb (Overridden_Operation): assert that
1384 function is called for valid arguments.
1385 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
1386 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
1387 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
1388 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
1389 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
1390 No space after closing parenthesis except where required for
1392 * sem_res.adb: Minor reformatting.
1394 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1396 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
1397 statement when relevant.
1399 2016-04-18 Bob Duff <duff@adacore.com>
1401 * a-cuprqu.adb (Enqueue): Properly handle the
1402 case where the new element has a unique priority.
1404 2016-04-18 Tristan Gingold <gingold@adacore.com>
1406 * adaint.h: Define stat structures and functions for iOS
1409 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1411 * sem_res.adb (Resolve_Entry_Call): reset
1412 Is_Overloaded flag after resolving calls to overloaded protected
1414 * exp_spark.adb (Expand_SPARK): call
1415 Qualify_Entity_Names for tasking nodes, i.e. protected types,
1416 task types and entries.
1417 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
1418 in case of an unconstrained type.
1420 2016-04-18 Yannick Moy <moy@adacore.com>
1422 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
1423 comment to document usage of subprogram in GNATprove.
1425 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1427 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
1428 message for wrong placement of aspect Test_Case.
1430 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1432 * einfo.ads: Update the documentation of attribute Renamed_Object.
1433 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
1435 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1437 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
1438 in the case of AAMP (same as for use of the -gnatd.P switch) to
1439 suppress this optimization, which avoids creating a dependence
1440 on the 64-bit arithmetic package.
1442 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1444 * exp_ch4.adb: Update comment.
1446 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1448 * exp_ch6.adb (Expand_Call): Make sure instantiations are
1449 registered only once as pending here.
1451 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1453 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
1454 (Minimize_Expression_With_Actions): New flag.
1455 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
1457 (Resolve_Short_Circuit): Redo previous change
1458 using Minimize_Expression_With_Actions.
1459 (Expand_N_If_Expression,
1460 Expand_Short_Circuit_Operator): Restore old code to avoid
1461 Expression_With_Actions when Minimize_Expression_With_Actions
1464 2016-04-18 Vincent Celier <celier@adacore.com>
1466 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
1467 Stderr_File): Close local file descriptors when no longer needed.
1469 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1471 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
1472 mode check that the type of the cursor in an iteration over
1473 a formal container is not volatile. The proper check on the
1474 element type is done elsewhere.
1476 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1478 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
1479 a subprogram that returns a class-wide type, if the subprogram
1480 is a compilation unit, because otherwise gigi will treat the
1481 subprogram as external, leading to link errors.
1483 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1485 * sem_res.adb (Resolve_Short_Circuit): Do not use
1486 expression-with-actions when generating C.
1488 2016-04-18 Yannick Moy <moy@adacore.com>
1490 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
1491 raise node in GNATprove mode.
1493 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1495 * s-fileio.adb: Minor reformatting.
1496 * sem_prag.adb (Analyze_Input_Item): Add local
1497 variable Input_OK. Do not consider mappings of generic formal
1498 parameters to actuals.
1500 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1502 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
1503 type, the cursor is declared in the scope of the parent type.
1504 (Analyze_Parameter_Specification): A qualified expression with an
1505 iterator type indicates an iteration over a container (explicit
1508 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1510 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
1511 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
1512 * debug.adb: Reserve -gnatd.4 to force generation of C files.
1514 2016-04-18 Yannick Moy <moy@adacore.com>
1516 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
1517 division by zero, instead possibly issue a warning.
1518 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
1519 static division by zero, instead add check flag on original
1521 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
1522 Only issue error when both SPARK_Mode is On and Warn is False.
1524 2016-04-18 Yannick Moy <moy@adacore.com>
1526 * checks.adb (Apply_Scalar_Range_Check): Force
1527 warning instead of error when SPARK_Mode is On, on index out of
1528 bounds, and set check flag for GNATprove.
1530 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1532 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
1533 Update the comment on usage. Reimplemented.
1534 (Check_Input_States.Check_Constituent_Usage): Update the comment
1535 on usage. A Proof_In constituent can now refine an Input state
1536 as long as there is at least one Input constituent present.
1538 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1540 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
1541 body id as the sloc of the entity in the generated subprogram
1542 declaration, to avoid spurious conformance errors when style
1545 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1547 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
1548 Refine check on illegal calls to entities within a task body,
1549 when the entity is declared in an object of the same type. In
1550 a generic context there might be no explicit dereference but if
1551 the prefix includes an access type the construct is legal.
1553 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1555 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
1556 RE_Default_Priority.
1558 2016-04-18 Bob Duff <duff@adacore.com>
1560 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
1561 if the pragma came from an aspect specification.
1563 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1565 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
1567 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1569 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
1570 superfluous conformance check on an inlined body with a previous
1571 spec, use the fact that the generated declaration does not come
1572 from source. We must treat the entity as coming from source to
1573 enable some back-end inlining when pragma appears after the body.
1575 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1577 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
1578 exp_intr.adb: Minor reformatting and typo corrections.
1580 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1582 * sem_ch6.adb: Code cleanup.
1584 2016-04-18 Thomas Quinot <quinot@adacore.com>
1586 * sem_ch13.adb: Minor reformatting and error message tweaking
1587 (remove extraneous spaces).
1589 2016-04-18 Johannes Kanig <kanig@adacore.com>
1591 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
1593 2016-04-18 Bob Duff <duff@adacore.com>
1595 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
1596 exists, and it's a fifo, we use "w" as the open string instead of
1597 "r+". This is necessary to make a write to the fifo block until
1600 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1602 * sem_attr.adb (Denote_Same_Function): Account
1603 for a special case where a primitive of a tagged type inherits
1604 a class-wide postcondition from a parent type.
1606 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1608 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
1609 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
1610 of reserved words is OK.
1611 (Scan_Pragma_Argument_Association):
1612 Add new formal Reserved_Words_OK and update the comment on
1613 usage. Code cleanup. Parse an expression or a reserved word in
1614 identifier form for pragmas Restriction_Warnings and Restrictions
1615 No_Use_Of_Attribute.
1616 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1617 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
1618 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
1620 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
1621 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
1622 Update the parameter profile.
1623 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
1625 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
1626 the comment on usage.
1627 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
1628 * sem_attr.adb (Analyze_Attribute): Check restriction
1629 No_Use_Of_Attribute.
1630 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
1631 restriction No_Use_Of_Attribute before any rewritings have
1633 * sem_prag.adb (Analyze_Pragma): Check restriction
1634 No_Use_Of_Pragma before any rewritings have taken place.
1636 2016-04-18 Bob Duff <duff@adacore.com>
1638 * sem_ch6.adb (Is_Inline_Pragma): The pragma
1639 argument can be a selected component, which has no Chars field,
1640 so we need to deal with that case (use the Selector_Name).
1641 (Check_Inline_Pragma): We need to test Is_List_Member before
1642 calling In_Same_List, because in case of a library unit, they're
1643 not in lists, so In_Same_List fails an assertion.
1645 2016-04-18 Bob Duff <duff@adacore.com>
1647 * namet.ads, namet.adb: Add an Append that appends a
1648 Bounded_String onto a Bounded_String. Probably a little more
1649 efficient than "Append(X, +Y);". Also minor cleanup.
1650 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
1651 Append_Unqualified_Decoded): Make sure these work with non-empty
1653 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
1654 parameter, defaulting to Global_Name_Buffer.
1655 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
1656 Bounded_String parameter, no default.
1657 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
1658 Bounded_String instead of Global_Name_Buffer.
1659 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
1660 to Append_Entity_Name, and pass a Bounded_String parameter,
1661 instead of using globals.
1662 (Add_Source_Info): Pass a Bounded_String parameter, instead of
1664 (Expand_Source_Info): Use local instead of globals.
1665 * stringt.ads, stringt.adb (Append): Add an Append procedure
1666 for appending a String_Id onto a Bounded_String.
1667 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
1669 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
1670 Adjust_Name_Case parameter.
1671 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
1672 Set_Casing; that's the default.
1673 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
1674 protected subprograms are entry calls; otherwise it is not possible to
1675 distinguish them from regular subprogram calls.
1677 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1679 * sem_ch13.adb (Has_Good_Profile): Improvement
1680 of error message. Now indicates subtype_mark of formal parameter
1681 rather than the formal's name, plus minor rewording.
1683 2016-04-18 Pascal Obry <obry@adacore.com>
1685 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
1687 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1689 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
1691 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1693 * par-ch4.adb, sem_prag.adb: Minor reformatting.
1695 2016-04-18 Bob Duff <duff@adacore.com>
1697 * sinput.ads, sinput.adb (Build_Location_String): Take a
1698 parameter instead of using a global variable. The function
1699 version no longer destroys the Name_Buffer.
1700 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
1701 parameter, which defaults to the Global_Name_Buffer, so some
1702 calls can avoid the global.
1703 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
1704 to avoid using globals. All but one call to Build_Location_String
1705 avoids the global. Only one call to String_From_Name_Buffer
1708 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1710 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
1712 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1714 * sem_eval.adb (Choice_Matches): Check the expression
1715 against the predicate values when the choice denotes a
1716 subtype with a static predicate.
1717 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
1718 tests for predicates.
1719 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
1720 is not static. (Is_Static_Subtype): A subtype with a dynamic
1721 predicate is not static.
1722 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
1723 (Is_Static_Subtype): Update the comment on usage.
1725 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1727 * sem_prag.adb (Analyze_Input_Item): Allow
1728 generic formals to appear as initialization items.
1730 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1732 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
1733 Has_Good_Profile): Additional error message to indicate that
1734 the second parameter of the subprogram must be a first subtype.
1736 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1738 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
1739 Use the pragma lookahead that determines whether a subprogram
1740 is to be inlined, when some level of backend optimization is
1742 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
1743 code used to create an instance body when needed for inlining.
1744 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
1745 call appears within an instantiation that is not a compilation
1746 unit, add a pending instantiation for the enclosing instance,
1747 so the backend can inline in turn the calls contained in the
1750 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1752 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
1753 that relates operations of the parent type to the operations of
1754 the derived type has three distinct sources:
1755 a) explicit operations of the derived type carry an
1756 Overridden_Operation that designates the operation in the
1758 b) Implicit operations that are inherited by the derived type
1759 carry an alias that may be an explicit subprogram (in which case
1760 it may have an Overridden_ Operation indicator) or may also be
1761 inherited and carry its own alias.
1762 c) If the parent type is an interface, the operation of the
1763 derived type does not override, but the interface operation
1764 indicates the operation that implements it.
1765 * sem_prag.adb: Minor reformatting.
1766 * sem_prag.adb (Check_External_Property): Update
1767 the comment on usage. Reimplement.
1769 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1771 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
1772 profiles such as ZFP, ceiling priority is not available.
1774 2016-04-18 Bob Duff <duff@adacore.com>
1776 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
1778 2016-04-18 Bob Duff <duff@adacore.com>
1780 * sem_elab.adb (Output_Calls): Use
1781 Get_Name_String, to clearly indicate that the global Name_Buffer
1782 is being used. The previous code used Is_Internal_Name, which
1783 returns a Boolean, but also has a side effect of setting the
1784 Name_Buffer. Then it called the other Is_Internal_Name, which uses
1785 the Name_Buffer for its input. And then it called Error_Msg_N,
1786 again using the Name_Buffer. We haven't eliminated the global
1787 usage here, but we've made it a bit clearer.
1788 This also allows us to have a side-effect-free version of
1790 * namet.ads, namet.adb: Provide a type Bounded_String, along with
1791 routines that can be used without using global variables. Provide
1792 Global_Name_Buffer so existing code can continue to use the
1793 global. Mark the routines that use globals as obsolete. New code
1794 shouldn't call the obsolete ones, and we should clean up existing
1795 code from time to time.
1796 Name_Find_Str is renamed as Name_Find.
1797 * namet.h: Changed as necessary to interface to the new version
1799 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
1802 2016-04-18 Yannick Moy <moy@adacore.com>
1804 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
1805 outside of GNATprove, hence it should not be removed.
1807 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1809 * sem_prag.adb (Analyze_Refinement_Clause):
1810 The refinement of an external abstract state can now mention
1811 non-external constituents.
1812 (Check_External_Property): Update all SPARK RM references.
1814 2016-04-18 Bob Duff <duff@adacore.com>
1816 * exp_intr.adb: Remove some duplicated code.
1818 2016-04-18 Yannick Moy <moy@adacore.com>
1820 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
1821 package spec and body out of SPARK.
1823 2016-04-18 Johannes Kanig <kanig@adacore.com>
1825 * spark_xrefs.ads: Minor comment update.
1827 2016-04-18 Johannes Kanig <kanig@adacore.com>
1829 * gnat1drv.adb (Gnat1drv): Force loading of System
1832 2016-04-18 Bob Duff <duff@adacore.com>
1834 * a-cuprqu.adb: Correction to previous change. If a new node
1835 is inserted at the front of the queue (because it is higher
1836 priority than the previous front node), we need to update
1837 Header.Next_Unequal -- not just in the case where the queue was
1840 2016-04-18 Bob Duff <duff@adacore.com>
1842 * a-cuprqu.ads: Change the representation of List_Type from a
1843 singly-linked list to a doubly-linked list. In addition, add a
1844 pointer Next_Unequal, which points past a possibly-long chain
1845 of equal-priority items. This increases efficiency, especially
1846 in the case of many equal-priority items.
1847 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
1848 advantage of new data structure.
1849 (Finalize): Rewrite in terms of Dequeue, for simplicity.
1851 2016-04-18 Yannick Moy <moy@adacore.com>
1853 * contracts.adb (Analyze_Object_Contract,
1854 Analyze_Protected_Contract): Remove tests performed in GNATprove.
1855 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
1856 Remove query for tests performed in GNATprove.
1858 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1860 * sem_aggr.adb (Resolve_Record_Aggregate): If
1861 Warn_On_Redundant_Constructs is enabled, report a redundant box
1862 association that does not cover any components, as it done for
1863 redundant others associations in case statements.
1865 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1867 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
1868 Analyze the generated Check pragma for an inherited condition so
1869 that it does not freeze the dispatching type of the primitive
1870 operation, because it is pre-analyzed at the point of the
1871 subprogram declaration (and not in the subprogram body, as is
1872 done during regular expansion).
1874 2016-04-18 Vincent Celier <celier@adacore.com>
1876 * ali.ads: Increase the range of all _Id types to 100 millions.
1878 2016-04-18 Gary Dismukes <dismukes@adacore.com>
1880 * sem_warn.adb (Check_References): Change warning to suggest
1881 using pragma Export rather than saying "volatile has no effect".
1883 2016-04-18 Bob Duff <duff@adacore.com>
1885 * g-souinf.ads (Compilation_ISO_Date): New function to return
1886 the current date in ISO form.
1887 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
1888 a call to Compilation_ISO_Date into a string literal containing
1889 the current date in ISO form.
1890 * exp_intr.ads (Add_Source_Info): Improve documentation.
1891 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
1892 Compilation_ISO_Date.
1893 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
1895 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1897 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
1898 to subtypes that are not first subtypes.
1900 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1902 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
1904 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
1905 generated pragmas after subprogram declaration, rather than in
1906 the corresponding subprogram body.
1907 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
1908 mode, if the operation is overridding, call
1909 Collect_Inherited_Class_Wide_Conditions to generate the
1910 corresponding pragmas immediately after the corresponding
1911 subprogram declaration.
1913 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1915 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
1916 type to natural numbers.
1917 (Stype): document code characters for concurrent entities.
1919 2016-04-18 Olivier Hainque <hainque@adacore.com>
1921 * targparm.ads: Update the Frontend_Exceptions default internal
1923 (Frontend_Exceptions_On_Target): Change default value to True.
1925 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1927 * sem_ch4.adb (Analyze_Selected_Component): Refine error
1928 detection when a selected component in the body of a synchronized
1929 type is a reference to an object of the same type declared
1930 elsewhere. The construct is legal if the prefix of the selected
1931 component includes an explicit dereference at any point.
1933 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1935 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
1936 internally generated expressions when trying to determine whether
1937 a formal parameter of a tagged type subject to Extensions_Visible
1938 False is used to initialize an object.
1939 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
1940 internally generated expressions when trying to determine whether
1941 a formal parameter of a tagged type subject to Extensions_Visible
1942 False is used in a type conversion.
1944 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1946 * sem_res.adb (Is_Protected_Operation_Call):
1947 Add guards to account for a non-decorated selected component.
1949 2016-04-18 Yannick Moy <moy@adacore.com>
1951 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
1952 implementation of Body_Has_SPARK_Mode_On.
1953 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
1954 New function replacing previous Get_SPARK_Mode_From_Pragma, that
1955 deals also with aspects.
1956 (Get_SPARK_Mode_Type): Make function internal again.
1957 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
1958 Get_SPARK_Mode_From_Annotation.
1960 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1962 * contracts.adb (Analyze_Object_Contract): Update references to
1964 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
1965 * ghost.adb Add with and use clauses for Sem_Disp.
1966 (Check_Ghost_Derivation): Removed.
1967 (Check_Ghost_Overriding):
1968 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
1969 (Check_Ghost_Primitive): New routine.
1970 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
1971 Update references to SPARK RM. (Is_OK_Pragma): Update references
1972 to SPARK RM. Predicates are now a valid context for references
1974 * ghost.ads (Check_Ghost_Derivation): Removed.
1975 (Check_Ghost_Overriding): Update the comment on usage.
1976 (Check_Ghost_Primitive): New routine.
1977 (Check_Ghost_Refinement): New routine.
1978 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
1979 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
1980 related to Ghost derivations
1981 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1982 related to the convention-like behavior of pragma Ghost.
1983 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1984 of a tagged type and its primitive agree.
1985 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1986 RM. Move the verification of pragma Assertion_Policy Ghost
1987 to the proper place. Remove the now obsolete check related
1988 to Ghost derivations.
1989 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1990 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1992 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1994 * layout.adb: Fix more minor typos in comments.
1996 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1998 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
2000 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2002 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
2003 mode, collect inherited class-wide conditions to generate the
2004 corresponding pragmas.
2005 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
2006 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
2007 procedure for overriding subprograms, used to generate the pragmas
2008 corresponding to an inherited class- wide pre- or postcondition.
2009 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
2010 from contracts.adb (Replace_Condition_Entities): Subsidiary
2011 Build_Pragma_Check_Equivalent, to implement the proper semantics
2012 of inherited class-wide conditions, as given in AI12-0113.
2013 (Process_Class_Wide_Condition): Removed.
2014 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
2015 in contract of subprogram, to collect inherited class-wide
2017 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2019 2016-04-18 Yannick Moy <moy@adacore.com>
2021 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
2022 * a-calend.ads (Ada.Calendar): Mark package spec as
2023 SPARK_Mode and add synchronous external abstract state Clock_Time.
2025 2016-04-18 Yannick Moy <moy@adacore.com>
2027 * sem_res.adb (Resolve_Call): Prevent inlining of
2028 calls inside expression functions. Factor previous code issuing
2029 errors to call Cannot_Inline instead, which does appropriate
2030 processing of message for GNATprove.
2032 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2034 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
2035 osint-b.adb: Cleanups.
2037 2016-04-18 Yannick Moy <moy@adacore.com>
2039 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
2040 body to inline in GNATprove mode when SPARK_Mode On applies to
2042 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
2045 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2047 * layout.adb: Fix minor typo in comment.
2048 * inline.adb: Fix minor pasto.
2049 * sem_ch12.ads: Fix minor typos in comments.
2051 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2053 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
2054 handle some complex cases of tag indeterminate calls that are
2055 actuals in other dispatching calls that are themselves tag
2057 (Check_Dispatching_Context): Add parameter to support recursive
2058 check for an enclosing construct that may provide a tag for a
2059 tag-indeterminate call.
2061 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2063 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2064 Add global variables Task_Input_Seen and Task_Output_Seen.
2065 (Analyze_Global_Item): Detect an illegal use of the current
2066 instance of a single protected/task type in a global annotation.
2067 (Analyze_Input_Output): Inputs and output related to the current
2068 instance of a task unit are now tracked.
2069 (Check_Usage): Require
2070 the presence of the current instance of a task unit only when
2071 one input/output is available. (Current_Task_Instance_Seen):
2073 (Is_CCT_Instance): New parameter profile. Update
2074 the comment on usage. The routine now properly recognizes several
2075 cases related to single protected/task types.
2077 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2079 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
2080 to create a brand new freeze node. This handles a case where an
2081 ignored Ghost context is freezing something which is not ignored
2082 Ghost and whose freeze node should not be removed from the tree.
2083 (New_Freeze_Node): New routine.
2085 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2087 * sigtramp.h (__gnat_set_is_vxsim) New function to
2088 tell sigtramp-vxworks to handle vxsim signal contexts. *
2089 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
2090 differences in the sigcontext structure between the expected
2091 regular x86 or x86_64 ones and the ones received in case of
2092 exexution on the vxworks simulator.
2093 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
2094 this information to sigtramp-vxworks.c. Remove the old mechanism for
2096 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2098 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2100 * exp_ch3.adb (Inline_Init_Proc): New function returning
2101 whether the initialization procedure of a type should be
2102 inlined. Return again True for controlled type themselves.
2103 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
2104 (Build_Record_Init_Proc): Likewise.
2106 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2108 * gnatvsn.ads (Library_Version): Bump to 7.
2110 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2112 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
2113 on the entity of a subprogram declaration that is completed by
2114 an expression function.
2116 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2118 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
2119 declaration can appear in an aspect specification for a dynamic
2120 predicate, and a pragma for aspect Predicate_Failure.
2121 * exp_util.adb (Replace_Subtype_References): Replace current
2122 occurrences of the subtype to which a dynamic predicate applies,
2123 byt the expression that triggers a predicate check. Needed to
2124 implement new aspect Predicate_Failure.
2126 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2128 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
2129 * Makefile.rtl: update accordingly.
2131 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2133 * sem_type.adb (Disambiguate): Call Covers only when necessary
2134 for standard operators.
2136 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2138 * atree.ads (Num_Extension_Nodes): Add couple of figures
2140 * atree.adb: Add GNAT.Heap_Sort_G dependency.
2141 (Print_Statistics): New exported procedure to print statistics.
2143 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2145 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
2146 as to be inlined if the type needs finalization.
2148 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2150 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
2151 alignment for x86_64.
2152 * init.c: Better fix for guard page reset on x86_64-vx7.
2153 Do not try to retrieve the page that actually raised
2154 the signal as the probing mechanism used on x86_64 do not allow
2155 such retrieval. We thus just test if the guard page is active,
2156 and re-activate it if not.
2158 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2160 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
2163 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
2165 * affinity.c: Use the proper type for task id.
2166 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
2168 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2170 * sem_prag.adb (Process_Convention): Relax rule on exporting
2171 Intrinsic types if Relaxed_RM_Semantics is True.
2173 2016-04-18 Vincent Celier <celier@adacore.com>
2175 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
2176 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
2177 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
2178 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
2179 exp_ch3.ads, exp_unst.adb: Change "descendent" to
2180 "descendant" in comments, error messages and identifiers.
2181 * gcc-interface/decl.c: Ditto.
2183 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2185 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
2186 New_S only once at the beginning of the function.
2188 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
2190 * gcc-interface/decl.c (components_to_record): Restrict the previous
2191 change to fields with variable size.
2193 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
2195 * gcc-interface/decl.c (components_to_record): Add special case for
2196 single field with representation clause at offset 0.
2198 2016-03-16 Svante Signell <svante.signell@gmail.com>
2200 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
2201 * s-osinte-gnu.ads: New file.
2203 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
2205 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
2206 (Stack_Check_Limits): Set to False.
2207 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
2208 (Stack_Check_Limits): Set to False.
2209 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
2210 (Stack_Check_Limits): Set to False.
2211 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
2212 (Stack_Check_Limits): Set to False.
2213 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
2214 (Stack_Check_Limits): Set to False.
2216 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2218 * gcc-interface/trans.c (statement_node_p): New predicate.
2219 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
2220 not return dummy results for expressions attached to packed array
2221 implementation types.
2223 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
2225 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
2226 the expression of a renaming manually in case #3.
2228 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
2230 * system-linux-s390.ads: Enable Stack_Check_Probes.
2231 * system-linux-s390.ads: Likewise.
2233 2016-02-29 Martin Liska <mliska@suse.cz>
2235 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
2236 Replace ENABLE_CHECKING macro with flag_checking.
2238 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2240 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
2241 handling of unconstrained array types as designated types into common
2242 processing. Also handle array types as incomplete designated types.
2244 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2246 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
2247 ASIS mode, fully lay out the minimal record type.
2249 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2251 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
2252 (build_return_expr): Likewise.
2253 (Call_to_gnu): If this is a function call and there is no target,
2254 create a temporary for the return value for all aggregate types,
2255 but never create it for a return statement. Push a binding level
2256 around the call in more cases. Remove obsolete code.
2258 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
2260 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
2261 * gcc-interface/gigi.h (gigi): Remove useless attribute.
2262 (gnat_gimplify_expr): Likewise.
2263 (gnat_to_gnu_external): Declare.
2264 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
2265 code dealing with the expression of external constants into...
2266 Invoke gnat_to_gnu_external instead.
2267 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
2268 when not for a definition. Deal with COMPOUND_EXPR and variables with
2269 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
2270 'reference to a function call in a renaming. Remove obsolete test and
2271 adjust associated comment.
2272 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
2273 temporaries created to hold the return value, if any.
2274 (gnat_to_gnu_external): ...this. New function.
2275 * gcc-interface/utils.c (create_var_decl): Detect a constant created
2276 to hold 'reference to function call.
2277 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
2278 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
2280 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2282 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
2283 the prefix denotes an entity which Has_Atomic_Components.
2284 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
2285 denotes an entity which Has_Atomic_Components.
2287 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
2289 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
2290 for fat pointer or scalar types.
2292 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2294 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
2295 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
2296 Call maybe_character_value on the array bounds. Get to the base type
2297 of the index type and call maybe_debug_type on it.
2298 * gcc-interface/utils.c (finish_character_type): Add special treatment
2301 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
2303 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
2304 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
2306 2016-02-12 Jakub Jelinek <jakub@redhat.com>
2308 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
2309 neighbour -> neighbor.
2310 * prep.adb: Likewise.
2311 * prj.ads: Likewise.
2312 * prepcomp.adb: Likewise.
2313 * g-socket.ads: Likewise.
2314 * s-imgrea.adb: Likewise.
2315 * a-calend.adb: Likewise.
2316 * exp_disp.adb: Likewise.
2317 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
2318 * g-socket.adb: Likewise.
2319 * sem_ch12.adb: Likewise.
2320 * terminals.c: Likewise.
2322 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2324 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
2325 build_common_tree_nodes.
2327 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
2329 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
2330 DECL_IGNORED_P last.
2332 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
2334 * gcc-interface/gigi.h (enum attr_type): Rename into...
2335 (enum attrib_type): ...this.
2336 (struct attrib): Adjust.
2337 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
2339 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
2341 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
2342 literal if the entity is of a character type.
2343 * gcc-interface/lang.opt (fsigned-char): New option.
2344 * gcc-interface/misc.c (gnat_handle_option): Accept it.
2345 (gnat_init): Adjust comment.
2346 * gcc-interface/gigi.h (finish_character_type): New prototype.
2347 (maybe_character_type): New inline function.
2348 (maybe_character_value): Likewise.
2349 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
2350 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2351 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
2352 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
2353 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
2354 Copy TYPE_STRING_FLAG from type to subtype.
2355 <E_Array_Type>: Deal with character index types.
2356 <E_Array_Subtype>: Likewise.
2357 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
2358 char_type_node throughout.
2359 (build_raise_check): Likewise.
2360 (get_type_length): Deal with character types.
2361 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
2363 <Attr_Pred>: Likewise.
2364 (Loop_Statement_to_gnu): Likewise.
2365 (Raise_Error_to_gnu): Likewise.
2366 <N_Indexed_Component>: Deal with character index types. Remove
2368 <N_Slice>: Likewise.
2369 <N_Type_Conversion>: Deal with character types. Minor tweak.
2370 <N_Unchecked_Type_Conversion>: Likewise.
2372 <N_Op_Eq>: Likewise.
2373 (emit_index_check): Delete.
2374 * gcc-interface/utils.c (finish_character_type): New function.
2375 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
2376 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
2377 with char_type_node.
2378 (build_call_raise): Likewise.
2379 (build_call_raise_column): Likewise.
2380 (build_call_raise_range): Likewise.
2382 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2384 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
2385 (build_call_raise_range): Likewise.
2386 (gnat_unsigned_type): Delete.
2387 (gnat_signed_type): Likewise.
2388 (gnat_signed_or_unsigned_type_for): New prototype.
2389 (gnat_unsigned_type_for): New inline function.
2390 (gnat_signed_type_for): Likewise.
2391 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
2392 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
2393 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
2394 and compute their base type from that.
2395 <E_Array_Subtype>: Remove duplicate declaration.
2396 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
2397 * gcc-interface/trans.c (get_type_length): Likewise.
2398 (Attribute_to_gnu): Likewise.
2399 (Loop_Statement_to_gnu): Likewise.
2400 (Call_to_gnu): Likewise.
2401 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
2402 and gnat_signed_type_for. Minor tweaks.
2403 (build_binary_op_trapv): Likewise.
2404 (emit_check): Likewise.
2405 (convert_with_check): Likewise.
2406 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
2407 functions. Minor tweaks.
2408 (Case_Statement_to_gnu): Remove dead code.
2409 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
2410 (init_code_table): Minor reordering.
2411 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
2412 (gnat_signed_type): Likewise.
2413 (gnat_signed_or_unsigned_type_for): New function.
2414 (unchecked_convert): Use directly the size in the test for precision
2415 vs size adjustments.
2416 (install_builtin_elementary_types): Call gnat_signed_type_for.
2417 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
2419 (build_goto_raise): New function taken from...
2420 (build_call_raise): ...here. Call it.
2421 (build_call_raise_column): Add KIND parameter and call it.
2422 (build_call_raise_range): Likewise.
2424 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2426 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
2427 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
2428 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
2429 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
2430 and tweak gnat_encodings tests throughout.
2431 (initial_value_needs_conversion): Likewise.
2432 (intrin_arglists_compatible_p): Likewise.
2433 * gcc-interface/misc.c (gnat_print_type): Likewise.
2434 (gnat_get_debug_type): Likewise.
2435 (gnat_get_fixed_point_type_info): Likewise.
2436 (gnat_get_array_descr_info): Likewise.
2437 (get_array_bit_stride): Likewise.
2438 (gnat_get_type_bias): Fix formatting.
2439 (enumerate_modes): Likewise.
2440 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2441 (add_decl_expr): Simplify NULL_TREE test.
2442 (end_stmt_group): Likewise.
2443 (build_binary_op_trapv): Fix formatting.
2444 (get_exception_label): Use switch statement.
2445 (init_code_table): Move around.
2446 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
2447 (gnat_poplevel): Likewise.
2448 (gnat_set_type_context): Likewise.
2449 (defer_or_set_type_context): Fix formatting.
2450 (gnat_pushdecl): Simplify NULL_TREE test.
2451 (maybe_pad_type): Likewise.
2452 (add_parallel_type): Likewise.
2453 (create_range_type): Likewise.
2454 (process_deferred_decl_context): Likewise.
2455 (convert): Likewise.
2456 (def_builtin_1): Likewise.
2457 * gcc-interface/utils2.c (find_common_type): Likewise.
2458 (build_binary_op): Likewise.
2459 (gnat_rewrite_reference): Likewise.
2460 (get_inner_constant_reference): Likewise.
2462 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
2465 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
2466 the parent function instead of the current function in order to issue
2467 the warning or the error. Add guard for ignored functions.
2469 2016-01-17 Jakub Jelinek <jakub@redhat.com>
2471 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
2473 2016-01-15 Jakub Jelinek <jakub@redhat.com>
2475 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
2476 of char * for path_val to avoid warnings.
2478 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
2480 * gcc-interface/utils.c: Bump copyright year.
2481 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
2482 the current lexical scope.
2484 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2486 * gnat_ugn.texi: Bump @copying's copyright year.
2487 * gnat_rm.texi: Likewise.
2489 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
2491 * gnatvsn.ads: Bump copyright year.
2494 Copyright (C) 2016 Free Software Foundation, Inc.
2496 Copying and distribution of this file, with or without modification,
2497 are permitted in any medium without royalty provided the copyright
2498 notice and this notice are preserved.