1 2016-06-14 Ed Schonberg <schonberg@adacore.com>
3 * contracts.adb (Has_Null_Body): Move to sem_util, for general
5 * sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
6 determine when an internal procedure created for some assertion
7 checking (e.g. type invariant) is a null procedure. Used to
8 eliminate redundant calls to such procedures when they apply to
9 components of composite types.
10 * exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
11 if invariant procedure has a null body.
13 2016-06-14 Thomas Quinot <quinot@adacore.com>
15 * g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
18 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
20 * exp_ch4.adb (Process_Action): Pass the action
21 list to Process_Transient_Object.
22 (Process_If_Case_Statements): Pass the action list to
23 Process_Transient_Object.
24 (Process_Transient_Object): Add new parameter Stmts and update the
25 comment on usage. When the context is a Boolean evaluation, insert
26 any finalization calls after the last statement of the construct.
28 2016-06-14 Tristan Gingold <gingold@adacore.com>
30 * einfo.adb, einfo.ads (Has_Timing_Event,
31 Set_Has_Timing_Event): Add Has_Timing_Event flag.
32 (Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
33 (Propagate_Type_Has_Flags): New procedure to factorize code.
34 * exp_ch3.adb (Expand_Freeze_Array_Type,
35 Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
36 * sem_ch3.adb (Access_Type_Decalaration): Initialize
37 Has_Timing_Event flag. (Analyze_Object_Declaration):
38 Move code that check No_Local_Timing_Events near
39 the code that check No_Local_Protected_Objects.
40 (Analyze_Private_Extension_Declaration, Array_Type_Declaration)
41 (Build_Derived_Type, Copy_Array_Base_Type_Attributes,
42 Process_Full_View) (Record_Type_Definition): Call
43 Propagate_Type_Has_Flags.
44 * sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
45 * sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
47 (Uninstall_Declaration): Call Propagate_Type_Has_Flags.
48 * sem_ch9.adb (Analyze_Protected_Definition): Call
49 Propagate_Type_Has_Flags.
51 2016-06-14 Arnaud Charlet <charlet@adacore.com>
53 * sem.ads: Minor style fix.
55 2016-06-14 Ed Schonberg <schonberg@adacore.com>
57 * sem_ch12.adb (Analyze_Associations): An actual parameter
58 with a box must be included in the count of actuals, to detect
59 possible superfluous named actuals that do not match any of the
60 formals of the generic unit in a formal package declaration.
62 2016-06-14 Justin Squirek <squirek@adacore.com>
64 * sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
65 of error output related to SPARK RM 6.1.7(3) and pragma
67 * sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
68 output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
69 * sem_prag.adb (Analyze_Pragma): Fix formatting of error output
70 related to SPARK RM 7.1.2(15) and pragma Volatile_Function
71 so that the values True and False are no longer surrounded by
73 * sem_res.adb (Resolve_Actuals): Fix formatting of error output
74 related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
76 2016-06-14 Arnaud Charlet <charlet@adacore.com>
78 * gnat1drv.adb (Adjust_Global_Switches): Enable access checks
80 * freeze.adb: Minor grammar fix in comment.
81 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
83 * lib.adb: Minor reformatting.
84 * sem_util.adb (Is_OK_Volatile_Context): Do
85 include Address in the supported attributes.
87 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
89 * exp_ch4.adb (Expand_N_Case_Expression):
90 Code cleanup. Finalize any transient controlled
91 objects on exit from a case expression alternative.
92 (Expand_N_If_Expression): Code cleanup.
93 (Process_Actions): Removed.
94 (Process_If_Case_Statements): New routine.
95 (Process_Transient_Object): Change the name of formal Rel_Node to
96 N and update all occurrences. Update the comment on usage. When
97 the type of the context is Boolean, the proper insertion point
98 for the finalization call is after the last declaration.
100 2016-06-14 Ed Schonberg <schonberg@adacore.com>
102 * lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
103 predicate to determine whether an entity appears in a context
104 for which a Deferred_Reference was created, because it is not
105 possible to determine when reference is analyzed whether it
106 appears in a context in which the entity is modified.
107 * sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
108 on assignment for an entity that has a deferred_reference.
110 2016-06-14 Javier Miranda <miranda@adacore.com>
112 * sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
113 come from source. Previously the reference was generated only if the
114 call comes from source but the call may be rewritten by the expander
115 thus causing the notification of spurious warnings.
117 2016-06-14 Arnaud Charlet <charlet@adacore.com>
119 * gnat1drv.adb: Remove further references to AAMP.
120 * checks.adb (Apply_Scalar_Range_Check): Take
121 Check_Float_Overflow info account.
122 * live.ads, live.adb Added subprogram headers and
123 start-of-processing-for comments.
124 * sem_ch12.adb (Instantiate_Package_Body): Do not suppress
125 checks when instantiating runtime units in CodePeer mode.
127 2016-06-14 Arnaud Charlet <charlet@adacore.com>
129 * exp_ch3.adb (Expand_N_Object_Declaration): Only consider
132 2016-06-14 Arnaud Charlet <charlet@adacore.com>
134 * switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
135 simple value propagation in CodePeer mode when warnings are disabled.
136 (Scan_Front_End_Switches): Enable relevant front-end switches
139 2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
141 * sem_util.adb (Is_OK_Volatile_Context): A
142 reference to a volatile object is considered OK if appears as
143 the prefix of attributes Address, Alignment, Component_Size,
144 First_Bit, Last_Bit, Position, Size, Storage_Size.
146 2016-06-14 Yannick Moy <moy@adacore.com>
148 * lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
149 subunits directly, as they are already traversed as part of the
150 top-level unit to which they belong.
151 (Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
152 (Generate_Dereference): Use unique definition place for special
153 variable __HEAP, to ensure correct sorting of references.
154 * lib-xref.adb (Generate_Reference): Use top-level unit in case
156 * lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
157 compute the top-level code unit for a source location of AST node,
158 that go past subunits.
160 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
162 * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
163 PARM_DECL when the parameter type is dummy.
164 * gcc-interface/trans.c (Call_to_gnu): Translate formal types before
167 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
169 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
170 PLUS_EXPR in the expression of a renaming.
172 2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
174 * gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
175 with calls to malloc.
177 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
179 * gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
180 constant, use the generic implementation of the middle-end; otherwise
181 turn the dynamic conditions into static conditions and simplify.
183 2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
185 * gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
187 2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
189 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
190 gnat_entity_name with temporary names for XUP and XUT types.
192 2016-06-10 Martin Sebor <msebor@redhat.com>
195 * gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
196 the nonnull attribute in type-generic builtins.
198 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
200 * gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
201 types are present before returning them. Remove final assertion.
202 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
204 <E_Protected_Type>: Likewise.
206 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
208 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
209 not elaborate Itypes.
211 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
213 * gcc-interface/utils.c (gnat_internal_attribute_table): Add support
214 for noinline and noclone attributes.
215 (handle_noinline_attribute): New handler.
216 (handle_noclone_attribute): Likewise.
218 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
220 * gcc-interface/trans.c (process_type): Beef up comment.
222 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
224 * gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
225 placeholder expressions here but...
226 * gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
227 Make an exception to the protection of a CALL_EXPR result with an
228 unconstrained type only in the same cases as Call_to_gnu.
230 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
232 * gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
233 with boolean rvalues and set the location directly. Do not set the
234 location in the other cases for a simple name.
235 (gnat_to_gnu_external): Clear the location on the expression.
237 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
239 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
240 useless 'else' statements and tidy up.
241 <E_Array_Subtype>: Fully deal with the declaration here.
242 <E_Incomplete_Type>: Use properly-typed constant.
243 Assert that we don't apply the special type treatment to dummy types.
244 Separate this treatment from the final back-annotation and simplify
245 the condition for the RM size.
246 (gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
247 (gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
248 * gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
250 (process_freeze_entity): Remove obsolete code.
251 (process_type): Minor tweaks.
253 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
255 * einfo.ads (Returns_Limited_View): Remove.
256 (Set_Returns_Limited_View ): Likewise.
257 * einfo.adb (Returns_Limited_View): Likewise.
258 (Set_Returns_Limited_View ): Likewise.
259 * freeze.adb (Late_Freeze_Subprogram): Remove.
260 (Freeze_Entity): Do not defer the freezing of functions returning an
261 incomplete type coming from a limited context.
263 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
265 * gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
266 * gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
267 (gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
268 of profiles for builtins here... Call gnu_ext_name_for_subprog.
269 Also update profiles if pointers to limited_with'ed types are
271 (gnat_to_gnu_param): Restore the correct source location information
272 for vector ABI warnings.
273 (associate_subprog_with_dummy_type): Add comment about AI05-019.
274 Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
275 (update_profile): Deal with builtin declarations.
276 Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
277 (update_profiles_with): Add comment.
278 (gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
279 Likewise for parameter declarations in most cases. Do not change
280 the return type for the CICO mechanism if the profile is incomplete.
281 ...but here instead. Always reset the slot for the parameters.
282 * gcc-interface/utils.c (create_subprog_decl): Call
283 gnu_ext_name_for_subprog. Do not set the assembler name here but...
284 (finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
286 2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
288 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
289 declaration of the corresponding record type before that of the
290 unprotected version of the subprograms that operate on it.
291 (Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
292 just before the original type.
293 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
294 declaration to the newly created declaration for the primitive.
295 (Analyze_Subtype_Declaration): Remove obsolete code forcing the
296 freezing of the subtype before its declaration.
297 (Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
298 declaration in the nearest enclosing scope for formal parameters too.
299 (Build_Derived_Access_Type): Restore the status of the created Itype
300 after it is erased by Copy_Node.
301 * sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
302 (Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
303 the specification is present.
304 Move around the code changing the designated view of the return type
305 and save the original view. Restore it on exit.
306 * sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
307 the declaration right after that of the type.
309 2016-06-01 Simon Wright <simon@pushface.org>
312 * g-comlin.adb (Display_Section_Help): Do not dereference
313 Config.Switches if it's null.
316 2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
318 * s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
319 (Get_Page_Size): Remove duplicate and return int.
321 2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
324 * s-osinte-rtems.ads (clock_getres): Define.
325 (Get_Page_Size): Remove duplicate and return int.
327 2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
329 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
330 Make same-sized subtypes of signed base types signed.
331 * gcc-interface/utils.c (make_type_from_size): Adjust to above change.
332 (unchecked_convert): Likewise.
334 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
336 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
337 a specific type for the object if it is deemed a constant.
339 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
341 * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
342 components of any elementary types and of composite types.
344 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
346 * freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
347 of testing for individual sizes.
348 (Freeze_Entity): Rework implementation of pragma Implicit_Packing for
349 array types, in particular test for suitable sizes upfront and do not
350 mimic the processing that will be redone later in Freeze_Array_Type.
352 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
354 * gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
357 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
359 * doc/gnat_rm/implementation_defined_attributes.rst
360 (Scalar_Storage_Order): Adjust restriction for packed array types.
361 * einfo.ads (Is_Bit_Packed_Array): Adjust description.
362 (Is_Packed): Likewise.
363 (Is_Packed_Array_Impl_Type): Likewise.
364 (Packed_Array_Impl_Type): Likewise.
365 * exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
366 if the prefix is not a packed array implemented specially.
367 * exp_ch6.adb (Expand_Actuals): Expand indexed components only for
368 bit-packed array types.
369 * exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
370 the PAT before analyzing its declaration.
371 (Create_Packed_Array_Impl_Type): Remove redundant statements.
372 * freeze.adb (Check_Component_Storage_Order): Reject packed array
373 components only if they are bit packed.
374 (Freeze_Array_Type): Fix logic detecting bit packing and do not bit
375 pack for composite types whose size is multiple of a byte.
376 Create the implementation type for packed array types only when it is
377 needed, i.e. bit packing or packing because of holes in index types.
378 Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
379 * gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
380 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
381 Call maybe_pad_type instead of building the padding type manually.
382 (gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
383 Packed_Array_Impl_Type is present for packed arrays.
384 (gnat_to_gnu_component_type): Also handle known alignment for packed
385 types by passing it to make_packable_type.
386 * gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
387 and deal with it in the array case. Adjust recursive call. Simplify
388 computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
390 2016-05-16 Thomas Quinot <quinot@adacore.com>
392 * freeze.adb (Check_Component_Storage_Order): Also get full view of
395 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
397 * exp_util.adb (Remove_Side_Effects): Also make a constant if we need
398 to capture the value for a small not by-reference record type.
399 * freeze.ads (Check_Compile_Time_Size): Adjust comment.
400 * freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
402 (Check_Compile_Time_Size): Merge scalar and access type cases. Change
403 variable name in array type case. For the computation of the packed
404 size, deal with record components and remove redundant test.
405 (Freeze_Array_Type): Also adjust packing status when the size of the
406 component type is in the range 33 .. 64 bits.
407 * doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
408 into elementary type throughout. Minor tweaks.
409 (Alignment Clauses): Document actual alignment of packed array types.
410 (Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
411 "simple" to the record case. Document effect on non packable types.
412 (Pragma Pack for Records): Likewise. Add record case and adjust.
414 2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
416 * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
417 cross case, use host_noncanonical instead of host as prefix.
418 (GNATBIND_FOR_HOST): Likewise.
419 (GNATLINK_FOR_HOST): Likewise.
420 (GNATLS_FOR_HOST): Likewise.
422 2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
425 * system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
426 * system-linux-armeb.ads: Likewise.
427 * system-linux-mips64el.ads: Likewise.
428 * system-linux-mips.ads: Likewise.
429 * system-linux-mipsel.ads: Likewise.
430 * system-linux-ppc64.ads: Likewise.
431 * system-linux-sparcv9.ads: Likewise.
432 * system-rtems.ads: Likewise.
434 2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
436 * s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
437 instead of __getpagesize.
439 2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
441 * gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
444 2016-05-02 Tristan Gingold <gingold@adacore.com>
446 * fname.adb (Is_Predefined_File_Name): Also consider non-krunched
449 2016-05-02 Ed Schonberg <schonberg@adacore.com>
451 * sem_util.adb (Aggregate_Constraint_Checks): Separate
452 accessibility checks and non-null checks for aggregate components,
453 to prevent spurious accessibility errors.
455 2016-05-02 Ed Schonberg <schonberg@adacore.com>
457 * sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
458 always legal in the in-place initialization of a limited entity
460 * sem_res.adb (Resolve_Allocator): Improve error message with RM
461 reference when allocator expression is illegal.
463 2016-05-02 Ed Schonberg <schonberg@adacore.com>
465 * exp_ch6.adb (Expand_Call): When inlining a call to a function
466 declared in a package instance, locate the instance node of the
467 package after the actual package declaration. skipping over
468 pragmas that may have been introduced when the generic unit
469 carries aspects that are transformed into pragmas.
471 2016-05-02 Bob Duff <duff@adacore.com>
473 * s-memory.adb (Alloc, Realloc): Move checks
474 for Size = 0 or size_t'Last into the Result = System.Null_Address
475 path for efficiency. Improve comments (based on actual C language
476 requirements for malloc).
477 * exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
478 case where we are using the default Global_Pool_Object, and we
479 don't need the heavy finalization machinery.
481 2016-05-02 Gary Dismukes <dismukes@adacore.com>
483 * exp_util.ads, sem_ch12.adb: Minor reformatting.
485 2016-05-02 Javier Miranda <miranda@adacore.com>
487 * exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
488 (Remove_Side_Effects): Adding a new formal.
489 * exp_ch6.adb (Expand_Simple_Function_Return): Generating the
490 call to the _Postconditions procedure ensure that side-effects
491 are unconditionally removed.
493 2016-05-02 Ed Schonberg <schonberg@adacore.com>
495 * sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
496 Use original node to determine whether the declaration is for
497 a formal type declaration, to take into account that formwl
498 private types are rewritten as private extension declarations
499 to simplify semantic analysis.
501 2016-05-02 Gary Dismukes <dismukes@adacore.com>
503 * exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
506 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
508 * sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
511 2016-05-02 Ed Schonberg <schonberg@adacore.com>
513 * exp_ch4.adb (Expand_N_Allocator): If the designated type
514 is a private derived type with no discriminants, examine its
515 underlying_full_view to determine whether the full view has
516 defaulted discriminants, so their defaults can be used in the
517 call to the initialization procedure for the designated object.
519 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
521 * exp_prag.adb, comperr.adb: Minor reformatting.
523 2016-05-02 Ed Schonberg <schonberg@adacore.com>
525 * exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
526 unchecked conversion if the source size is 0 (indicating that
527 its RM size is unknown). This will happen with packed arrays of
528 non-discrete types, in which case the component type is known
531 2016-05-02 Arnaud Charlet <charlet@adacore.com>
533 * debug.adb: Reserve -gnatd.V.
535 2016-05-02 Javier Miranda <miranda@adacore.com>
537 * sem_ch3.adb (Process_Full_View): Remove from visibility
538 wrappers of synchronized types to avoid spurious errors with
539 their wrapped entity.
540 * exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
541 if no interface primitive is covered by the subprogram and this is
542 not a primitive declared between two views; see Process_Full_View.
543 (Build_Protected_Sub_Specification): Link the dispatching
544 subprogram with its original non-dispatching protected subprogram
545 since their names differ.
546 (Expand_N_Protected_Type_Declaration):
547 If a protected subprogram overrides an interface primitive then
548 do not build a wrapper if it was already built.
549 * einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
550 * sem_ch4.adb (Names_Match): New subprogram.
551 * sem_ch6.adb (Check_Synchronized_Overriding): Moved
552 to library level and defined in the public part of the
553 package to invoke it from Exp_Ch9.Build_Wrapper_Spec
554 (Has_Matching_Entry_Or_Subprogram): New subprogram.
555 (Report_Conflict): New subprogram.
557 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
559 * s-unstyp.ads: Code cleanups.
561 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
563 * sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
565 2016-05-02 Ed Schonberg <schonberg@adacore.com>
567 * exp_prag.adb (Expand_attributes_In_Consequence,
568 Expand_Attributes): If the prefix of'Old is an unconstrained type,
569 for example an unconstrained formal of the enclosing subprogram,
570 create an object declaration with an expression to obtain the
571 actual subtype of the temporary.
573 2016-05-02 Arnaud Charlet <charlet@adacore.com>
575 * comperr.adb (Delete_SCIL_Files): Add missing handling of
576 N_Subprogram_Declaration.
578 2016-05-02 Gary Dismukes <dismukes@adacore.com>
580 * exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
581 gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
583 * sem_prag.adb, sem_ch12.adb: Minor typo fixes.
585 2016-05-02 Ed Schonberg <schonberg@adacore.com>
587 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
588 function call may be wrapped in an explicit type conversion.
590 2016-05-02 Jerome Lambourg <lambourg@adacore.com>
592 * interfac.ads: use pragma No_Elaboration_Code_All.
593 * s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
595 2016-05-02 Ed Schonberg <schonberg@adacore.com>
597 * sem.adb (Analyze: If node is an error node previously created
598 by the parser, disable expansion to prevent subsequent glitches
601 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
603 * sem_ch13.adb (Alignment_Error): Removed.
604 (Get_Alignment_Value): Code cleanup.
606 2016-05-02 Tristan Gingold <gingold@adacore.com>
608 * sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
609 to check for the no local protected objects restriction.
611 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
613 * einfo.adb Anonymous_Master now uses Node35.
614 (Anonymous_Master): Update the assertion and node reference.
615 (Set_Anonymous_Master): Update the assertion and node reference.
616 (Write_Field35_Name): Add output for Anonymous_Master.
617 (Write_Field36_Name): The output is now undefined.
618 * einfo.ads Update the node and description of attribute
619 Anonymous_Master. Remove prior occurrences in entities as this
620 is now a type attribute.
621 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
622 Ins_Node. Anonymous access- to-controlled component types no
623 longer need finalization masters. The master is now built when
624 a related allocator is expanded.
625 (Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
626 detect whether the record type has at least one component of anonymous
627 access-to- controlled type. These types no longer need finalization
628 masters. The master is now built when a related allocator is expanded.
629 * exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
630 (Current_Anonymous_Master): Removed.
631 (Expand_N_Allocator): Call Build_Anonymous_Master to create a
632 finalization master for an anonymous access-to-controlled type.
633 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
634 Call routine Build_Anonymous_Master to create a finalization master
635 for an anonymous access-to-controlled type.
636 * exp_ch7.adb (Allows_Finalization_Master): New routine.
637 (Build_Anonymous_Master): New routine.
638 (Build_Finalization_Master): Remove formal parameter
639 For_Anonymous. Use Allows_Finalization_Master to determine whether
640 circumstances warrant a finalization master. This routine no
641 longer creates masters for anonymous access-to-controlled types.
642 (In_Deallocation_Instance): Removed.
643 * exp_ch7.ads (Build_Anonymous_Master): New routine.
644 (Build_Finalization_Master): Remove formal parameter For_Anonymous
645 and update the comment on usage.
646 * sem_util.adb (Get_Qualified_Name): New routines.
647 (Output_Name): Reimplemented.
648 (Output_Scope): Removed.
649 * sem_util.ads (Get_Qualified_Name): New routines.
651 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
653 * debug.adb: Document the use of switch -gnatd.H.
654 * gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
656 (Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
657 * opt.ads: Add new option ASIS_GNSA_Mode.
658 * sem_ch13.adb (Alignment_Error): New routine.
659 (Analyze_Attribute_Definition_Clause): Suppress certain errors in
660 ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
662 (Check_Size): Use routine Size_Too_Small_Error to
663 suppress certain errors in ASIS mode.
664 (Get_Alignment_Value): Use routine Alignment_Error to suppress certain
666 (Size_Too_Small_Error): New routine.
668 2016-05-02 Arnaud Charlet <charlet@adacore.com>
670 * spark_xrefs.ads Description of the spark cross-references
671 clarified; small style fixes.
672 * lib-xref-spark_specific.adb (Add_SPARK_Scope,
673 Detect_And_Add_SPARK_Scope): consider protected types and bodies
674 as yet another scopes.
675 (Enclosing_Subprogram_Or_Library_Package): refactored using
676 Hristian's suggestions; added support for scopes of protected
677 types and bodies; fix for entries to return the scope of the
678 enclosing concurrent type, which is consistent with what is
679 returned for protected subprograms.
680 * sem_intr.adb: Minor style fix in comment.
682 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
684 * lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
685 put_spark_xrefs.adb: Minor reformatting.
687 2016-05-02 Doug Rupp <rupp@adacore.com>
689 * g-traceb.ads: Document traceback for ARM.
691 2016-05-02 Javier Miranda <miranda@adacore.com>
693 * exp_disp.adb (Make_Tags): Do not generate the
694 external name of interface tags adding the suffix counter since
695 it causes problems at link time when the IP routines are inlined
696 across units with optimization.
698 2016-05-02 Ed Schonberg <schonberg@adacore.com>
700 * einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
701 that predicate checking is disabled for predicated subtypes in
702 the context of an Assertion_Policy pragma.
703 * checks.adb (Apply_Predicate_Check): Do nothing if
704 Predicates_Ignored is true.
705 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
706 Predicates_Ignores is true, the function Rep_To_Pos does raise
707 an exception for invalid data.
708 * exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
709 type do not apply check if Predicates_Ignored is true.
710 * exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
711 is true, sem_prag.adb:
712 * sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
713 is true do not emit predicate check on initializing expression.
715 2016-05-02 Arnaud Charlet <charlet@adacore.com>
717 * get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
718 they are declared; refine type of a counter from Integer to Natural.
719 * sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
720 prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
721 exp_ch3.adb: Minor editing.
723 2016-05-02 Yannick Moy <moy@adacore.com>
725 * a-tigeli.adb (Get_Line): Always set Last prior to returning.
727 2016-05-02 Yannick Moy <moy@adacore.com>
729 * lib-xref.adb: Minor style fix in whitespace of declarations.
730 * put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
731 refactored without loops.
732 * put_spark_xrefs.ads (Write_Info_Str): new formal argument of
734 * spark_xrefs.adb (Write_Info_Str): new actual in instantiation
735 of generic procedure.
737 2016-05-02 Arnaud Charlet <charlet@adacore.com>
739 * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
740 (Detect_And_Add_SPARK_Scope): detect and add task type scope.
741 (Enclosing_Subprogram_Or_Package): Respect boundaries of task
742 and entry declarations.
743 * spark_xrefs.ads: minor typo in comment.
745 2016-05-02 Arnaud Charlet <charlet@adacore.com>
747 * make.adb: Minor: avoid an exception when calling gnatmake with
748 no argument and gnatmake is built with checks on.
749 * lib-xref-spark_specific.adb: Minor code cleanup.
751 2016-05-02 Ed Schonberg <schonberg@adacore.com>
753 * sem_util.adb (Normalize_Actuals): Take into account extra
754 actuals that may have been introduced previously. Normally extra
755 actuals are introduced when a call is expanded, but a validity
756 check may copy and reanalyze a call that carries an extra actual
757 (e.g. an accessibility parameter) before the call itself is
758 marked Analzyed, and the analysis of the copy has to be able to
759 cope with the added actual.
761 2016-05-02 Bob Duff <duff@adacore.com>
763 * sem_ch10.adb (Analyze_Compilation_Unit): Preserve
764 treeishness. Previous version had Context_Items shared between
767 2016-05-02 Ed Schonberg <schonberg@adacore.com>
769 * sem_aggr.adb (Resolve_Aggr_Expression): For both array and
770 record cases, apply predicate check on component for expression
771 only if expression has been analyzed already. For expressions
772 that need to be duplicated when they cover multiple components,
773 resolution and predicate checking take place later.
775 2016-05-02 Olivier Hainque <hainque@adacore.com>
777 * a-direct.adb (Delete_Tree): Use full names to designate subdirs
778 and files therein, instead of local names after a change of
781 2016-05-02 Thomas Quinot <quinot@adacore.com>
783 * freeze.adb (Check_Component_Storage_Order): Get full view of
786 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
788 * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
791 2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
793 * sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
794 of the container base type in case the container is a subtype.
795 * sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
796 the selector has an entity when checking for a component of a
799 2016-05-02 Arnaud Charlet <charlet@adacore.com>
802 * opt.ads (Latest_Ada_Only): New flag.
803 * sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
804 * usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
805 * einfo.ads (Has_Predicates, Predicate_Function):
806 Clarify that Has_Predicates does not imply that Predicate_Function
807 will return a non-empty entity.
809 2016-05-02 Ed Schonberg <schonberg@adacore.com>
811 * sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
812 check if type requires it.
813 * checks.adb (Apply_Predicate_Check): Disable checks in the
814 object declaration created for an expression with side-effects
815 that requires a predicate check to prevent infinite recursion
818 2016-05-02 Ed Schonberg <schonberg@adacore.com>
820 * sem_ch6.adb (Process_Formals): Check properly the type of a
821 formal to determine whether a given convention applies to it.
823 2016-05-02 Doug Rupp <rupp@adacore.com>
825 * tracebak.c: Add incantations for arm-vxworks[67] traceback.
827 2016-05-02 Thomas Quinot <quinot@adacore.com>
829 * freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
830 error, to have a component with implicit SSO within a composite type
831 that has explicit SSO.
833 2016-05-02 Bob Duff <duff@adacore.com>
835 * s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
837 2016-05-02 Ed Schonberg <schonberg@adacore.com>
839 * repinfo.adb (List_Entities): Make procedure recursive, to
840 provide representation information for subprograms declared
841 within subprogram bodies.
843 2016-05-02 Arnaud Charlet <charlet@adacore.com>
845 * exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
846 bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
847 gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
848 osint.adb: Remove dead code.
850 2016-05-02 Yannick Moy <moy@adacore.com>
852 * a-tigeli.adb (Get_Line): Fix bound for test to
853 decide when to compensate for character 0 added by call to fgets.
855 2016-05-02 Ed Schonberg <schonberg@adacore.com>
857 * sem_ch4.adb (Analyze_Allocator): If the expression does not
858 have a subtype indication and the type is an unconstrained tagged
859 type with defaulted discriminants, create an explicit constraint
860 for it during analysis to prevent out-of-order freezing actions
861 on generated classwide types.
863 2016-05-02 Javier Miranda <miranda@adacore.com>
865 * exp_ch5.adb (Expand_N_Assignment_Statement):
866 In the runtime check that ensures that the tags of source an
867 target match, add missing displacement of the pointer to the
868 objects if they cover interface types.
870 2016-05-02 Ed Schonberg <schonberg@adacore.com>
872 * sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
873 base type for attribute when type is discrete: transformation
874 is not needed for such types, and leads to spurious errors if
875 the context is a case construct.
877 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
879 * gcc-interface/decl.c (elaborate_reference_1): Do not bother about
880 operand #2 for COMPONENT_REF.
881 * gcc-interface/utils2.c (gnat_save_expr): Likewise.
882 (gnat_protect_expr): Likewise.
883 (gnat_stabilize_reference_1): Likewise.
884 (gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
885 (get_inner_constant_reference): Likewise.
886 (gnat_invariant_expr): Likewise.
887 * gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
889 2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
891 * gcc-interface/trans.c (Range_to_gnu): New static function.
892 (Raise_Error_to_gnu) <N_In>: Call it to translate the range.
893 (gnat_to_gnu) <N_In>: Likewise.
895 2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
897 * gcc-interface/Make-lang.in (ACATSCMD): New variable.
898 (check-acats): Use it.
899 (check_acats_targets): Likewise.
901 2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
904 * a-textio.adb (Get_Immediate): Add missing 'not' in expression.
906 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
908 * sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
909 incomplete type without full view.
910 * sem_ch6.adb (Exchange_Limited_Views): Change into a function and
911 return the list of changes.
912 (Restore_Limited_Views): New procedure to undo the transformation made
913 by Exchange_Limited_Views.
914 (Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
915 and call Restore_Limited_Views at the end, if need be.
916 (Possible_Freeze): Do not delay freezing because of incomplete types.
917 (Process_Formals): Remove kludges for class-wide types.
918 * types.h (By_Copy_Return): Delete.
919 * gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
920 (TYPE_DUMMY_IN_PROFILE_P): New macro.
921 * gcc-interface/gigi.h (update_profiles_with): Declare.
922 (finish_subprog_decl): Likewise.
923 (get_minimal_subprog_decl): Delete.
924 (create_subprog_type): Likewise.
925 (create_param_decl): Adjust prototype.
926 (create_subprog_decl): Likewise.
927 * gcc-interface/decl.c (defer_limited_with): Rename into...
928 (defer_limited_with_list): ...this.
929 (gnat_to_gnu_entity): Adjust to above renaming.
930 (finalize_from_limited_with): Likewise.
931 (tree_entity_vec_map): New structure.
932 (gt_pch_nx): New helpers.
933 (dummy_to_subprog_map): New hash table.
934 (gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
935 add FIRST parameter. Deal with the mechanism here instead of...
936 Do not make read-only variant of types. Simplify expressions.
937 In the by-ref case, test the mechanism before must_pass_by_ref
938 and also TYPE_IS_BY_REFERENCE_P before building the reference type.
939 (gnat_to_gnu_subprog_type): New static function extracted from...
940 Do not special-case the type_annotate_only mode. Call
941 gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
942 Deal with dummy return types. Likewise for parameter types. Deal
943 with by-reference types explicitly and add a kludge for null procedures
944 with untagged incomplete types. Remove assertion on the types and be
945 prepared for multiple elaboration of the declarations. Skip the whole
946 CICO processing if the profile is incomplete. Handle the completion of
947 a previously incomplete profile.
948 (gnat_to_gnu_entity) <E_Variable>: Rename local variable.
949 Adjust couple of calls to create_param_decl.
950 <E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
951 Remove specific deferring code.
952 <E_Access_Type>: Also deal with E_Subprogram_Type designated type.
953 Simplify handling of dummy types and remove obsolete comment.
954 Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
956 <E_Access_Subtype>: Tweak comment and simplify condition.
957 <E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
958 obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
960 <E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
961 inner break statements. Tidy up condition guarding direct use of the
963 (get_minimal_subprog_decl): Delete.
964 (finalize_from_limited_with): Call update_profiles_with on dummy types
965 with TYPE_DUMMY_IN_PROFILE_P set.
966 (is_from_limited_with_of_main): Delete.
967 (associate_subprog_with_dummy_type): New function.
968 (update_profile): Likewise.
969 (update_profiles_with): Likewise.
970 (gnat_to_gnu_profile_type): Likewise.
971 (init_gnat_decl): Initialize dummy_to_subprog_map.
972 (destroy_gnat_decl): Destroy dummy_to_subprog_map.
973 * gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
974 TYPE_UNIVERSAL_ALIASING_P.
975 (gnat_get_array_descr_info): Minor tweak.
976 * gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
977 (build_raise_check): Likewise.
978 (Compilation_Unit_to_gnu): Likewise.
979 (Identifier_to_gnu): Accept mismatches coming from a limited context.
980 (Attribute_to_gnu): Remove kludge for dispatch table entities.
981 (process_freeze_entity): Do not retrieve old definition if there is an
982 address clause on the entity. Call update_profiles_with on dummy types
983 with TYPE_DUMMY_IN_PROFILE_P set.
984 * gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
985 TYPE_REFERENCE_TO to the fat pointer type.
986 (create_subprog_type): Delete.
987 (create_param_decl): Remove READONLY parameter.
988 (finish_subprog_decl): New function extracted from...
989 (create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
990 VOLATILE_FLAG parameters and adjust.
991 (update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
994 2016-04-27 Arnaud Charlet <charlet@adacore.com>
996 * aa_util.adb, aa_util.ads: Removed, no longer used.
998 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1000 * sem_prag.adb (Analyze_Pragma): An object
1001 renaming declaration resulting from the expansion of an object
1002 declaration is a suitable context for pragma Ghost.
1004 2016-04-27 Doug Rupp <rupp@adacore.com>
1006 * init.c: Refine last checkin so the only requirement is the
1007 signaling compilation unit is compiled with the same mode as
1008 the compilation unit containing the initial landing pad.
1010 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1012 * sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
1013 specifications for Default_Iterator, including overloaded cases
1014 where no interpretations are legal, and return types that are
1017 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1019 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
1020 an accessibility check when the left hand side of the assignment
1021 denotes a container cursor.
1022 * exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
1023 * sem_ch4.adb (Find_Indexing_Operations): New routine.
1024 (Try_Container_Indexing): Code cleanup.
1026 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1028 * sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
1030 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1032 * errout.adb, errutil.adb: Minor reformatting.
1034 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1036 * sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
1037 Check that the classwide version is illegal when the prefix is
1038 an operation of an untagged synchronized type.
1040 2016-04-27 Arnaud Charlet <charleT@adacore.com>
1042 * sinput-l.ads, sem_ch13.adb: Minor editing.
1044 2016-04-27 Doug Rupp <rupp@adacore.com>
1046 * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
1047 Bump the pc so the lower order bit is set.
1049 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1051 * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
1052 enabled, report an empty range in a case construct.
1054 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1056 * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
1057 a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
1059 2016-04-27 Bob Duff <duff@adacore.com>
1061 * a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
1062 as is done for the other containers.
1064 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1066 * ghost.adb (In_Subprogram_Body_Profile): New routine.
1067 (Is_OK_Declaration): Treat an unanalyzed expression
1068 function as an OK context. Treat a reference to a Ghost entity
1069 as OK when it appears within the profile of a subprogram body.
1071 2016-04-27 Bob Duff <duff@adacore.com>
1073 * errout.ads: Document the fact that informational messages
1074 don't have to be warnings.
1075 * errout.adb (Error_Msg_Internal): In statistics counts, deal
1076 correctly with informational messages that are not warnings.
1077 (Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
1078 Set_Posted already checks for errors and ignores others.
1079 * erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
1080 if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
1081 implies Is_Warning_Msg.
1082 * errutil.adb (Error_Msg): In statistics counts, deal correctly
1083 with informational messages that are not warnings.
1085 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1087 * sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
1088 to determine whether a record type is a null record.
1089 * sem_ch3.adb (Analyze_Object_Declaration): If the type is a
1090 null record and there is no expression in the declaration,
1091 no predicate check applies to the object.
1093 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1095 * sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
1096 instantiated package should not cause freezing of previous contracts.
1098 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1100 * sem_dim.adb (Analyze_Dimension): Handle subtype declarations
1101 that do not come from source.
1102 (Analyze_Dimension_Subtype_Declaration): Allow confirming
1103 dimensions on subtype entity, either inherited from base type
1104 or provided by aspect specification.
1106 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1108 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1109 Add scalar formal object Zero, to allow detection and report
1110 when the matrix is singular.
1111 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
1112 Raise Constraint_Error if the Forward_Eliminate pass has
1113 determined that determinant is Zero.o
1114 * s-ngrear.adb (Solve): Add actual for Zero in corresponding
1116 * s-ngcoar.adb (Solve): Ditto.
1118 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1120 * sem_ch3.adb: Minor reformatting.
1122 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1124 * sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
1125 that identifier has a usable type before analysis, to handle
1126 properly identifiers introduced after some lexical/syntactic
1127 recovery that created new identifiers.
1129 2016-04-27 Bob Duff <duff@adacore.com>
1131 * a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
1132 exp_util.adb: Remove assertions that can fail in obscure cases when
1133 assertions are turned on but tampering checks are turned off.
1135 2016-04-27 Javier Miranda <miranda@adacore.com>
1137 * exp_ch6.adb (Add_Call_By_Copy_Code,
1138 Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
1139 whose type comes from the limited view.
1141 2016-04-27 Yannick Moy <moy@adacore.com>
1143 * a-textio.adb: Complete previous patch.
1145 2016-04-27 Yannick Moy <moy@adacore.com>
1147 * inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
1148 Error_Msg_N to issue message about impossibility to inline call,
1149 with slight change of message.
1151 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1153 * exp_spark.adb (Expand_Potential_Renaming): Removed.
1154 (Expand_SPARK): Update the call to expand a potential renaming.
1155 (Expand_SPARK_Potential_Renaming): New routine.
1156 * exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
1157 * sem.adb Add with and use clauses for Exp_SPARK.
1158 (Analyze): Expand a non-overloaded potential renaming for SPARK.
1160 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1162 * sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
1163 check full view for the presence of defaulted discriminants,
1164 even when the partial view of a private type has no visible and
1165 no unknown discriminants.
1167 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1169 * lib-xref.adb, exp_ch3.adb: Minor reformatting.
1171 2016-04-27 Nicolas Roche <roche@adacore.com>
1173 * rtinit.c: Add weak symbol __gnat_do_argv_expansion.
1175 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1177 * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
1178 cleanup. Check the original node when trying to determine the node kind
1179 of pragma Volatile's argument to account for untagged derivations
1180 where the type is transformed into a constrained subtype.
1182 2016-04-27 Olivier Hainque <hainque@adacore.com>
1184 * mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
1185 consistent posix interface on the caller side.
1187 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1189 * sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
1190 is a limited view of a type, initialize the Limited_Dependents
1191 field to catch misuses of the type in a client unit.
1193 2016-04-27 Thomas Quinot <quinot@adacore.com>
1195 * a-strunb-shared.adb (Finalize): add missing Reference call.
1196 * s-strhas.adb: minor grammar fix and extension of comment
1197 * sem_ch8.adb: minor whitespace fixes
1199 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1201 * lib-xref.adb (Get_Type_Reference): Handle properly the case
1202 of an object declaration whose type definition is a class-wide
1203 subtype and whose expression is a function call that returns a
1206 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1208 * sem_util.ads, sem_util.adb (Output_Entity): New routine.
1209 (Output_Name): New routine.
1211 2016-04-27 Bob Duff <duff@adacore.com>
1213 * exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
1215 2016-04-27 Vincent Celier <celier@adacore.com>
1217 * gnatcmd.adb: For "gnat ls -V -P", recognize switch
1218 --unchecked-shared-lib-imports and set the flag
1219 Opt.Unchecked_Shared_Lib_Imports accordingly.
1221 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1223 * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
1224 A generic subprogram is never a primitive operation, and thus
1225 a classwide condition for it is not legal.
1227 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1229 * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
1232 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1234 * sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
1235 (Resolve_Actuals): Flag effectively volatile objects with enabled
1236 property Async_Writers or Effective_Reads as illegal.
1237 * sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
1239 2016-04-27 Javier Miranda <miranda@adacore.com>
1241 * exp_ch3.adb (Make_Predefined_Primitive_Specs):
1242 Do not generate the profile of the equality operator if it has
1243 been explicitly defined as abstract in the parent type. Required
1244 to avoid reporting an spurious error.
1246 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1248 * sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
1249 procedure to compute the dimension vector of a scalar expression
1250 and compare it with the dimensions if its expected subtype. Used
1251 for the ultimate components of a multidimensional aggregate,
1252 whose components typically are themselves aggregates that are
1253 expanded separately. Previous to this patch, dimensionality
1254 checking on such aggregates generated spurious errors.
1255 * sem_aggr.adb (Resolve_Array_Aggregate): Use
1256 Check_Expression_Dimensions when needed.
1258 2016-04-27 Javier Miranda <miranda@adacore.com>
1260 * einfo.ads, einfo.adb (Corresponding_Function): New attribute
1261 (applicable to E_Procedure).
1262 (Corresponding_Procedure): New attribute (applicable to E_Function).
1263 * exp_util.adb (Build_Procedure_Form): Link the function with
1264 its internally built proc and viceversa.
1265 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1266 attribute Rewritten_For_C and Corresponding_Procedure to the body.
1267 * exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
1268 (Rewritten_For_C_Proc_Id): Removed.
1269 * exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
1270 locate the corresponding procedure.
1272 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1274 * sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
1275 corresponding pragma.
1277 2016-04-27 Bob Duff <duff@adacore.com>
1279 * exp_ch3.adb: Minor comment improvement.
1281 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1283 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
1284 return type is an untagged limited record with only access
1285 discriminants and no controlled components, the return value does not
1286 need to use the secondary stack.
1288 2016-04-27 Javier Miranda <miranda@adacore.com>
1290 * exp_util.adb (Remove_Side_Effects): When
1291 generating C code handle object declarations that have
1292 discriminants and are initialized by means of a call to a
1295 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1297 * a-textio.adb (Get_Line function): Handle properly the case of
1298 a line that has the same length as the buffer (or a multiple
1299 thereof) and there is no line terminator.
1300 * a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
1301 in the string when there is no previous line terminator and we
1302 need at most one additional character.
1304 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1306 * s-rident.ads: Make No_Implicit_Loops non partition wide.
1308 2016-04-27 Arnaud Charlet <charlet@adacore.com>
1310 * sem_ch11.adb (Analyze_Handled_Statements): check useless
1311 assignments also in entries and task bodies, not only in
1312 procedures and declaration blocks.
1313 * sem_ch5.adb (Analyze_Block_Statement): check useless
1314 assignements in declaration blocks as part of processing their
1315 handled statement sequence, just like it was done for procedures
1316 and now is also done for entries and task bodies.
1317 * sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
1318 of entries and task bodies just like of procedures.
1320 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1322 * sem_util.adb (Is_Volatile_Function): Recognize
1323 a function declared within a protected type as well as the
1324 protected/unprotected version of a function.
1326 2016-04-27 Bob Duff <duff@adacore.com>
1328 * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
1329 declaration of the form "X : T := Func (...);", where T is
1330 controlled, as a renaming.
1331 * a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
1332 to be an empty string, instead of null-ing out the Reference.
1333 * exp_util.adb (Needs_Finalization): Remove redundant code.
1335 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1337 * aspects.ads Aspects Export and Import do not require delay. They
1338 were classified as delayed aspects, but treated as non-delayed
1339 by the analysis of aspects.
1340 * freeze.adb (Copy_Import_Pragma): New routine.
1341 (Wrap_Imported_Subprogram): Copy the import pragma by first
1342 resetting all semantic fields to avoid an infinite loop when
1343 performing the copy.
1344 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
1345 comment on the processing of aspects Export and Import
1346 at the freeze point.
1347 (Analyze_Aspect_Convention: New routine.
1348 (Analyze_Aspect_Export_Import): New routine.
1349 (Analyze_Aspect_External_Link_Name): New routine.
1350 (Analyze_Aspect_External_Or_Link_Name): Removed.
1351 (Analyze_Aspect_Specifications): Factor out the analysis of
1352 aspects Convention, Export, External_Name, Import, and Link_Name
1353 in their respective routines. Aspects Export and Import should
1354 not generate a Boolean pragma because their corresponding pragmas
1355 have a very different syntax.
1356 (Build_Export_Import_Pragma): New routine.
1357 (Get_Interfacing_Aspects): New routine.
1359 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1361 * inline.adb (Add_Inlined_Body): Overhaul implementation,
1362 robustify handling of -gnatn1, add special treatment for
1363 expression functions.
1365 2016-04-27 Doug Rupp <rupp@adacore.com>
1367 * g-traceb.ads: Update comment.
1368 * exp_ch2.adb: minor style fix in object declaration
1370 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1372 * sem_elab.adb (Check_Internal_Call): Do not
1373 consider a call when it appears within pragma Initial_Condition
1374 since the pragma is part of the elaboration statements of a
1375 package body and may only call external subprograms or subprograms
1376 whose body is already available.
1377 (Within_Initial_Condition): New routine.
1379 2016-04-27 Ed Schonberg <schonberg@adacore.com>
1381 * exp_util.adb (Build_Procedure_Form): Prevent double generation
1382 of the procedure form when dealing with an expression function
1383 whose return type is an array.
1384 * sem_ch3.adb: Fix out-of order Has_Predicates setting.
1385 * exp_ch6.adb: Proper conversion for inherited operation in C.
1386 * sem_ch6.adb: Code cleanup.
1388 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1390 * lib-xref.ads, sem_ch10.adb: minor style fix in comment
1391 * g-socket.adb: Minor reformatting.
1392 * sinfo.ads: Minor comment correction.
1393 * sem_warn.ads: minor grammar fix in comment
1395 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1397 * gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
1398 (maybe_pad_type): Adjust comment.
1399 (finish_record_type): Likewise.
1400 (rest_of_record_type_compilation): Likewise.
1401 * gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
1402 parameter from integer to boolean. Adjust recursive calls.
1403 <E_Subprogram_Type>: Use copy_type and remove redundant assignments.
1404 <E_Signed_Integer_Subtype>: Adjust comment. Remove call to
1405 rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
1406 Pass false to finish_record_type. Set the debug type later.
1407 <E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
1408 (gnat_to_gnu_component_type): Fix formatting.
1409 (gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
1410 (gnat_to_gnu_type): Likewise.
1411 * gcc-interface/trans.c (Identifier_to_gnu): Likewise.
1412 (Loop_Statement_to_gnu): Likewise.
1413 (Subprogram_Body_to_gnu): Likewise.
1414 (Exception_Handler_to_gnu_fe_sjlj): Likewise.
1415 (Exception_Handler_to_gnu_gcc): Likewise.
1416 (Compilation_Unit_to_gnu): Likewise.
1417 (gnat_to_gnu): Likewise.
1418 (push_exception_label_stack): Likewise.
1419 (elaborate_all_entities_for_package): Likewise.
1420 (process_freeze_entity): Likewise.
1421 (process_decls): Likewise.
1422 (process_type): Likewise.
1423 * gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
1424 (maybe_pad_type): Adjust comments. Set the debug type later. Remove
1425 call to rest_of_record_type_compilation.
1426 (rest_of_record_type_compilation): Use copy_type.
1427 (copy_type): Use correctly typed constants.
1428 (gnat_signed_or_unsigned_type_for): Use copy_type.
1429 * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
1430 (build_goto_raise): Adjust call tognat_to_gnu_entity.
1432 2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
1434 * gcc-interface/misc.c (gnat_init): Do not call
1435 internal_reference_types.
1437 2016-04-27 Svante Signell <svante.signell@gmail.com>
1439 * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
1440 * s-osinte-gnu.ads: Small tweaks.
1441 * s-osinte-gnu.adb: New file.
1443 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1445 * sem_prag.adb (Match_Constituent): Treat a constant as a legal
1446 constituent even if it is not to prevent spurious errors.
1448 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1450 * sem_ch4.adb: Minor typo fixes and reformatting.
1452 2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
1454 * g-calend.ads (No_Time): The same value in any timezone.
1455 * g-socket.adb (Raise_Host_Error): Remove ending
1456 dot from original error message before append colon delimited
1459 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1461 * sem_ch3.adb: Code cleanup.
1462 * sem_ch6.adb: Code cleanup.
1463 (Is_Matching_Limited_View): New routine.
1464 (Matches_Limited_With_View): Reimplemented.
1465 * sem_ch10.adb (Decorate_Type): Code cleanup.
1467 2016-04-21 Doug Rupp <rupp@adacore.com>
1469 * tracebak.c (PPC ELF): Add macro defs for lynxos178e.
1471 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1473 * sem_ch4.adb (Try_Container_Indexing): If there are overloaded
1474 indexing functions, collect all overloadings of the call firts,
1475 and then transfer them to indexing node, to prevent interleaving
1476 of the set of interpretations of the nodes involved.
1477 * sem_res.adb (Resolve): Suppress cascaded errors that report
1478 ambiguities when one of the actuals in an overloaded generatlized
1479 indexing operation is illegal and has type Any_Type, as is done
1480 for similar cascaded errors in subprogram calls.
1481 (Valid_Tagged_Conversion): Cleanup conversion checks when one
1482 of the types involved is a class-wide subtype.
1484 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1486 * sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
1487 subprogram declaration within a wrapper package, skip pragmas
1488 that may have been generated by aspect specifications on the
1491 2016-04-21 Javier Miranda <miranda@adacore.com>
1493 * exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
1494 code return True for array identifiers since the backend needs
1495 to initialize such component by means of memcpy().
1497 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1499 * a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
1500 potentially uninitialized memory.
1501 * sem_ch3.adb: Minor style fix in comment.
1503 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1505 * gnat_rm.texi, gnat_ugn.texi,
1506 doc/gnat_ugn/gnat_project_manager.rst,
1507 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1508 doc/gnat_ugn/gnat_and_program_execution.rst,
1509 doc/gnat_ugn/gnat_utility_programs.rst,
1510 doc/gnat_ugn/the_gnat_compilation_model.rst,
1511 doc/gnat_rm/implementation_defined_attributes.rst,
1512 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
1513 doc/gnat_rm/implementation_defined_pragmas.rst,
1514 doc/gnat_rm/the_gnat_library.rst,
1515 doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
1516 * doc/Makefile: Cleanups.
1518 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1520 * exp_pakd.adb, sem_ch13.adb: Minor reformatting.
1522 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1524 * exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
1525 disambiguate local variables that may be hidden from inner visibility
1526 by nested block declarations or loop variables.
1528 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
1530 * s-soflin.adb: Initialize the Stack_Limit global variable.
1532 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1534 * lib-writ.adb: Minor reformatting.
1536 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1538 * exp_pakd.adb (Compute_Number_Components): New function to
1539 build an expression that computes the number of a components of
1540 an array that may be multidimensional.
1541 (Expan_Packed_Eq): Use it.
1543 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1545 * g-traceb.ads: Update list of supported platforms.
1547 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1549 * sem_ch13.adb (Add_Predicates): if the type is declared in
1550 an inner package it may be frozen outside of the package, and
1551 the generated pragma has not been analyzed yet, the expression
1552 for the predicate must be captured and added to the predicate
1553 function at this point.
1555 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1557 * contracts.adb (Analyze_Package_Body_Contract): Do not check
1558 for a missing package refinement because 1) packages do not have
1559 "refinement" and 2) the check for proper state refinement is
1560 performed in a different place.
1561 * einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
1562 (Has_Null_Visible_Refinement): Reimplemented.
1563 * sem_ch3.adb (Analyze_Declarations): Determine whether all
1564 abstract states have received a refinement and if not, emit
1566 * sem_ch7.adb (Analyze_Package_Declaration): Code
1567 cleanup. Determine whether all abstract states of the
1568 package and any nested packages have received a refinement
1569 and if not, emit errors.
1570 (Requires_Completion_In_Body): Add new formal parameter
1571 Do_Abstract_States. Update the comment on usage. Propagate the
1572 Do_Abstract_States flag to all Unit_Requires_Body calls.
1573 (Unit_Requires_Body): Remove formal
1574 parameter Ignore_Abstract_States. Add new formal paramter
1575 Do_Abstract_States. Propagate the Do_Abstract_States flag to
1576 all Requires_Completion_In calls.
1577 * sem_ch7.ads (Unit_Requires_Body): Remove formal
1578 parameter Ignore_Abstract_States. Add new formal paramter
1579 Do_Abstract_States. Update the comment on usage.
1580 * sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
1581 not initialize the constituent list as this is now done on a
1582 need-to-add-element basis.
1583 (Analyze_Single_Task_Declaration):
1584 Do not initialize the constituent list as this is now done on
1585 a need-to-add-element basis.
1586 * sem_ch10.adb (Decorate_State): Do not initialize the constituent
1587 lists as this is now done on a need-to-add-element basis.
1588 * sem_prag.adb (Analyze_Constituent): Set the
1589 refinement constituents when adding a new element.
1590 (Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
1591 adding a new element.
1592 (Analyze_Part_Of_Option): Set the Part_Of
1593 constituents when adding a new element.
1594 (Analyze_Pragma): Set the Part_Of constituents when adding a new
1596 (Check_Constituent_Usage (all versions)): Reimplemented.
1597 (Collect_Constituent): Set the refinement constituents when adding
1599 (Create_Abstract_State): Do not initialize the
1600 constituent lists as this is now done on a need-to-add-element basis.
1601 (Propagate_Part_Of): Set the Part_Of constituents when
1602 adding a new element.
1603 * sem_util.adb (Check_State_Refinements): New routine.
1604 (Has_Non_Null_Refinement): Reimplemented.
1605 (Has_Null_Refinement): Reimplemented.
1606 (Requires_State_Refinement): Removed.
1607 * sem_util.ads (Check_State_Refinements): New routine.
1608 (Requires_State_Refinement): Removed.
1610 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1612 * lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
1613 * sem.adb: Fix comment.
1615 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1617 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
1618 declaration with no aspects, whose subtype_mark is a subtype
1619 with predicates, inherits the list of subprograms for the type.
1621 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1623 * exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
1626 2016-04-21 Thomas Quinot <quinot@adacore.com>
1628 * g-socket.adb (Raise_Host_Error): Include additional Name parameter.
1630 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1632 * lib-writ.adb (Write_ALI): Do not record in ali file units
1633 that are present in the files table but not analyzed. These
1634 units are present because they appear in the context of units
1635 named in limited_with clauses, and the unit being compiled does
1636 not depend semantically on them.
1638 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1640 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
1641 create the procedure body for an function returning an array type,
1642 when generating C code. Reuse the subprogram body rather than
1643 creating a new one, both as an efficiency measure and because
1644 in an instance the body may contain global references that must
1647 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1649 * sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
1652 2016-04-21 Javier Miranda <miranda@adacore.com>
1654 * exp_aggr.adb (Component_Check): Extend
1655 the check that verifies that the aggregate has no function
1656 calls to handle transformations performed by the frontend.
1657 (Ultimate_Original_Expression): New subprogram.
1659 2016-04-21 Philippe Gil <gil@adacore.com>
1661 * krunch.adb (Krunch): Fix krunching of i-java.
1663 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1665 * exp_ch8.adb (Evaluation_Required): Always return
1666 True when Modify_Tree_For_C.
1668 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1670 * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
1671 * alloc.ads: Minor comment fixes.
1672 * einfo.ads: Fix typo.
1674 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1676 * exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
1677 changes to handle all cases of components depending on the
1678 discriminant, not just string literals.
1680 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1682 * sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
1683 declaration is the generated declaration for a generic actual,
1684 inherit predicates from the actual if it is a predicated subtype.
1686 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1688 * exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
1689 inherited and its result is controlling, introduce a conversion
1690 on the actual for the corresponding procedure call, to avoid
1691 spurious type errors.
1693 2016-04-21 Jerome Lambourg <lambourg@adacore.com>
1695 * krunch.adb (Krunch): Fix krunching of i-vxworks.
1697 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1699 * exp_aggr.adb: Minor reformatting and code cleanup.
1701 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1703 * sem_ch13.adb (Resolve_Name): Omit quantified expressions from
1704 resolution, because they introduce local names. Full resolution
1705 will take place when predicate function is constructed.
1707 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1709 * exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
1710 change to take into account Per_Object_Constraint field rather
1711 than special casing strings.
1712 * exp_ch6.adb: Fix typo in Replace_Returns.
1714 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1716 * sem_ch5.adb: Minor reformatting.
1718 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1720 * exp_aggr.adb (Backend_Processing_Possible): Return False
1721 when generating C and aggregate contains function calls.
1723 2016-04-21 Tristan Gingold <gingold@adacore.com>
1725 * krunch.adb (Krunch): Only partially krunch children of
1726 Interfaces that aren't known.
1728 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1730 * sem_prag.adb (Make_Inline): Handle properly the instantiation
1731 of a generic subpprogram that carries an Inline aspect. Place
1732 inline info on the anonymous subprogram that is constructed in
1733 the wrapper package.
1734 (Analyze_Pragma, case Pure): Do not check placement if pragma
1735 appears within an instantiation, which can be nested at any level.
1736 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
1737 node from anonymous subprogram to its visible renaming. The
1738 freeze node will be constructed if the subprogram carries
1740 (Set_Global): Preserve dimension information if present (from
1743 2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
1745 * gnatlink.adb: Change wording of the warning message on
1746 problematic filenames to be more neutral. Add a new substring
1747 "patch" introduced on Windows 10.
1749 2016-04-21 Philippe Gil <gil@adacore.com>
1751 * tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
1753 2016-04-21 Javier Miranda <miranda@adacore.com>
1755 * exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
1758 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1760 * einfo.adb (Has_Non_Null_Abstract_State): New routine.
1761 * einfo.ads New synthesized attribute
1762 Has_Non_Null_Abstract_State along with occurrences in entities.
1763 (Has_Non_Null_Abstract_State): New routine.
1764 * sem_ch7.adb (Unit_Requires_Body): Add local variable
1765 Requires_Body. A package declaring an abstract state requires
1766 a body only when the state is non-null and the package contains
1767 at least one other construct that requires completion in a body.
1768 * sem_util.adb (Mode_Is_Off): Removed.
1769 (Requires_State_Refinement): Remove an obsolete check. Code
1772 2016-04-21 Bob Duff <duff@adacore.com>
1774 * sem_attr.adb (Analyze_Attribute): In processing
1775 the 'Old attribute, a warning is given for infinite recursion. Fix
1776 the code to not crash when the prefix of 'Old denotes a protected
1778 * sem_ch5.adb (Analyze_Iterator_Specification):
1779 Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
1780 where the parameter would not be an object.
1782 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1784 * sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
1785 Etype or Underlying_Type of the operands.
1787 2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
1789 * atree.adb (Print_Statistics): Protect against overflows and
1790 print the memory consumption in bytes.
1791 * table.adb (Reallocate): Do the intermediate calculation of the new
1792 size using the Memory.size_t type.
1794 2016-04-21 Gary Dismukes <dismukes@adacore.com>
1796 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
1797 expansion of Attribute_Machine and Attribute_Model for AAMP.
1799 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1801 * freeze.adb: Disable previous change for now.
1803 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1805 * sem_ch8.adb (Find_Selected_Component): If prefix has an
1806 access type and designated type is a limited view, introduce
1807 an explicit dereference before continuing the analysis, and
1808 set its type to the non-limited view of the designated type,
1809 if we are in context where it is available.
1811 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1813 * freeze.adb: Freeze profile in ASIS mode.
1815 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1817 * sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
1818 * sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
1820 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1822 * exp_ch6.adb: Minor reformatting.
1824 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1826 * sem_ch13.adb: Minor comment update.
1828 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1830 * freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
1831 boolean parameter to determine whether freezing an overloadable
1832 entity freezes its profile as well. This is required by
1833 AI05-019. The call to Freeze_Profile within Freeze_Entity is
1834 conditioned by the value of this flag, whose default is True.
1835 * sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
1836 reference freezes the prefix, but it the prefix is a subprogram
1837 it does not freeze its profile.
1839 2016-04-21 Javier Miranda <miranda@adacore.com>
1841 * exp_util.adb (Build_Procedure_Form): No action needed for
1842 subprogram renamings since the backend can generate the call
1843 using the renamed subprogram. This leaves the tree more clean
1845 * exp_ch6.adb (Expand_Call): Extend previous patch for
1846 rewritten-for-c entities to handle subprogram renamings.
1847 (Rewrite_Function_Call_For_C): Handle subprogram renamings.
1849 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1851 * sem_ch13.adb: Code cleanup.
1853 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1855 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1856 created for SPARK_To_C, the entity must remain invisible so it
1857 does not overload subsequent references to the original function.
1858 * exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
1859 Handle Extended_Return_Statements by replacing it with a block
1860 with assignments and a simple return statement.
1861 * exp_util.adb (Build_Procedure_Form): Make procedure entity
1862 invisible after analyzing declaration, to prevent improper
1865 2016-04-21 Javier Miranda <miranda@adacore.com>
1867 * sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
1868 attribute Rewritten_For_C to the body since since the expander
1869 may generate calls using that entity.
1870 * exp_ch6.adb (Expand_Call): For internally generated
1871 calls ensure that they reference the entity of the spec
1872 of the called function.
1873 (Rewritten_For_C_Func_Id): New subprogram.
1874 (Rewritten_For_C_Proc_Id): New subprogram.
1875 (Rewrite_Function_Call_For_C): Invoke the new subprogram to
1876 ensure that we skip freezing entities.
1877 * exp_util.adb (Build_Procedure_Form): No action needed if the
1878 procedure was already built.
1880 2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
1882 * sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
1885 2016-04-21 Ed Schonberg <schonberg@adacore.com>
1887 * sem_util.adb (Denotes_Iterator): Use root type to determine
1888 whether the ultimate ancestor is the predefined iterator
1890 * exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
1891 and avoid reuse of Pack local variable.
1893 2016-04-21 Olivier Hainque <hainque@adacore.com>
1895 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1896 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1897 system-vxworks-mips.ads, system-vxworks-x86.ads: Define
1898 Executable_Extension to ".out".
1900 2016-04-21 Javier Miranda <miranda@adacore.com>
1902 * frontend.adb: Update call to Unnest_Subprograms.
1903 * exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
1904 (Unnest_Subprograms): Moved to package exp_unst.
1905 * exp_unst.ads (Unnest_Subprogram): Moved to the body of the
1907 * exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
1908 enumeration literals when generating C code.
1910 2016-04-21 Javier Miranda <miranda@adacore.com>
1912 * frontend.adb: Remove call to initialize Exp_Ch6.
1913 * exp_ch6.ads, exp_ch6.adb (Initialize): removed.
1914 (Unest_Entry/Unest_Bodies): Removed.
1915 (Unnest_Subprograms): Code cleanup.
1917 2016-04-21 Arnaud Charlet <charlet@adacore.com>
1919 * set_targ.adb (Read_Target_Dependent_Values):
1920 close target description file once its contents is read.
1921 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
1922 and Stderr_File): Close local file descriptors before spawning
1924 * exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
1925 local variables to make the code easier to understand and avoid
1926 duplicated calls to Parent and Generic_Parent.
1928 2016-04-20 Bob Duff <duff@adacore.com>
1930 * s-os_lib.ads: Minor comment fix.
1932 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1934 * exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
1935 a discriminant check for a type whose partial view has unknown
1936 discriminants when the full view has discriminants with defaults.
1938 2016-04-20 Javier Miranda <miranda@adacore.com>
1940 * exp_util.adb (Remove_Side_Effects): When generating C code
1941 remove side effect of type conversion of access to unconstrained
1943 (Side_Effect_Free): Return false for the type
1944 conversion of access to unconstrained array type when generating
1946 * sem_res.adb (Resolved_Type_Conversion): Remove side effects
1947 of access to unconstrained array type conversion when generating
1950 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1952 * sem_ch13.adb (Build_Predicate_Function_Declaration): New
1953 function, to construct the declaration of a predicate function
1954 at the end of the current declarative part rather than at the
1955 (possibly later) freeze point of the type. This also allows uses
1956 of a type with predicates in instantiations elsewhere.
1957 (Resolve_Aspect_Expression): New procedure to detect visiblity
1958 errors in aspect expressions, at the end of the declarative part
1959 that includes the type declaration.
1960 * sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
1961 predicate function from private to full view.
1962 * einfo.adb (Predicate_Function): Refine search for predicate
1963 function when type has a full view and predicate function may
1964 be defined on either view.
1966 2016-04-20 Javier Miranda <miranda@adacore.com>
1968 * frontend.adb: Passing the root of the tree to
1969 Unnest_Subprograms().
1970 * exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
1971 took care of adding subprograms to the Unest_Bodies table since
1972 performing such action too early disables the ability to process
1973 generic instantiations.
1974 (Unnest_Subprograms): Adding parameter.
1975 (Search_Unnesting_Subprograms): New subprogram.
1976 * exp_ch6.ads (Unnest_Subrograms): Update documentation.
1978 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
1980 * exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
1982 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1984 * exp_unst.adb (Check_Static_Type): For a private type, check
1987 2016-04-20 Ed Schonberg <schonberg@adacore.com>
1989 * sem_attr.adb (Check_Type): Reject an attribute reference in
1990 an aspect expression, when the prefix of the reference is the
1991 current instance of the type to which the aspect applies.
1993 2016-04-20 Bob Duff <duff@adacore.com>
1995 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
1996 hiding unless we're actually hiding something. The previous
1997 code would (for example) warn about a "<" on a record type
1998 because it incorrectly thought it was hiding the "<" on Boolean
1999 in Standard. We need to check that the homonym S is in fact a
2000 homograph of a predefined operator.
2002 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2004 * exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
2005 from exp_ch6.adb, for use in SPARK_To_C mode when creating the
2006 procedure equivalent to a function returning an array, when this
2007 construction is deferred to the freeze point of the function.
2008 * sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
2009 function that renames an instance of Unchecked_Conversion.
2010 * freeze.adb (Freeze_Subprogram): Generate the proper procedure
2011 declaration for a function returning an array.
2012 * exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2014 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2016 * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
2017 New predicate to determine that in a context with full run-time,
2018 a function call is an expansion of a reference to attribute
2020 * sem_ch5.adb (Analyze_Function_Call): use it.
2021 * exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2023 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2025 * einfo.adb Flag286 is now used as Is_Exception_Handler.
2026 (Is_Exception_Handler): New routine.
2027 (Set_Is_Exception_Handler): New routine.
2028 (Write_Entity_Flags): Output the status of Is_Exception_Handler.
2029 * einfo.ads New attribute Is_Exception_Handler along with
2030 occurrences in entities.
2031 (Is_Exception_Handler): New routine along with pragma Inline.
2032 (Set_Is_Exception_Handler): New routine along with pragma Inline.
2033 * exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
2034 for exception handlers with a choice parameter.
2035 * sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
2036 generated for a choice parameter as an exception handler.
2038 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2040 * sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
2041 (Constrain_Discriminated_Type): In an instance, if the type has
2042 unknown discriminants, use its full view.
2043 (Process_Subtype): Check that the base type is private before
2044 adding subtype to Private_Dependents list.
2046 2016-04-20 Bob Duff <duff@adacore.com>
2048 * sem_ch13.adb: Minor comment fix.
2050 2016-04-20 Yannick Moy <moy@adacore.com>
2052 * sem_ch4.adb: Fix typos in comments.
2053 * sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2055 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2057 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
2058 current instance of a task type is legal if the prefix is an
2059 expression of that task type and the selector is an entry or
2062 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2064 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
2065 varsize field at the end for efficiency.
2067 2016-04-20 Vincent Celier <celier@adacore.com>
2069 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
2070 ls" includes the switch -V.
2071 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
2073 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
2076 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2078 * sem_ch12.adb (Qualify_Type): Do not perform
2079 partial qualification when the immediate scope is a generic unit.
2081 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2083 * exp_unst.adb: Minor reformatting.
2085 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2087 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
2088 tag assignment and adjustment preceed the accessibility check.
2089 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2091 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2093 * exp_prag.adb (Expand_Attributes): Ensure that
2094 the temporary used to capture the value of attribute 'Old's
2095 prefix is properly initialized.
2097 2016-04-20 Javier Miranda <miranda@adacore.com>
2099 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
2102 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2104 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
2107 2016-04-20 Vincent Celier <celier@adacore.com>
2109 * make.adb: Code cleanup.
2111 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2113 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
2116 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2118 * sem_ch12.adb (Copy_Generic_Node): Handle the special
2119 qualification installed for universal literals that act as
2120 operands in binary or unary operators. (Qualify_Operand): Mark
2121 the qualification to signal the instantiation mechanism how to
2122 handle global reference propagation.
2123 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
2124 (Set_Is_Qualified_Universal_Literal): New routine.
2125 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
2126 with occurrences in nodes.
2127 (Is_Qualified_Universal_Literal):
2128 New routine along with pragma Inline.
2129 (Set_Is_Qualified_Universal_Literal): New routine along with
2132 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2134 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
2135 so that the corresponding checks are preserved across compilations
2136 that include System.Constants in their context.
2138 2016-04-20 Gary Dismukes <dismukes@adacore.com>
2140 * sem_type.adb: Minor typo fix and reformatting.
2141 * a-conhel.ads: Update comment.
2143 2016-04-20 Bob Duff <duff@adacore.com>
2145 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
2146 code so it doesn't trigger an "uninit var" warning.
2148 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2150 * sem_attr.ads Add new table Universal_Type_Attribute.
2151 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
2152 checking attributes.
2154 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2156 * exp_aggr.adb (Init_Stored_Discriminants,
2157 Init_Visible_Discriminants): New procedures, subsidiary of
2158 Build_Record_Aggr_Code, to handle properly the construction
2159 of aggregates for a derived type that constrains some parent
2160 discriminants and renames others.
2162 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2164 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
2165 (Save_References_In_Operator): Add explicit qualifications in
2166 the generic template for all operands of universal type.
2167 * sem_type.adb (Disambiguate): Update the call to Matches.
2168 (Matches): Reimplemented.
2169 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2171 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2173 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
2174 an illegal aspect that freezes the entity to which it applies.
2176 2016-04-20 Bob Duff <duff@adacore.com>
2178 * a-stwibo.ads, a-stzbou.ads
2179 ("="): Add overriding keyword before function to avoid crash when
2180 compiler is called with -gnatyO (check overriding indicators).
2182 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2184 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
2185 is a configuration pragma and it uses the ARG syntax, insert
2186 the rewritten pragma after the current one rather than using
2189 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2191 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
2194 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2196 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
2197 s-imglli.adb: Minor reformatting.
2199 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2201 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
2202 renamed operator when the associated node appears within a
2204 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2206 2016-04-20 Yannick Moy <moy@adacore.com>
2208 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
2209 * einfo.adb (Set_Overridden_Operation): Add assertion.
2210 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
2213 2016-04-20 Javier Miranda <miranda@adacore.com>
2215 * exp_unst.adb (Append_Unique_Call): New subprogram.
2216 (Unnest_Subprogram): Replace the unique occurrence
2217 of Call.Append() by Append_Unique_Call() which protects us from
2218 adding to the Calls table duplicated entries.
2220 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2222 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
2223 * xref_lib.ads (Dependencies_Tables): instantiate
2224 Table package with types that guarantee its safe use.
2225 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
2228 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2230 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
2231 Disable expansion when generating C code.
2232 * sinfo.ads, inline.ads: Minor editing.
2234 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2236 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
2239 2016-04-20 Javier Miranda <miranda@adacore.com>
2241 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2242 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
2243 declaration of the internally built _postcondition procedure.
2245 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2247 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
2249 * sem_util.adb (Is_Unchecked_Conversion_Instance):
2250 defense against library-level renamings of other functions,
2251 which are never instances of Unchecked_Conversion.
2252 * einfo.ads: minor fix of casing in comment
2254 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2256 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
2257 that has been analyzed and expanded already. Qualify the names
2258 in the proper body for use in the generation of C code.
2260 2016-04-20 Javier Miranda <miranda@adacore.com>
2262 * contracts.adb (Build_Postconditions_Procedure): Force its
2263 inlining when generating C code.
2264 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
2265 _postconditions when generating C code.
2266 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
2267 _postconditions when generating C code.
2268 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
2269 types of return value and argument changed from Node_Id to
2272 2016-04-20 Vincent Celier <celier@adacore.com>
2274 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2276 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
2278 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
2279 the Has_Delayed_Freeze flag on the anonymous instance node.
2281 2016-04-20 Javier Miranda <miranda@adacore.com>
2283 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
2284 scope associated with the renaming object declaration.
2285 * exp_util.adb (Insert_Actions): Remove handling of iterator
2286 loop marked as requiring the secondary stack.
2288 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2290 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
2291 AI12-0124, which extends the functionality of the attribute so it
2292 reflects the semantics of GNAT 'Img when applied to scalar types.
2293 * lib-xref.adb: minor whitespace layout fix.
2295 2016-04-20 Vincent Celier <celier@adacore.com>
2297 * clean.adb (Gnatclean): Fail if project file specified and
2298 gprclean is not available.
2299 * gnatname.adb: Fail is -P is used and gprname is not available.
2300 * make.adb (Initialize): Fail if project file specified and
2301 gprbuild is not available.
2303 2016-04-20 Bob Duff <duff@adacore.com>
2305 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
2306 stack when possible.
2308 2016-04-20 Gary Dismukes <dismukes@adacore.com>
2310 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
2313 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2315 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
2316 If the pragma comes from an aspect specification, verify that
2317 the aspect applies to an entity with a declarative part.
2318 * exp_ch5.adb: Code cleanup.
2320 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2322 * sem_res.adb (Resolve_If_Expression): If first expression is
2323 universal, resolve subsequent ones with the corresponding class
2324 type (Any_Integer or Any_Real).
2326 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2328 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
2329 disabled, complete the analysis of the iterator name to ensure
2330 that reference for entities within are properly generated.
2332 2016-04-20 Arnaud Charlet <charlet@adacore.com>
2334 * a-dispat.ads (Yield): add Global contract.
2335 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
2336 * a-taside.adb: Added Initializes => Tasking_State.
2338 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2340 * sem_ch13.adb (Build_Invariant_Procedure):
2341 Reimplement the invariant procedure spec and body insertion.
2343 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
2345 * sem_ch13.adb (Add_Invariant): Do not replace
2346 the saved expression of an invariatn aspect when inheriting
2347 a class-wide type invariant as this clobbers the existing
2348 expression. Do not use New_Copy_List as it is unnecessary
2349 and leaves the parent pointers referencing the wrong part of
2350 the tree. Do not replace the type references for ASIS when
2351 inheriting a class-wide type invariant as this clobbers the
2352 existing replacement.
2354 2016-04-20 Ed Schonberg <schonberg@adacore.com>
2356 * sem_util.adb (Build_Explicit_Dereference): If the designated
2357 expression is an entity name, generate reference to the entity
2358 because it will not be resolved again.
2360 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2362 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
2363 gnat_rm.texi: Update documentation.
2365 2016-04-19 Olivier Hainque <hainque@adacore.com>
2367 * par_sco.adb (Traverse_One, case N_Case_Statement):
2368 Skip pragmas before the first alternative.
2369 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2371 2016-04-19 Tristan Gingold <gingold@adacore.com>
2373 * adaint.c (__gnat_lwp_self): New function (for darwin).
2374 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
2377 2016-04-19 Olivier Hainque <hainque@adacore.com>
2379 * sem_util.adb (Build_Elaboration_Entity): Always request an
2380 elab counter when preserving control-flow.
2382 2016-04-19 Olivier Hainque <hainque@adacore.com>
2384 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
2385 Needs_Debug_Info when producing SCOs.
2386 * par_sco.adb (Traverse_Aspects): Fix categorization of
2387 Type_Invariant to match actual processing as activated depending
2388 on pragma Assertion_Policy.
2389 * sem_prag.adb (Analyze_Pragma): Remove special case for
2390 Name_Invariant regarding SCO generation, which completely disabled
2391 the production of SCOs for Invariant pragmas and aspects.
2393 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2395 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
2398 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2400 * freeze.adb (Freeze_Profile): Refine predicate that checks
2401 whether a function that returns a limited view is declared in
2402 another unit and cannot be frozen at this point.
2404 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2406 * exp_aggr.adb (Component_Count): Handle properly superflat
2407 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
2408 return value of the function is Natural, rather than leaving
2409 the handling of such arrays to the caller of this function.
2411 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2413 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
2414 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
2415 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
2416 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
2417 to publicly visible routine in Sem_Util.
2419 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2421 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
2422 the check if the type of the actual is By_Reference.
2424 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2426 * sem_res.adb (Within_Subprogram_Call): Detect
2427 also nodes that appear in entry calls.
2428 (Resolve_Actuals, Insert_Default): Propagate
2429 dimension information if any, from default expression to the
2430 copy that appears in the list of actuals.
2431 * uintp.ads: minor whitespace fix in comment.
2432 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
2434 * set_targ.adb (Set_Targ): convert directly from
2435 Natural to Pos, without intermediate conversion to Int.
2437 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2439 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
2440 SPARK RM in comment.
2441 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
2443 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
2444 to SPARK RM in both comment and error message.
2446 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
2448 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
2449 CW type, then the subprogram must have a delayed freeze. This
2450 ensures that the backend can properly recover the full view when
2451 elaborating the access subprogram declaration.
2453 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2455 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
2456 overloadable entity if originally overloaded.
2458 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2460 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
2461 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
2462 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
2463 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
2466 2016-04-19 Arnaud Charlet <charlet@adacore.com>
2468 * sem_util.adb (Copy_Node_With_Replacement):
2469 use Set_Comes_From_Source instead of directly manipulating
2470 internals of the node table.
2471 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
2472 * sem_aux.adb (Get_Rep_Pragma,
2473 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
2474 do not change as constants and initialize them in the declaration.
2475 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
2476 variables that do not change as constants and initialize them
2479 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2481 * sem_res.adb (Resolve_Entry_Call): If the entry has
2482 preconditions it is rewritten by means of a wrapper that
2483 incorporates the original call. Before rewriting generate a
2484 reference to the entry being called to prevent spurious warnings
2485 and provide correct cross-reference information.
2487 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2489 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
2490 local constant Scop. Ignore any internally generated loops when
2491 performing the check concerning an abstract subprogram call
2492 without a controlling argument.
2493 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
2495 2016-04-19 Bob Duff <duff@adacore.com>
2497 * sem_elab.adb (Check_A_Call): There are cases where we have No
2498 (Ent) after the Alias loop, even when there was no previous error,
2499 so we can't assert that there was an error.
2501 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2503 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
2504 Reject use of type name as a prefix to 'access within an aggregate
2505 in a context that is not the declarative region of a type.
2507 2016-04-19 Vincent Celier <celier@adacore.com>
2509 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
2510 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
2511 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
2512 Remove anything related to project files
2513 * g-mbdira.adb: minor whitespace cleanup
2514 * g-spipat.adb: minor removal of extra spaces after closing paren
2516 2016-04-19 Ed Schonberg <schonberg@adacore.com>
2518 * exp_ch6.adb (Expand_Actuals): If post-statements are present
2519 and the enclosing context is a function call or indexing, build
2520 an Expression_With_Actions for the call.
2522 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
2524 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
2525 a with line for an ignored Ghost unit.
2526 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
2527 Par. A child package is Ghost when its parent is Ghost.
2528 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
2529 a subprogram declaration that acts as a compilation unit.
2531 2016-04-18 Michael Matz <matz@suse.de>
2533 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
2534 (gnat_to_gnu_field): Ditto.
2535 (components_to_record): Ditto.
2536 (create_variant_part_from): Ditto.
2537 (copy_and_substitute_in_size): Ditto.
2538 (substitute_in_type): Ditto.
2539 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
2540 (make_packable_type): Ditto.
2541 (maybe_pad_type): Ditto.
2542 (finish_fat_pointer_type): Ditto.
2543 (finish_record_type): Ditto and use SET_DECL_ALIGN.
2544 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
2545 (create_field_decl): Use SET_DECL_ALIGN.
2547 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2549 * einfo.adb (Overridden_Operation): assert that
2550 function is called for valid arguments.
2551 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
2552 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
2553 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
2554 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
2555 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
2556 No space after closing parenthesis except where required for
2558 * sem_res.adb: Minor reformatting.
2560 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2562 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
2563 statement when relevant.
2565 2016-04-18 Bob Duff <duff@adacore.com>
2567 * a-cuprqu.adb (Enqueue): Properly handle the
2568 case where the new element has a unique priority.
2570 2016-04-18 Tristan Gingold <gingold@adacore.com>
2572 * adaint.h: Define stat structures and functions for iOS
2575 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2577 * sem_res.adb (Resolve_Entry_Call): reset
2578 Is_Overloaded flag after resolving calls to overloaded protected
2580 * exp_spark.adb (Expand_SPARK): call
2581 Qualify_Entity_Names for tasking nodes, i.e. protected types,
2582 task types and entries.
2583 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
2584 in case of an unconstrained type.
2586 2016-04-18 Yannick Moy <moy@adacore.com>
2588 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
2589 comment to document usage of subprogram in GNATprove.
2591 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2593 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
2594 message for wrong placement of aspect Test_Case.
2596 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2598 * einfo.ads: Update the documentation of attribute Renamed_Object.
2599 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2601 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2603 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
2604 in the case of AAMP (same as for use of the -gnatd.P switch) to
2605 suppress this optimization, which avoids creating a dependence
2606 on the 64-bit arithmetic package.
2608 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2610 * exp_ch4.adb: Update comment.
2612 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
2614 * exp_ch6.adb (Expand_Call): Make sure instantiations are
2615 registered only once as pending here.
2617 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2619 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
2620 (Minimize_Expression_With_Actions): New flag.
2621 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
2623 (Resolve_Short_Circuit): Redo previous change
2624 using Minimize_Expression_With_Actions.
2625 (Expand_N_If_Expression,
2626 Expand_Short_Circuit_Operator): Restore old code to avoid
2627 Expression_With_Actions when Minimize_Expression_With_Actions
2630 2016-04-18 Vincent Celier <celier@adacore.com>
2632 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
2633 Stderr_File): Close local file descriptors when no longer needed.
2635 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2637 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
2638 mode check that the type of the cursor in an iteration over
2639 a formal container is not volatile. The proper check on the
2640 element type is done elsewhere.
2642 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2644 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
2645 a subprogram that returns a class-wide type, if the subprogram
2646 is a compilation unit, because otherwise gigi will treat the
2647 subprogram as external, leading to link errors.
2649 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2651 * sem_res.adb (Resolve_Short_Circuit): Do not use
2652 expression-with-actions when generating C.
2654 2016-04-18 Yannick Moy <moy@adacore.com>
2656 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
2657 raise node in GNATprove mode.
2659 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2661 * s-fileio.adb: Minor reformatting.
2662 * sem_prag.adb (Analyze_Input_Item): Add local
2663 variable Input_OK. Do not consider mappings of generic formal
2664 parameters to actuals.
2666 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2668 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
2669 type, the cursor is declared in the scope of the parent type.
2670 (Analyze_Parameter_Specification): A qualified expression with an
2671 iterator type indicates an iteration over a container (explicit
2674 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2676 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
2677 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
2678 * debug.adb: Reserve -gnatd.4 to force generation of C files.
2680 2016-04-18 Yannick Moy <moy@adacore.com>
2682 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
2683 division by zero, instead possibly issue a warning.
2684 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
2685 static division by zero, instead add check flag on original
2687 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
2688 Only issue error when both SPARK_Mode is On and Warn is False.
2690 2016-04-18 Yannick Moy <moy@adacore.com>
2692 * checks.adb (Apply_Scalar_Range_Check): Force
2693 warning instead of error when SPARK_Mode is On, on index out of
2694 bounds, and set check flag for GNATprove.
2696 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2698 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
2699 Update the comment on usage. Reimplemented.
2700 (Check_Input_States.Check_Constituent_Usage): Update the comment
2701 on usage. A Proof_In constituent can now refine an Input state
2702 as long as there is at least one Input constituent present.
2704 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2706 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
2707 body id as the sloc of the entity in the generated subprogram
2708 declaration, to avoid spurious conformance errors when style
2711 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2713 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
2714 Refine check on illegal calls to entities within a task body,
2715 when the entity is declared in an object of the same type. In
2716 a generic context there might be no explicit dereference but if
2717 the prefix includes an access type the construct is legal.
2719 2016-04-18 Arnaud Charlet <charlet@adacore.com>
2721 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
2722 RE_Default_Priority.
2724 2016-04-18 Bob Duff <duff@adacore.com>
2726 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
2727 if the pragma came from an aspect specification.
2729 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2731 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2733 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2735 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
2736 superfluous conformance check on an inlined body with a previous
2737 spec, use the fact that the generated declaration does not come
2738 from source. We must treat the entity as coming from source to
2739 enable some back-end inlining when pragma appears after the body.
2741 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2743 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
2744 exp_intr.adb: Minor reformatting and typo corrections.
2746 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2748 * sem_ch6.adb: Code cleanup.
2750 2016-04-18 Thomas Quinot <quinot@adacore.com>
2752 * sem_ch13.adb: Minor reformatting and error message tweaking
2753 (remove extraneous spaces).
2755 2016-04-18 Johannes Kanig <kanig@adacore.com>
2757 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2759 2016-04-18 Bob Duff <duff@adacore.com>
2761 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
2762 exists, and it's a fifo, we use "w" as the open string instead of
2763 "r+". This is necessary to make a write to the fifo block until
2766 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2768 * sem_attr.adb (Denote_Same_Function): Account
2769 for a special case where a primitive of a tagged type inherits
2770 a class-wide postcondition from a parent type.
2772 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2774 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
2775 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
2776 of reserved words is OK.
2777 (Scan_Pragma_Argument_Association):
2778 Add new formal Reserved_Words_OK and update the comment on
2779 usage. Code cleanup. Parse an expression or a reserved word in
2780 identifier form for pragmas Restriction_Warnings and Restrictions
2781 No_Use_Of_Attribute.
2782 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
2783 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
2784 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
2786 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
2787 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
2788 Update the parameter profile.
2789 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
2791 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
2792 the comment on usage.
2793 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
2794 * sem_attr.adb (Analyze_Attribute): Check restriction
2795 No_Use_Of_Attribute.
2796 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
2797 restriction No_Use_Of_Attribute before any rewritings have
2799 * sem_prag.adb (Analyze_Pragma): Check restriction
2800 No_Use_Of_Pragma before any rewritings have taken place.
2802 2016-04-18 Bob Duff <duff@adacore.com>
2804 * sem_ch6.adb (Is_Inline_Pragma): The pragma
2805 argument can be a selected component, which has no Chars field,
2806 so we need to deal with that case (use the Selector_Name).
2807 (Check_Inline_Pragma): We need to test Is_List_Member before
2808 calling In_Same_List, because in case of a library unit, they're
2809 not in lists, so In_Same_List fails an assertion.
2811 2016-04-18 Bob Duff <duff@adacore.com>
2813 * namet.ads, namet.adb: Add an Append that appends a
2814 Bounded_String onto a Bounded_String. Probably a little more
2815 efficient than "Append(X, +Y);". Also minor cleanup.
2816 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
2817 Append_Unqualified_Decoded): Make sure these work with non-empty
2819 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
2820 parameter, defaulting to Global_Name_Buffer.
2821 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
2822 Bounded_String parameter, no default.
2823 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
2824 Bounded_String instead of Global_Name_Buffer.
2825 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
2826 to Append_Entity_Name, and pass a Bounded_String parameter,
2827 instead of using globals.
2828 (Add_Source_Info): Pass a Bounded_String parameter, instead of
2830 (Expand_Source_Info): Use local instead of globals.
2831 * stringt.ads, stringt.adb (Append): Add an Append procedure
2832 for appending a String_Id onto a Bounded_String.
2833 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
2835 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
2836 Adjust_Name_Case parameter.
2837 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
2838 Set_Casing; that's the default.
2839 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
2840 protected subprograms are entry calls; otherwise it is not possible to
2841 distinguish them from regular subprogram calls.
2843 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2845 * sem_ch13.adb (Has_Good_Profile): Improvement
2846 of error message. Now indicates subtype_mark of formal parameter
2847 rather than the formal's name, plus minor rewording.
2849 2016-04-18 Pascal Obry <obry@adacore.com>
2851 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2853 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2855 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2857 2016-04-18 Gary Dismukes <dismukes@adacore.com>
2859 * par-ch4.adb, sem_prag.adb: Minor reformatting.
2861 2016-04-18 Bob Duff <duff@adacore.com>
2863 * sinput.ads, sinput.adb (Build_Location_String): Take a
2864 parameter instead of using a global variable. The function
2865 version no longer destroys the Name_Buffer.
2866 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
2867 parameter, which defaults to the Global_Name_Buffer, so some
2868 calls can avoid the global.
2869 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
2870 to avoid using globals. All but one call to Build_Location_String
2871 avoids the global. Only one call to String_From_Name_Buffer
2874 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2876 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2878 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2880 * sem_eval.adb (Choice_Matches): Check the expression
2881 against the predicate values when the choice denotes a
2882 subtype with a static predicate.
2883 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
2884 tests for predicates.
2885 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
2886 is not static. (Is_Static_Subtype): A subtype with a dynamic
2887 predicate is not static.
2888 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
2889 (Is_Static_Subtype): Update the comment on usage.
2891 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2893 * sem_prag.adb (Analyze_Input_Item): Allow
2894 generic formals to appear as initialization items.
2896 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2898 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
2899 Has_Good_Profile): Additional error message to indicate that
2900 the second parameter of the subprogram must be a first subtype.
2902 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2904 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
2905 Use the pragma lookahead that determines whether a subprogram
2906 is to be inlined, when some level of backend optimization is
2908 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
2909 code used to create an instance body when needed for inlining.
2910 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
2911 call appears within an instantiation that is not a compilation
2912 unit, add a pending instantiation for the enclosing instance,
2913 so the backend can inline in turn the calls contained in the
2916 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2918 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
2919 that relates operations of the parent type to the operations of
2920 the derived type has three distinct sources:
2921 a) explicit operations of the derived type carry an
2922 Overridden_Operation that designates the operation in the
2924 b) Implicit operations that are inherited by the derived type
2925 carry an alias that may be an explicit subprogram (in which case
2926 it may have an Overridden_ Operation indicator) or may also be
2927 inherited and carry its own alias.
2928 c) If the parent type is an interface, the operation of the
2929 derived type does not override, but the interface operation
2930 indicates the operation that implements it.
2931 * sem_prag.adb: Minor reformatting.
2932 * sem_prag.adb (Check_External_Property): Update
2933 the comment on usage. Reimplement.
2935 2016-04-18 Ed Schonberg <schonberg@adacore.com>
2937 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
2938 profiles such as ZFP, ceiling priority is not available.
2940 2016-04-18 Bob Duff <duff@adacore.com>
2942 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2944 2016-04-18 Bob Duff <duff@adacore.com>
2946 * sem_elab.adb (Output_Calls): Use
2947 Get_Name_String, to clearly indicate that the global Name_Buffer
2948 is being used. The previous code used Is_Internal_Name, which
2949 returns a Boolean, but also has a side effect of setting the
2950 Name_Buffer. Then it called the other Is_Internal_Name, which uses
2951 the Name_Buffer for its input. And then it called Error_Msg_N,
2952 again using the Name_Buffer. We haven't eliminated the global
2953 usage here, but we've made it a bit clearer.
2954 This also allows us to have a side-effect-free version of
2956 * namet.ads, namet.adb: Provide a type Bounded_String, along with
2957 routines that can be used without using global variables. Provide
2958 Global_Name_Buffer so existing code can continue to use the
2959 global. Mark the routines that use globals as obsolete. New code
2960 shouldn't call the obsolete ones, and we should clean up existing
2961 code from time to time.
2962 Name_Find_Str is renamed as Name_Find.
2963 * namet.h: Changed as necessary to interface to the new version
2965 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
2968 2016-04-18 Yannick Moy <moy@adacore.com>
2970 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
2971 outside of GNATprove, hence it should not be removed.
2973 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
2975 * sem_prag.adb (Analyze_Refinement_Clause):
2976 The refinement of an external abstract state can now mention
2977 non-external constituents.
2978 (Check_External_Property): Update all SPARK RM references.
2980 2016-04-18 Bob Duff <duff@adacore.com>
2982 * exp_intr.adb: Remove some duplicated code.
2984 2016-04-18 Yannick Moy <moy@adacore.com>
2986 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
2987 package spec and body out of SPARK.
2989 2016-04-18 Johannes Kanig <kanig@adacore.com>
2991 * spark_xrefs.ads: Minor comment update.
2993 2016-04-18 Johannes Kanig <kanig@adacore.com>
2995 * gnat1drv.adb (Gnat1drv): Force loading of System
2998 2016-04-18 Bob Duff <duff@adacore.com>
3000 * a-cuprqu.adb: Correction to previous change. If a new node
3001 is inserted at the front of the queue (because it is higher
3002 priority than the previous front node), we need to update
3003 Header.Next_Unequal -- not just in the case where the queue was
3006 2016-04-18 Bob Duff <duff@adacore.com>
3008 * a-cuprqu.ads: Change the representation of List_Type from a
3009 singly-linked list to a doubly-linked list. In addition, add a
3010 pointer Next_Unequal, which points past a possibly-long chain
3011 of equal-priority items. This increases efficiency, especially
3012 in the case of many equal-priority items.
3013 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
3014 advantage of new data structure.
3015 (Finalize): Rewrite in terms of Dequeue, for simplicity.
3017 2016-04-18 Yannick Moy <moy@adacore.com>
3019 * contracts.adb (Analyze_Object_Contract,
3020 Analyze_Protected_Contract): Remove tests performed in GNATprove.
3021 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
3022 Remove query for tests performed in GNATprove.
3024 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3026 * sem_aggr.adb (Resolve_Record_Aggregate): If
3027 Warn_On_Redundant_Constructs is enabled, report a redundant box
3028 association that does not cover any components, as it done for
3029 redundant others associations in case statements.
3031 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3033 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
3034 Analyze the generated Check pragma for an inherited condition so
3035 that it does not freeze the dispatching type of the primitive
3036 operation, because it is pre-analyzed at the point of the
3037 subprogram declaration (and not in the subprogram body, as is
3038 done during regular expansion).
3040 2016-04-18 Vincent Celier <celier@adacore.com>
3042 * ali.ads: Increase the range of all _Id types to 100 millions.
3044 2016-04-18 Gary Dismukes <dismukes@adacore.com>
3046 * sem_warn.adb (Check_References): Change warning to suggest
3047 using pragma Export rather than saying "volatile has no effect".
3049 2016-04-18 Bob Duff <duff@adacore.com>
3051 * g-souinf.ads (Compilation_ISO_Date): New function to return
3052 the current date in ISO form.
3053 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
3054 a call to Compilation_ISO_Date into a string literal containing
3055 the current date in ISO form.
3056 * exp_intr.ads (Add_Source_Info): Improve documentation.
3057 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
3058 Compilation_ISO_Date.
3059 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
3061 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3063 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
3064 to subtypes that are not first subtypes.
3066 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3068 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
3070 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
3071 generated pragmas after subprogram declaration, rather than in
3072 the corresponding subprogram body.
3073 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
3074 mode, if the operation is overridding, call
3075 Collect_Inherited_Class_Wide_Conditions to generate the
3076 corresponding pragmas immediately after the corresponding
3077 subprogram declaration.
3079 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3081 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
3082 type to natural numbers.
3083 (Stype): document code characters for concurrent entities.
3085 2016-04-18 Olivier Hainque <hainque@adacore.com>
3087 * targparm.ads: Update the Frontend_Exceptions default internal
3089 (Frontend_Exceptions_On_Target): Change default value to True.
3091 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3093 * sem_ch4.adb (Analyze_Selected_Component): Refine error
3094 detection when a selected component in the body of a synchronized
3095 type is a reference to an object of the same type declared
3096 elsewhere. The construct is legal if the prefix of the selected
3097 component includes an explicit dereference at any point.
3099 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3101 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
3102 internally generated expressions when trying to determine whether
3103 a formal parameter of a tagged type subject to Extensions_Visible
3104 False is used to initialize an object.
3105 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
3106 internally generated expressions when trying to determine whether
3107 a formal parameter of a tagged type subject to Extensions_Visible
3108 False is used in a type conversion.
3110 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3112 * sem_res.adb (Is_Protected_Operation_Call):
3113 Add guards to account for a non-decorated selected component.
3115 2016-04-18 Yannick Moy <moy@adacore.com>
3117 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
3118 implementation of Body_Has_SPARK_Mode_On.
3119 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
3120 New function replacing previous Get_SPARK_Mode_From_Pragma, that
3121 deals also with aspects.
3122 (Get_SPARK_Mode_Type): Make function internal again.
3123 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
3124 Get_SPARK_Mode_From_Annotation.
3126 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3128 * contracts.adb (Analyze_Object_Contract): Update references to
3130 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
3131 * ghost.adb Add with and use clauses for Sem_Disp.
3132 (Check_Ghost_Derivation): Removed.
3133 (Check_Ghost_Overriding):
3134 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
3135 (Check_Ghost_Primitive): New routine.
3136 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
3137 Update references to SPARK RM. (Is_OK_Pragma): Update references
3138 to SPARK RM. Predicates are now a valid context for references
3140 * ghost.ads (Check_Ghost_Derivation): Removed.
3141 (Check_Ghost_Overriding): Update the comment on usage.
3142 (Check_Ghost_Primitive): New routine.
3143 (Check_Ghost_Refinement): New routine.
3144 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
3145 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
3146 related to Ghost derivations
3147 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
3148 related to the convention-like behavior of pragma Ghost.
3149 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
3150 of a tagged type and its primitive agree.
3151 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
3152 RM. Move the verification of pragma Assertion_Policy Ghost
3153 to the proper place. Remove the now obsolete check related
3154 to Ghost derivations.
3155 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
3156 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
3158 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3160 * layout.adb: Fix more minor typos in comments.
3162 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3164 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
3166 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3168 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
3169 mode, collect inherited class-wide conditions to generate the
3170 corresponding pragmas.
3171 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
3172 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
3173 procedure for overriding subprograms, used to generate the pragmas
3174 corresponding to an inherited class- wide pre- or postcondition.
3175 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
3176 from contracts.adb (Replace_Condition_Entities): Subsidiary
3177 Build_Pragma_Check_Equivalent, to implement the proper semantics
3178 of inherited class-wide conditions, as given in AI12-0113.
3179 (Process_Class_Wide_Condition): Removed.
3180 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
3181 in contract of subprogram, to collect inherited class-wide
3183 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
3185 2016-04-18 Yannick Moy <moy@adacore.com>
3187 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
3188 * a-calend.ads (Ada.Calendar): Mark package spec as
3189 SPARK_Mode and add synchronous external abstract state Clock_Time.
3191 2016-04-18 Yannick Moy <moy@adacore.com>
3193 * sem_res.adb (Resolve_Call): Prevent inlining of
3194 calls inside expression functions. Factor previous code issuing
3195 errors to call Cannot_Inline instead, which does appropriate
3196 processing of message for GNATprove.
3198 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3200 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
3201 osint-b.adb: Cleanups.
3203 2016-04-18 Yannick Moy <moy@adacore.com>
3205 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
3206 body to inline in GNATprove mode when SPARK_Mode On applies to
3208 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
3211 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3213 * layout.adb: Fix minor typo in comment.
3214 * inline.adb: Fix minor pasto.
3215 * sem_ch12.ads: Fix minor typos in comments.
3217 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3219 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
3220 handle some complex cases of tag indeterminate calls that are
3221 actuals in other dispatching calls that are themselves tag
3223 (Check_Dispatching_Context): Add parameter to support recursive
3224 check for an enclosing construct that may provide a tag for a
3225 tag-indeterminate call.
3227 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3229 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
3230 Add global variables Task_Input_Seen and Task_Output_Seen.
3231 (Analyze_Global_Item): Detect an illegal use of the current
3232 instance of a single protected/task type in a global annotation.
3233 (Analyze_Input_Output): Inputs and output related to the current
3234 instance of a task unit are now tracked.
3235 (Check_Usage): Require
3236 the presence of the current instance of a task unit only when
3237 one input/output is available. (Current_Task_Instance_Seen):
3239 (Is_CCT_Instance): New parameter profile. Update
3240 the comment on usage. The routine now properly recognizes several
3241 cases related to single protected/task types.
3243 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
3245 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
3246 to create a brand new freeze node. This handles a case where an
3247 ignored Ghost context is freezing something which is not ignored
3248 Ghost and whose freeze node should not be removed from the tree.
3249 (New_Freeze_Node): New routine.
3251 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3253 * sigtramp.h (__gnat_set_is_vxsim) New function to
3254 tell sigtramp-vxworks to handle vxsim signal contexts. *
3255 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
3256 differences in the sigcontext structure between the expected
3257 regular x86 or x86_64 ones and the ones received in case of
3258 exexution on the vxworks simulator.
3259 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
3260 this information to sigtramp-vxworks.c. Remove the old mechanism for
3262 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
3264 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3266 * exp_ch3.adb (Inline_Init_Proc): New function returning
3267 whether the initialization procedure of a type should be
3268 inlined. Return again True for controlled type themselves.
3269 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
3270 (Build_Record_Init_Proc): Likewise.
3272 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3274 * gnatvsn.ads (Library_Version): Bump to 7.
3276 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3278 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
3279 on the entity of a subprogram declaration that is completed by
3280 an expression function.
3282 2016-04-18 Ed Schonberg <schonberg@adacore.com>
3284 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
3285 declaration can appear in an aspect specification for a dynamic
3286 predicate, and a pragma for aspect Predicate_Failure.
3287 * exp_util.adb (Replace_Subtype_References): Replace current
3288 occurrences of the subtype to which a dynamic predicate applies,
3289 byt the expression that triggers a predicate check. Needed to
3290 implement new aspect Predicate_Failure.
3292 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3294 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
3295 * Makefile.rtl: update accordingly.
3297 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3299 * sem_type.adb (Disambiguate): Call Covers only when necessary
3300 for standard operators.
3302 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3304 * atree.ads (Num_Extension_Nodes): Add couple of figures
3306 * atree.adb: Add GNAT.Heap_Sort_G dependency.
3307 (Print_Statistics): New exported procedure to print statistics.
3309 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3311 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
3312 as to be inlined if the type needs finalization.
3314 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3316 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
3317 alignment for x86_64.
3318 * init.c: Better fix for guard page reset on x86_64-vx7.
3319 Do not try to retrieve the page that actually raised
3320 the signal as the probing mechanism used on x86_64 do not allow
3321 such retrieval. We thus just test if the guard page is active,
3322 and re-activate it if not.
3324 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3326 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
3329 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
3331 * affinity.c: Use the proper type for task id.
3332 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
3334 2016-04-18 Arnaud Charlet <charlet@adacore.com>
3336 * sem_prag.adb (Process_Convention): Relax rule on exporting
3337 Intrinsic types if Relaxed_RM_Semantics is True.
3339 2016-04-18 Vincent Celier <celier@adacore.com>
3341 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
3342 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
3343 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
3344 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
3345 exp_ch3.ads, exp_unst.adb: Change "descendent" to
3346 "descendant" in comments, error messages and identifiers.
3347 * gcc-interface/decl.c: Ditto.
3349 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
3351 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
3352 New_S only once at the beginning of the function.
3354 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
3356 * gcc-interface/decl.c (components_to_record): Restrict the previous
3357 change to fields with variable size.
3359 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
3361 * gcc-interface/decl.c (components_to_record): Add special case for
3362 single field with representation clause at offset 0.
3364 2016-03-16 Svante Signell <svante.signell@gmail.com>
3366 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
3367 * s-osinte-gnu.ads: New file.
3369 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
3371 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
3372 (Stack_Check_Limits): Set to False.
3373 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
3374 (Stack_Check_Limits): Set to False.
3375 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
3376 (Stack_Check_Limits): Set to False.
3377 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
3378 (Stack_Check_Limits): Set to False.
3379 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
3380 (Stack_Check_Limits): Set to False.
3382 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3384 * gcc-interface/trans.c (statement_node_p): New predicate.
3385 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
3386 not return dummy results for expressions attached to packed array
3387 implementation types.
3389 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
3391 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
3392 the expression of a renaming manually in case #3.
3394 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
3396 * system-linux-s390.ads: Enable Stack_Check_Probes.
3397 * system-linux-s390.ads: Likewise.
3399 2016-02-29 Martin Liska <mliska@suse.cz>
3401 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
3402 Replace ENABLE_CHECKING macro with flag_checking.
3404 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3406 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
3407 handling of unconstrained array types as designated types into common
3408 processing. Also handle array types as incomplete designated types.
3410 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3412 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
3413 ASIS mode, fully lay out the minimal record type.
3415 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3417 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
3418 (build_return_expr): Likewise.
3419 (Call_to_gnu): If this is a function call and there is no target,
3420 create a temporary for the return value for all aggregate types,
3421 but never create it for a return statement. Push a binding level
3422 around the call in more cases. Remove obsolete code.
3424 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
3426 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
3427 * gcc-interface/gigi.h (gigi): Remove useless attribute.
3428 (gnat_gimplify_expr): Likewise.
3429 (gnat_to_gnu_external): Declare.
3430 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
3431 code dealing with the expression of external constants into...
3432 Invoke gnat_to_gnu_external instead.
3433 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
3434 when not for a definition. Deal with COMPOUND_EXPR and variables with
3435 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
3436 'reference to a function call in a renaming. Remove obsolete test and
3437 adjust associated comment.
3438 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
3439 temporaries created to hold the return value, if any.
3440 (gnat_to_gnu_external): ...this. New function.
3441 * gcc-interface/utils.c (create_var_decl): Detect a constant created
3442 to hold 'reference to function call.
3443 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
3444 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
3446 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
3448 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
3449 the prefix denotes an entity which Has_Atomic_Components.
3450 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
3451 denotes an entity which Has_Atomic_Components.
3453 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
3455 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
3456 for fat pointer or scalar types.
3458 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
3460 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
3461 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
3462 Call maybe_character_value on the array bounds. Get to the base type
3463 of the index type and call maybe_debug_type on it.
3464 * gcc-interface/utils.c (finish_character_type): Add special treatment
3467 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
3469 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
3470 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
3472 2016-02-12 Jakub Jelinek <jakub@redhat.com>
3474 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
3475 neighbour -> neighbor.
3476 * prep.adb: Likewise.
3477 * prj.ads: Likewise.
3478 * prepcomp.adb: Likewise.
3479 * g-socket.ads: Likewise.
3480 * s-imgrea.adb: Likewise.
3481 * a-calend.adb: Likewise.
3482 * exp_disp.adb: Likewise.
3483 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
3484 * g-socket.adb: Likewise.
3485 * sem_ch12.adb: Likewise.
3486 * terminals.c: Likewise.
3488 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3490 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
3491 build_common_tree_nodes.
3493 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
3495 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
3496 DECL_IGNORED_P last.
3498 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
3500 * gcc-interface/gigi.h (enum attr_type): Rename into...
3501 (enum attrib_type): ...this.
3502 (struct attrib): Adjust.
3503 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
3505 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
3507 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
3508 literal if the entity is of a character type.
3509 * gcc-interface/lang.opt (fsigned-char): New option.
3510 * gcc-interface/misc.c (gnat_handle_option): Accept it.
3511 (gnat_init): Adjust comment.
3512 * gcc-interface/gigi.h (finish_character_type): New prototype.
3513 (maybe_character_type): New inline function.
3514 (maybe_character_value): Likewise.
3515 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
3516 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3517 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
3518 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
3519 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
3520 Copy TYPE_STRING_FLAG from type to subtype.
3521 <E_Array_Type>: Deal with character index types.
3522 <E_Array_Subtype>: Likewise.
3523 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
3524 char_type_node throughout.
3525 (build_raise_check): Likewise.
3526 (get_type_length): Deal with character types.
3527 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
3529 <Attr_Pred>: Likewise.
3530 (Loop_Statement_to_gnu): Likewise.
3531 (Raise_Error_to_gnu): Likewise.
3532 <N_Indexed_Component>: Deal with character index types. Remove
3534 <N_Slice>: Likewise.
3535 <N_Type_Conversion>: Deal with character types. Minor tweak.
3536 <N_Unchecked_Type_Conversion>: Likewise.
3538 <N_Op_Eq>: Likewise.
3539 (emit_index_check): Delete.
3540 * gcc-interface/utils.c (finish_character_type): New function.
3541 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
3542 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
3543 with char_type_node.
3544 (build_call_raise): Likewise.
3545 (build_call_raise_column): Likewise.
3546 (build_call_raise_range): Likewise.
3548 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3550 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
3551 (build_call_raise_range): Likewise.
3552 (gnat_unsigned_type): Delete.
3553 (gnat_signed_type): Likewise.
3554 (gnat_signed_or_unsigned_type_for): New prototype.
3555 (gnat_unsigned_type_for): New inline function.
3556 (gnat_signed_type_for): Likewise.
3557 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
3558 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
3559 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
3560 and compute their base type from that.
3561 <E_Array_Subtype>: Remove duplicate declaration.
3562 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
3563 * gcc-interface/trans.c (get_type_length): Likewise.
3564 (Attribute_to_gnu): Likewise.
3565 (Loop_Statement_to_gnu): Likewise.
3566 (Call_to_gnu): Likewise.
3567 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
3568 and gnat_signed_type_for. Minor tweaks.
3569 (build_binary_op_trapv): Likewise.
3570 (emit_check): Likewise.
3571 (convert_with_check): Likewise.
3572 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
3573 functions. Minor tweaks.
3574 (Case_Statement_to_gnu): Remove dead code.
3575 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
3576 (init_code_table): Minor reordering.
3577 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
3578 (gnat_signed_type): Likewise.
3579 (gnat_signed_or_unsigned_type_for): New function.
3580 (unchecked_convert): Use directly the size in the test for precision
3581 vs size adjustments.
3582 (install_builtin_elementary_types): Call gnat_signed_type_for.
3583 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
3585 (build_goto_raise): New function taken from...
3586 (build_call_raise): ...here. Call it.
3587 (build_call_raise_column): Add KIND parameter and call it.
3588 (build_call_raise_range): Likewise.
3590 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3592 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
3593 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
3594 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
3595 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
3596 and tweak gnat_encodings tests throughout.
3597 (initial_value_needs_conversion): Likewise.
3598 (intrin_arglists_compatible_p): Likewise.
3599 * gcc-interface/misc.c (gnat_print_type): Likewise.
3600 (gnat_get_debug_type): Likewise.
3601 (gnat_get_fixed_point_type_info): Likewise.
3602 (gnat_get_array_descr_info): Likewise.
3603 (get_array_bit_stride): Likewise.
3604 (gnat_get_type_bias): Fix formatting.
3605 (enumerate_modes): Likewise.
3606 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
3607 (add_decl_expr): Simplify NULL_TREE test.
3608 (end_stmt_group): Likewise.
3609 (build_binary_op_trapv): Fix formatting.
3610 (get_exception_label): Use switch statement.
3611 (init_code_table): Move around.
3612 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
3613 (gnat_poplevel): Likewise.
3614 (gnat_set_type_context): Likewise.
3615 (defer_or_set_type_context): Fix formatting.
3616 (gnat_pushdecl): Simplify NULL_TREE test.
3617 (maybe_pad_type): Likewise.
3618 (add_parallel_type): Likewise.
3619 (create_range_type): Likewise.
3620 (process_deferred_decl_context): Likewise.
3621 (convert): Likewise.
3622 (def_builtin_1): Likewise.
3623 * gcc-interface/utils2.c (find_common_type): Likewise.
3624 (build_binary_op): Likewise.
3625 (gnat_rewrite_reference): Likewise.
3626 (get_inner_constant_reference): Likewise.
3628 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
3631 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
3632 the parent function instead of the current function in order to issue
3633 the warning or the error. Add guard for ignored functions.
3635 2016-01-17 Jakub Jelinek <jakub@redhat.com>
3637 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
3639 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3641 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
3642 of char * for path_val to avoid warnings.
3644 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
3646 * gcc-interface/utils.c: Bump copyright year.
3647 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
3648 the current lexical scope.
3650 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3652 * gnat_ugn.texi: Bump @copying's copyright year.
3653 * gnat_rm.texi: Likewise.
3655 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
3657 * gnatvsn.ads: Bump copyright year.
3660 Copyright (C) 2016 Free Software Foundation, Inc.
3662 Copying and distribution of this file, with or without modification,
3663 are permitted in any medium without royalty provided the copyright
3664 notice and this notice are preserved.