1 2016-06-14 Bob Duff <duff@adacore.com>
3 * sem_elab.adb (Check_A_Call): Do nothing if the callee is
4 (or is in) an instance, and the caller is outside. Misc cleanup.
6 2016-06-14 Javier Miranda <miranda@adacore.com>
8 * sem_ch4.adb (Analyze_Quantified_Expression):
9 Generating C code avoid spurious warning on loop variable of
10 inlinined postconditions.
12 2016-06-14 Javier Miranda <miranda@adacore.com>
14 * sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
15 (Analyze_Attribute [Attribute_Old]): Generating C handle
16 analysis of 'old in inlined postconditions.
17 (Analyze_Attribute [Attribute_Result]): Generating C handle analysis
18 of 'result in inlined postconditions.
19 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
20 Generating C handle expansion of 'old in inlined postconditions.
21 * inline.adb (Declare_Postconditions_Result): New subprogram.
22 * sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
23 aspects when generating C code since pre/post conditions are
24 inlined and the frontend inlining relies on this routine to
26 * exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
28 * exp_unst.adb (Visit_Node): Searching for up-level references
29 skip entities defined in inlined subprograms.
31 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
33 * sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
36 2016-06-14 Bob Duff <duff@adacore.com>
38 * sem_elab.adb: Do nothing if the callee is intrinsic.
39 * sinfo.ads, einfo.ads: Minor comment fixes.
41 2016-06-14 Ed Schonberg <schonberg@adacore.com>
43 * contracts.adb (Has_Null_Body): Move to sem_util, for general
45 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
46 determine when an internal procedure created for some assertion
47 checking (e.g. type invariant) is a null procedure. Used to
48 eliminate redundant calls to such procedures when they apply to
49 components of composite types.
50 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
51 if invariant procedure has a null body.
53 2016-06-14 Thomas Quinot <quinot@adacore.com>
55 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
58 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
60 * exp_ch4.adb (Process_Action): Pass the action
61 list to Process_Transient_Object.
62 (Process_If_Case_Statements): Pass the action list to
63 Process_Transient_Object.
64 (Process_Transient_Object): Add new parameter Stmts and update the
65 comment on usage. When the context is a Boolean evaluation, insert
66 any finalization calls after the last statement of the construct.
68 2016-06-14 Tristan Gingold <gingold@adacore.com>
70 * einfo.adb, einfo.ads (Has_Timing_Event,
71 Set_Has_Timing_Event): Add Has_Timing_Event flag.
72 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
73 (Propagate_Type_Has_Flags): New procedure to factorize code.
74 * exp_ch3.adb (Expand_Freeze_Array_Type,
75 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
76 * sem_ch3.adb (Access_Type_Decalaration): Initialize
77 Has_Timing_Event flag. (Analyze_Object_Declaration):
78 Move code that check No_Local_Timing_Events near
79 the code that check No_Local_Protected_Objects.
80 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
81 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
82 Process_Full_View) (Record_Type_Definition): Call
83 Propagate_Type_Has_Flags.
84 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
85 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
87 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
88 * sem_ch9.adb (Analyze_Protected_Definition): Call
89 Propagate_Type_Has_Flags.
91 2016-06-14 Arnaud Charlet <charlet@adacore.com>
93 * sem.ads: Minor style fix.
95 2016-06-14 Ed Schonberg <schonberg@adacore.com>
97 * sem_ch12.adb (Analyze_Associations): An actual parameter
98 with a box must be included in the count of actuals, to detect
99 possible superfluous named actuals that do not match any of the
100 formals of the generic unit in a formal package declaration.
102 2016-06-14 Justin Squirek <squirek@adacore.com>
104 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
105 of error output related to SPARK RM 6.1.7(3) and pragma
107 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
108 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
109 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
110 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
111 so that the values True and False are no longer surrounded by
113 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
114 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
116 2016-06-14 Arnaud Charlet <charlet@adacore.com>
118 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
120 * freeze.adb: Minor grammar fix in comment.
121 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
123 * lib.adb: Minor reformatting.
124 * sem_util.adb (Is_OK_Volatile_Context): Do
125 include Address in the supported attributes.
127 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
129 * exp_ch4.adb (Expand_N_Case_Expression):
130 Code cleanup. Finalize any transient controlled
131 objects on exit from a case expression alternative.
132 (Expand_N_If_Expression): Code cleanup.
133 (Process_Actions): Removed.
134 (Process_If_Case_Statements): New routine.
135 (Process_Transient_Object): Change the name of formal Rel_Node to
136 N and update all occurrences. Update the comment on usage. When
137 the type of the context is Boolean, the proper insertion point
138 for the finalization call is after the last declaration.
140 2016-06-14 Ed Schonberg <schonberg@adacore.com>
142 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
143 predicate to determine whether an entity appears in a context
144 for which a Deferred_Reference was created, because it is not
145 possible to determine when reference is analyzed whether it
146 appears in a context in which the entity is modified.
147 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
148 on assignment for an entity that has a deferred_reference.
150 2016-06-14 Javier Miranda <miranda@adacore.com>
152 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
153 come from source. Previously the reference was generated only if the
154 call comes from source but the call may be rewritten by the expander
155 thus causing the notification of spurious warnings.
157 2016-06-14 Arnaud Charlet <charlet@adacore.com>
159 * gnat1drv.adb: Remove further references to AAMP.
160 * checks.adb (Apply_Scalar_Range_Check): Take
161 Check_Float_Overflow info account.
162 * live.ads, live.adb Added subprogram headers and
163 start-of-processing-for comments.
164 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
165 checks when instantiating runtime units in CodePeer mode.
167 2016-06-14 Arnaud Charlet <charlet@adacore.com>
169 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
172 2016-06-14 Arnaud Charlet <charlet@adacore.com>
174 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
175 simple value propagation in CodePeer mode when warnings are disabled.
176 (Scan_Front_End_Switches): Enable relevant front-end switches
179 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
181 * sem_util.adb (Is_OK_Volatile_Context): A
182 reference to a volatile object is considered OK if appears as
183 the prefix of attributes Address, Alignment, Component_Size,
184 First_Bit, Last_Bit, Position, Size, Storage_Size.
186 2016-06-14 Yannick Moy <moy@adacore.com>
188 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
189 subunits directly, as they are already traversed as part of the
190 top-level unit to which they belong.
191 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
192 (Generate_Dereference): Use unique definition place for special
193 variable __HEAP, to ensure correct sorting of references.
194 * lib-xref.adb (Generate_Reference): Use top-level unit in case
196 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
197 compute the top-level code unit for a source location of AST node,
198 that go past subunits.
200 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
202 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
203 PARM_DECL when the parameter type is dummy.
204 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
207 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
209 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
210 PLUS_EXPR in the expression of a renaming.
212 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
214 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
215 with calls to malloc.
217 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
219 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
220 constant, use the generic implementation of the middle-end; otherwise
221 turn the dynamic conditions into static conditions and simplify.
223 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
225 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
227 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
229 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
230 gnat_entity_name with temporary names for XUP and XUT types.
232 2016-06-10 Martin Sebor <msebor@redhat.com>
235 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
236 the nonnull attribute in type-generic builtins.
238 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
240 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
241 types are present before returning them. Remove final assertion.
242 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
244 <E_Protected_Type>: Likewise.
246 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
248 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
249 not elaborate Itypes.
251 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
253 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
254 for noinline and noclone attributes.
255 (handle_noinline_attribute): New handler.
256 (handle_noclone_attribute): Likewise.
258 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
260 * gcc-interface/trans.c (process_type): Beef up comment.
262 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
264 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
265 placeholder expressions here but...
266 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
267 Make an exception to the protection of a CALL_EXPR result with an
268 unconstrained type only in the same cases as Call_to_gnu.
270 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
272 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
273 with boolean rvalues and set the location directly. Do not set the
274 location in the other cases for a simple name.
275 (gnat_to_gnu_external): Clear the location on the expression.
277 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
279 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
280 useless 'else' statements and tidy up.
281 <E_Array_Subtype>: Fully deal with the declaration here.
282 <E_Incomplete_Type>: Use properly-typed constant.
283 Assert that we don't apply the special type treatment to dummy types.
284 Separate this treatment from the final back-annotation and simplify
285 the condition for the RM size.
286 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
287 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
288 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
290 (process_freeze_entity): Remove obsolete code.
291 (process_type): Minor tweaks.
293 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
295 * einfo.ads (Returns_Limited_View): Remove.
296 (Set_Returns_Limited_View ): Likewise.
297 * einfo.adb (Returns_Limited_View): Likewise.
298 (Set_Returns_Limited_View ): Likewise.
299 * freeze.adb (Late_Freeze_Subprogram): Remove.
300 (Freeze_Entity): Do not defer the freezing of functions returning an
301 incomplete type coming from a limited context.
303 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
305 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
306 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
307 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
308 of profiles for builtins here... Call gnu_ext_name_for_subprog.
309 Also update profiles if pointers to limited_with'ed types are
311 (gnat_to_gnu_param): Restore the correct source location information
312 for vector ABI warnings.
313 (associate_subprog_with_dummy_type): Add comment about AI05-019.
314 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
315 (update_profile): Deal with builtin declarations.
316 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
317 (update_profiles_with): Add comment.
318 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
319 Likewise for parameter declarations in most cases. Do not change
320 the return type for the CICO mechanism if the profile is incomplete.
321 ...but here instead. Always reset the slot for the parameters.
322 * gcc-interface/utils.c (create_subprog_decl): Call
323 gnu_ext_name_for_subprog. Do not set the assembler name here but...
324 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
326 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
328 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
329 declaration of the corresponding record type before that of the
330 unprotected version of the subprograms that operate on it.
331 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
332 just before the original type.
333 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
334 declaration to the newly created declaration for the primitive.
335 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
336 freezing of the subtype before its declaration.
337 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
338 declaration in the nearest enclosing scope for formal parameters too.
339 (Build_Derived_Access_Type): Restore the status of the created Itype
340 after it is erased by Copy_Node.
341 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
342 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
343 the specification is present.
344 Move around the code changing the designated view of the return type
345 and save the original view. Restore it on exit.
346 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
347 the declaration right after that of the type.
349 2016-06-01 Simon Wright <simon@pushface.org>
352 * g-comlin.adb (Display_Section_Help): Do not dereference
353 Config.Switches if it's null.
356 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
358 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
359 (Get_Page_Size): Remove duplicate and return int.
361 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
364 * s-osinte-rtems.ads (clock_getres): Define.
365 (Get_Page_Size): Remove duplicate and return int.
367 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
369 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
370 Make same-sized subtypes of signed base types signed.
371 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
372 (unchecked_convert): Likewise.
374 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
376 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
377 a specific type for the object if it is deemed a constant.
379 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
381 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
382 components of any elementary types and of composite types.
384 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
386 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
387 of testing for individual sizes.
388 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
389 array types, in particular test for suitable sizes upfront and do not
390 mimic the processing that will be redone later in Freeze_Array_Type.
392 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
394 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
397 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
399 * doc/gnat_rm/implementation_defined_attributes.rst
400 (Scalar_Storage_Order): Adjust restriction for packed array types.
401 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
402 (Is_Packed): Likewise.
403 (Is_Packed_Array_Impl_Type): Likewise.
404 (Packed_Array_Impl_Type): Likewise.
405 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
406 if the prefix is not a packed array implemented specially.
407 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
408 bit-packed array types.
409 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
410 the PAT before analyzing its declaration.
411 (Create_Packed_Array_Impl_Type): Remove redundant statements.
412 * freeze.adb (Check_Component_Storage_Order): Reject packed array
413 components only if they are bit packed.
414 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
415 pack for composite types whose size is multiple of a byte.
416 Create the implementation type for packed array types only when it is
417 needed, i.e. bit packing or packing because of holes in index types.
418 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
419 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
420 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
421 Call maybe_pad_type instead of building the padding type manually.
422 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
423 Packed_Array_Impl_Type is present for packed arrays.
424 (gnat_to_gnu_component_type): Also handle known alignment for packed
425 types by passing it to make_packable_type.
426 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
427 and deal with it in the array case. Adjust recursive call. Simplify
428 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
430 2016-05-16 Thomas Quinot <quinot@adacore.com>
432 * freeze.adb (Check_Component_Storage_Order): Also get full view of
435 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
437 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
438 to capture the value for a small not by-reference record type.
439 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
440 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
442 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
443 variable name in array type case. For the computation of the packed
444 size, deal with record components and remove redundant test.
445 (Freeze_Array_Type): Also adjust packing status when the size of the
446 component type is in the range 33 .. 64 bits.
447 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
448 into elementary type throughout. Minor tweaks.
449 (Alignment Clauses): Document actual alignment of packed array types.
450 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
451 "simple" to the record case. Document effect on non packable types.
452 (Pragma Pack for Records): Likewise. Add record case and adjust.
454 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
456 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
457 cross case, use host_noncanonical instead of host as prefix.
458 (GNATBIND_FOR_HOST): Likewise.
459 (GNATLINK_FOR_HOST): Likewise.
460 (GNATLS_FOR_HOST): Likewise.
462 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
465 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
466 * system-linux-armeb.ads: Likewise.
467 * system-linux-mips64el.ads: Likewise.
468 * system-linux-mips.ads: Likewise.
469 * system-linux-mipsel.ads: Likewise.
470 * system-linux-ppc64.ads: Likewise.
471 * system-linux-sparcv9.ads: Likewise.
472 * system-rtems.ads: Likewise.
474 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
476 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
477 instead of __getpagesize.
479 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
481 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
484 2016-05-02 Tristan Gingold <gingold@adacore.com>
486 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
489 2016-05-02 Ed Schonberg <schonberg@adacore.com>
491 * sem_util.adb (Aggregate_Constraint_Checks): Separate
492 accessibility checks and non-null checks for aggregate components,
493 to prevent spurious accessibility errors.
495 2016-05-02 Ed Schonberg <schonberg@adacore.com>
497 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
498 always legal in the in-place initialization of a limited entity
500 * sem_res.adb (Resolve_Allocator): Improve error message with RM
501 reference when allocator expression is illegal.
503 2016-05-02 Ed Schonberg <schonberg@adacore.com>
505 * exp_ch6.adb (Expand_Call): When inlining a call to a function
506 declared in a package instance, locate the instance node of the
507 package after the actual package declaration. skipping over
508 pragmas that may have been introduced when the generic unit
509 carries aspects that are transformed into pragmas.
511 2016-05-02 Bob Duff <duff@adacore.com>
513 * s-memory.adb (Alloc, Realloc): Move checks
514 for Size = 0 or size_t'Last into the Result = System.Null_Address
515 path for efficiency. Improve comments (based on actual C language
516 requirements for malloc).
517 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
518 case where we are using the default Global_Pool_Object, and we
519 don't need the heavy finalization machinery.
521 2016-05-02 Gary Dismukes <dismukes@adacore.com>
523 * exp_util.ads, sem_ch12.adb: Minor reformatting.
525 2016-05-02 Javier Miranda <miranda@adacore.com>
527 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
528 (Remove_Side_Effects): Adding a new formal.
529 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
530 call to the _Postconditions procedure ensure that side-effects
531 are unconditionally removed.
533 2016-05-02 Ed Schonberg <schonberg@adacore.com>
535 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
536 Use original node to determine whether the declaration is for
537 a formal type declaration, to take into account that formwl
538 private types are rewritten as private extension declarations
539 to simplify semantic analysis.
541 2016-05-02 Gary Dismukes <dismukes@adacore.com>
543 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
546 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
548 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
551 2016-05-02 Ed Schonberg <schonberg@adacore.com>
553 * exp_ch4.adb (Expand_N_Allocator): If the designated type
554 is a private derived type with no discriminants, examine its
555 underlying_full_view to determine whether the full view has
556 defaulted discriminants, so their defaults can be used in the
557 call to the initialization procedure for the designated object.
559 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
561 * exp_prag.adb, comperr.adb: Minor reformatting.
563 2016-05-02 Ed Schonberg <schonberg@adacore.com>
565 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
566 unchecked conversion if the source size is 0 (indicating that
567 its RM size is unknown). This will happen with packed arrays of
568 non-discrete types, in which case the component type is known
571 2016-05-02 Arnaud Charlet <charlet@adacore.com>
573 * debug.adb: Reserve -gnatd.V.
575 2016-05-02 Javier Miranda <miranda@adacore.com>
577 * sem_ch3.adb (Process_Full_View): Remove from visibility
578 wrappers of synchronized types to avoid spurious errors with
579 their wrapped entity.
580 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
581 if no interface primitive is covered by the subprogram and this is
582 not a primitive declared between two views; see Process_Full_View.
583 (Build_Protected_Sub_Specification): Link the dispatching
584 subprogram with its original non-dispatching protected subprogram
585 since their names differ.
586 (Expand_N_Protected_Type_Declaration):
587 If a protected subprogram overrides an interface primitive then
588 do not build a wrapper if it was already built.
589 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
590 * sem_ch4.adb (Names_Match): New subprogram.
591 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
592 to library level and defined in the public part of the
593 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
594 (Has_Matching_Entry_Or_Subprogram): New subprogram.
595 (Report_Conflict): New subprogram.
597 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
599 * s-unstyp.ads: Code cleanups.
601 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
603 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
605 2016-05-02 Ed Schonberg <schonberg@adacore.com>
607 * exp_prag.adb (Expand_attributes_In_Consequence,
608 Expand_Attributes): If the prefix of'Old is an unconstrained type,
609 for example an unconstrained formal of the enclosing subprogram,
610 create an object declaration with an expression to obtain the
611 actual subtype of the temporary.
613 2016-05-02 Arnaud Charlet <charlet@adacore.com>
615 * comperr.adb (Delete_SCIL_Files): Add missing handling of
616 N_Subprogram_Declaration.
618 2016-05-02 Gary Dismukes <dismukes@adacore.com>
620 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
621 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
623 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
625 2016-05-02 Ed Schonberg <schonberg@adacore.com>
627 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
628 function call may be wrapped in an explicit type conversion.
630 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
632 * interfac.ads: use pragma No_Elaboration_Code_All.
633 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
635 2016-05-02 Ed Schonberg <schonberg@adacore.com>
637 * sem.adb (Analyze: If node is an error node previously created
638 by the parser, disable expansion to prevent subsequent glitches
641 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
643 * sem_ch13.adb (Alignment_Error): Removed.
644 (Get_Alignment_Value): Code cleanup.
646 2016-05-02 Tristan Gingold <gingold@adacore.com>
648 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
649 to check for the no local protected objects restriction.
651 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
653 * einfo.adb Anonymous_Master now uses Node35.
654 (Anonymous_Master): Update the assertion and node reference.
655 (Set_Anonymous_Master): Update the assertion and node reference.
656 (Write_Field35_Name): Add output for Anonymous_Master.
657 (Write_Field36_Name): The output is now undefined.
658 * einfo.ads Update the node and description of attribute
659 Anonymous_Master. Remove prior occurrences in entities as this
660 is now a type attribute.
661 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
662 Ins_Node. Anonymous access- to-controlled component types no
663 longer need finalization masters. The master is now built when
664 a related allocator is expanded.
665 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
666 detect whether the record type has at least one component of anonymous
667 access-to- controlled type. These types no longer need finalization
668 masters. The master is now built when a related allocator is expanded.
669 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
670 (Current_Anonymous_Master): Removed.
671 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
672 finalization master for an anonymous access-to-controlled type.
673 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
674 Call routine Build_Anonymous_Master to create a finalization master
675 for an anonymous access-to-controlled type.
676 * exp_ch7.adb (Allows_Finalization_Master): New routine.
677 (Build_Anonymous_Master): New routine.
678 (Build_Finalization_Master): Remove formal parameter
679 For_Anonymous. Use Allows_Finalization_Master to determine whether
680 circumstances warrant a finalization master. This routine no
681 longer creates masters for anonymous access-to-controlled types.
682 (In_Deallocation_Instance): Removed.
683 * exp_ch7.ads (Build_Anonymous_Master): New routine.
684 (Build_Finalization_Master): Remove formal parameter For_Anonymous
685 and update the comment on usage.
686 * sem_util.adb (Get_Qualified_Name): New routines.
687 (Output_Name): Reimplemented.
688 (Output_Scope): Removed.
689 * sem_util.ads (Get_Qualified_Name): New routines.
691 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
693 * debug.adb: Document the use of switch -gnatd.H.
694 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
696 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
697 * opt.ads: Add new option ASIS_GNSA_Mode.
698 * sem_ch13.adb (Alignment_Error): New routine.
699 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
700 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
702 (Check_Size): Use routine Size_Too_Small_Error to
703 suppress certain errors in ASIS mode.
704 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
706 (Size_Too_Small_Error): New routine.
708 2016-05-02 Arnaud Charlet <charlet@adacore.com>
710 * spark_xrefs.ads Description of the spark cross-references
711 clarified; small style fixes.
712 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
713 Detect_And_Add_SPARK_Scope): consider protected types and bodies
714 as yet another scopes.
715 (Enclosing_Subprogram_Or_Library_Package): refactored using
716 Hristian's suggestions; added support for scopes of protected
717 types and bodies; fix for entries to return the scope of the
718 enclosing concurrent type, which is consistent with what is
719 returned for protected subprograms.
720 * sem_intr.adb: Minor style fix in comment.
722 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
724 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
725 put_spark_xrefs.adb: Minor reformatting.
727 2016-05-02 Doug Rupp <rupp@adacore.com>
729 * g-traceb.ads: Document traceback for ARM.
731 2016-05-02 Javier Miranda <miranda@adacore.com>
733 * exp_disp.adb (Make_Tags): Do not generate the
734 external name of interface tags adding the suffix counter since
735 it causes problems at link time when the IP routines are inlined
736 across units with optimization.
738 2016-05-02 Ed Schonberg <schonberg@adacore.com>
740 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
741 that predicate checking is disabled for predicated subtypes in
742 the context of an Assertion_Policy pragma.
743 * checks.adb (Apply_Predicate_Check): Do nothing if
744 Predicates_Ignored is true.
745 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
746 Predicates_Ignores is true, the function Rep_To_Pos does raise
747 an exception for invalid data.
748 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
749 type do not apply check if Predicates_Ignored is true.
750 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
751 is true, sem_prag.adb:
752 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
753 is true do not emit predicate check on initializing expression.
755 2016-05-02 Arnaud Charlet <charlet@adacore.com>
757 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
758 they are declared; refine type of a counter from Integer to Natural.
759 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
760 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
761 exp_ch3.adb: Minor editing.
763 2016-05-02 Yannick Moy <moy@adacore.com>
765 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
767 2016-05-02 Yannick Moy <moy@adacore.com>
769 * lib-xref.adb: Minor style fix in whitespace of declarations.
770 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
771 refactored without loops.
772 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
774 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
775 of generic procedure.
777 2016-05-02 Arnaud Charlet <charlet@adacore.com>
779 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
780 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
781 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
782 and entry declarations.
783 * spark_xrefs.ads: minor typo in comment.
785 2016-05-02 Arnaud Charlet <charlet@adacore.com>
787 * make.adb: Minor: avoid an exception when calling gnatmake with
788 no argument and gnatmake is built with checks on.
789 * lib-xref-spark_specific.adb: Minor code cleanup.
791 2016-05-02 Ed Schonberg <schonberg@adacore.com>
793 * sem_util.adb (Normalize_Actuals): Take into account extra
794 actuals that may have been introduced previously. Normally extra
795 actuals are introduced when a call is expanded, but a validity
796 check may copy and reanalyze a call that carries an extra actual
797 (e.g. an accessibility parameter) before the call itself is
798 marked Analzyed, and the analysis of the copy has to be able to
799 cope with the added actual.
801 2016-05-02 Bob Duff <duff@adacore.com>
803 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
804 treeishness. Previous version had Context_Items shared between
807 2016-05-02 Ed Schonberg <schonberg@adacore.com>
809 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
810 record cases, apply predicate check on component for expression
811 only if expression has been analyzed already. For expressions
812 that need to be duplicated when they cover multiple components,
813 resolution and predicate checking take place later.
815 2016-05-02 Olivier Hainque <hainque@adacore.com>
817 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
818 and files therein, instead of local names after a change of
821 2016-05-02 Thomas Quinot <quinot@adacore.com>
823 * freeze.adb (Check_Component_Storage_Order): Get full view of
826 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
828 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
831 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
833 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
834 of the container base type in case the container is a subtype.
835 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
836 the selector has an entity when checking for a component of a
839 2016-05-02 Arnaud Charlet <charlet@adacore.com>
842 * opt.ads (Latest_Ada_Only): New flag.
843 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
844 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
845 * einfo.ads (Has_Predicates, Predicate_Function):
846 Clarify that Has_Predicates does not imply that Predicate_Function
847 will return a non-empty entity.
849 2016-05-02 Ed Schonberg <schonberg@adacore.com>
851 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
852 check if type requires it.
853 * checks.adb (Apply_Predicate_Check): Disable checks in the
854 object declaration created for an expression with side-effects
855 that requires a predicate check to prevent infinite recursion
858 2016-05-02 Ed Schonberg <schonberg@adacore.com>
860 * sem_ch6.adb (Process_Formals): Check properly the type of a
861 formal to determine whether a given convention applies to it.
863 2016-05-02 Doug Rupp <rupp@adacore.com>
865 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
867 2016-05-02 Thomas Quinot <quinot@adacore.com>
869 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
870 error, to have a component with implicit SSO within a composite type
871 that has explicit SSO.
873 2016-05-02 Bob Duff <duff@adacore.com>
875 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
877 2016-05-02 Ed Schonberg <schonberg@adacore.com>
879 * repinfo.adb (List_Entities): Make procedure recursive, to
880 provide representation information for subprograms declared
881 within subprogram bodies.
883 2016-05-02 Arnaud Charlet <charlet@adacore.com>
885 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
886 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
887 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
888 osint.adb: Remove dead code.
890 2016-05-02 Yannick Moy <moy@adacore.com>
892 * a-tigeli.adb (Get_Line): Fix bound for test to
893 decide when to compensate for character 0 added by call to fgets.
895 2016-05-02 Ed Schonberg <schonberg@adacore.com>
897 * sem_ch4.adb (Analyze_Allocator): If the expression does not
898 have a subtype indication and the type is an unconstrained tagged
899 type with defaulted discriminants, create an explicit constraint
900 for it during analysis to prevent out-of-order freezing actions
901 on generated classwide types.
903 2016-05-02 Javier Miranda <miranda@adacore.com>
905 * exp_ch5.adb (Expand_N_Assignment_Statement):
906 In the runtime check that ensures that the tags of source an
907 target match, add missing displacement of the pointer to the
908 objects if they cover interface types.
910 2016-05-02 Ed Schonberg <schonberg@adacore.com>
912 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
913 base type for attribute when type is discrete: transformation
914 is not needed for such types, and leads to spurious errors if
915 the context is a case construct.
917 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
919 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
920 operand #2 for COMPONENT_REF.
921 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
922 (gnat_protect_expr): Likewise.
923 (gnat_stabilize_reference_1): Likewise.
924 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
925 (get_inner_constant_reference): Likewise.
926 (gnat_invariant_expr): Likewise.
927 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
929 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
931 * gcc-interface/trans.c (Range_to_gnu): New static function.
932 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
933 (gnat_to_gnu) <N_In>: Likewise.
935 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
937 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
938 (check-acats): Use it.
939 (check_acats_targets): Likewise.
941 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
944 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
946 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
948 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
949 incomplete type without full view.
950 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
951 return the list of changes.
952 (Restore_Limited_Views): New procedure to undo the transformation made
953 by Exchange_Limited_Views.
954 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
955 and call Restore_Limited_Views at the end, if need be.
956 (Possible_Freeze): Do not delay freezing because of incomplete types.
957 (Process_Formals): Remove kludges for class-wide types.
958 * types.h (By_Copy_Return): Delete.
959 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
960 (TYPE_DUMMY_IN_PROFILE_P): New macro.
961 * gcc-interface/gigi.h (update_profiles_with): Declare.
962 (finish_subprog_decl): Likewise.
963 (get_minimal_subprog_decl): Delete.
964 (create_subprog_type): Likewise.
965 (create_param_decl): Adjust prototype.
966 (create_subprog_decl): Likewise.
967 * gcc-interface/decl.c (defer_limited_with): Rename into...
968 (defer_limited_with_list): ...this.
969 (gnat_to_gnu_entity): Adjust to above renaming.
970 (finalize_from_limited_with): Likewise.
971 (tree_entity_vec_map): New structure.
972 (gt_pch_nx): New helpers.
973 (dummy_to_subprog_map): New hash table.
974 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
975 add FIRST parameter. Deal with the mechanism here instead of...
976 Do not make read-only variant of types. Simplify expressions.
977 In the by-ref case, test the mechanism before must_pass_by_ref
978 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
979 (gnat_to_gnu_subprog_type): New static function extracted from...
980 Do not special-case the type_annotate_only mode. Call
981 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
982 Deal with dummy return types. Likewise for parameter types. Deal
983 with by-reference types explicitly and add a kludge for null procedures
984 with untagged incomplete types. Remove assertion on the types and be
985 prepared for multiple elaboration of the declarations. Skip the whole
986 CICO processing if the profile is incomplete. Handle the completion of
987 a previously incomplete profile.
988 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
989 Adjust couple of calls to create_param_decl.
990 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
991 Remove specific deferring code.
992 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
993 Simplify handling of dummy types and remove obsolete comment.
994 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
996 <E_Access_Subtype>: Tweak comment and simplify condition.
997 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
998 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
1000 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
1001 inner break statements. Tidy up condition guarding direct use of the
1003 (get_minimal_subprog_decl): Delete.
1004 (finalize_from_limited_with): Call update_profiles_with on dummy types
1005 with TYPE_DUMMY_IN_PROFILE_P set.
1006 (is_from_limited_with_of_main): Delete.
1007 (associate_subprog_with_dummy_type): New function.
1008 (update_profile): Likewise.
1009 (update_profiles_with): Likewise.
1010 (gnat_to_gnu_profile_type): Likewise.
1011 (init_gnat_decl): Initialize dummy_to_subprog_map.
1012 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
1013 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
1014 TYPE_UNIVERSAL_ALIASING_P.
1015 (gnat_get_array_descr_info): Minor tweak.
1016 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
1017 (build_raise_check): Likewise.
1018 (Compilation_Unit_to_gnu): Likewise.
1019 (Identifier_to_gnu): Accept mismatches coming from a limited context.
1020 (Attribute_to_gnu): Remove kludge for dispatch table entities.
1021 (process_freeze_entity): Do not retrieve old definition if there is an
1022 address clause on the entity. Call update_profiles_with on dummy types
1023 with TYPE_DUMMY_IN_PROFILE_P set.
1024 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
1025 TYPE_REFERENCE_TO to the fat pointer type.
1026 (create_subprog_type): Delete.
1027 (create_param_decl): Remove READONLY parameter.
1028 (finish_subprog_decl): New function extracted from...
1029 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
1030 VOLATILE_FLAG parameters and adjust.
1031 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
1034 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1036 * aa_util.adb, aa_util.ads: Removed, no longer used.
1038 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1040 * sem_prag.adb (Analyze_Pragma): An object
1041 renaming declaration resulting from the expansion of an object
1042 declaration is a suitable context for pragma Ghost.
1044 2016-04-27 Doug Rupp <rupp@adacore.com>
1046 * init.c: Refine last checkin so the only requirement is the
1047 signaling compilation unit is compiled with the same mode as
1048 the compilation unit containing the initial landing pad.
1050 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1052 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1053 specifications for Default_Iterator, including overloaded cases
1054 where no interpretations are legal, and return types that are
1057 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1059 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1060 an accessibility check when the left hand side of the assignment
1061 denotes a container cursor.
1062 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1063 * sem_ch4.adb (Find_Indexing_Operations): New routine.
1064 (Try_Container_Indexing): Code cleanup.
1066 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1068 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1070 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1072 * errout.adb, errutil.adb: Minor reformatting.
1074 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1076 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1077 Check that the classwide version is illegal when the prefix is
1078 an operation of an untagged synchronized type.
1080 2016-04-27 Arnaud Charlet <charleT@adacore.com>
1082 * sinput-l.ads, sem_ch13.adb: Minor editing.
1084 2016-04-27 Doug Rupp <rupp@adacore.com>
1086 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1087 Bump the pc so the lower order bit is set.
1089 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1091 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1092 enabled, report an empty range in a case construct.
1094 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1096 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1097 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1099 2016-04-27 Bob Duff <duff@adacore.com>
1101 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1102 as is done for the other containers.
1104 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1106 * ghost.adb (In_Subprogram_Body_Profile): New routine.
1107 (Is_OK_Declaration): Treat an unanalyzed expression
1108 function as an OK context. Treat a reference to a Ghost entity
1109 as OK when it appears within the profile of a subprogram body.
1111 2016-04-27 Bob Duff <duff@adacore.com>
1113 * errout.ads: Document the fact that informational messages
1114 don't have to be warnings.
1115 * errout.adb (Error_Msg_Internal): In statistics counts, deal
1116 correctly with informational messages that are not warnings.
1117 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1118 Set_Posted already checks for errors and ignores others.
1119 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1120 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1121 implies Is_Warning_Msg.
1122 * errutil.adb (Error_Msg): In statistics counts, deal correctly
1123 with informational messages that are not warnings.
1125 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1127 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1128 to determine whether a record type is a null record.
1129 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1130 null record and there is no expression in the declaration,
1131 no predicate check applies to the object.
1133 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1135 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1136 instantiated package should not cause freezing of previous contracts.
1138 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1140 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1141 that do not come from source.
1142 (Analyze_Dimension_Subtype_Declaration): Allow confirming
1143 dimensions on subtype entity, either inherited from base type
1144 or provided by aspect specification.
1146 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1148 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1149 Add scalar formal object Zero, to allow detection and report
1150 when the matrix is singular.
1151 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1152 Raise Constraint_Error if the Forward_Eliminate pass has
1153 determined that determinant is Zero.o
1154 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1156 * s-ngcoar.adb (Solve): Ditto.
1158 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1160 * sem_ch3.adb: Minor reformatting.
1162 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1164 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1165 that identifier has a usable type before analysis, to handle
1166 properly identifiers introduced after some lexical/syntactic
1167 recovery that created new identifiers.
1169 2016-04-27 Bob Duff <duff@adacore.com>
1171 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1172 exp_util.adb: Remove assertions that can fail in obscure cases when
1173 assertions are turned on but tampering checks are turned off.
1175 2016-04-27 Javier Miranda <miranda@adacore.com>
1177 * exp_ch6.adb (Add_Call_By_Copy_Code,
1178 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1179 whose type comes from the limited view.
1181 2016-04-27 Yannick Moy <moy@adacore.com>
1183 * a-textio.adb: Complete previous patch.
1185 2016-04-27 Yannick Moy <moy@adacore.com>
1187 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1188 Error_Msg_N to issue message about impossibility to inline call,
1189 with slight change of message.
1191 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1193 * exp_spark.adb (Expand_Potential_Renaming): Removed.
1194 (Expand_SPARK): Update the call to expand a potential renaming.
1195 (Expand_SPARK_Potential_Renaming): New routine.
1196 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1197 * sem.adb Add with and use clauses for Exp_SPARK.
1198 (Analyze): Expand a non-overloaded potential renaming for SPARK.
1200 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1202 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1203 check full view for the presence of defaulted discriminants,
1204 even when the partial view of a private type has no visible and
1205 no unknown discriminants.
1207 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1209 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1211 2016-04-27 Nicolas Roche <roche@adacore.com>
1213 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1215 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1217 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1218 cleanup. Check the original node when trying to determine the node kind
1219 of pragma Volatile's argument to account for untagged derivations
1220 where the type is transformed into a constrained subtype.
1222 2016-04-27 Olivier Hainque <hainque@adacore.com>
1224 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1225 consistent posix interface on the caller side.
1227 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1229 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1230 is a limited view of a type, initialize the Limited_Dependents
1231 field to catch misuses of the type in a client unit.
1233 2016-04-27 Thomas Quinot <quinot@adacore.com>
1235 * a-strunb-shared.adb (Finalize): add missing Reference call.
1236 * s-strhas.adb: minor grammar fix and extension of comment
1237 * sem_ch8.adb: minor whitespace fixes
1239 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1241 * lib-xref.adb (Get_Type_Reference): Handle properly the case
1242 of an object declaration whose type definition is a class-wide
1243 subtype and whose expression is a function call that returns a
1246 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1248 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1249 (Output_Name): New routine.
1251 2016-04-27 Bob Duff <duff@adacore.com>
1253 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1255 2016-04-27 Vincent Celier <celier@adacore.com>
1257 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1258 --unchecked-shared-lib-imports and set the flag
1259 Opt.Unchecked_Shared_Lib_Imports accordingly.
1261 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1263 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1264 A generic subprogram is never a primitive operation, and thus
1265 a classwide condition for it is not legal.
1267 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1269 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1272 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1274 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1275 (Resolve_Actuals): Flag effectively volatile objects with enabled
1276 property Async_Writers or Effective_Reads as illegal.
1277 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1279 2016-04-27 Javier Miranda <miranda@adacore.com>
1281 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1282 Do not generate the profile of the equality operator if it has
1283 been explicitly defined as abstract in the parent type. Required
1284 to avoid reporting an spurious error.
1286 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1288 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1289 procedure to compute the dimension vector of a scalar expression
1290 and compare it with the dimensions if its expected subtype. Used
1291 for the ultimate components of a multidimensional aggregate,
1292 whose components typically are themselves aggregates that are
1293 expanded separately. Previous to this patch, dimensionality
1294 checking on such aggregates generated spurious errors.
1295 * sem_aggr.adb (Resolve_Array_Aggregate): Use
1296 Check_Expression_Dimensions when needed.
1298 2016-04-27 Javier Miranda <miranda@adacore.com>
1300 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1301 (applicable to E_Procedure).
1302 (Corresponding_Procedure): New attribute (applicable to E_Function).
1303 * exp_util.adb (Build_Procedure_Form): Link the function with
1304 its internally built proc and viceversa.
1305 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1306 attribute Rewritten_For_C and Corresponding_Procedure to the body.
1307 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1308 (Rewritten_For_C_Proc_Id): Removed.
1309 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1310 locate the corresponding procedure.
1312 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1314 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1315 corresponding pragma.
1317 2016-04-27 Bob Duff <duff@adacore.com>
1319 * exp_ch3.adb: Minor comment improvement.
1321 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1323 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1324 return type is an untagged limited record with only access
1325 discriminants and no controlled components, the return value does not
1326 need to use the secondary stack.
1328 2016-04-27 Javier Miranda <miranda@adacore.com>
1330 * exp_util.adb (Remove_Side_Effects): When
1331 generating C code handle object declarations that have
1332 discriminants and are initialized by means of a call to a
1335 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1337 * a-textio.adb (Get_Line function): Handle properly the case of
1338 a line that has the same length as the buffer (or a multiple
1339 thereof) and there is no line terminator.
1340 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
1341 in the string when there is no previous line terminator and we
1342 need at most one additional character.
1344 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1346 * s-rident.ads: Make No_Implicit_Loops non partition wide.
1348 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1350 * sem_ch11.adb (Analyze_Handled_Statements): check useless
1351 assignments also in entries and task bodies, not only in
1352 procedures and declaration blocks.
1353 * sem_ch5.adb (Analyze_Block_Statement): check useless
1354 assignements in declaration blocks as part of processing their
1355 handled statement sequence, just like it was done for procedures
1356 and now is also done for entries and task bodies.
1357 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
1358 of entries and task bodies just like of procedures.
1360 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1362 * sem_util.adb (Is_Volatile_Function): Recognize
1363 a function declared within a protected type as well as the
1364 protected/unprotected version of a function.
1366 2016-04-27 Bob Duff <duff@adacore.com>
1368 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
1369 declaration of the form "X : T := Func (...);", where T is
1370 controlled, as a renaming.
1371 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
1372 to be an empty string, instead of null-ing out the Reference.
1373 * exp_util.adb (Needs_Finalization): Remove redundant code.
1375 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1377 * aspects.ads Aspects Export and Import do not require delay. They
1378 were classified as delayed aspects, but treated as non-delayed
1379 by the analysis of aspects.
1380 * freeze.adb (Copy_Import_Pragma): New routine.
1381 (Wrap_Imported_Subprogram): Copy the import pragma by first
1382 resetting all semantic fields to avoid an infinite loop when
1383 performing the copy.
1384 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
1385 comment on the processing of aspects Export and Import
1386 at the freeze point.
1387 (Analyze_Aspect_Convention: New routine.
1388 (Analyze_Aspect_Export_Import): New routine.
1389 (Analyze_Aspect_External_Link_Name): New routine.
1390 (Analyze_Aspect_External_Or_Link_Name): Removed.
1391 (Analyze_Aspect_Specifications): Factor out the analysis of
1392 aspects Convention, Export, External_Name, Import, and Link_Name
1393 in their respective routines. Aspects Export and Import should
1394 not generate a Boolean pragma because their corresponding pragmas
1395 have a very different syntax.
1396 (Build_Export_Import_Pragma): New routine.
1397 (Get_Interfacing_Aspects): New routine.
1399 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1401 * inline.adb (Add_Inlined_Body): Overhaul implementation,
1402 robustify handling of -gnatn1, add special treatment for
1403 expression functions.
1405 2016-04-27 Doug Rupp <rupp@adacore.com>
1407 * g-traceb.ads: Update comment.
1408 * exp_ch2.adb: minor style fix in object declaration
1410 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1412 * sem_elab.adb (Check_Internal_Call): Do not
1413 consider a call when it appears within pragma Initial_Condition
1414 since the pragma is part of the elaboration statements of a
1415 package body and may only call external subprograms or subprograms
1416 whose body is already available.
1417 (Within_Initial_Condition): New routine.
1419 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1421 * exp_util.adb (Build_Procedure_Form): Prevent double generation
1422 of the procedure form when dealing with an expression function
1423 whose return type is an array.
1424 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
1425 * exp_ch6.adb: Proper conversion for inherited operation in C.
1426 * sem_ch6.adb: Code cleanup.
1428 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1430 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
1431 * g-socket.adb: Minor reformatting.
1432 * sinfo.ads: Minor comment correction.
1433 * sem_warn.ads: minor grammar fix in comment
1435 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1437 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
1438 (maybe_pad_type): Adjust comment.
1439 (finish_record_type): Likewise.
1440 (rest_of_record_type_compilation): Likewise.
1441 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
1442 parameter from integer to boolean. Adjust recursive calls.
1443 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
1444 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
1445 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
1446 Pass false to finish_record_type. Set the debug type later.
1447 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
1448 (gnat_to_gnu_component_type): Fix formatting.
1449 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
1450 (gnat_to_gnu_type): Likewise.
1451 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
1452 (Loop_Statement_to_gnu): Likewise.
1453 (Subprogram_Body_to_gnu): Likewise.
1454 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
1455 (Exception_Handler_to_gnu_gcc): Likewise.
1456 (Compilation_Unit_to_gnu): Likewise.
1457 (gnat_to_gnu): Likewise.
1458 (push_exception_label_stack): Likewise.
1459 (elaborate_all_entities_for_package): Likewise.
1460 (process_freeze_entity): Likewise.
1461 (process_decls): Likewise.
1462 (process_type): Likewise.
1463 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
1464 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
1465 call to rest_of_record_type_compilation.
1466 (rest_of_record_type_compilation): Use copy_type.
1467 (copy_type): Use correctly typed constants.
1468 (gnat_signed_or_unsigned_type_for): Use copy_type.
1469 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1470 (build_goto_raise): Adjust call tognat_to_gnu_entity.
1472 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1474 * gcc-interface/misc.c (gnat_init): Do not call
1475 internal_reference_types.
1477 2016-04-27 Svante Signell <svante.signell@gmail.com>
1479 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
1480 * s-osinte-gnu.ads: Small tweaks.
1481 * s-osinte-gnu.adb: New file.
1483 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1485 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
1486 constituent even if it is not to prevent spurious errors.
1488 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1490 * sem_ch4.adb: Minor typo fixes and reformatting.
1492 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
1494 * g-calend.ads (No_Time): The same value in any timezone.
1495 * g-socket.adb (Raise_Host_Error): Remove ending
1496 dot from original error message before append colon delimited
1499 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1501 * sem_ch3.adb: Code cleanup.
1502 * sem_ch6.adb: Code cleanup.
1503 (Is_Matching_Limited_View): New routine.
1504 (Matches_Limited_With_View): Reimplemented.
1505 * sem_ch10.adb (Decorate_Type): Code cleanup.
1507 2016-04-21 Doug Rupp <rupp@adacore.com>
1509 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
1511 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1513 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
1514 indexing functions, collect all overloadings of the call firts,
1515 and then transfer them to indexing node, to prevent interleaving
1516 of the set of interpretations of the nodes involved.
1517 * sem_res.adb (Resolve): Suppress cascaded errors that report
1518 ambiguities when one of the actuals in an overloaded generatlized
1519 indexing operation is illegal and has type Any_Type, as is done
1520 for similar cascaded errors in subprogram calls.
1521 (Valid_Tagged_Conversion): Cleanup conversion checks when one
1522 of the types involved is a class-wide subtype.
1524 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1526 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
1527 subprogram declaration within a wrapper package, skip pragmas
1528 that may have been generated by aspect specifications on the
1531 2016-04-21 Javier Miranda <miranda@adacore.com>
1533 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
1534 code return True for array identifiers since the backend needs
1535 to initialize such component by means of memcpy().
1537 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1539 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
1540 potentially uninitialized memory.
1541 * sem_ch3.adb: Minor style fix in comment.
1543 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1545 * gnat_rm.texi, gnat_ugn.texi,
1546 doc/gnat_ugn/gnat_project_manager.rst,
1547 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1548 doc/gnat_ugn/gnat_and_program_execution.rst,
1549 doc/gnat_ugn/gnat_utility_programs.rst,
1550 doc/gnat_ugn/the_gnat_compilation_model.rst,
1551 doc/gnat_rm/implementation_defined_attributes.rst,
1552 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1553 doc/gnat_rm/implementation_defined_pragmas.rst,
1554 doc/gnat_rm/the_gnat_library.rst,
1555 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
1556 * doc/Makefile: Cleanups.
1558 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1560 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
1562 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1564 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
1565 disambiguate local variables that may be hidden from inner visibility
1566 by nested block declarations or loop variables.
1568 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
1570 * s-soflin.adb: Initialize the Stack_Limit global variable.
1572 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1574 * lib-writ.adb: Minor reformatting.
1576 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1578 * exp_pakd.adb (Compute_Number_Components): New function to
1579 build an expression that computes the number of a components of
1580 an array that may be multidimensional.
1581 (Expan_Packed_Eq): Use it.
1583 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1585 * g-traceb.ads: Update list of supported platforms.
1587 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1589 * sem_ch13.adb (Add_Predicates): if the type is declared in
1590 an inner package it may be frozen outside of the package, and
1591 the generated pragma has not been analyzed yet, the expression
1592 for the predicate must be captured and added to the predicate
1593 function at this point.
1595 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1597 * contracts.adb (Analyze_Package_Body_Contract): Do not check
1598 for a missing package refinement because 1) packages do not have
1599 "refinement" and 2) the check for proper state refinement is
1600 performed in a different place.
1601 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
1602 (Has_Null_Visible_Refinement): Reimplemented.
1603 * sem_ch3.adb (Analyze_Declarations): Determine whether all
1604 abstract states have received a refinement and if not, emit
1606 * sem_ch7.adb (Analyze_Package_Declaration): Code
1607 cleanup. Determine whether all abstract states of the
1608 package and any nested packages have received a refinement
1609 and if not, emit errors.
1610 (Requires_Completion_In_Body): Add new formal parameter
1611 Do_Abstract_States. Update the comment on usage. Propagate the
1612 Do_Abstract_States flag to all Unit_Requires_Body calls.
1613 (Unit_Requires_Body): Remove formal
1614 parameter Ignore_Abstract_States. Add new formal paramter
1615 Do_Abstract_States. Propagate the Do_Abstract_States flag to
1616 all Requires_Completion_In calls.
1617 * sem_ch7.ads (Unit_Requires_Body): Remove formal
1618 parameter Ignore_Abstract_States. Add new formal paramter
1619 Do_Abstract_States. Update the comment on usage.
1620 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
1621 not initialize the constituent list as this is now done on a
1622 need-to-add-element basis.
1623 (Analyze_Single_Task_Declaration):
1624 Do not initialize the constituent list as this is now done on
1625 a need-to-add-element basis.
1626 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
1627 lists as this is now done on a need-to-add-element basis.
1628 * sem_prag.adb (Analyze_Constituent): Set the
1629 refinement constituents when adding a new element.
1630 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
1631 adding a new element.
1632 (Analyze_Part_Of_Option): Set the Part_Of
1633 constituents when adding a new element.
1634 (Analyze_Pragma): Set the Part_Of constituents when adding a new
1636 (Check_Constituent_Usage (all versions)): Reimplemented.
1637 (Collect_Constituent): Set the refinement constituents when adding
1639 (Create_Abstract_State): Do not initialize the
1640 constituent lists as this is now done on a need-to-add-element basis.
1641 (Propagate_Part_Of): Set the Part_Of constituents when
1642 adding a new element.
1643 * sem_util.adb (Check_State_Refinements): New routine.
1644 (Has_Non_Null_Refinement): Reimplemented.
1645 (Has_Null_Refinement): Reimplemented.
1646 (Requires_State_Refinement): Removed.
1647 * sem_util.ads (Check_State_Refinements): New routine.
1648 (Requires_State_Refinement): Removed.
1650 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1652 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
1653 * sem.adb: Fix comment.
1655 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1657 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
1658 declaration with no aspects, whose subtype_mark is a subtype
1659 with predicates, inherits the list of subprograms for the type.
1661 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1663 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
1666 2016-04-21 Thomas Quinot <quinot@adacore.com>
1668 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
1670 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1672 * lib-writ.adb (Write_ALI): Do not record in ali file units
1673 that are present in the files table but not analyzed. These
1674 units are present because they appear in the context of units
1675 named in limited_with clauses, and the unit being compiled does
1676 not depend semantically on them.
1678 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1680 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
1681 create the procedure body for an function returning an array type,
1682 when generating C code. Reuse the subprogram body rather than
1683 creating a new one, both as an efficiency measure and because
1684 in an instance the body may contain global references that must
1687 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1689 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
1692 2016-04-21 Javier Miranda <miranda@adacore.com>
1694 * exp_aggr.adb (Component_Check): Extend
1695 the check that verifies that the aggregate has no function
1696 calls to handle transformations performed by the frontend.
1697 (Ultimate_Original_Expression): New subprogram.
1699 2016-04-21 Philippe Gil <gil@adacore.com>
1701 * krunch.adb (Krunch): Fix krunching of i-java.
1703 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1705 * exp_ch8.adb (Evaluation_Required): Always return
1706 True when Modify_Tree_For_C.
1708 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1710 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
1711 * alloc.ads: Minor comment fixes.
1712 * einfo.ads: Fix typo.
1714 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1716 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
1717 changes to handle all cases of components depending on the
1718 discriminant, not just string literals.
1720 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1722 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
1723 declaration is the generated declaration for a generic actual,
1724 inherit predicates from the actual if it is a predicated subtype.
1726 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1728 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
1729 inherited and its result is controlling, introduce a conversion
1730 on the actual for the corresponding procedure call, to avoid
1731 spurious type errors.
1733 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
1735 * krunch.adb (Krunch): Fix krunching of i-vxworks.
1737 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1739 * exp_aggr.adb: Minor reformatting and code cleanup.
1741 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1743 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
1744 resolution, because they introduce local names. Full resolution
1745 will take place when predicate function is constructed.
1747 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1749 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
1750 change to take into account Per_Object_Constraint field rather
1751 than special casing strings.
1752 * exp_ch6.adb: Fix typo in Replace_Returns.
1754 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1756 * sem_ch5.adb: Minor reformatting.
1758 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1760 * exp_aggr.adb (Backend_Processing_Possible): Return False
1761 when generating C and aggregate contains function calls.
1763 2016-04-21 Tristan Gingold <gingold@adacore.com>
1765 * krunch.adb (Krunch): Only partially krunch children of
1766 Interfaces that aren't known.
1768 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1770 * sem_prag.adb (Make_Inline): Handle properly the instantiation
1771 of a generic subpprogram that carries an Inline aspect. Place
1772 inline info on the anonymous subprogram that is constructed in
1773 the wrapper package.
1774 (Analyze_Pragma, case Pure): Do not check placement if pragma
1775 appears within an instantiation, which can be nested at any level.
1776 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
1777 node from anonymous subprogram to its visible renaming. The
1778 freeze node will be constructed if the subprogram carries
1780 (Set_Global): Preserve dimension information if present (from
1783 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
1785 * gnatlink.adb: Change wording of the warning message on
1786 problematic filenames to be more neutral. Add a new substring
1787 "patch" introduced on Windows 10.
1789 2016-04-21 Philippe Gil <gil@adacore.com>
1791 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
1793 2016-04-21 Javier Miranda <miranda@adacore.com>
1795 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
1798 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1800 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
1801 * einfo.ads New synthesized attribute
1802 Has_Non_Null_Abstract_State along with occurrences in entities.
1803 (Has_Non_Null_Abstract_State): New routine.
1804 * sem_ch7.adb (Unit_Requires_Body): Add local variable
1805 Requires_Body. A package declaring an abstract state requires
1806 a body only when the state is non-null and the package contains
1807 at least one other construct that requires completion in a body.
1808 * sem_util.adb (Mode_Is_Off): Removed.
1809 (Requires_State_Refinement): Remove an obsolete check. Code
1812 2016-04-21 Bob Duff <duff@adacore.com>
1814 * sem_attr.adb (Analyze_Attribute): In processing
1815 the 'Old attribute, a warning is given for infinite recursion. Fix
1816 the code to not crash when the prefix of 'Old denotes a protected
1818 * sem_ch5.adb (Analyze_Iterator_Specification):
1819 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
1820 where the parameter would not be an object.
1822 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1824 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
1825 Etype or Underlying_Type of the operands.
1827 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1829 * atree.adb (Print_Statistics): Protect against overflows and
1830 print the memory consumption in bytes.
1831 * table.adb (Reallocate): Do the intermediate calculation of the new
1832 size using the Memory.size_t type.
1834 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1836 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
1837 expansion of Attribute_Machine and Attribute_Model for AAMP.
1839 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1841 * freeze.adb: Disable previous change for now.
1843 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1845 * sem_ch8.adb (Find_Selected_Component): If prefix has an
1846 access type and designated type is a limited view, introduce
1847 an explicit dereference before continuing the analysis, and
1848 set its type to the non-limited view of the designated type,
1849 if we are in context where it is available.
1851 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1853 * freeze.adb: Freeze profile in ASIS mode.
1855 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1857 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
1858 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
1860 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1862 * exp_ch6.adb: Minor reformatting.
1864 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1866 * sem_ch13.adb: Minor comment update.
1868 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1870 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
1871 boolean parameter to determine whether freezing an overloadable
1872 entity freezes its profile as well. This is required by
1873 AI05-019. The call to Freeze_Profile within Freeze_Entity is
1874 conditioned by the value of this flag, whose default is True.
1875 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
1876 reference freezes the prefix, but it the prefix is a subprogram
1877 it does not freeze its profile.
1879 2016-04-21 Javier Miranda <miranda@adacore.com>
1881 * exp_util.adb (Build_Procedure_Form): No action needed for
1882 subprogram renamings since the backend can generate the call
1883 using the renamed subprogram. This leaves the tree more clean
1885 * exp_ch6.adb (Expand_Call): Extend previous patch for
1886 rewritten-for-c entities to handle subprogram renamings.
1887 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
1889 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1891 * sem_ch13.adb: Code cleanup.
1893 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1895 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1896 created for SPARK_To_C, the entity must remain invisible so it
1897 does not overload subsequent references to the original function.
1898 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
1899 Handle Extended_Return_Statements by replacing it with a block
1900 with assignments and a simple return statement.
1901 * exp_util.adb (Build_Procedure_Form): Make procedure entity
1902 invisible after analyzing declaration, to prevent improper
1905 2016-04-21 Javier Miranda <miranda@adacore.com>
1907 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1908 attribute Rewritten_For_C to the body since since the expander
1909 may generate calls using that entity.
1910 * exp_ch6.adb (Expand_Call): For internally generated
1911 calls ensure that they reference the entity of the spec
1912 of the called function.
1913 (Rewritten_For_C_Func_Id): New subprogram.
1914 (Rewritten_For_C_Proc_Id): New subprogram.
1915 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
1916 ensure that we skip freezing entities.
1917 * exp_util.adb (Build_Procedure_Form): No action needed if the
1918 procedure was already built.
1920 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1922 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
1925 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1927 * sem_util.adb (Denotes_Iterator): Use root type to determine
1928 whether the ultimate ancestor is the predefined iterator
1930 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
1931 and avoid reuse of Pack local variable.
1933 2016-04-21 Olivier Hainque <hainque@adacore.com>
1935 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1936 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1937 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
1938 Executable_Extension to ".out".
1940 2016-04-21 Javier Miranda <miranda@adacore.com>
1942 * frontend.adb: Update call to Unnest_Subprograms.
1943 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
1944 (Unnest_Subprograms): Moved to package exp_unst.
1945 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
1947 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
1948 enumeration literals when generating C code.
1950 2016-04-21 Javier Miranda <miranda@adacore.com>
1952 * frontend.adb: Remove call to initialize Exp_Ch6.
1953 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
1954 (Unest_Entry/Unest_Bodies): Removed.
1955 (Unnest_Subprograms): Code cleanup.
1957 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1959 * set_targ.adb (Read_Target_Dependent_Values):
1960 close target description file once its contents is read.
1961 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
1962 and Stderr_File): Close local file descriptors before spawning
1964 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
1965 local variables to make the code easier to understand and avoid
1966 duplicated calls to Parent and Generic_Parent.
1968 2016-04-20 Bob Duff <duff@adacore.com>
1970 * s-os_lib.ads: Minor comment fix.
1972 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1974 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
1975 a discriminant check for a type whose partial view has unknown
1976 discriminants when the full view has discriminants with defaults.
1978 2016-04-20 Javier Miranda <miranda@adacore.com>
1980 * exp_util.adb (Remove_Side_Effects): When generating C code
1981 remove side effect of type conversion of access to unconstrained
1983 (Side_Effect_Free): Return false for the type
1984 conversion of access to unconstrained array type when generating
1986 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
1987 of access to unconstrained array type conversion when generating
1990 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1992 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
1993 function, to construct the declaration of a predicate function
1994 at the end of the current declarative part rather than at the
1995 (possibly later) freeze point of the type. This also allows uses
1996 of a type with predicates in instantiations elsewhere.
1997 (Resolve_Aspect_Expression): New procedure to detect visiblity
1998 errors in aspect expressions, at the end of the declarative part
1999 that includes the type declaration.
2000 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
2001 predicate function from private to full view.
2002 * einfo.adb (Predicate_Function): Refine search for predicate
2003 function when type has a full view and predicate function may
2004 be defined on either view.
2006 2016-04-20 Javier Miranda <miranda@adacore.com>
2008 * frontend.adb: Passing the root of the tree to
2009 Unnest_Subprograms().
2010 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
2011 took care of adding subprograms to the Unest_Bodies table since
2012 performing such action too early disables the ability to process
2013 generic instantiations.
2014 (Unnest_Subprograms): Adding parameter.
2015 (Search_Unnesting_Subprograms): New subprogram.
2016 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
2018 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2020 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2022 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2024 * exp_unst.adb (Check_Static_Type): For a private type, check
2027 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2029 * sem_attr.adb (Check_Type): Reject an attribute reference in
2030 an aspect expression, when the prefix of the reference is the
2031 current instance of the type to which the aspect applies.
2033 2016-04-20 Bob Duff <duff@adacore.com>
2035 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
2036 hiding unless we're actually hiding something. The previous
2037 code would (for example) warn about a "<" on a record type
2038 because it incorrectly thought it was hiding the "<" on Boolean
2039 in Standard. We need to check that the homonym S is in fact a
2040 homograph of a predefined operator.
2042 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2044 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2045 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2046 procedure equivalent to a function returning an array, when this
2047 construction is deferred to the freeze point of the function.
2048 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2049 function that renames an instance of Unchecked_Conversion.
2050 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2051 declaration for a function returning an array.
2052 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2054 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2056 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2057 New predicate to determine that in a context with full run-time,
2058 a function call is an expansion of a reference to attribute
2060 * sem_ch5.adb (Analyze_Function_Call): use it.
2061 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2063 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2065 * einfo.adb Flag286 is now used as Is_Exception_Handler.
2066 (Is_Exception_Handler): New routine.
2067 (Set_Is_Exception_Handler): New routine.
2068 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2069 * einfo.ads New attribute Is_Exception_Handler along with
2070 occurrences in entities.
2071 (Is_Exception_Handler): New routine along with pragma Inline.
2072 (Set_Is_Exception_Handler): New routine along with pragma Inline.
2073 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2074 for exception handlers with a choice parameter.
2075 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2076 generated for a choice parameter as an exception handler.
2078 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2080 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2081 (Constrain_Discriminated_Type): In an instance, if the type has
2082 unknown discriminants, use its full view.
2083 (Process_Subtype): Check that the base type is private before
2084 adding subtype to Private_Dependents list.
2086 2016-04-20 Bob Duff <duff@adacore.com>
2088 * sem_ch13.adb: Minor comment fix.
2090 2016-04-20 Yannick Moy <moy@adacore.com>
2092 * sem_ch4.adb: Fix typos in comments.
2093 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2095 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2097 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2098 current instance of a task type is legal if the prefix is an
2099 expression of that task type and the selector is an entry or
2102 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2104 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2105 varsize field at the end for efficiency.
2107 2016-04-20 Vincent Celier <celier@adacore.com>
2109 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2110 ls" includes the switch -V.
2111 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2113 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2116 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2118 * sem_ch12.adb (Qualify_Type): Do not perform
2119 partial qualification when the immediate scope is a generic unit.
2121 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2123 * exp_unst.adb: Minor reformatting.
2125 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2127 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2128 tag assignment and adjustment preceed the accessibility check.
2129 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2131 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2133 * exp_prag.adb (Expand_Attributes): Ensure that
2134 the temporary used to capture the value of attribute 'Old's
2135 prefix is properly initialized.
2137 2016-04-20 Javier Miranda <miranda@adacore.com>
2139 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2142 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2144 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2147 2016-04-20 Vincent Celier <celier@adacore.com>
2149 * make.adb: Code cleanup.
2151 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2153 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2156 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2158 * sem_ch12.adb (Copy_Generic_Node): Handle the special
2159 qualification installed for universal literals that act as
2160 operands in binary or unary operators. (Qualify_Operand): Mark
2161 the qualification to signal the instantiation mechanism how to
2162 handle global reference propagation.
2163 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2164 (Set_Is_Qualified_Universal_Literal): New routine.
2165 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2166 with occurrences in nodes.
2167 (Is_Qualified_Universal_Literal):
2168 New routine along with pragma Inline.
2169 (Set_Is_Qualified_Universal_Literal): New routine along with
2172 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2174 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2175 so that the corresponding checks are preserved across compilations
2176 that include System.Constants in their context.
2178 2016-04-20 Gary Dismukes <dismukes@adacore.com>
2180 * sem_type.adb: Minor typo fix and reformatting.
2181 * a-conhel.ads: Update comment.
2183 2016-04-20 Bob Duff <duff@adacore.com>
2185 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2186 code so it doesn't trigger an "uninit var" warning.
2188 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2190 * sem_attr.ads Add new table Universal_Type_Attribute.
2191 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2192 checking attributes.
2194 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2196 * exp_aggr.adb (Init_Stored_Discriminants,
2197 Init_Visible_Discriminants): New procedures, subsidiary of
2198 Build_Record_Aggr_Code, to handle properly the construction
2199 of aggregates for a derived type that constrains some parent
2200 discriminants and renames others.
2202 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2204 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2205 (Save_References_In_Operator): Add explicit qualifications in
2206 the generic template for all operands of universal type.
2207 * sem_type.adb (Disambiguate): Update the call to Matches.
2208 (Matches): Reimplemented.
2209 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2211 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2213 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2214 an illegal aspect that freezes the entity to which it applies.
2216 2016-04-20 Bob Duff <duff@adacore.com>
2218 * a-stwibo.ads, a-stzbou.ads
2219 ("="): Add overriding keyword before function to avoid crash when
2220 compiler is called with -gnatyO (check overriding indicators).
2222 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2224 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
2225 is a configuration pragma and it uses the ARG syntax, insert
2226 the rewritten pragma after the current one rather than using
2229 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2231 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2234 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2236 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2237 s-imglli.adb: Minor reformatting.
2239 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2241 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2242 renamed operator when the associated node appears within a
2244 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2246 2016-04-20 Yannick Moy <moy@adacore.com>
2248 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2249 * einfo.adb (Set_Overridden_Operation): Add assertion.
2250 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2253 2016-04-20 Javier Miranda <miranda@adacore.com>
2255 * exp_unst.adb (Append_Unique_Call): New subprogram.
2256 (Unnest_Subprogram): Replace the unique occurrence
2257 of Call.Append() by Append_Unique_Call() which protects us from
2258 adding to the Calls table duplicated entries.
2260 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2262 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2263 * xref_lib.ads (Dependencies_Tables): instantiate
2264 Table package with types that guarantee its safe use.
2265 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2268 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2270 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2271 Disable expansion when generating C code.
2272 * sinfo.ads, inline.ads: Minor editing.
2274 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2276 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2279 2016-04-20 Javier Miranda <miranda@adacore.com>
2281 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2282 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2283 declaration of the internally built _postcondition procedure.
2285 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2287 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2289 * sem_util.adb (Is_Unchecked_Conversion_Instance):
2290 defense against library-level renamings of other functions,
2291 which are never instances of Unchecked_Conversion.
2292 * einfo.ads: minor fix of casing in comment
2294 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2296 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2297 that has been analyzed and expanded already. Qualify the names
2298 in the proper body for use in the generation of C code.
2300 2016-04-20 Javier Miranda <miranda@adacore.com>
2302 * contracts.adb (Build_Postconditions_Procedure): Force its
2303 inlining when generating C code.
2304 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2305 _postconditions when generating C code.
2306 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2307 _postconditions when generating C code.
2308 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2309 types of return value and argument changed from Node_Id to
2312 2016-04-20 Vincent Celier <celier@adacore.com>
2314 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2316 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
2318 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2319 the Has_Delayed_Freeze flag on the anonymous instance node.
2321 2016-04-20 Javier Miranda <miranda@adacore.com>
2323 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2324 scope associated with the renaming object declaration.
2325 * exp_util.adb (Insert_Actions): Remove handling of iterator
2326 loop marked as requiring the secondary stack.
2328 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2330 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2331 AI12-0124, which extends the functionality of the attribute so it
2332 reflects the semantics of GNAT 'Img when applied to scalar types.
2333 * lib-xref.adb: minor whitespace layout fix.
2335 2016-04-20 Vincent Celier <celier@adacore.com>
2337 * clean.adb (Gnatclean): Fail if project file specified and
2338 gprclean is not available.
2339 * gnatname.adb: Fail is -P is used and gprname is not available.
2340 * make.adb (Initialize): Fail if project file specified and
2341 gprbuild is not available.
2343 2016-04-20 Bob Duff <duff@adacore.com>
2345 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
2346 stack when possible.
2348 2016-04-20 Gary Dismukes <dismukes@adacore.com>
2350 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
2353 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2355 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2356 If the pragma comes from an aspect specification, verify that
2357 the aspect applies to an entity with a declarative part.
2358 * exp_ch5.adb: Code cleanup.
2360 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2362 * sem_res.adb (Resolve_If_Expression): If first expression is
2363 universal, resolve subsequent ones with the corresponding class
2364 type (Any_Integer or Any_Real).
2366 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2368 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
2369 disabled, complete the analysis of the iterator name to ensure
2370 that reference for entities within are properly generated.
2372 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2374 * a-dispat.ads (Yield): add Global contract.
2375 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
2376 * a-taside.adb: Added Initializes => Tasking_State.
2378 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2380 * sem_ch13.adb (Build_Invariant_Procedure):
2381 Reimplement the invariant procedure spec and body insertion.
2383 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2385 * sem_ch13.adb (Add_Invariant): Do not replace
2386 the saved expression of an invariatn aspect when inheriting
2387 a class-wide type invariant as this clobbers the existing
2388 expression. Do not use New_Copy_List as it is unnecessary
2389 and leaves the parent pointers referencing the wrong part of
2390 the tree. Do not replace the type references for ASIS when
2391 inheriting a class-wide type invariant as this clobbers the
2392 existing replacement.
2394 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2396 * sem_util.adb (Build_Explicit_Dereference): If the designated
2397 expression is an entity name, generate reference to the entity
2398 because it will not be resolved again.
2400 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2402 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2403 gnat_rm.texi: Update documentation.
2405 2016-04-19 Olivier Hainque <hainque@adacore.com>
2407 * par_sco.adb (Traverse_One, case N_Case_Statement):
2408 Skip pragmas before the first alternative.
2409 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2411 2016-04-19 Tristan Gingold <gingold@adacore.com>
2413 * adaint.c (__gnat_lwp_self): New function (for darwin).
2414 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
2417 2016-04-19 Olivier Hainque <hainque@adacore.com>
2419 * sem_util.adb (Build_Elaboration_Entity): Always request an
2420 elab counter when preserving control-flow.
2422 2016-04-19 Olivier Hainque <hainque@adacore.com>
2424 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
2425 Needs_Debug_Info when producing SCOs.
2426 * par_sco.adb (Traverse_Aspects): Fix categorization of
2427 Type_Invariant to match actual processing as activated depending
2428 on pragma Assertion_Policy.
2429 * sem_prag.adb (Analyze_Pragma): Remove special case for
2430 Name_Invariant regarding SCO generation, which completely disabled
2431 the production of SCOs for Invariant pragmas and aspects.
2433 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2435 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
2438 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2440 * freeze.adb (Freeze_Profile): Refine predicate that checks
2441 whether a function that returns a limited view is declared in
2442 another unit and cannot be frozen at this point.
2444 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2446 * exp_aggr.adb (Component_Count): Handle properly superflat
2447 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
2448 return value of the function is Natural, rather than leaving
2449 the handling of such arrays to the caller of this function.
2451 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2453 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
2454 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
2455 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
2456 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
2457 to publicly visible routine in Sem_Util.
2459 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2461 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
2462 the check if the type of the actual is By_Reference.
2464 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2466 * sem_res.adb (Within_Subprogram_Call): Detect
2467 also nodes that appear in entry calls.
2468 (Resolve_Actuals, Insert_Default): Propagate
2469 dimension information if any, from default expression to the
2470 copy that appears in the list of actuals.
2471 * uintp.ads: minor whitespace fix in comment.
2472 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
2474 * set_targ.adb (Set_Targ): convert directly from
2475 Natural to Pos, without intermediate conversion to Int.
2477 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2479 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
2480 SPARK RM in comment.
2481 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
2483 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
2484 to SPARK RM in both comment and error message.
2486 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
2488 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
2489 CW type, then the subprogram must have a delayed freeze. This
2490 ensures that the backend can properly recover the full view when
2491 elaborating the access subprogram declaration.
2493 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2495 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
2496 overloadable entity if originally overloaded.
2498 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2500 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
2501 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
2502 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
2503 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
2506 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2508 * sem_util.adb (Copy_Node_With_Replacement):
2509 use Set_Comes_From_Source instead of directly manipulating
2510 internals of the node table.
2511 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
2512 * sem_aux.adb (Get_Rep_Pragma,
2513 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
2514 do not change as constants and initialize them in the declaration.
2515 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
2516 variables that do not change as constants and initialize them
2519 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2521 * sem_res.adb (Resolve_Entry_Call): If the entry has
2522 preconditions it is rewritten by means of a wrapper that
2523 incorporates the original call. Before rewriting generate a
2524 reference to the entry being called to prevent spurious warnings
2525 and provide correct cross-reference information.
2527 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2529 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
2530 local constant Scop. Ignore any internally generated loops when
2531 performing the check concerning an abstract subprogram call
2532 without a controlling argument.
2533 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
2535 2016-04-19 Bob Duff <duff@adacore.com>
2537 * sem_elab.adb (Check_A_Call): There are cases where we have No
2538 (Ent) after the Alias loop, even when there was no previous error,
2539 so we can't assert that there was an error.
2541 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2543 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
2544 Reject use of type name as a prefix to 'access within an aggregate
2545 in a context that is not the declarative region of a type.
2547 2016-04-19 Vincent Celier <celier@adacore.com>
2549 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
2550 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
2551 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
2552 Remove anything related to project files
2553 * g-mbdira.adb: minor whitespace cleanup
2554 * g-spipat.adb: minor removal of extra spaces after closing paren
2556 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2558 * exp_ch6.adb (Expand_Actuals): If post-statements are present
2559 and the enclosing context is a function call or indexing, build
2560 an Expression_With_Actions for the call.
2562 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2564 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
2565 a with line for an ignored Ghost unit.
2566 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
2567 Par. A child package is Ghost when its parent is Ghost.
2568 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
2569 a subprogram declaration that acts as a compilation unit.
2571 2016-04-18 Michael Matz <matz@suse.de>
2573 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
2574 (gnat_to_gnu_field): Ditto.
2575 (components_to_record): Ditto.
2576 (create_variant_part_from): Ditto.
2577 (copy_and_substitute_in_size): Ditto.
2578 (substitute_in_type): Ditto.
2579 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
2580 (make_packable_type): Ditto.
2581 (maybe_pad_type): Ditto.
2582 (finish_fat_pointer_type): Ditto.
2583 (finish_record_type): Ditto and use SET_DECL_ALIGN.
2584 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
2585 (create_field_decl): Use SET_DECL_ALIGN.
2587 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2589 * einfo.adb (Overridden_Operation): assert that
2590 function is called for valid arguments.
2591 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
2592 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
2593 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
2594 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
2595 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
2596 No space after closing parenthesis except where required for
2598 * sem_res.adb: Minor reformatting.
2600 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2602 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
2603 statement when relevant.
2605 2016-04-18 Bob Duff <duff@adacore.com>
2607 * a-cuprqu.adb (Enqueue): Properly handle the
2608 case where the new element has a unique priority.
2610 2016-04-18 Tristan Gingold <gingold@adacore.com>
2612 * adaint.h: Define stat structures and functions for iOS
2615 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2617 * sem_res.adb (Resolve_Entry_Call): reset
2618 Is_Overloaded flag after resolving calls to overloaded protected
2620 * exp_spark.adb (Expand_SPARK): call
2621 Qualify_Entity_Names for tasking nodes, i.e. protected types,
2622 task types and entries.
2623 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
2624 in case of an unconstrained type.
2626 2016-04-18 Yannick Moy <moy@adacore.com>
2628 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
2629 comment to document usage of subprogram in GNATprove.
2631 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2633 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
2634 message for wrong placement of aspect Test_Case.
2636 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2638 * einfo.ads: Update the documentation of attribute Renamed_Object.
2639 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2641 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2643 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
2644 in the case of AAMP (same as for use of the -gnatd.P switch) to
2645 suppress this optimization, which avoids creating a dependence
2646 on the 64-bit arithmetic package.
2648 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2650 * exp_ch4.adb: Update comment.
2652 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2654 * exp_ch6.adb (Expand_Call): Make sure instantiations are
2655 registered only once as pending here.
2657 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2659 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
2660 (Minimize_Expression_With_Actions): New flag.
2661 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
2663 (Resolve_Short_Circuit): Redo previous change
2664 using Minimize_Expression_With_Actions.
2665 (Expand_N_If_Expression,
2666 Expand_Short_Circuit_Operator): Restore old code to avoid
2667 Expression_With_Actions when Minimize_Expression_With_Actions
2670 2016-04-18 Vincent Celier <celier@adacore.com>
2672 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
2673 Stderr_File): Close local file descriptors when no longer needed.
2675 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2677 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
2678 mode check that the type of the cursor in an iteration over
2679 a formal container is not volatile. The proper check on the
2680 element type is done elsewhere.
2682 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2684 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
2685 a subprogram that returns a class-wide type, if the subprogram
2686 is a compilation unit, because otherwise gigi will treat the
2687 subprogram as external, leading to link errors.
2689 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2691 * sem_res.adb (Resolve_Short_Circuit): Do not use
2692 expression-with-actions when generating C.
2694 2016-04-18 Yannick Moy <moy@adacore.com>
2696 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
2697 raise node in GNATprove mode.
2699 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2701 * s-fileio.adb: Minor reformatting.
2702 * sem_prag.adb (Analyze_Input_Item): Add local
2703 variable Input_OK. Do not consider mappings of generic formal
2704 parameters to actuals.
2706 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2708 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
2709 type, the cursor is declared in the scope of the parent type.
2710 (Analyze_Parameter_Specification): A qualified expression with an
2711 iterator type indicates an iteration over a container (explicit
2714 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2716 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
2717 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
2718 * debug.adb: Reserve -gnatd.4 to force generation of C files.
2720 2016-04-18 Yannick Moy <moy@adacore.com>
2722 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
2723 division by zero, instead possibly issue a warning.
2724 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
2725 static division by zero, instead add check flag on original
2727 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
2728 Only issue error when both SPARK_Mode is On and Warn is False.
2730 2016-04-18 Yannick Moy <moy@adacore.com>
2732 * checks.adb (Apply_Scalar_Range_Check): Force
2733 warning instead of error when SPARK_Mode is On, on index out of
2734 bounds, and set check flag for GNATprove.
2736 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2738 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
2739 Update the comment on usage. Reimplemented.
2740 (Check_Input_States.Check_Constituent_Usage): Update the comment
2741 on usage. A Proof_In constituent can now refine an Input state
2742 as long as there is at least one Input constituent present.
2744 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2746 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
2747 body id as the sloc of the entity in the generated subprogram
2748 declaration, to avoid spurious conformance errors when style
2751 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2753 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
2754 Refine check on illegal calls to entities within a task body,
2755 when the entity is declared in an object of the same type. In
2756 a generic context there might be no explicit dereference but if
2757 the prefix includes an access type the construct is legal.
2759 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2761 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
2762 RE_Default_Priority.
2764 2016-04-18 Bob Duff <duff@adacore.com>
2766 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
2767 if the pragma came from an aspect specification.
2769 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2771 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2773 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2775 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
2776 superfluous conformance check on an inlined body with a previous
2777 spec, use the fact that the generated declaration does not come
2778 from source. We must treat the entity as coming from source to
2779 enable some back-end inlining when pragma appears after the body.
2781 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2783 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
2784 exp_intr.adb: Minor reformatting and typo corrections.
2786 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2788 * sem_ch6.adb: Code cleanup.
2790 2016-04-18 Thomas Quinot <quinot@adacore.com>
2792 * sem_ch13.adb: Minor reformatting and error message tweaking
2793 (remove extraneous spaces).
2795 2016-04-18 Johannes Kanig <kanig@adacore.com>
2797 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2799 2016-04-18 Bob Duff <duff@adacore.com>
2801 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
2802 exists, and it's a fifo, we use "w" as the open string instead of
2803 "r+". This is necessary to make a write to the fifo block until
2806 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2808 * sem_attr.adb (Denote_Same_Function): Account
2809 for a special case where a primitive of a tagged type inherits
2810 a class-wide postcondition from a parent type.
2812 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2814 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
2815 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
2816 of reserved words is OK.
2817 (Scan_Pragma_Argument_Association):
2818 Add new formal Reserved_Words_OK and update the comment on
2819 usage. Code cleanup. Parse an expression or a reserved word in
2820 identifier form for pragmas Restriction_Warnings and Restrictions
2821 No_Use_Of_Attribute.
2822 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2823 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
2824 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
2826 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
2827 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
2828 Update the parameter profile.
2829 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
2831 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
2832 the comment on usage.
2833 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
2834 * sem_attr.adb (Analyze_Attribute): Check restriction
2835 No_Use_Of_Attribute.
2836 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
2837 restriction No_Use_Of_Attribute before any rewritings have
2839 * sem_prag.adb (Analyze_Pragma): Check restriction
2840 No_Use_Of_Pragma before any rewritings have taken place.
2842 2016-04-18 Bob Duff <duff@adacore.com>
2844 * sem_ch6.adb (Is_Inline_Pragma): The pragma
2845 argument can be a selected component, which has no Chars field,
2846 so we need to deal with that case (use the Selector_Name).
2847 (Check_Inline_Pragma): We need to test Is_List_Member before
2848 calling In_Same_List, because in case of a library unit, they're
2849 not in lists, so In_Same_List fails an assertion.
2851 2016-04-18 Bob Duff <duff@adacore.com>
2853 * namet.ads, namet.adb: Add an Append that appends a
2854 Bounded_String onto a Bounded_String. Probably a little more
2855 efficient than "Append(X, +Y);". Also minor cleanup.
2856 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
2857 Append_Unqualified_Decoded): Make sure these work with non-empty
2859 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
2860 parameter, defaulting to Global_Name_Buffer.
2861 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
2862 Bounded_String parameter, no default.
2863 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
2864 Bounded_String instead of Global_Name_Buffer.
2865 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
2866 to Append_Entity_Name, and pass a Bounded_String parameter,
2867 instead of using globals.
2868 (Add_Source_Info): Pass a Bounded_String parameter, instead of
2870 (Expand_Source_Info): Use local instead of globals.
2871 * stringt.ads, stringt.adb (Append): Add an Append procedure
2872 for appending a String_Id onto a Bounded_String.
2873 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
2875 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
2876 Adjust_Name_Case parameter.
2877 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
2878 Set_Casing; that's the default.
2879 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
2880 protected subprograms are entry calls; otherwise it is not possible to
2881 distinguish them from regular subprogram calls.
2883 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2885 * sem_ch13.adb (Has_Good_Profile): Improvement
2886 of error message. Now indicates subtype_mark of formal parameter
2887 rather than the formal's name, plus minor rewording.
2889 2016-04-18 Pascal Obry <obry@adacore.com>
2891 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2893 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2895 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2897 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2899 * par-ch4.adb, sem_prag.adb: Minor reformatting.
2901 2016-04-18 Bob Duff <duff@adacore.com>
2903 * sinput.ads, sinput.adb (Build_Location_String): Take a
2904 parameter instead of using a global variable. The function
2905 version no longer destroys the Name_Buffer.
2906 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
2907 parameter, which defaults to the Global_Name_Buffer, so some
2908 calls can avoid the global.
2909 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
2910 to avoid using globals. All but one call to Build_Location_String
2911 avoids the global. Only one call to String_From_Name_Buffer
2914 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2916 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2918 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2920 * sem_eval.adb (Choice_Matches): Check the expression
2921 against the predicate values when the choice denotes a
2922 subtype with a static predicate.
2923 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
2924 tests for predicates.
2925 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
2926 is not static. (Is_Static_Subtype): A subtype with a dynamic
2927 predicate is not static.
2928 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
2929 (Is_Static_Subtype): Update the comment on usage.
2931 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2933 * sem_prag.adb (Analyze_Input_Item): Allow
2934 generic formals to appear as initialization items.
2936 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2938 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
2939 Has_Good_Profile): Additional error message to indicate that
2940 the second parameter of the subprogram must be a first subtype.
2942 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2944 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
2945 Use the pragma lookahead that determines whether a subprogram
2946 is to be inlined, when some level of backend optimization is
2948 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
2949 code used to create an instance body when needed for inlining.
2950 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
2951 call appears within an instantiation that is not a compilation
2952 unit, add a pending instantiation for the enclosing instance,
2953 so the backend can inline in turn the calls contained in the
2956 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2958 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
2959 that relates operations of the parent type to the operations of
2960 the derived type has three distinct sources:
2961 a) explicit operations of the derived type carry an
2962 Overridden_Operation that designates the operation in the
2964 b) Implicit operations that are inherited by the derived type
2965 carry an alias that may be an explicit subprogram (in which case
2966 it may have an Overridden_ Operation indicator) or may also be
2967 inherited and carry its own alias.
2968 c) If the parent type is an interface, the operation of the
2969 derived type does not override, but the interface operation
2970 indicates the operation that implements it.
2971 * sem_prag.adb: Minor reformatting.
2972 * sem_prag.adb (Check_External_Property): Update
2973 the comment on usage. Reimplement.
2975 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2977 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
2978 profiles such as ZFP, ceiling priority is not available.
2980 2016-04-18 Bob Duff <duff@adacore.com>
2982 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2984 2016-04-18 Bob Duff <duff@adacore.com>
2986 * sem_elab.adb (Output_Calls): Use
2987 Get_Name_String, to clearly indicate that the global Name_Buffer
2988 is being used. The previous code used Is_Internal_Name, which
2989 returns a Boolean, but also has a side effect of setting the
2990 Name_Buffer. Then it called the other Is_Internal_Name, which uses
2991 the Name_Buffer for its input. And then it called Error_Msg_N,
2992 again using the Name_Buffer. We haven't eliminated the global
2993 usage here, but we've made it a bit clearer.
2994 This also allows us to have a side-effect-free version of
2996 * namet.ads, namet.adb: Provide a type Bounded_String, along with
2997 routines that can be used without using global variables. Provide
2998 Global_Name_Buffer so existing code can continue to use the
2999 global. Mark the routines that use globals as obsolete. New code
3000 shouldn't call the obsolete ones, and we should clean up existing
3001 code from time to time.
3002 Name_Find_Str is renamed as Name_Find.
3003 * namet.h: Changed as necessary to interface to the new version
3005 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
3008 2016-04-18 Yannick Moy <moy@adacore.com>
3010 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
3011 outside of GNATprove, hence it should not be removed.
3013 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3015 * sem_prag.adb (Analyze_Refinement_Clause):
3016 The refinement of an external abstract state can now mention
3017 non-external constituents.
3018 (Check_External_Property): Update all SPARK RM references.
3020 2016-04-18 Bob Duff <duff@adacore.com>
3022 * exp_intr.adb: Remove some duplicated code.
3024 2016-04-18 Yannick Moy <moy@adacore.com>
3026 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
3027 package spec and body out of SPARK.
3029 2016-04-18 Johannes Kanig <kanig@adacore.com>
3031 * spark_xrefs.ads: Minor comment update.
3033 2016-04-18 Johannes Kanig <kanig@adacore.com>
3035 * gnat1drv.adb (Gnat1drv): Force loading of System
3038 2016-04-18 Bob Duff <duff@adacore.com>
3040 * a-cuprqu.adb: Correction to previous change. If a new node
3041 is inserted at the front of the queue (because it is higher
3042 priority than the previous front node), we need to update
3043 Header.Next_Unequal -- not just in the case where the queue was
3046 2016-04-18 Bob Duff <duff@adacore.com>
3048 * a-cuprqu.ads: Change the representation of List_Type from a
3049 singly-linked list to a doubly-linked list. In addition, add a
3050 pointer Next_Unequal, which points past a possibly-long chain
3051 of equal-priority items. This increases efficiency, especially
3052 in the case of many equal-priority items.
3053 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3054 advantage of new data structure.
3055 (Finalize): Rewrite in terms of Dequeue, for simplicity.
3057 2016-04-18 Yannick Moy <moy@adacore.com>
3059 * contracts.adb (Analyze_Object_Contract,
3060 Analyze_Protected_Contract): Remove tests performed in GNATprove.
3061 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3062 Remove query for tests performed in GNATprove.
3064 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3066 * sem_aggr.adb (Resolve_Record_Aggregate): If
3067 Warn_On_Redundant_Constructs is enabled, report a redundant box
3068 association that does not cover any components, as it done for
3069 redundant others associations in case statements.
3071 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3073 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3074 Analyze the generated Check pragma for an inherited condition so
3075 that it does not freeze the dispatching type of the primitive
3076 operation, because it is pre-analyzed at the point of the
3077 subprogram declaration (and not in the subprogram body, as is
3078 done during regular expansion).
3080 2016-04-18 Vincent Celier <celier@adacore.com>
3082 * ali.ads: Increase the range of all _Id types to 100 millions.
3084 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3086 * sem_warn.adb (Check_References): Change warning to suggest
3087 using pragma Export rather than saying "volatile has no effect".
3089 2016-04-18 Bob Duff <duff@adacore.com>
3091 * g-souinf.ads (Compilation_ISO_Date): New function to return
3092 the current date in ISO form.
3093 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3094 a call to Compilation_ISO_Date into a string literal containing
3095 the current date in ISO form.
3096 * exp_intr.ads (Add_Source_Info): Improve documentation.
3097 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3098 Compilation_ISO_Date.
3099 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3101 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3103 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3104 to subtypes that are not first subtypes.
3106 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3108 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3110 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3111 generated pragmas after subprogram declaration, rather than in
3112 the corresponding subprogram body.
3113 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3114 mode, if the operation is overridding, call
3115 Collect_Inherited_Class_Wide_Conditions to generate the
3116 corresponding pragmas immediately after the corresponding
3117 subprogram declaration.
3119 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3121 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3122 type to natural numbers.
3123 (Stype): document code characters for concurrent entities.
3125 2016-04-18 Olivier Hainque <hainque@adacore.com>
3127 * targparm.ads: Update the Frontend_Exceptions default internal
3129 (Frontend_Exceptions_On_Target): Change default value to True.
3131 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3133 * sem_ch4.adb (Analyze_Selected_Component): Refine error
3134 detection when a selected component in the body of a synchronized
3135 type is a reference to an object of the same type declared
3136 elsewhere. The construct is legal if the prefix of the selected
3137 component includes an explicit dereference at any point.
3139 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3141 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3142 internally generated expressions when trying to determine whether
3143 a formal parameter of a tagged type subject to Extensions_Visible
3144 False is used to initialize an object.
3145 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3146 internally generated expressions when trying to determine whether
3147 a formal parameter of a tagged type subject to Extensions_Visible
3148 False is used in a type conversion.
3150 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3152 * sem_res.adb (Is_Protected_Operation_Call):
3153 Add guards to account for a non-decorated selected component.
3155 2016-04-18 Yannick Moy <moy@adacore.com>
3157 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3158 implementation of Body_Has_SPARK_Mode_On.
3159 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3160 New function replacing previous Get_SPARK_Mode_From_Pragma, that
3161 deals also with aspects.
3162 (Get_SPARK_Mode_Type): Make function internal again.
3163 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3164 Get_SPARK_Mode_From_Annotation.
3166 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3168 * contracts.adb (Analyze_Object_Contract): Update references to
3170 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3171 * ghost.adb Add with and use clauses for Sem_Disp.
3172 (Check_Ghost_Derivation): Removed.
3173 (Check_Ghost_Overriding):
3174 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
3175 (Check_Ghost_Primitive): New routine.
3176 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
3177 Update references to SPARK RM. (Is_OK_Pragma): Update references
3178 to SPARK RM. Predicates are now a valid context for references
3180 * ghost.ads (Check_Ghost_Derivation): Removed.
3181 (Check_Ghost_Overriding): Update the comment on usage.
3182 (Check_Ghost_Primitive): New routine.
3183 (Check_Ghost_Refinement): New routine.
3184 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3185 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3186 related to Ghost derivations
3187 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3188 related to the convention-like behavior of pragma Ghost.
3189 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3190 of a tagged type and its primitive agree.
3191 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3192 RM. Move the verification of pragma Assertion_Policy Ghost
3193 to the proper place. Remove the now obsolete check related
3194 to Ghost derivations.
3195 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3196 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3198 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3200 * layout.adb: Fix more minor typos in comments.
3202 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3204 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3206 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3208 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3209 mode, collect inherited class-wide conditions to generate the
3210 corresponding pragmas.
3211 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3212 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3213 procedure for overriding subprograms, used to generate the pragmas
3214 corresponding to an inherited class- wide pre- or postcondition.
3215 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3216 from contracts.adb (Replace_Condition_Entities): Subsidiary
3217 Build_Pragma_Check_Equivalent, to implement the proper semantics
3218 of inherited class-wide conditions, as given in AI12-0113.
3219 (Process_Class_Wide_Condition): Removed.
3220 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3221 in contract of subprogram, to collect inherited class-wide
3223 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3225 2016-04-18 Yannick Moy <moy@adacore.com>
3227 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3228 * a-calend.ads (Ada.Calendar): Mark package spec as
3229 SPARK_Mode and add synchronous external abstract state Clock_Time.
3231 2016-04-18 Yannick Moy <moy@adacore.com>
3233 * sem_res.adb (Resolve_Call): Prevent inlining of
3234 calls inside expression functions. Factor previous code issuing
3235 errors to call Cannot_Inline instead, which does appropriate
3236 processing of message for GNATprove.
3238 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3240 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3241 osint-b.adb: Cleanups.
3243 2016-04-18 Yannick Moy <moy@adacore.com>
3245 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3246 body to inline in GNATprove mode when SPARK_Mode On applies to
3248 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3251 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3253 * layout.adb: Fix minor typo in comment.
3254 * inline.adb: Fix minor pasto.
3255 * sem_ch12.ads: Fix minor typos in comments.
3257 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3259 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3260 handle some complex cases of tag indeterminate calls that are
3261 actuals in other dispatching calls that are themselves tag
3263 (Check_Dispatching_Context): Add parameter to support recursive
3264 check for an enclosing construct that may provide a tag for a
3265 tag-indeterminate call.
3267 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3269 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3270 Add global variables Task_Input_Seen and Task_Output_Seen.
3271 (Analyze_Global_Item): Detect an illegal use of the current
3272 instance of a single protected/task type in a global annotation.
3273 (Analyze_Input_Output): Inputs and output related to the current
3274 instance of a task unit are now tracked.
3275 (Check_Usage): Require
3276 the presence of the current instance of a task unit only when
3277 one input/output is available. (Current_Task_Instance_Seen):
3279 (Is_CCT_Instance): New parameter profile. Update
3280 the comment on usage. The routine now properly recognizes several
3281 cases related to single protected/task types.
3283 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3285 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3286 to create a brand new freeze node. This handles a case where an
3287 ignored Ghost context is freezing something which is not ignored
3288 Ghost and whose freeze node should not be removed from the tree.
3289 (New_Freeze_Node): New routine.
3291 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3293 * sigtramp.h (__gnat_set_is_vxsim) New function to
3294 tell sigtramp-vxworks to handle vxsim signal contexts. *
3295 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3296 differences in the sigcontext structure between the expected
3297 regular x86 or x86_64 ones and the ones received in case of
3298 exexution on the vxworks simulator.
3299 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3300 this information to sigtramp-vxworks.c. Remove the old mechanism for
3302 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3304 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3306 * exp_ch3.adb (Inline_Init_Proc): New function returning
3307 whether the initialization procedure of a type should be
3308 inlined. Return again True for controlled type themselves.
3309 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3310 (Build_Record_Init_Proc): Likewise.
3312 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3314 * gnatvsn.ads (Library_Version): Bump to 7.
3316 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3318 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3319 on the entity of a subprogram declaration that is completed by
3320 an expression function.
3322 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3324 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3325 declaration can appear in an aspect specification for a dynamic
3326 predicate, and a pragma for aspect Predicate_Failure.
3327 * exp_util.adb (Replace_Subtype_References): Replace current
3328 occurrences of the subtype to which a dynamic predicate applies,
3329 byt the expression that triggers a predicate check. Needed to
3330 implement new aspect Predicate_Failure.
3332 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3334 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3335 * Makefile.rtl: update accordingly.
3337 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3339 * sem_type.adb (Disambiguate): Call Covers only when necessary
3340 for standard operators.
3342 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3344 * atree.ads (Num_Extension_Nodes): Add couple of figures
3346 * atree.adb: Add GNAT.Heap_Sort_G dependency.
3347 (Print_Statistics): New exported procedure to print statistics.
3349 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3351 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
3352 as to be inlined if the type needs finalization.
3354 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3356 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
3357 alignment for x86_64.
3358 * init.c: Better fix for guard page reset on x86_64-vx7.
3359 Do not try to retrieve the page that actually raised
3360 the signal as the probing mechanism used on x86_64 do not allow
3361 such retrieval. We thus just test if the guard page is active,
3362 and re-activate it if not.
3364 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3366 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
3369 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3371 * affinity.c: Use the proper type for task id.
3372 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
3374 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3376 * sem_prag.adb (Process_Convention): Relax rule on exporting
3377 Intrinsic types if Relaxed_RM_Semantics is True.
3379 2016-04-18 Vincent Celier <celier@adacore.com>
3381 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
3382 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
3383 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
3384 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
3385 exp_ch3.ads, exp_unst.adb: Change "descendent" to
3386 "descendant" in comments, error messages and identifiers.
3387 * gcc-interface/decl.c: Ditto.
3389 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3391 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
3392 New_S only once at the beginning of the function.
3394 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
3396 * gcc-interface/decl.c (components_to_record): Restrict the previous
3397 change to fields with variable size.
3399 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
3401 * gcc-interface/decl.c (components_to_record): Add special case for
3402 single field with representation clause at offset 0.
3404 2016-03-16 Svante Signell <svante.signell@gmail.com>
3406 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
3407 * s-osinte-gnu.ads: New file.
3409 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
3411 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
3412 (Stack_Check_Limits): Set to False.
3413 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
3414 (Stack_Check_Limits): Set to False.
3415 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
3416 (Stack_Check_Limits): Set to False.
3417 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
3418 (Stack_Check_Limits): Set to False.
3419 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
3420 (Stack_Check_Limits): Set to False.
3422 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3424 * gcc-interface/trans.c (statement_node_p): New predicate.
3425 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
3426 not return dummy results for expressions attached to packed array
3427 implementation types.
3429 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3431 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
3432 the expression of a renaming manually in case #3.
3434 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
3436 * system-linux-s390.ads: Enable Stack_Check_Probes.
3437 * system-linux-s390.ads: Likewise.
3439 2016-02-29 Martin Liska <mliska@suse.cz>
3441 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
3442 Replace ENABLE_CHECKING macro with flag_checking.
3444 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3446 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
3447 handling of unconstrained array types as designated types into common
3448 processing. Also handle array types as incomplete designated types.
3450 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3452 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
3453 ASIS mode, fully lay out the minimal record type.
3455 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3457 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
3458 (build_return_expr): Likewise.
3459 (Call_to_gnu): If this is a function call and there is no target,
3460 create a temporary for the return value for all aggregate types,
3461 but never create it for a return statement. Push a binding level
3462 around the call in more cases. Remove obsolete code.
3464 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3466 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
3467 * gcc-interface/gigi.h (gigi): Remove useless attribute.
3468 (gnat_gimplify_expr): Likewise.
3469 (gnat_to_gnu_external): Declare.
3470 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
3471 code dealing with the expression of external constants into...
3472 Invoke gnat_to_gnu_external instead.
3473 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
3474 when not for a definition. Deal with COMPOUND_EXPR and variables with
3475 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
3476 'reference to a function call in a renaming. Remove obsolete test and
3477 adjust associated comment.
3478 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
3479 temporaries created to hold the return value, if any.
3480 (gnat_to_gnu_external): ...this. New function.
3481 * gcc-interface/utils.c (create_var_decl): Detect a constant created
3482 to hold 'reference to function call.
3483 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
3484 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
3486 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
3488 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
3489 the prefix denotes an entity which Has_Atomic_Components.
3490 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
3491 denotes an entity which Has_Atomic_Components.
3493 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
3495 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
3496 for fat pointer or scalar types.
3498 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
3500 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
3501 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
3502 Call maybe_character_value on the array bounds. Get to the base type
3503 of the index type and call maybe_debug_type on it.
3504 * gcc-interface/utils.c (finish_character_type): Add special treatment
3507 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
3509 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
3510 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
3512 2016-02-12 Jakub Jelinek <jakub@redhat.com>
3514 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
3515 neighbour -> neighbor.
3516 * prep.adb: Likewise.
3517 * prj.ads: Likewise.
3518 * prepcomp.adb: Likewise.
3519 * g-socket.ads: Likewise.
3520 * s-imgrea.adb: Likewise.
3521 * a-calend.adb: Likewise.
3522 * exp_disp.adb: Likewise.
3523 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
3524 * g-socket.adb: Likewise.
3525 * sem_ch12.adb: Likewise.
3526 * terminals.c: Likewise.
3528 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3530 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
3531 build_common_tree_nodes.
3533 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
3535 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
3536 DECL_IGNORED_P last.
3538 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
3540 * gcc-interface/gigi.h (enum attr_type): Rename into...
3541 (enum attrib_type): ...this.
3542 (struct attrib): Adjust.
3543 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
3545 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
3547 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
3548 literal if the entity is of a character type.
3549 * gcc-interface/lang.opt (fsigned-char): New option.
3550 * gcc-interface/misc.c (gnat_handle_option): Accept it.
3551 (gnat_init): Adjust comment.
3552 * gcc-interface/gigi.h (finish_character_type): New prototype.
3553 (maybe_character_type): New inline function.
3554 (maybe_character_value): Likewise.
3555 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
3556 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3557 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
3558 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
3559 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3560 Copy TYPE_STRING_FLAG from type to subtype.
3561 <E_Array_Type>: Deal with character index types.
3562 <E_Array_Subtype>: Likewise.
3563 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
3564 char_type_node throughout.
3565 (build_raise_check): Likewise.
3566 (get_type_length): Deal with character types.
3567 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
3569 <Attr_Pred>: Likewise.
3570 (Loop_Statement_to_gnu): Likewise.
3571 (Raise_Error_to_gnu): Likewise.
3572 <N_Indexed_Component>: Deal with character index types. Remove
3574 <N_Slice>: Likewise.
3575 <N_Type_Conversion>: Deal with character types. Minor tweak.
3576 <N_Unchecked_Type_Conversion>: Likewise.
3578 <N_Op_Eq>: Likewise.
3579 (emit_index_check): Delete.
3580 * gcc-interface/utils.c (finish_character_type): New function.
3581 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
3582 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
3583 with char_type_node.
3584 (build_call_raise): Likewise.
3585 (build_call_raise_column): Likewise.
3586 (build_call_raise_range): Likewise.
3588 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3590 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
3591 (build_call_raise_range): Likewise.
3592 (gnat_unsigned_type): Delete.
3593 (gnat_signed_type): Likewise.
3594 (gnat_signed_or_unsigned_type_for): New prototype.
3595 (gnat_unsigned_type_for): New inline function.
3596 (gnat_signed_type_for): Likewise.
3597 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
3598 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
3599 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
3600 and compute their base type from that.
3601 <E_Array_Subtype>: Remove duplicate declaration.
3602 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
3603 * gcc-interface/trans.c (get_type_length): Likewise.
3604 (Attribute_to_gnu): Likewise.
3605 (Loop_Statement_to_gnu): Likewise.
3606 (Call_to_gnu): Likewise.
3607 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
3608 and gnat_signed_type_for. Minor tweaks.
3609 (build_binary_op_trapv): Likewise.
3610 (emit_check): Likewise.
3611 (convert_with_check): Likewise.
3612 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
3613 functions. Minor tweaks.
3614 (Case_Statement_to_gnu): Remove dead code.
3615 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
3616 (init_code_table): Minor reordering.
3617 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
3618 (gnat_signed_type): Likewise.
3619 (gnat_signed_or_unsigned_type_for): New function.
3620 (unchecked_convert): Use directly the size in the test for precision
3621 vs size adjustments.
3622 (install_builtin_elementary_types): Call gnat_signed_type_for.
3623 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
3625 (build_goto_raise): New function taken from...
3626 (build_call_raise): ...here. Call it.
3627 (build_call_raise_column): Add KIND parameter and call it.
3628 (build_call_raise_range): Likewise.
3630 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3632 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
3633 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
3634 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
3635 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
3636 and tweak gnat_encodings tests throughout.
3637 (initial_value_needs_conversion): Likewise.
3638 (intrin_arglists_compatible_p): Likewise.
3639 * gcc-interface/misc.c (gnat_print_type): Likewise.
3640 (gnat_get_debug_type): Likewise.
3641 (gnat_get_fixed_point_type_info): Likewise.
3642 (gnat_get_array_descr_info): Likewise.
3643 (get_array_bit_stride): Likewise.
3644 (gnat_get_type_bias): Fix formatting.
3645 (enumerate_modes): Likewise.
3646 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3647 (add_decl_expr): Simplify NULL_TREE test.
3648 (end_stmt_group): Likewise.
3649 (build_binary_op_trapv): Fix formatting.
3650 (get_exception_label): Use switch statement.
3651 (init_code_table): Move around.
3652 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
3653 (gnat_poplevel): Likewise.
3654 (gnat_set_type_context): Likewise.
3655 (defer_or_set_type_context): Fix formatting.
3656 (gnat_pushdecl): Simplify NULL_TREE test.
3657 (maybe_pad_type): Likewise.
3658 (add_parallel_type): Likewise.
3659 (create_range_type): Likewise.
3660 (process_deferred_decl_context): Likewise.
3661 (convert): Likewise.
3662 (def_builtin_1): Likewise.
3663 * gcc-interface/utils2.c (find_common_type): Likewise.
3664 (build_binary_op): Likewise.
3665 (gnat_rewrite_reference): Likewise.
3666 (get_inner_constant_reference): Likewise.
3668 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3671 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
3672 the parent function instead of the current function in order to issue
3673 the warning or the error. Add guard for ignored functions.
3675 2016-01-17 Jakub Jelinek <jakub@redhat.com>
3677 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
3679 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3681 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
3682 of char * for path_val to avoid warnings.
3684 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
3686 * gcc-interface/utils.c: Bump copyright year.
3687 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
3688 the current lexical scope.
3690 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3692 * gnat_ugn.texi: Bump @copying's copyright year.
3693 * gnat_rm.texi: Likewise.
3695 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
3697 * gnatvsn.ads: Bump copyright year.
3700 Copyright (C) 2016 Free Software Foundation, Inc.
3702 Copying and distribution of this file, with or without modification,
3703 are permitted in any medium without royalty provided the copyright
3704 notice and this notice are preserved.