1 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
4 * exp_ch3.adb (Make_Predefined_Primitive_Specs): Use Positive index.
6 2017-06-12 Eric Botcazou <ebotcazou@adacore.com>
9 * s-interr-hwint.adb: Reinstate.
10 * gcc-interface/Makefile.in (RTEMS): Use it again.
12 2017-06-08 Olivier Hainque <hainque@adacore.com>
14 * vx_crtbegin_auto.c: Update year in copyright notice.
15 * vx_crtbegin.c: Likewise.
16 * vx_crtbegin.inc: Likewise.
17 * vx_crtend.c: Likewise.
19 2017-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
21 * Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
22 * s-tpopsp-rtems.adb: Delete.
24 2017-06-02 Olivier Hainque <hainque@adacore.com>
26 * vx_crtbegin_auto.c: New file.
27 * vx_crtbegin.c: New file.
28 * vx_crtbegin.inc: New file.
29 * vx_crtend.c: New file.
31 2017-05-25 Jonathan Wakely <jwakely@redhat.com>
33 * gcc-interface/utils2.c (compare_elmt_bitpos): Remove redundant
34 const qualifiers that cause -Wignored-qualifiers warnings.
36 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
38 * gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
39 for Itypes that are E_Access_Subtype.
40 <E_Access_Subtype>: Use the DECL of the base type directly.
42 2017-05-22 Ed Schonberg <schonberg@adacore.com>
43 Eric Botcazou <ebotcazou@adacore.com>
45 * sem_ch4.adb (Analyze_Call): In Ada2012 an incomplete type from a
46 limited view may appear in the profile of a function, and a call to
47 that function in another unit in which the full view is available must
48 use this full view to spurious type errors at the point of call.
49 * inline.adb (Analyze_Inlined_Bodies): Remove restriction on loading
50 of parent body with a with clause for the main unit.
51 * gcc-interface/decl.c (defer_limited_with_list): Document new usage.
52 (gnat_to_gnu_entity) <E_Access_Type>: Handle completed Taft Amendment
53 types declared in external units like types from limited with clauses.
54 Adjust final processing of defer_limited_with_list accordingly.
55 * gcc-interface/trans.c (gnat_to_gnu) < N_Selected_Component>: Try
56 again to translate the prefix after the field if it is incomplete.
58 2017-05-22 Eric Botcazou <ebotcazou@adacore.com>
60 * gcc-interface/decl.c (gnat_to_gnu_field): Do not enforce strict
61 alignment for simple volatile fields and remove associated errors.
63 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
65 * gcc-interface/gigi.h (get_elaboration_procedure): Delete.
66 * gcc-interface/trans.c (get_elaboration_procedure): Make static.
68 2017-05-15 Pierre-Marie de Rodat <derodat@adacore.com>
70 * gcc-interface/utils.c (can_materialize_object_renaming_p):
71 Synchronize with GNAT's Exp_Dbug.Debug_Renaming_Declaration:
72 process Original_Node instead of expanded names.
74 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
76 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Only apply the
77 addressability check in the constrained case.
79 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
81 * gcc-interface/trans.c (Identifier_to_gnu): Also accept incomplete
82 types not coming from a limited context.
84 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
86 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Skip subprograms on
87 the inlined list that are not public.
88 * gcc-interface/utils.c (create_subprog_decl): Clear TREE_PUBLIC if
89 there is a pragma Inline_Always on the subprogram.
91 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
93 * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Fix formatting.
94 <N_Allocator>: Use properly typed constants.
95 (extract_values): Move around.
96 (pos_to_constructor): Minor tweaks.
97 (Sloc_to_locus): Fix formatting.
98 * gcc-interface/utils.c (process_deferred_decl_context): Minor tweaks.
99 * gcc-interface/gigi.h (MARK_VISITED): Remove blank line.
100 (Gigi_Equivalent_Type): Adjust head comment.
101 * gcc-interface/decl.c (Gigi_Equivalent_Type): Likewise.
103 2017-05-15 Eric Botcazou <ebotcazou@adacore.com>
105 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When there
106 is a representation clause on an extension, propagate the alignment of
107 the parent type only if the platform requires strict alignment.
109 2017-05-12 Eric Botcazou <ebotcazou@adacore.com>
111 * system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
112 instead of Word_Size.
115 2017-03-28 Andreas Schwab <schwab@suse.de>
118 * system-linux-aarch64-ilp32.ads: New file.
119 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
120 from LIBGNAT_TARGET_PAIRS.
121 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
122 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
123 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
124 or -mabi=ilp32, resp.
126 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
129 * system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
130 instead of Word_Size.
132 2017-05-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
134 * raise-gcc.c (exception_class_eq): Make ec parameter const.
136 2017-05-02 Richard Biener <rguenther@suse.de>
138 * gcc-interface/misc.c (gnat_post_options): Do not set
141 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
143 * gcc-interface/trans.c (assoc_to_constructor): Make sure
144 Corresponding_Discriminant is only called on discriminants.
145 Skip the saving of the result only for them.
146 (gnat_to_gnu) <N_Selected_Component>: Likewise.
147 <N_Unchecked_Type_Conversion>: Translate the result type first.
148 (gigi): Set TREE_NOTHROW on Begin_Handler.
149 (stmt_list_cannot_raise_p): New predicate.
150 (Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
151 a cleanup if the statements of the handler cannot raise.
152 (process_freeze_entity): Use Is_Record_Type.
153 (process_type): Likewise.
155 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
157 * einfo.ads (Corresponding_Record_Component): New alias
158 for Node21 used for E_Component and E_Discriminant.
159 * einfo.adb (Corresponding_Record_Component): New function.
160 (Set_Corresponding_Record_Component): New procedure.
161 (Write_Field21_Name): Handle Corresponding_Record_Component.
162 * sem_ch3.adb (Inherit_Component): Set
163 Corresponding_Record_Component for every component in
164 the untagged case. Clear it afterwards for non-girder
166 * gcc-interface/decl.c (gnat_to_gnu_entity)
167 <E_Record_Type>: For a derived untagged type with discriminants
168 and constraints, apply the constraints to the layout of the
169 parent type to deduce the layout.
170 (field_is_aliased): Delete.
171 (components_to_record): Test DECL_ALIASED_P directly.
172 (annotate_rep): Check that fields are present except for
174 (create_field_decl_from): Add DEBUG_INFO_P
175 parameter and pass it in recursive and other calls. Add guard
176 for the manual CSE on the size.
177 (is_stored_discriminant): New predicate.
178 (copy_and_substitute_in_layout): Consider only
179 stored discriminants and check that original fields are present
180 in the old type. Deal with derived types. Adjust call to
181 create_variant_part_from.
183 2017-05-02 Ed Schonberg <schonberg@adacore.com>
185 * exp_ch6.adb (Expand_Call_Helper): When locating the
186 accessibility entity created for an access parameter, handle
187 properly a reference to a formal of an enclosing subprogram. if
188 the reference appears in an inherited class-wide condition, it
189 is the rewriting of the reference in the ancestor expression,
190 but the accessibility entity must be that of the current formal.
192 2017-05-02 Javier Miranda <miranda@adacore.com>
194 * exp_ch4.adb (Expand_Non_Binary_Modular_Op): New subprogram.
195 (Expand_N_Op_Add, Expand_N_Op_Divide, Expand_N_Op_Minus,
196 Expand_N_Op_Multiply, Expand_N_Op_Or, Expand_N_Op_Subtract):
197 Call Expand_Non_Binary_Modular_Op.
199 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
201 * sem_ch3.adb (Build_Derived_Private_Type): If the parent type
202 has discriminants, do not override the Stored_Constraint list of
203 the full view of the derived type with that of the derived type.
205 2017-05-02 Bob Duff <duff@adacore.com>
207 * sem_attr.adb (Attribute_Enum_Rep): Disallow T'Enum_Rep.
209 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
211 * s-os_lib.ads: Minor typo fix.
213 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
215 * gnatls.adb: Merge and refactor code from Prj.Env and remove
216 this deprecated dependency.
218 2017-05-02 Ed Schonberg <schonberg@adacore.com>
220 * exp_util.ads: minor comment addition.
222 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
224 * sem_ch3.adb (Build_Derived_Record_Type): Fix a few typos and
225 pastos in part #3 of the head comment.
227 2017-05-02 Ed Schonberg <schonberg@adacore.com>
229 * exp_ch3.adb (Freeze_Type): Do not generate an invariant
230 procedure body for a local (sub)type declaration within a
231 predicate function. Invariant checks do not apply to these, and
232 the expansion of the procedure will happen in the wrong scope,
233 leading to misplaced freeze nodes.
235 2017-05-02 Ed Schonberg <schonberg@adacore.com>
237 * exp_util.adb (Insert_Library_Level_Action): Use proper scope
238 to analyze generated actions. If the main unit is a body,
239 the required scope is that of the corresponding unit declaration.
241 2017-05-02 Arnaud Charlet <charlet@adacore.com>
243 * einfo.adb (Declaration_Node): flip branches of
244 an IF statement to avoid repeated negations in its condition;
245 no change in semantics, only to improve readability.
247 2017-05-02 Arnaud Charlet <charlet@adacore.com>
249 * sem_case.adb: Remove extra spaces in parameter declarations.
251 2017-05-02 Justin Squirek <squirek@adacore.com>
253 * usage.adb: Replace space with hyphen ("run time" -> "run-time")
254 in usage line for new -gnatwE switch.
256 2017-05-02 Claire Dross <dross@adacore.com>
258 * a-cofuve.ads (Remove): Remove unnecessary
259 conditions in precondition.
261 2017-05-02 Vasiliy Fofanov <fofanov@adacore.com>
263 * a-stream.ads, exp_imgv.adb, sem_ch10.adb,
264 sem_attr.adb, s-finmas.ads, osint.adb: Minor typo fix.
266 2017-05-02 Justin Squirek <squirek@adacore.com>
268 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
269 alternative expression.
270 * sem_res.adb (Resolve_Case_Expression): Ditto.
272 2017-05-02 Ed Schonberg <schonberg@adacore.com>
274 * exp_disp.adb (Set_All_DT_Position, In_Predef_Prim_DT):
275 Refine predicate for the case where the primitive operation
276 is a renaming of equality. An overriding operation that is
277 a user-defined renaming of predefined equality inherits its
278 slot from the overridden operation. Otherwise it is treated
279 as a predefined op and occupies the same predefined slot as
280 equality. A call to it is transformed into a call to its alias,
281 which is the predefined equality. A dispatching call thus uses
282 the proper slot if operation is further inherited and called
283 with class-wide arguments.
285 2017-05-02 Justin Squirek <squirek@adacore.com>
287 * errout.adb (Set_Msg_Text): Add a case to switch the message
288 type when the character '[' is detected signifying a warning
289 about a run-time exception.
290 * opt.ads Add a new Warning_Mode value for new switch
291 * switch-b.adb (Scan_Binder_Switches): Add case for the binder
292 to handle new warning mode
293 * usage.adb (Usage): Add usage entry for -gnatwE
294 * warnsw.adb (Set_Warning_Switch): Add case for the new switch
296 2017-05-02 Ed Schonberg <schonberg@adacore.com>
298 * sem_prag.adb (Process_Conversion): Reject an intrinsic operator
299 declaration that operates on some fixed point type.
301 2017-05-02 Justin Squirek <squirek@adacore.com>
303 * a-crbtgo.adb, s-taasde.adb: Remove unused use-type clauses.
305 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
307 * sem_ch6.adb (Analyze_Null_Procedure): Revert previous change.
309 2017-05-02 Justin Squirek <squirek@adacore.com>
311 * sem_ch4.adb (Analyze_Case_Expression): Add check for valid
312 expression (Analyze_If_Expression): Add check for valid condition
313 * sem_eval.adb (Eval_Case_Expression): Add check for error posted
315 * sem_res.adb (Resolve_If_Expression): Add check for valid
316 condition and then-expression.
318 2017-05-02 Ed Schonberg <schonberg@adacore.com>
320 * exp_ch3.adb (Build_Initialization_Call): Generate a null
321 statement if the initialization call is a null procedure, as
322 can happen with a controlled type with no explicit Initialize
323 procedure, or an array of such.
324 * exp_ch7.adb (Process_Object_Declaration): For a type with
325 controlled components that has a trivial Initialize procedure,
326 insert declaration for finalization counter after object
328 (Make_Deep_Array_Body, Build_Initialize_statements): Do not create
329 finalization block and attendant declarations if component has
330 a trivial Initialize procedure.
331 (Make_Init_Call): Do not generate a call if controlled type has
332 a trivial Initialize procedure.
334 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
336 * g-forstr.ads (Data): Move Format component last.
337 * g-forstr.adb ("+"): Adjust for above change.
338 * g-rewdat.ads (Buffer): Move Buffer, Current, Pattern and Value last.
339 * g-sechas.ads (Context): Move Key last.
340 * g-socket.ads (Service_Entry_Type): Move Aliases last.
341 * s-fileio.adb (Temp_File_Record): Move Name last.
342 * s-regexp.adb (Regexp_Value): Move Case_Sensitive last.
343 * xr_tabls.ads (Project_File): Move Src_Dir and Obj_Dir last.
345 2017-05-02 Jerome Lambourg <lambourg@adacore.com>
347 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: Remove the -nognarl
348 switch introduced recently. finally not needed.
350 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
352 * sem_ch6.adb (Analyze_Null_Procedure): Set the
353 Corresponding_Body link for a null procedure declaration.
355 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
357 * atree.h (Flag290): Add missing terminating parenthesis.
358 * einfo.adb (Is_Class_Wide_Clone): Use Flag290.
359 (Set_Is_Class_Wide_Clone): Likewise.
360 * einfo.ads (Is_Class_Wide_Clone): Likewise.
362 2017-05-02 Gary Dismukes <dismukes@adacore.com>
364 * checks.ads (Null_Exclusion_Static_Checks): Add Boolean
365 parameter Array_Comp to indicate the case of an array object
366 with null-excluding components.
367 * checks.adb (Null_Exclusion_Static_Checks):
368 Call Compile_Time_Constraint_Error instead of
369 Apply_Compile_Time_Constraint_Error in the component case. Also
370 call that when Array_Comp is True, with an appropriate warning for
371 the array component case. Only create an explicit initialization
372 by null in the case of an object of a null-excluding access type
373 (and no longer do that in the component case).
374 * sem_ch3.adb (Check_Component): Add a Boolean parameter
375 Array_Comp defaulted to False. Pass Empty for the Comp
376 actual when calling Null_Exclusion_Static_Checks in the case
377 where Comp_Decl matches Object_Decl, because we don't have a
378 component in that case. In the case of an object or component
379 of an array type, pass True for Array_Comp on the recursive call
382 2017-05-02 Bob Duff <duff@adacore.com>
384 * s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
385 compute the linux priority from the Ada priority. Call this everywhere
386 required. In particular, the previous version was not doing this
387 computation when setting the ceiling priority in various places. It
388 was just converting to C.int, which results in a ceiling that is off
391 2017-05-02 Ed Schonberg <schonberg@adacore.com>
393 * sem_ch3.adb: Comment predicate inheritance.
395 2017-05-02 Tristan Gingold <gingold@adacore.com>
397 * s-trasym.ads: Add comment.
399 2017-05-02 Bob Duff <duff@adacore.com>
401 * sem_elab.adb, sem_elab.ads: Minor comment fixes.
402 * sem_ch4.adb: Minor reformatting.
403 * s-taprop-linux.adb, s-taspri-posix.ads: Code refactoring.
404 * s-taspri-posix-noaltstack.ads: Minor refactoring.
405 * sinput.ads: Minor typo fix.
407 2017-05-02 Ed Schonberg <schonberg@adacore.com>
409 * exp_ch9.adb (Discriminated_Size): Moved to sem_util.
410 * sem_util.ads, sem_util.adb (Discriminated_Size): Predicate moved
411 here from exp_ch9, to recognize objects whose creation requires
412 dynamic allocation, so that the proper warning can be emitted
413 when restriction No_Implicit_Heap_Allocation is in effect.
414 * sem_ch3.adb (Analyze_Object_Declaration): Use Discriminated_Size
415 to emit proper warning when an object that requires dynamic
416 allocation is declared.
418 2017-05-02 Tristan Gingold <gingold@adacore.com>
420 * s-trasym.ads, s-trasym.adb (Enable_Cache): New.
422 2017-05-02 Ed Schonberg <schonberg@adacore.com>
424 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): The same relaxed
425 visibility rules for equality operators that apply within an
426 instantiation apply within an inlined body.
427 * sem_type.adb (Add_One_Interp): ditto.
429 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
431 * sem_prag.adb (Analyze_Pragma): Forbid pragma Contract_Cases on null
434 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
437 (Name_Assume, Name_Attribute_Definition, Name_Loop_Optimize,
438 Name_No_Tagged_Streams): Move to regular pragmas. Add
439 placeholders for Default_Scalar_Storage_Order, Dispatching_Domain,
440 and Secondary_Stack_Size.
441 (Pragma_Id): Move Pragma_Assume,
442 Pragma_Attribute_Definition, Pragma_Loop_Optimize and
443 Pragma_No_Tagged_Streams to second part.
445 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
447 * exp_attr.adb: Minor reformatting.
449 2017-05-02 Ed Schonberg <schonberg@adacore.com>
451 * sem_ch4.adb (Analyze_Selected_Component): Improve error
452 detection for illegal references to private components or
453 operations of a protected type in the body of the type.
455 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
457 * opt.ads: Add missing GNAT markers in comments.
458 * opt.adb (Set_Opt_Config_Switches): Do not override earlier
459 settings of Optimize_Alignment at the end.
461 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
463 * checks.adb (Apply_Constraint_Check): Do not apply
464 a discriminant check when the associated type is a constrained
465 subtype created for an unconstrained nominal type.
466 * exp_attr.adb: Minor reformatting.
468 2017-05-02 Bob Duff <duff@adacore.com>
470 * sem_ch3.adb (OK_For_Limited_Init_In_05): Handle correctly
471 the N_Raise_Expression case.
472 * sem_ch6.adb (Check_Limited_Return): Minor: clarify comment,
475 2017-05-02 Yannick Moy <moy@adacore.com>
477 * exp_ch4.adb (Expand_N_Op_Ne): Do not bump parenthese level and
478 optimize length comparison in GNATprove mode.
479 * exp_spark.adb (Expand_SPARK_Op_Ne): New function to rewrite
480 operator /= into negation of operator = when needed.
481 (Expand_SPARK): Call new
482 function to expand operator /=.
484 2017-05-02 Ed Schonberg <schonberg@adacore.com>
486 * exp_fixd.adb (Expand_Divide_Fixed_By_Fixed_Giving_Fixed):
487 Simplify the expression for a fixed-fixed division to remove
488 divisions by constants whenever possible, as an optimization
489 for restricted targets.
491 2017-05-02 Hristian Kirtchev <kirtchev@adacore.com>
493 * checks.adb, sem_ch3.adb, sem_ch6.adb: Minor reformatting.
495 2017-05-02 Bob Duff <duff@adacore.com>
497 * exp_attr.adb (Callable, Identity, Terminated): Use Find_Prim_Op
498 to find primitive ops, instead of using an Identifier that will
499 later be looked up. This is necessary because these ops are not
500 necessarily visible at all places where we need to call them.
501 * exp_util.ads: Minor comment fix.
503 2017-05-02 Ed Schonberg <schonberg@adacore.com>
505 * sem_ch6.adb (Fully_Conformant_Expressions): Two entity
506 references are fully conformant if they are both expansions
507 of the discriminant of a protected type, within one of the
508 protected operations. One occurrence may be expanded into a
509 constant declaration while the other is an input parameter to
510 the corresponding generated subprogram.
512 2017-05-02 Justin Squirek <squirek@adacore.com>
514 * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for
515 recursivly searching composite-types for null-excluding access
516 types and verifying them.
517 (Analyze_Object_Declaration): Add a
518 call to Check_Null_Excluding_Components for static verification
519 of non-initialized objects.
520 * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added
521 a parameter for a composite-type's component and an extra case
522 for printing component information.
524 2017-05-02 Yannick Moy <moy@adacore.com>
526 * sem_ch10.adb (Analyze_Subunit): Take
527 configuration pragma into account when restoring appropriate
528 pragma for analysis of subunit.
530 2017-05-02 Justin Squirek <squirek@adacore.com>
532 * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb,
533 s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb,
534 g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type
535 clauses from the runtime.
537 2017-05-02 Eric Botcazou <ebotcazou@adacore.com>
539 * freeze.adb (Check_Component_Storage_Order): Do not treat bit-packed
540 array components specially.
542 2017-05-02 Ed Schonberg <schonberg@adacore.com>
544 * sem_ch8.adb (Premature_Usage): If the premature usage of
545 an entity is as the expression in its own object decaration,
546 rewrite the reference as Any_Id to prevent cascaded errors or
547 compiler loops when such an entity is used in an address clause.
549 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
551 * gcc-interface/decl.c (components_to_record): Add missing guard.
553 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
555 * gcc-interface/decl.c (components_to_record): Add more comments.
556 Put back pending fields onto the regular list if the misalignment
557 happens to cancel itself.
559 2017-04-28 Ed Schonberg <schonberg@adacore.com>
561 * sem_ch4.adb (Complete_Object_Operation): When rewriting the
562 controlling actual in a prefixed call, preserve the original node
563 information if the prefix itself has been rewritten, for ASIS use.
565 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
567 * exp_ch6.adb (Insert_Post_Call_Actions):
568 Code clean up. Insert the post-call actions after an enclosing
569 procedure call when N denotes a function call and appears as an
570 actual parameter in the procedure call.
572 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
574 * freeze.adb (Check_Component_Storage_Order): If there is a clause
575 for the component, also reject the attribute if the component
576 doesn't end on a byte boundary and its scalar storage order is
577 different from that of the enclosing record type.
579 2017-04-28 Javier Miranda <miranda@adacore.com>
581 * atree.ads (Info_Messages): Removed.
582 (Warning_Info_Messages): New counter.
583 (Report_Info_Messages): New counter.
584 * err_vars.ads Update documentation.
585 * errout.adb (Delete_Warning_And_Continuations): Update
586 Info_Message occurrences.
587 (Error_Msg_Internal): Update Info_Message occurrences.
588 (Delete_Warning): Update Info_Message occurrences.
589 (Write_Error_Summary): Update Info_Message occurrences.
590 (Output_Messages): Update Info_Message occurrences.
591 (To_Be_Removed): Update Info_Message occurrences.
592 (Reset_Warnings): Update Info_Message occurrences.
593 * errutil.adb (Error_Msg): Update Info_Message occurrences.
594 (Finalize): Update Info_Message occurrences.
595 (Initialize): Update Info_Message occurrences.
596 * erroutc.adb (Delete_Msg): Update Info_Message occurrences.
597 (Compilation_Errors): Update Info_Message_Occurences.
599 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
601 * exp_ch3.adb (Build_Init_Statements): Likewise on Nam.
602 * freeze.adb (Check_Component_Storage_Order): And on Comp_Byte_Aligned.
603 * sem_aggr.adb (Resolve_Record_Aggregate): Initialize Box_Node.
604 * sem_attr.adb (Loop_Entry): Initialize Encl_Loop.
605 * sem_ch12.adb (Build_Operator_Wrapper): Add pragma Warnings on Expr.
606 * sem_ch13.adb (Validate_Address_Clauses): Initialize Y_Alignment and
608 * sem_eval.adb (Why_Not_Static): Initialize Typ.
609 * sem_prag.adb (Analyze_Pragma): Add pragma Warnings on Str.
611 2017-04-28 Bob Duff <duff@adacore.com>
613 * sem_util.ads, sem_util.adb (Might_Raise): New function
614 that replaces Is_Exception_Safe, but has the opposite
615 sense. Is_Exception_Safe was missing various cases -- calls inside
616 a pragma Debug, calls inside an 'if' or assignment statement,
617 etc. Might_Raise now walks the entire subtree looking for things
619 * exp_ch9.adb (Is_Exception_Safe): Remove.
620 (Build_Protected_Subprogram_Body): Replace call to
621 Is_Exception_Safe with "not Might_Raise". Misc cleanup (use
622 constants where possible).
623 * exp_ch7.adb: Rename Is_Protected_Body -->
624 Is_Protected_Subp_Body. A protected_body is something different
627 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
629 * inline.adb (Expand_Inlined_Call): Initialize Targ1 variable.
630 * par-ch3.adb (P_Component_Items): Initialize Decl_Node variable.
631 (P_Discrete_Choice_List): Initialize Expr_Node variable.
632 * par-ch9.adb (P_Task): Initialize Aspect_Sloc variable.
633 (P_Protected): Likewise.
634 * sem_case.adb (Check_Duplicates):
635 Add pragma Warnings on variable.
636 * sem_ch12.adb (Preanalyze_Actuals): Initialize Vis variable.
637 * sem_ch4.adb (List_Operand_Interps): Add pragma Warnings on variable.
638 * sem_ch5.adb (Analyze_Assignment): Initialize Save_Full_Analysis.
639 (Analyze_Exit_Statement): Initialize Scope_Id variable.
640 (Analyze_Iterator_Specification): Initialize Bas variable.
641 * sem_ch9.adb (Allows_Lock_Free_Implementation): Initialize
642 Error_Count (Satisfies_Lock_Free_Requirements): Likewise.
643 (Analyze_Accept_Statement): Initialize Task_Nam.
645 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
647 * checks.adb (Install_Primitive_Elaboration_Check):
648 Do not generate an elaboration check if all checks have been
651 2017-04-28 Ed Schonberg <schonberg@adacore.com>
653 * sem_ch13.adb (Analyze_Aspect_Specifications, case
654 Interrupt_Handler and Attach_Handler): Generate reference
655 to protected operation to prevent spurious warnings about
656 unreferenced entities. Previous scheme failed with style checks
659 2017-04-28 Ed Schonberg <schonberg@adacore.com>
661 * sem_prag.adb (Relocate_Pragmas_To_Body): A pragma Warnings
662 that follows an expression function must not be relocated to
663 the generated body, because it applies to the code that follows.
665 2017-04-28 Gary Dismukes <dismukes@adacore.com>
667 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
668 Relaxed_RM_Semantics to avoid having CodePeer issue errors on
669 code that might violate the more stringent checking for 'Access
670 introduced in Ada 2005.
672 2017-04-28 Arnaud Charlet <charlet@adacore.com>
674 * a-cforse.adb: minor style fix in comment.
676 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
678 * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
679 initialize Block_Decls variable.
680 (Expand_Entry_Barrier): Add pragma Warnings on Func_Body variable.
681 (Build_Dispatching_Requeue): Add pragma Warnings on Op variable.
682 * exp_disp.adb (Expand_Interface_Actuals): Initialize
683 Formal_DDT and Actual_DDT variables.
684 (Expand_Interface_Thunk): Initialize Iface_Formal.
685 (Make_DT): Initialize Size_Comp.
686 (Make_Select_Specific_Data_Table): Initialize Decls.
687 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies):
688 Also initialize more RPC_Receiver_* variables.
689 (Build_To_Any_Function): Initialize Cstr_Formal.
690 * exp_prag.adb (Expand_Pragma_Contract_Cases): Initialize Msg_Str.
692 2017-04-28 Ed Schonberg <schonberg@adacore.com>
694 * sem_ch6.adb (Freeze_Type_Refs): For an interface conversion
695 node between access types, freeze the designated type as well,
696 so that dispatch table pointers are created in the proper scope,
697 and not in the constructed body of the expression function.
699 2017-04-28 Bob Duff <duff@adacore.com>
701 * alloc.ads (Nodes_Initial): Go back to previous value. The large
702 value makes large compilations faster, but small compilations slower.
704 2017-04-28 Arnaud Charlet <charlet@adacore.com>
706 * sem_util.adb: minor typos in Is_Child_Or_Sibling.
708 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
710 * erroutc.adb (Compilation_Errors): Do not consider info messages
711 as suitable warnings when warnings must be treated as errors.
712 * sem_ch7.adb (Analyze_Package_Specification): Do not consider
713 internally-generated packages when outputting completion
715 * errout.adb (Output_Messages): Do not consider info messages as
716 suitable warnings when warnings must be treated as errors.
717 * errutil.adb (Finalize): Do not consider info messages as
718 suitable warnings when warnings must be treated as errors.
720 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
722 * warnsw.ads: Minor fix for incorrect wording in comment.
724 2017-04-28 Ed Schonberg <schonberg@adacore.com>
726 * sem_res.adb (In_Instance_Code): New predicate in
727 Valid_Conversion, to determine whether a type conversion appears
728 as (or within) an actual for a formal object. Type conversions
729 in instances are not rechecked in Valid_Conversion because
730 visibility changes between generic location andi instance may
731 lead to spurious errors, but conversions within an actual must be
732 fully checked, and they are not fully resolved when pre-analyzing
735 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
737 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
738 New_Copy_Tree instead of Relocate_Node as any subsequent copies
739 of the relocated node will have mangled Parent pointers.
740 * sem_util.adb (Build_NCT_Hash_Tables): Reset both hash
741 tables used in conjunction with entity and itype replication.
742 (Visit_Entity): Rewrite the restriction on which entities
743 require duplication. The restriction now includes all types.
745 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
747 * a-cofuse.ads, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfinve.adb,
748 a-cfinve.ads, a-cforma.adb, a-cforma.ads, a-cofuma.adb, a-cofuma.ads,
749 a-cfhama.adb, a-cfhama.ads, a-cforse.adb: Minor reformatting and code
752 2017-04-28 Hristian Kirtchev <kirtchev@adacore.com>
754 * exp_util.adb, g-dyntab.adb, par-ch4.adb, sem_util.adb, sem_attr.adb,
755 gnat1drv.adb, exp_disp.adb, namet.adb, alloc.ads: Minor reformatting.
757 2017-04-28 Gary Dismukes <dismukes@adacore.com>
759 * exp_util.adb: Minor reformatting.
761 2017-04-28 Ed Schonberg <schonberg@adacore.com>
763 * sem_ch4.adb: Fix copy/pasto.
765 2017-04-27 Tristan Gingold <gingold@adacore.com>
767 * gcc-interface/Make-lang.in: Define EH_MECHANISM while building
768 raise-gcc.c. Fix include search path for raise-gcc.c
770 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
772 * fe.h (Warn_On_Questionable_Layout): Declare.
773 * warnsw.ads (Warn_On_Record_Holes): Move down.
774 (Warn_On_Questionable_Layout): New boolean variable.
775 (Warning_Record): Add Warn_On_Questionable_Layout field.
776 * warnsw.adb (All_Warnings): Set Warn_On_Questionable_Layout.
777 (Restore_Warnings): Likewise.
778 (Save_Warnings): Likewise.
779 (Set_Dot_Warning_Switch): Handle 'q' and 'Q' letters.
780 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust call to
781 components_to_record.
782 (gnu_field_to_gnat): New function.
783 (warn_on_field_placement): Likewise.
784 (components_to_record): Add GNAT_RECORD_TYPE and remove REORDER
785 parameters. Rename local variables and adjust recursive call.
786 Rework final scan of the field list and implement warnings on the
787 problematic placement of specific sorts of fields.
789 2017-04-27 Bob Duff <duff@adacore.com>
791 * errout.adb, exp_aggr.adb, exp_attr.adb, exp_code.adb, fname.adb,
792 * fname.ads, freeze.adb, inline.adb, lib.adb, lib.ads, lib-list.adb,
793 * lib-load.adb, lib-writ.adb, par.adb, restrict.adb, rtsfind.adb,
794 * sem.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb,
795 * sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
796 * sem_intr.adb, sem_res.adb, sem_util.adb, sem_warn.adb, sprint.adb:
797 For efficiency, cache results of Is_Internal_File_Name and
798 Is_Predefined_File_Name in the Units table. This avoids a lot
799 of repeated text processing.
801 2017-04-27 Emmanuel Briot <briot@adacore.com>
803 * g-comlin.adb (Sort_Sections): remove useless test.
805 2017-04-27 Claire Dross <dross@adacore.com>
807 * a-cfhase.adb, a-cfhase.ads (=): Generic parameter removed to
808 allow the use of regular equality over elements in contracts.
809 (Formal_Model): Ghost package containing model functions that are
810 used in subprogram contracts.
811 (Current_To_Last): Removed, model functions should be used instead.
812 (First_To_Previous): Removed, model functions should be used instead.
813 (Strict_Equal): Removed, model functions should be used instead.
814 (No_Overlap): Removed, model functions should be used instead.
815 (Equivalent_Keys): Functions over cursors are removed. They were
816 awkward with explicit container parameters.
817 * a-cforse.adb, a-cforse.ads (=): Generic parameter removed to
818 allow the use of regular equality over elements in contracts.
819 (Formal_Model): Ghost package containing model functions that
820 are used in subprogram contracts.
821 (Current_To_Last): Removed, model functions should be used instead.
822 (First_To_Previous): Removed, model functions should be used instead.
823 (Strict_Equal): Removed, model functions should be used instead.
824 (No_Overlap): Removed, model functions should be used instead.
826 2017-04-27 Yannick Moy <moy@adacore.com>
828 * gnat1drv.adb: Code cleanup.
830 2017-04-27 Ed Schonberg <schonberg@adacore.com>
832 * exp_util.adb (Replace_Entity): The prefix of a 'Result
833 attribute reference in a post- condition is the subprogram to
834 which the condition applies. If the condition is inherited
835 by a type extension, the prefix becomes a reference to the
836 inherited operation, but there is no need to create a wrapper
837 for this operation, because 'Result is expanded independently
838 when elaborating the postconditions.
840 2017-04-27 Bob Duff <duff@adacore.com>
842 * sinput.adb: Minor code cleanup.
843 * namet.adb (Append): Create faster versions of
844 Append(String) and Append(Name_Id) by using slice assignment
846 * sem_util.adb (In_Instance): Speed this up by removing
847 unnecessary tests; Is_Generic_Instance is defined for all
849 * sem_util.ads, sem_util.adb (In_Parameter_Specification):
850 Remove unused function.
851 * alloc.ads (Nodes_Initial): Use a much larger value, because
852 the compiler was spending a lot of time copying the nodes table
853 when it grows. This number was chosen in 1996, so is rather out
854 of date with current memory sizes. Anyway, it's virtual memory.
855 Get rid of Orig_Nodes_...; use Node_... instead.
856 * atree.adb (Lock): Do not release the Nodes tables; it's a
858 Orig_Nodes_ ==> Nodes_
859 * nlists.adb: Orig_Nodes_ ==> Nodes_
860 * g-table.adb: Remove unused "with" clause.
861 * g-table.ads, table.ads: Remove Big_Table_Type, which should
862 not be used by clients.
863 * g-dyntab.adb (Last_Allocated): New function
864 to encapsulate T.P.Last_Allocated, which I'm thinking of changing.
866 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
868 * sem_eval.adb (Subtypes_Statically_Compatible): Remove duplicated
870 (Subtypes_Statically_Match): Remove duplicate check.
871 * sem_prag.adb (Check_Arg_Is_External_Name): Remove duplicate check.
873 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
875 * exp_aggr.adb (Replace_Type): Remove the special processing
876 for selected components.
877 * exp_attr.adb (Expand_N_Attribute_Reference): Merge the
878 processing for attributes Fixed_Value and Integer_Value.
879 * exp_util.adb (Side_Effect_Free): Merge the processing for
880 qualified expressions, type conversions, and unchecked type
882 * g-comlin.adb (Is_In_Config): Merge the processing for No_Space
884 * par-ch3.adb (P_Declarative_Items): Merge the processing for
885 tokens function, not, overriding, and procedure.
886 * sem_ch6.adb (Fully_Conformant_Expressions): Merge the processing
887 for qualified expressions, type conversions, and unchecked
889 * sem_util.adb (Compile_Time_Constraint_Error): Merge the
890 processing for Ada 83 and instances.
891 (Object_Access_Level): Merge the processing for indexed components
892 and selected components.
893 * uname.adb (Add_Node_Name): Merge the processing for stubs.
895 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
897 * checks.adb (Install_Primitive_Elaboration_Check):
898 Do not generate the check when restriction No_Elaboration_Code
901 2017-04-27 Ed Schonberg <schonberg@adacore.com>
903 * exp_disp.adb (Build_Class_Wide_Check): New subsidiary
904 of Expand_Dispatching_Call. If the denoted subprogram has a
905 class-wide precondition, this is the only precondition that
906 applies to the call, rather that the class-wide preconditions
907 that may apply to the body that is executed. (This is specified
910 2017-04-27 Yannick Moy <moy@adacore.com>
912 * gnat1drv.adb (Adjust_Global_Switches): Issue
913 a warning in GNATprove mode if the runtime library does not
914 support IEEE-754 floats.
916 2017-04-27 Ed Schonberg <schonberg@adacore.com>
918 * sem_prag.adb (Inherit_Class_Wide_Pre): If the parent operation
919 is itself inherited it does not carry any contract information,
920 so examine its parent operation which is its Alias.
922 2017-04-27 Ed Schonberg <schonberg@adacore.com>
924 * sem_attr.adb (Analyze_Attribute, case 'Image): In Ada2012 the
925 prefix can be an object reference in which case Obj'Image (X)
926 can only be interpreted as an indexing of the parameterless
927 version of the attribute.
928 * par-ch4.adb (P_Name): An attribute reference can be the prefix of
929 an indexing or a slice operation if the attribute does not require
930 parameters. In Ada2012 'Image also belongs in this category,
931 and A'Image (lo .. hi) is legal and must be parsed as a slice.
933 2017-04-27 Yannick Moy <moy@adacore.com>
935 * exp_ch4.adb: Minor reformatting.
936 * gnat1drv.adb (Adjust_Global_Switches): When in GNATprove mode,
937 disable the CodePeer and C generation modes. Similar to the
938 opposite actions done in CodePeer mode.
940 2017-04-27 Yannick Moy <moy@adacore.com>
942 * sem_res.adb: Remove duplicate code.
943 * sem_attr.adb: Delete duplicate code.
945 2017-04-27 Bob Duff <duff@adacore.com>
947 * g-dyntab.adb: Reduce the amount of copying in
948 Release. No need to copy items past Last.
950 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
952 * checks.adb Add with and use clauses for Sem_Disp.
953 (Install_Primitive_Elaboration_Check): New routine.
954 * checks.ads (Install_Primitive_Elaboration_Check): New routine.
955 * exp_attr.adb (Expand_N_Attribute_Reference): Clean up the
956 processing of 'Elaborated.
957 * exp_ch6.adb (Expand_N_Subprogram_Body): Install a primitive
960 2017-04-27 Bob Duff <duff@adacore.com>
962 * g-dyntab.ads, g-dyntab.adb, g-table.ads: Remove incorrect assertion.
963 If the table grows and then shrinks back to empty, we won't necessarily
964 point back to the empty array. Code cleanups.
965 * sinput.ads: Add 'Base to Size clause to match the declared
968 2017-04-27 Claire Dross <dross@adacore.com>
970 * a-cforma.adb, a-cforma.ads (=): Generic parameter removed to
971 allow the use of regular equality over elements in contracts.
972 (Formal_Model): Ghost package containing model functions that
973 are used in subprogram contracts.
974 (Current_To_Last): Removed, model functions should be used instead.
975 (First_To_Previous): Removed, model functions should be used instead.
976 (Strict_Equal): Removed, model functions should be used instead.
977 (No_Overlap): Removed, model functions should be used instead.
978 * a-cofuma.adb, a-cofuma.ads (Enable_Handling_Of_Equivalence)
979 Boolean generic parameter to disable contracts for equivalence
981 (Witness): Create a witness of a key that is used for handling of
982 equivalence between keys.
983 (Has_Witness): Check whether a witness is contained in a map.
984 (W_Get): Get the element associated to a witness.
985 (Lift_Equivalent_Keys): Removed, equivalence between keys is handled
987 * a-cofuse.adb, a-cofuse.ads (Enable_Handling_Of_Equivalence)
988 Boolean generic parameter to disable contracts for equivalence
990 * a-cfhama.adb, a-cfhama.ads (Formal_Model.P) Disable handling
991 of equivalence on functional maps.
992 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.P) Disable handling
993 of equivalence on functional maps.
995 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
997 * exp_ch9.adb (Expand_Entry_Barrier): Code
998 cleanup. Do not perform the optimization which removes the
999 declarations of the discriminant and component renamings when
1000 validity checks on operands and attributes are in effect.
1002 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1004 * exp_spark.adb, exp_util.adb, sem_ch7.adb, g-dyntab.adb, g-dyntab.ads,
1005 freeze.adb, a-cfinve.ads, a-cofuma.adb, a-cofuma.ads, a-cfhama.adb,
1006 a-cfhama.ads, a-cofove.ads: Minor reformatting.
1008 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1010 * g-debpoo.adb (Dump_Gnatmem): Protect against a possible null
1011 pointer dereference.
1012 * g-spipat.adb (Dump): Code clean up. Protect against a possible
1013 null pointer dereference.
1015 2017-04-27 Bob Duff <duff@adacore.com>
1017 * g-dyntab.ads, g-dyntab.adb: Default for Table_Low_Bound.
1018 Rename Empty --> Empty_Table_Ptr, and don't duplicate code for it.
1019 Free renames Init, since they do the same thing.
1020 * g-table.ads: Default for Table_Low_Bound.
1021 * table.ads: Default for Table_Low_Bound, Table_Initial, and
1024 2017-04-27 Bob Duff <duff@adacore.com>
1026 * g-dyntab.ads, g-dyntab.adb: Add assertions to subprograms that
1028 * atree.adb, elists.adb, fname-uf.adb, ghost.adb, inline.adb,
1029 * lib.adb, namet.adb, nlists.adb, sem.adb, sinput.adb, stringt.adb:
1030 Reorder code so that above assertions do not fail.
1031 * table.ads: Remove obsolete comment on Locked.
1033 2017-04-27 Claire Dross <dross@adacore.com>
1035 * a-cfdlli.ads: Code cleanup.
1037 2017-04-27 Yannick Moy <moy@adacore.com>
1039 * exp_spark.adb (Expand_SPARK_Freeze_Type): Build a DIC procedure
1040 when needed for proof. (Expand_SPARK): Call the new procedure.
1041 * exp_util.ads Fix typo.
1043 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1045 * a-cofuma.ads, a-cfhama.ads: Minor reformatting, grammar, and typo
1048 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1050 * sem_elab.adb Add new type Visited_Element
1051 and update the contents of table Elab_Visited. Various code clean up.
1052 (Check_Elab_Call): Determine whether a prior call to
1053 the same subprogram was already examined within the same context.
1054 (Check_Internal_Call_Continue): Register the subprogram being
1055 called as examined within a particular context. Do not suppress
1056 elaboration warnings.
1058 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1060 * xoscons.adb, osint.ads: Minor reformatting.
1062 2017-04-27 Bob Duff <duff@adacore.com>
1064 * g-dyntab.ads, g-dyntab.adb: Misc cleanup. Rename
1065 Table_Count_Type --> Table_Last_Type, because the name
1066 was confusing (a "count" usually starts at zero). Add
1067 functionality supported or needed by other tables packages
1068 (Move, Release_Threshold).
1069 * g-table.ads, g-table.adb: This is now just a thin wrapper
1070 around g-dyntab.ads/g-dyntab.adb. Add functionality supported
1071 or needed by other tables packages (Save, Restore).
1072 * table.ads, table.adb: This is now just a thin wrapper around
1073 * g-table.ads/g-table.adb.
1074 * namet.h, scos.h, uintp.h: These files are reaching into the
1075 private data of some instances of g-table, whose names changed,
1076 so the above change requires some adjustment here. It now uses
1079 2017-04-27 Bob Duff <duff@adacore.com>
1081 * namet.adb, namet.ads: Minor: remove unused procedures.
1083 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1085 * checks.adb (Apply_Scalar_Range_Check): Initialize Ok variable too.
1086 (Minimize_Eliminate_Overflows): Initialize Llo and Lhi.
1087 Add pragma Warnings on Rtype variable in nested block. *
1088 * exp_ch3.adb (Build_Init_Statements): Initialize VAR_LOC.
1089 * exp_ch4.adb (Expand_Concatenate): Initialize 3 variables.
1090 (Size_In_Storage_Elements): Add pragma Warnings on Res variable.
1091 * exp_ch7.adb (Build_Adjust_Statements): Initialize Bod_Stmts.
1092 (Process_Component_List_For_Finalize): Initialize Counter_Id.
1093 (Build_Finalize_Statements): Initialize Bod_Stmts.
1094 * exp_disp.adb (Expand_Dispatching_Call): Initialize SCIL_Node.
1096 2017-04-27 Claire Dross <dross@adacore.com>
1098 * a-cfhama.adb, a-cfhamai.ads (=): Generic parameter removed to
1099 allow the use of regular equality over elements in contracts.
1100 (Formal_Model): Ghost package containing model functions that are
1101 used in subprogram contracts.
1102 (Current_To_Last): Removed, model
1103 functions should be used instead.
1104 (First_To_Previous): Removed, model functions should be used instead.
1105 (Strict_Equal): Removed, model functions should be used instead.
1106 (No_Overlap): Removed, model functions should be used instead.
1107 (Equivalent_Keys): Functions over cursors are removed. They were
1108 awkward with explicit container parameters.
1109 * a-cofuma.adb, a-cofuma.ads (Lift_Equivalent_Keys): New lemma
1110 (proof only) procedure to help GNATprove when equivalence over
1111 keys is not equality.
1113 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1115 * exp_util.adb, a-cfdlli.adb, a-cfdlli.ads, exp_ch9.adb, g-dyntab.adb,
1116 sem_dim.adb, a-cfinve.adb, a-cfinve.ads, a-cofove.adb, a-cofove.ads:
1117 Minor reformatting and code cleanups.
1119 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1121 * freeze.adb (Build_Inherited_Condition_Pragmas): New procedure,
1122 subsidiary of Check_Inherited_Conditions, to build pragmas for an
1123 operation whose ancestor has classwide pre/postconditions. This
1124 is used both to check the legality of the inheritance in Ada
1125 and in SPARK, and to determine whether a wrapper is needed for
1126 an inherited operation.
1127 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity):
1128 Improve placement of error message for inherited classwide
1129 conditions that become illegal on type derivation.
1131 2017-04-27 Yannick Moy <moy@adacore.com>
1133 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Set
1134 SPARK_Mode from context on generic package.
1135 * sem_ch7.adb (Analyze_Package_Declaration): Simplify code to remove
1138 2017-04-27 Claire Dross <dross@adacore.com>
1140 * a-cofuve.ads (Range_Shifted): Rewrite precondition to avoid
1141 overflows in computations.
1142 * a-cofove.ads (Capacity_Range): Rewrite last bound to avoid
1143 overflows in computations.
1144 (Insert): Rewrite precondition to avoid overflows in computations.
1145 * a-cfinve.ads (Capacity_Range): Rewrite last bound to avoid
1146 overflows in computations.
1147 (Insert): Rewrite precondition to avoid overflows in computations.
1149 2017-04-27 Steve Baird <baird@adacore.com>
1151 * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel
1152 flag when it is declared in order to avoid confusing CodePeer about
1153 the possibility of an uninitialized variable read.
1155 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1157 * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is
1158 no dimensionality error if the subtype of the expression is
1159 identical to the nominal subtype in the declaration, even though
1160 the expression itself may have been constant-folded and lack a
1162 * sem_dim.ads: Add comments on setting of dimension vectors and
1163 its interaction with node rewritings and side-effect removal.
1165 2017-04-27 Bob Duff <duff@adacore.com>
1167 * debug.adb: Minor comment correction.
1168 * sem_dim.ads: Minor reformatting and typo fixes.
1170 2017-04-27 Bob Duff <duff@adacore.com>
1172 * g-table.adb, g-table.adsa, scos.h: From the C side, access First and
1173 Last of the tables via function calls, rather than relying on layout
1176 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1178 * exp_util.adb: No wrapper in GNATprove mode.
1180 2017-04-27 Yannick Moy <moy@adacore.com>
1182 * sem_res.adb (Resolve_Comparison_Op): Always
1183 evaluate comparisons between values of universal types.
1185 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1187 * sem_elab.adb (Check_Internal_Call_Continue): Do not generate
1188 an elaboration counter nor a check when in GNATprove mode.
1189 * sem_util.adb (Build_Elaboration_Entity): Do not create an
1190 elaboration counter when in GNATprove mode.
1192 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1194 * freeze.adb: copy-paste typo.
1196 2017-04-27 Yannick Moy <moy@adacore.com>
1198 * sem_prag.adb (Analyze_Pre_Post_In_Decl_Part):
1199 Use correct test to detect call in GNATprove mode instead of
1202 2017-04-27 Claire Dross <dross@adacore.com>
1204 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model.M_Elements_In_Union):
1205 New property function expressing that the element of a
1206 sequence are contained in the union of two sequences.
1207 (Formal_Model.M_Elements_Included): New property function
1208 expressing that the element of a sequence are another sequence.
1209 (Generic_Sorting): Use new property functions to state that
1210 elements are preserved by Sort and Merge.
1211 * a-cofove.adb, a-cofove.ads (=): Generic parameter removed to
1212 allow the use of regular equality over elements in contracts.
1213 (Formal_Model): Ghost package containing model functions
1214 that are used in subprogram contracts. (Capacity):
1215 On unbounded containers, return the maximal capacity.
1216 (Current_To_Last): Removed, model functions should be used instead.
1217 (First_To_Previous): Removed, model functions should be used instead.
1218 (Append): Default parameter value replaced
1219 by new wrapper to allow more precise contracts.
1220 (Insert): Subprogram restored, it seems it was useful to users even if
1222 (Delete): Subprogram restored, it seems it was useful to users even if
1224 (Prepend): Subprogram restored, it seems it was useful to users even
1225 if it is inefficient.
1226 (Delete_First): Subprogram restored, it seems it
1227 was useful to users even if it is inefficient. (Delete_Last):
1228 Default parameter value replaced by new wrapper to allow more
1230 (Generic_Sorting.Merge): Subprogram restored.
1231 * a-cfinve.adb, a-cfinve.ads (=): Generic parameter removed to
1232 allow the use of regular equality over elements in contracts.
1233 (Formal_Model): Ghost package containing model functions
1234 that are used in subprogram contracts. (Capacity):
1235 On unbounded containers, return the maximal capacity.
1236 (Current_To_Last): Removed, model functions should be used
1238 (First_To_Previous): Removed, model functions should be used instead.
1239 (Append): Default parameter value replaced
1240 by new wrapper to allow more precise contracts.
1241 (Insert): Subprogram restored, it seems it was useful to users even if
1243 (Delete): Subprogram restored, it seems it was useful to users even if
1245 (Prepend): Subprogram restored, it seems it was useful to users even
1246 if it is inefficient.
1247 (Delete_First): Subprogram restored, it seems it
1248 was useful to users even if it is inefficient. (Delete_Last):
1249 Default parameter value replaced by new wrapper to allow more
1251 (Generic_Sorting.Merge): Subprogram restored.
1252 (Vector): Do not reuse formal vectors, as it is no longer possible
1253 to supply them with an equality function over elements.
1255 2017-04-27 Bob Duff <duff@adacore.com>
1257 * g-dyntab.adb (Release): When allocating the new
1258 table, use the correct slice of the old table to initialize it.
1260 2017-04-27 Eric Botcazou <ebotcazou@adacore.com>
1262 * einfo.ads: Minor fixes in comments.
1264 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1266 * sem_prag.adb: disable clones in SPARK_Mode.
1268 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1270 * sem_util.ads, contracts.adb: Minor reformatting.
1272 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1274 * sem_util.adb, sem_util.ads (Build_Class_Wide_Clone_Body):
1275 Build body of subprogram that has a class-wide condition that
1276 contains calls to other primitives.
1277 (Build_Class_Wide_Clone_Call); Build a call to the common
1278 class-wide clone of a subprogram with classwide conditions. The
1279 body of the subprogram becomes a wrapper for a call to the
1280 clone. The inherited operation becomes a similar wrapper to which
1281 modified conditions apply, and the call to the clone includes
1282 the proper conversion in a call the parent operation.
1283 (Build_Class_Wide_Clone_Decl (Spec_Id : Entity_Id): For a
1284 subprogram that has a classwide condition that contains calls to
1285 other primitives, build an internal subprogram that is invoked
1286 through a type-specific wrapper for all inherited subprograms
1287 that may have a modified condition.
1288 * sem_prag.adb (Check_References): If subprogram has a classwide
1289 condition, create entity for corresponding clone, to be invoked
1290 through wrapper subprograns.
1291 (Analyze_Pre_Post_Condition_In_Decl_Part): Do not emit error
1292 message about placement if pragma isi internally generated.
1293 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If subprogram has
1294 a classwide clone, build body of clone as copy of original body,
1295 and rewrite original body as a wrapper as a wrapper for a call to
1296 the clone, so that it incorporates the original pre/postconditions
1298 * freeze.adb (Check_Inherited_Conditions): For an inherited
1299 subprogram that inherits a classwide condition, build spec and
1300 body of corresponding wrapper so that call to inherited operation
1301 gets the modified conditions.
1302 * contracts.adb (Analyze_Contracts): If analysis of classwide
1303 condition has created a clone for a primitive operation, analyze
1304 declaration of clone.
1306 2017-04-27 Steve Baird <baird@adacore.com>
1308 * exp_util.adb (Build_Allocate_Deallocate_Proc):
1309 Add "Suppress => All_Checks" to avoid generating unnecessary
1312 2017-04-27 Yannick Moy <moy@adacore.com>
1314 * debug.adb: Reserve debug flag 'm' for no inlining in GNATprove.
1315 * sem_ch6.adb (Anayze_Subprogram_Body_Helper): Skip creation of
1316 inlining body in GNATprove mode when switch -gnatdm used.
1317 * sem_res.adb (Resolve_Call): Skip detection of lack of inlining
1318 in GNATprove mode when switch -gnatdm used.
1320 2017-04-27 Arnaud Charlet <charlet@adacore.com>
1322 * sem_ch13.adb (Analyze_Attribute_Definition_Clause
1323 [Attribute_Address]): Call Set_Address_Taken when ignoring rep
1324 clauses, so that we keep an indication of the address clause
1325 before removing it from the tree.
1327 2017-04-27 Yannick Moy <moy@adacore.com>
1329 * exp_util.ads, exp_util.adb (Evaluate_Name): Force evaluation
1330 of expression being qualified, when not an object name, or else
1331 evaluate the underlying name.
1333 2017-04-27 Jerome Lambourg <lambourg@adacore.com>
1335 * bindusg.adb, bindgen.adb, gnatbind.adb, opt.ads: add -nognarl switch.
1337 2017-04-27 Justin Squirek <squirek@adacore.com>
1339 * exp_ch7.adb (Build_Finalize_Statements): Move Num_Comps to
1340 Process_Component_List_For_Finalization as a local variable.
1341 (Process_Component_For_Finalize): Add an extra parameter to avoid
1343 (Process_Component_List_For_Finalization): Correct calls to
1344 Process_Component_For_Finalize to take Num_Comps as a parameter.
1346 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1348 * sem_ch8.adb (Find_Direct_Name): Account for the case where
1349 a use-visible entity is defined within a nested scope of an
1350 instance when giving priority to entities which were visible in
1351 the original generic.
1352 * sem_util.ads, sem_util.adb (Nearest_Enclosing_Instance): New routine.
1354 2017-04-27 Tristan Gingold <gingold@adacore.com>
1356 * raise-gcc.c: Don't use unwind.h while compiling
1357 for the frontend, but mimic host behavior.
1359 2017-04-27 Javier Miranda <miranda@adacore.com>
1361 * sem_ch3.adb (Build_Discriminated_Subtype):
1362 Propagate Has_Pragma_Unreferenced_Objects to the built subtype.
1364 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1366 * sem_prag.adb (Analyze_Global_Item):
1367 Do not consider discriminants because they are not "entire
1368 objects". Remove the discriminant-related checks because they are
1370 (Analyze_Input_Output): Do not consider discriminants
1371 because they are not "entire objects".
1373 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1375 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Do not
1376 perform check if the current scope does not come from source,
1377 as is the case for a rewritten task body, because check has
1378 been performed already, and may not be doable because of changed
1381 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1383 * a-cofuse.adb, a-cfdlli.adb, a-cofuse.ads, a-cfdlli.ads, a-cofuve.adb,
1384 a-cofuve.ads, a-cofuma.adb, a-cofuma.ads, sem_eval.adb, a-cofuba.adb:
1387 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1389 * sem_ch4.adb (Analyze_Call): If the return type of a function
1390 is incomplete in an context in which the full view is available,
1391 replace the type of the call by the full view, to prevent spurious
1393 * exp_disp.adb (Check_Premature_Freezing): Disable check on an
1394 abstract subprogram so that compiler does not reject a parameter
1395 of a primitive operation of a tagged type being frozen, when
1396 the untagged type of that parameter cannot be frozen.
1398 2017-04-27 Bob Duff <duff@adacore.com>
1400 * sem_attr.adb (Compute_Type_Key): Don't walk
1401 representation items for irrelevant types, which could be in a
1402 different source file.
1404 2017-04-27 Steve Baird <baird@adacore.com>
1406 * exp_attr.adb (Expand_N_Attribute_Reference):
1407 Don't expand Image, Wide_Image, Wide_Wide_Image attributes
1410 2017-04-27 Yannick Moy <moy@adacore.com>
1412 * exp_unst.ads: Fix typos in comments.
1414 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1416 * sem_eval.adb (Choice_Matches): Handle properly a real literal
1417 whose type has a defined static predicate.
1419 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1421 * exp_ch4.adb (Insert_Dereference_Action):
1422 Do not adjust the address of a controlled object when the
1423 associated access type is subject to pragma No_Heap_Finalization.
1426 2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
1428 * gcc-interface/utils.c (gnat_type_for_size): Set
1429 TYPE_ARTIFICIAL on created types.
1431 2017-04-27 Claire Dross <dross@adacore.com>
1433 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
1434 modifications in functional containers.
1435 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
1436 to improve readablity. Subprograms are separated between basic
1437 operations, constructors and properties. Universally quantified
1438 formulas in contracts are factorized in independant functions
1439 with a name and a comment. Names of parameters are improved.
1441 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1443 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1445 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1447 * sem_res.adb (Resolve_Type_Conversion): Do not
1448 install a predicate check here since this is already done during
1449 the expansion phase. Verify whether the operand satisfies the
1450 static predicate (if any) of the target type.
1451 * sem_ch3.adb (Analyze_Object_Declaration): Do
1452 not install a predicate check if the object is initialized by
1453 means of a type conversion because the conversion is subjected
1456 2017-04-27 Tristan Gingold <gingold@adacore.com>
1458 * raise.c (__gnat_builtin_longjmp): Remove.
1459 (__gnat_bracktrace):
1460 Add a dummy definition for the compiler (__gnat_eh_personality,
1461 __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
1462 __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
1463 __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
1464 * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
1465 * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
1466 and a-except-2005.adb.
1467 * raise-gcc.c: Allow build in compiler, compiled as a C++
1469 (__gnat_Unwind_ForcedUnwind): Adjust prototype.
1470 (db): Constify msg_format.
1471 (get_call_site_action_for): Don't use void arithmetic.
1472 * system.ads (Frontend_Exceptions): Set to False.
1473 (ZCX_By_Default): Set to True.
1474 (GCC_ZC_Support): Set to True.
1475 * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
1477 * gcc-interface/Make-lang.in: Add support for backend zcx exceptions
1478 in gnat1 and gnatbind.
1479 * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
1480 s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
1481 * s-excmac.ads, s-excmac.adb: Copy of variants.
1482 * a-except.o: Adjust preequisites.
1483 Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
1485 2017-04-27 Claire Dross <dross@adacore.com>
1487 * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
1488 modifications in functional containers.
1489 * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
1490 to improve readablity. Subprograms are separated between basic
1491 operations, constructors and properties. Universally quantified
1492 formulas in contracts are factorized in independant functions
1493 with a name and a comment. Names of parameters are improved.
1495 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1497 * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
1499 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1501 * sem_res.adb (Resolve_Type_Conversion): Do not
1502 install a predicate check here since this is already done during
1503 the expansion phase. Verify whether the operand satisfies the
1504 static predicate (if any) of the target type.
1505 * sem_ch3.adb (Analyze_Object_Declaration): Do
1506 not install a predicate check if the object is initialized by
1507 means of a type conversion because the conversion is subjected
1510 2017-04-27 Tristan Gingold <gingold@adacore.com>
1512 * a-except.ads, a-except.adb, a-exexpr.adb: Removed (will be
1513 replaced by their variants).
1515 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1517 * exp_prag.adb, a-cofuse.adb, a-cofuse.ads, einfo.adb, sem_prag.adb,
1518 cstand.adb, par-prag.adb, a-cofuve.adb, a-cofuve.ads, a-cofuma.adb,
1519 a-cofuma.ads, a-cofuba.adb, a-cofuba.ads: Minor reformatting.
1521 2017-04-27 Tristan Gingold <gingold@adacore.com>
1523 * s-excmac-gcc.ads, s-excmac-gcc.adb,
1524 s-excmac-arm.ads, s-excmac-arm.adb (New_Occurrence): Rewrite it in
1527 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1529 * exp_ch7.adb (Establish_Transient_Scope): Rewrite
1530 the loop which detects potential enclosing transient scopes. The
1531 loop now terminates much earlier as transient scopes are bounded
1532 by packages and subprograms.
1534 2017-04-27 Claire Dross <dross@adacore.com>
1536 * a-cfdlli.adb, a-cfdlli.ads (=): Generic parameter removed to
1537 allow the use of regular equality over elements in contracts.
1538 (Cursor): Type is now public so that it can be used in
1540 (Formal_Model): Ghost package containing
1541 model functions that are used in subprogram contracts.
1542 (Current_To_Last): Removed, model functions should be used
1544 (First_To_Previous): Removed, model functions should
1546 (Strict_Equal): Removed, model functions
1547 should be used instead.
1548 (Append): Default parameter value
1549 replaced by new wrapper to allow more precise contracts.
1550 (Insert): Default parameter value replaced by new wrapper to
1551 allow more precise contracts.
1552 (Delete): Default parameter
1553 value replaced by new wrapper to allow more precise contracts.
1554 (Prepend): Default parameter value replaced by new wrapper to
1555 allow more precise contracts.
1556 (Delete_First): Default parameter
1557 value replaced by new wrapper to allow more precise contracts.
1558 (Delete_Last): Default parameter value replaced by new wrapper
1559 to allow more precise contracts.
1561 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1563 * exp_spark.adb (Expand_SPARK): Perform specialized expansion
1564 for object declarations.
1565 (Expand_SPARK_N_Object_Declaration): New routine.
1566 * sem_elab.adb (Check_A_Call): Include calls to the
1567 Default_Initial_Condition procedure of a type under the SPARK
1568 elaboration checks umbrella.
1570 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1572 * sem.adb (Analyze): Diagnose an illegal iterated component
1574 * sem_util.ads, sem_util.adb
1575 (Diagnose_Iterated_Component_Association): New routine.
1577 2017-04-27 Bob Duff <duff@adacore.com>
1579 * adaint.c (__gnat_get_current_dir): Return 0 in length if
1581 * a-direct.adb, g-dirope.adb, osint.adb, s-os_lib.adb: Raise
1582 exception if getcwd failed.
1584 2017-04-27 Yannick Moy <moy@adacore.com>
1586 * exp_dbug.adb, exp_dbug.ads (Get_External_Name): Prefix ghost
1587 entities with special prefix.
1589 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1591 * debug.adb Change the documentation of switch -gnatd.s.
1592 * exp_ch7.adb (Make_Transient_Block): Transient blocks do not need
1593 to manage the secondary stack when an enclosing scope already
1594 performs this functionality (aka relaxed management). Switch
1595 -gnatd.s may be used to force strict management in which case
1596 the block will manage the secondary stack unconditionally. Add
1597 a guard to stop the traversal when encountering a package or a
1600 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1602 * sem_res.adb (Resolve_Call): Refine further the handling of
1603 limited views of return types in function calls. If the function
1604 that returns a limited view appears in the current unit,
1605 we do not replace its type by the non-limited view because
1606 this transformation is performed int the back-end. However,
1607 the type of the call itself must be the non-limited view, to
1608 prevent spurious resolution errors.
1610 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1612 * einfo,ads, einfo.adb (Class_Wide_Preconds, Class_Wide_Postconds):
1613 Removed, proposed implementation using generics for class-wide
1614 preconditions proved impractical.
1615 (Class_Wide_Clone): New attribute of subprogram. Designates
1616 subprogram created for primitive operations with class-wide
1617 pre/postconditions that contain calls to other primitives. The
1618 clone holds the body of the original primitive, but the
1619 pre/postonditions do not apply to it. The original body is
1620 rewritten as a wrapper for a call to the clone.
1621 (Is_Class_Wide_Clone): New flag to identify a Class_Wide_Clone. If
1622 the flag is set, no code for the corresponding pre/postconditions
1623 is inserted into its body.
1625 2017-04-27 Bob Duff <duff@adacore.com>
1627 * exp_prag.adb, par-prag.adb, sem_ch13.adb: Ignore
1628 Scalar_Storage_Order if -gnatI is given.
1629 * sem_prag.adb (Analyze_Pragma): Ignore
1630 Default_Scalar_Storage_Order if -gnatI is given.
1632 2017-04-27 Claire Dross <dross@adacore.com>
1634 * a-cofuba.ads (Add): Take as an additional input parameter
1635 the position where the element should be inserted.
1636 (Remove): New function that removes an element from the container.
1637 * a-cofuma.ads (Add): Adapt to the new API of Base.Add.
1638 * a-cofuse.ads (Add): Adapt to the new API of Base.Add.
1639 (Remove): New function that removes an element from a set.
1640 * a-cofuve.ads (Add): Adapt to the new API of Base.Add.
1641 (Remove): New function that removes an element from a sequence.
1642 (Insert): New function that adds anywhere in a sequence.
1644 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1646 * checks.adb (Generate_Range_Check): Revert previous change.
1648 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1650 * sem_util.adb: Minor reformatting/rewording.
1652 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1654 * lib-xref.adb (Generate_Reference): The use
1655 of attribute 'Result is not considered a violation of pragma
1658 2017-04-27 Justin Squirek <squirek@adacore.com>
1660 * cstand.adb (Create_Standard): Correctly set
1661 Directly_Designated_Type for Any_Access.
1662 * sem_type.adb (Covers): Minor grammar fixes.
1664 2017-04-27 Bob Duff <duff@adacore.com>
1666 * sem_attr.adb: Minor cleanup.
1668 2017-04-27 Claire Dross <dross@adacore.com>
1670 * a-cofuba.ads, a-cofuba.adb (Ada.Containers.Functional_Base): New
1671 private child of Ada.Containers used to implement all functional
1673 * a-cofuma.ads, a-cofuma.adb (Ada.Containers.Functional_Maps): New
1674 child of Ada.Containers. It provides functional indefinite unbounded
1675 maps which can be used as high level models for specification
1677 * a-cofuse.ads, a-cofuse.adb (Ada.Containers.Functional_Sets): New
1678 child of Ada.Containers. It provides functional indefinite unbounded
1679 sets which can be used as high level models for specification
1681 * a-cofuve.ads, a-cofuve.adb (Ada.Containers.Functional_Vectors): New
1682 child of Ada.Containers. It provides functional indefinite unbounded
1683 vectors which can be used as high level models for specification
1685 * Makefile.rtl: Add new packages.
1686 * impunit.adb: Add new packages.
1688 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1690 * sem_ch4.adb: Minor reformatting.
1692 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1694 * sem_ch12.adb (Analyze_Associations): minor reformatting.
1695 (Check_Fixed_Point_Actual): Do not emit a warning on a fixed
1696 point type actual that has user-defined arithmetic primitives,
1697 when there is a previous actual for a formal package that defines
1698 a fixed-point type with the parent user-defined operator.
1700 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1702 * checks.adb (Generate_Range_Check): Reinstate part of previous change.
1703 * sem_attr.adb (Resolve_Attribute): Generate a range check when
1704 the component type allows range checks.
1706 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1708 * sem_aux.adb (Is_Generic_Formal): Use original node to locate
1709 corresponding declaration, because formal derived types are
1710 rewritten as private extensions.
1712 2017-04-27 Ed Schonberg <schonberg@adacore.com>
1714 * sem_dim.adb (Analyze_Dimension_Binary_Op): Do not check
1715 dimensions of operands if node has been analyzed already, because
1716 previous analysis and dimension checking will have removed the
1717 dimension information from the operands.
1719 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1721 * debug.adb: Document the use of switch -gnatd.s.
1722 * einfo.ads Update the documentation on attribute
1723 Sec_Stack_Needed_For_Return and attribute Uses_Sec_Stack. Remove
1724 the uses of these attributes from certain entities.
1725 * exp_ch7.adb (Make_Transient_Block): Reimplement the circuitry
1726 which determines whether the block should continue to manage
1727 the secondary stack.
1728 (Manages_Sec_Stack): New routine.
1730 2017-04-27 Bob Duff <duff@adacore.com>
1732 * atree.ads: Minor edit.
1734 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
1736 * sinfo.ads: Update the section on Ghost mode. Add
1737 a section on SPARK mode. Update the placement of section on
1738 expression functions.
1740 2017-04-27 Bob Duff <duff@adacore.com>
1742 * sinput.adb (Get_Source_File_Index): Don't
1743 assert that S is in the right range in the case where this is
1744 a .dg file under construction.
1746 2017-04-27 Yannick Moy <moy@adacore.com>
1748 * sem_util.adb (Check_Result_And_Post_State):
1749 Handle more precisely each conjunct in expressions formed by
1750 and'ing sub-expressions.
1752 2017-04-27 Gary Dismukes <dismukes@adacore.com>
1754 * exp_ch4.adb, sem_ch4.adb: Minor typo fix and reformatting.
1756 2017-04-25 Arnaud Charlet <charlet@adacore.com>
1758 * gnat_rm.texi, gnat_ugn.texi,
1759 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
1760 doc/gnat_ugn/platform_specific_information.rst,
1761 doc/gnat_ugn/gnat_and_program_execution.rst,
1762 doc/gnat_ugn/gnat_utility_programs.rst,
1763 doc/gnat_ugn/the_gnat_compilation_model.rst,
1764 doc/gnat_rm/implementation_defined_attributes.rst,
1765 doc/gnat_rm/the_gnat_library.rst,
1766 doc/gnat_rm/implementation_defined_pragmas.rst,
1767 doc/gnat_rm/representation_clauses_and_pragmas.rst,
1768 doc/gnat_rm/implementation_of_specific_ada_features.rst,
1769 doc/gnat_rm/implementation_defined_aspects.rst,
1770 doc/gnat_rm/implementation_defined_characteristics.rst: Update
1773 2017-04-25 Arnaud Charlet <charlet@adacore.com>
1775 * exp_ch4.adb (Expand_N_Case_Expression): Emit error message when
1776 generating C code on complex case expressions.
1778 2017-04-25 Arnaud Charlet <charlet@adacore.com>
1780 * sem_prag.adb (Analyze_Pragma): Generate a warning instead
1781 of silently ignoring pragma Ada_xxx in Latest_Ada_Only mode.
1782 * directio.ads, ioexcept.ads, sequenio.ads, text_io.ads: Use
1783 Ada_2012 instead of Ada_2005 to be compatible with the above
1785 * bindgen.adb: Silence new warning on pragma Ada_95.
1787 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1789 * checks.adb (Generate_Range_Check): Revert part of previous change.
1791 2017-04-25 Ed Schonberg <schonberg@adacore.com>
1793 * sem_ch4.adb (Try_Container_Indexing): Handle properly a
1794 container indexing operation that appears as a an actual in a
1795 parameter association in a procedure call.
1797 2017-04-25 Olivier Ramonat <ramonat@adacore.com>
1799 * prj-proc.adb, sem_util.adb, s-stposu.adb, sem_attr.adb, prj-conf.ads:
1800 Fix spelling mistakes.
1802 2017-04-25 Bob Duff <duff@adacore.com>
1804 * types.ads, osint.adb, sinput-c.adb, sinput-d.adb, sinput-l.adb,
1805 * sinput-p.adb: Use regular fat pointers, with bounds checking,
1806 for source buffers. Fix misc obscure bugs.
1807 * sinput.ads, sinput.adb: Use regular fat pointers, with bounds
1808 checking, for source buffers. Modify representation clause for
1809 Source_File_Record as appropriate. Move Source_File_Index_Table
1810 from spec to body, because it is not used outside the body.
1811 Move Set_Source_File_Index_Table into the private part, because
1812 it is used only in the body and in children. Use trickery to
1813 modify the dope in the generic instantiation case. It's ugly,
1814 but not as ugly as the previous method. Fix documentation.
1815 Remove obsolete code.
1816 * fname-sf.adb, targparm.adb: Fix misc out-of-bounds
1817 indexing in source buffers.
1818 * fmap.adb: Avoid conversions from one string type to another.
1819 Remove a use of global name buffer.
1820 * osint.ads, sfn_scan.ads, sfn_scan.adb, sinput-c.ads: Comment
1823 2017-04-25 Gary Dismukes <dismukes@adacore.com>
1825 * exp_util.adb, exp_ch4.adb: Minor reformatting.
1827 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1829 * checks.adb: Code clean up in various routines.
1830 (Generate_Range_Check): Do not generate a range check when the
1831 expander is not active or when index/range checks are suppressed
1833 (Insert_List_After_And_Analyze, Insert_List_Before_And_Analyze):
1834 Remove variants that include a Supress parameter. These routines
1835 are never used, and were introduced before the current scope-based
1836 check suppression method.
1838 2017-04-25 Vasiliy Fofanov <fofanov@adacore.com>
1840 * prj-part.adb, cstreams.c, osint.adb, osint.ads: Remove VMS specific
1841 code and some subprogram calls that are now noop.
1843 2017-04-25 Arnaud Charlet <charlet@adacore.com>
1845 * exp_ch4.adb (Expand_N_Case_Expression): Take
1846 Minimize_Expression_With_Actions into account when possible.
1848 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1850 * exp_util.adb (Known_Non_Null): Moved to Sem_Util.
1851 (Known_Null): Moved to Sem_Util.
1852 * exp_util.ads (Known_Non_Null): Moved to Sem_Util.
1853 (Known_Null): Moved to Sem_Util.
1854 * sem_util.adb Add new enumeration type Null_Status_Kind.
1855 (Known_Non_Null): Moved from Exp_Util. Most of the logic in
1856 this routine is now carried out by Null_Status.
1857 (Known_Null): Moved from Exp_Util. Most of the logic in this routine
1858 is now carried out by Null_Status.
1859 (Null_Status): New routine.
1860 * sem_util.ads (Known_Non_Null): Moved from Exp_Util.
1861 (Known_Null): Moved from Exp_Util.
1863 2017-04-25 Ed Schonberg <schonberg@adacore.com>
1865 * sem_ch6.adb (Analyze_Expression_Function): Do not report an
1866 error on the return type of an expression function that is a
1867 completion, if the type is derived from a generic formal type.
1869 2017-04-25 Ed Schonberg <schonberg@adacore.com>
1871 * sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
1872 conversion are those of the target type.
1874 2017-04-25 Bob Duff <duff@adacore.com>
1876 * a-clrefi.adb: Minor cleanup.
1878 2017-04-25 Gary Dismukes <dismukes@adacore.com>
1880 * exp_util.adb, exp_util.ads, types.ads: Minor reformatting.
1882 2017-04-25 Bob Duff <duff@adacore.com>
1884 * err_vars.ads, fmap.adb, fmap.ads, comperr.adb, fname-sf.adb,
1885 types.adb, types.ads, types.h, sinput-l.adb, targparm.adb,
1886 errout.adb, sinput.adb, sinput.ads, cstand.adb, scn.adb,
1887 scn.ads, gnatls.adb: Eliminate the vestigial Internal_Source_File and
1888 the Internal_Source buffer. This removes the incorrect call to "="
1889 the customer noticed.
1890 Wrap remaining calls to "=" in Null_Source_Buffer_Ptr. We
1891 eventually need to eliminate them altogether. Or else get rid
1892 of zero-origin addressing.
1894 2017-04-25 Claire Dross <dross@adacore.com>
1896 * exp_util.ads (Expression_Contains_Primitives_Calls_Of): New
1897 function used in GNATprove to know if an expression contains
1898 non-dispatching calls on primitives of a tagged type.
1900 2017-04-25 Bob Duff <duff@adacore.com>
1902 * rtsfind.adb (Initialize): Initialize
1903 First_Implicit_With. Building the compiler with Normalize_Scalars
1904 and validity checking finds this being used as an uninitialized
1907 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
1909 * contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract):
1910 Add a warning about SPARK mode management. The routine now
1911 saves and restores both the mode and associated pragma.
1912 (Analyze_Entry_Or_Subprogram_Contract): Add a warning about
1913 SPARK mode management. The routine now saves and restores both
1914 the mode and associated pragma.
1915 (Analyze_Object_Contract):
1916 Add a warning about SPARK mode management. The routine
1917 now saves and restores both the mode and associated pragma.
1918 (Analyze_Package_Body_Contract): Add a warning about SPARK mode
1919 management. The routine now saves and restores both the mode
1920 and associated pragma. (Analyze_Package_Contract): Add a warning
1921 about SPARK mode management. The routine now saves and restores
1922 both the mode and associated pragma.
1923 (Analyze_Task_Contract):
1924 Add a warning about SPARK mode management. The routine now saves
1925 and restores both the mode and associated pragma.
1926 * expander.adb (Expand): Change the way the Ghost mode is saved
1928 * exp_ch3.adb (Freeze_Type): Change the way the Ghost mode is
1930 * exp_disp.adb (Make_DT): Change the way the Ghost mode is saved
1932 * exp_util.adb (Build_DIC_Procedure_Body):
1933 Change the way the Ghost mode is saved and restored.
1934 (Build_DIC_Procedure_Declaration): Change the way the Ghost
1935 mode is saved and restored.
1936 (Build_Invariant_Procedure_Body):
1937 Change the way the Ghost mode is saved and restored.
1938 (Build_Invariant_Procedure_Declaration): Change the way the Ghost
1939 mode is saved and restored.
1940 (Make_Predicate_Call): Change the
1941 way the Ghost mode is saved and restored.
1942 * freeze.adb (Freeze_Entity): Change the way the Ghost mode is
1944 * ghost.adb (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
1946 (Mark_And_Set_Ghost_Body): Remove parameter
1947 Mode and its assignment.
1948 (Mark_And_Set_Ghost_Completion):
1949 Remove parameter Mode and its assignment.
1950 (Mark_And_Set_Ghost_Declaration): Remove parameter Mode and its
1952 (Mark_And_Set_Ghost_Instantiation): Remove parameter
1953 Mode and its assignment.
1954 (Mark_And_Set_Ghost_Procedure_Call):
1955 Remove parameter Mode and its assignment.
1957 Remove parameter Mode and its assignment.
1958 * ghost.ads (Mark_And_Set_Ghost_Assignment): Remove parameter Mode
1959 and update the comment on usage.
1960 (Mark_And_Set_Ghost_Body):
1961 Remove parameter Mode and update the comment on usage.
1962 (Mark_And_Set_Ghost_Completion): Remove parameter Mode and
1963 update the comment on usage.
1964 (Mark_And_Set_Ghost_Declaration):
1965 Remove parameter Mode and update the comment on usage.
1966 (Mark_And_Set_Ghost_Instantiation): Remove parameter Mode and
1967 update the comment on usage.
1968 (Mark_And_Set_Ghost_Procedure_Call):
1969 Remove parameter Mode and update the comment on usage.
1970 (Set_Ghost_Mode): Remove parameter Mode and update the comment
1972 * lib.ads Remove obsolete fields SPARK_Mode_Pragma from various
1974 * lib-load.adb (Create_Dummy_Package_Unit): Remove the assignment
1975 of obsolete field SPARK_Mode_Pragma.
1976 (Load_Main_Source): Remove
1977 the assignment of obsolete field SPARK_Mode_Pragma.
1978 (Load_Unit): Remove the assignment of obsolete field SPARK_Mode_Pragma.
1979 * lib-writ.adb (Add_Preprocessing_Dependency): Remove
1980 the assignment of obsolete field SPARK_Mode_Pragma.
1981 (Ensure_System_Dependency): Remove the assignment of obsolete
1982 field SPARK_Mode_Pragma.
1983 * rtsfind.adb (Load_RTU): Add a warning about Ghost and SPARK
1984 mode management. Change the way Ghost and SPARK modes are saved
1986 * sem.adb (Analyze): Change the way the Ghost mode is saved
1988 * sem_ch3.adb (Analyze_Object_Declaration): Change the way the
1989 Ghost mode is saved and restored.
1990 (Process_Full_View): Change
1991 the way the Ghost mode is saved and restored.
1992 * sem_ch5.adb (Analyze_Assignment): Change the way the Ghost
1993 mode is saved and restored.
1994 * sem_ch6.adb (Analyze_Procedure_Call): Change the way the Ghost
1995 mode is saved and restored.
1996 (Analyze_Subprogram_Body_Helper):
1997 Change the way the Ghost mode is saved and restored.
1998 * sem_ch7.adb (Analyze_Package_Body_Helper): Change the way the
1999 Ghost mode is saved and restored.
2000 * sem_ch10.adb (Analyze_Subunit): Add a warning about SPARK mode
2001 management. Save the SPARK mode-related data prior to any changes
2002 to the scope stack and contexts. The mode is then reinstalled
2003 before the subunit is analyzed in order to restore the original
2004 view of the subunit.
2005 * sem_ch12.adb (Analyze_Package_Instantiation): Update the
2006 warning on region management. Change the way the Ghost and
2007 SPARK modes are saved and restored.
2008 (Inline_Instance_Body):
2009 Add a warning about SPARK mode management. Code clean up.
2010 (Analyze_Subprogram_Instantiation): Update the warning on region
2011 management. Change the way the Ghost and SPARK modes are saved
2013 (Instantiate_Package_Body): Update the warning
2014 on region management. Change the way the Ghost and SPARK modes
2015 are saved and restored.
2016 (Instantiate_Subprogram_Body): Update
2017 the warning on region management. Change the way the Ghost and
2018 SPARK modes are saved and restored.
2019 (Set_Instance_Env): Add a
2020 warning about SPARK mode management. Change the way SPARK mode
2021 is saved and restored.
2022 * sem_ch13.adb (Build_Predicate_Functions):
2023 Change the way the Ghost mode is saved and restored.
2024 (Build_Predicate_Function_Declaration): Change the way the Ghost
2025 mode is saved and restored.
2026 * sem_elab.adb (Check_Elab_Calls): Add a warning about SPARK
2027 mode management. Change the way SPARK mode is saved and restored.
2028 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
2029 Change the way the Ghost mode is saved and restored.
2030 (Analyze_Initial_Condition_In_Decl_Part): Change the way
2031 the Ghost mode is saved and restored.
2033 Change the way the Ghost mode is saved and restored.
2034 (Analyze_Pre_Post_Condition_In_Decl_Part): Change the way the
2035 Ghost mode is saved and restored.
2036 * sem_util.adb (Install_SPARK_Mode): New routine.
2037 (Restore_SPARK_Mode): New routine.
2038 (Save_SPARK_Mode_And_Set): Removed.
2039 (Set_SPARK_Mode): New routine.
2040 * sem_util.ads (Install_SPARK_Mode): New routine.
2041 (Restore_SPARK_Mode): New routine.
2042 (Save_SPARK_Mode_And_Set): Removed.
2043 (Set_SPARK_Mode): New routine.
2045 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2047 * sem_util.adb, sem_util.ads (From_Nested_Package): New predicate
2048 to determine whether a type is declared in a local package that
2049 has not yet been frozen.
2050 * freeze.adb (Freeze_Before): Use new predicate to determine
2051 whether a local package must be installed on the scope stack
2052 in order to evaluate in the proper scope actions generated by
2053 aspect specifications, such as Predicate
2054 * sem_ch13.adb: Simplify code in Analyze_Aspects_At_Freeze_Point
2055 using new predicate.
2057 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2059 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not consider
2060 comparisons between non- scalar expressions expressions because
2061 their values cannot be invalidated.
2062 * sem_warn.ads (Warn_On_Constant_Valid_Condition): Update the
2065 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2067 * par_sco.adb: Minor reformatting.
2069 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2071 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): If entity
2072 is a type from an unfrozen local package, install package to
2073 complete the analysis of delayed aspects of the type.
2075 2017-04-25 Tristan Gingold <gingold@adacore.com>
2077 * bingen.adb (System_Version_Control_Used): New variable.
2078 (Resolve_Binder_Options): Set the above variable.
2079 (Gen_Output_File_Ada): Conditionally call Gen_Versions.
2080 (Gen_Elab_Order): Emit blank line before.
2082 2017-04-25 Justin Squirek <squirek@adacore.com>
2084 * sem_cat.adb (Validate_RT_RAT_Component): Added
2085 an extra check to ignore incomplete types.
2087 2017-04-25 Thomas Quinot <quinot@adacore.com>
2089 * sem_prag.adb (Analyze_Pragma, case Pragma_Check): Remove
2090 bogus circuitry for the case where Name is Predicate.
2092 2017-04-25 Thomas Quinot <quinot@adacore.com>
2094 * par_sco.adb(Traverse_Declarations_Or_Statements.Traverse_Aspects):
2095 Create SCOs for Predicate aspects in disabled
2096 state initially, to be enabled later on by...
2097 * sem_ch13.adb (Build_Predicate_Functions.Add_Predicates): Mark
2098 SCO for predicate as enabled.
2100 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2102 * comperr.adb (Compiler_Abort): Remove now obsolete pair of
2103 pragmas Warnings Off / On.
2104 * namet.adb (Finalize): Remove now obsolete pair of pragmas
2106 * output.adb: Remove now obsolete pair of pragmas Warnings Off / On.
2107 * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not
2108 consider comparisons between static expressions because their
2109 values cannot be invalidated.
2110 * urealp.adb (Tree_Read): Remove now obsolete pair of pragmas
2112 (Tree_Write): Remove now obsolete pair of pragmas Warnings Off / On.
2113 * usage.adb Remove now obsolete pair of pragmas Warnings Off / On.
2115 2017-04-25 Bob Duff <duff@adacore.com>
2117 * sem_elab.adb (In_Task_Activation): Trace internal calls in
2120 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2122 * sem_prag.adb, sem_warn.adb, sem_eval.adb: Minor reformatting and
2125 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2127 * comperr.adb (Compiler_Abort): Add a pair of pragma Warnings
2128 On/Off to defend against a spurious warning in conditional
2130 * exp_ch4.adb (Rewrite_Comparison): Reimplemented.
2131 * namet.adb (Finalize): Add a pair of pragma Warnings On/Off to
2132 defend against a spurious warning in conditional compilation.
2133 * output.adb Add a pair of pragma Warnings On/Off to defend
2134 against a spurious warning in conditional compilation.
2135 * sem_eval.adb (Eval_Relational_Op): Major code clean up.
2136 (Fold_General_Op): New routine.
2137 (Fold_Static_Real_Op): New routine.
2138 (Test_Comparison): New routine.
2139 * sem_eval.ads (Test_Comparison): New routine.
2140 * sem_warn.adb (Is_Attribute_Constant_Comparison): New routine.
2141 (Warn_On_Constant_Valid_Condition): New routine.
2142 (Warn_On_Known_Condition): Use Is_Attribute_Constant_Comparison
2143 to detect a specific case.
2144 * sem_warn.adb (Warn_On_Constant_Valid_Condition): New routine.
2145 * urealp.adb (Tree_Read): Add a pair of pragma Warnings On/Off
2146 to defend against a spurious warning in conditional compilation.
2147 (Tree_Write): Add a pair of pragma Warnings On/Off to defend
2148 against a spurious warning in conditional compilation.
2149 * usage.adb Add a pair of pragma Warnings On/Off to defend
2150 against a spurious warning in conditional compilation.
2152 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2154 * sinfo.ads, sem_ch13.adb: Update comment.
2156 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2158 * sem_util.adb (Is_Post_State): A reference to a
2159 generic in out parameter is considered a change in the post-state
2162 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2164 * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the
2165 declaration of a subprogram instance within its wrapper package,
2166 skip over null statements that may result from the rewriting of
2169 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2171 * exp_attr.adb (Expand_Attribute_Reference, case 'Read):
2172 If the type is an unchecked_union, replace the attribute with
2173 a Raise_Program_Error (rather than inserting such before the
2174 attribute reference) to handle properly the case where we are
2175 processing a component of a larger record, and we need to prevent
2176 further expansion for the unchecked union.
2177 (Expand_Attribute_Reference, case 'Write): If the type is
2178 an unchecked_union, check whether enclosing scope is a Write
2179 subprogram. Replace attribute with a Raise_Program_Error if the
2180 discriminants of the unchecked_union type have not default values
2181 because such a use is erroneous..
2183 2017-04-25 Tristan Gingold <gingold@adacore.com>
2185 * exp_ch9.adb (Expand_N_Task_Type_Declaration):
2186 Add relative_deadline to task record on edf profile.
2187 (Make_Initialize_Protection): Pass deadline_floor value on edf profile.
2188 (Make_Task_Create_Call): Pass relative_deadline value.
2189 * par-prag.adb (Prag): Handle Pragma_Deadline_Floor.
2190 * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF.
2191 (Profile_Info): Add info for GNAT_Ravenscar_EDF.
2192 * sem_prag.adb (Set_Ravenscar_Profile): Handle
2193 GNAT_Ravenscar_EDF (set scheduling policy).
2194 (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor
2196 (Sig_Flags): Add choice for Pragma_Deadline_Floor.
2197 * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF):
2199 (Pragma_Deadline_Floor): New pragma.
2200 * targparm.adb (Get_Target_Parameters): Recognize
2201 GNAT_Ravenscar_EDF profile.
2203 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2205 * gnatvsn.ads (Library_Version): Bump to 8. Update comment.
2207 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2209 * sem_aux.adb (Nearest_Ancestor): Use original node of type
2210 declaration to locate nearest ancestor, because derived
2211 type declarations for record types are rewritten as record
2213 * sem_ch13.adb (Add_Call): Use an unchecked conversion to handle
2214 properly derivations that are completions of private types.
2215 (Add_Predicates): If type is private, examine rep. items of full
2216 view, which may include inherited predicates.
2217 (Build_Predicate_Functions): Ditto.
2219 2017-04-25 Javier Miranda <miranda@adacore.com>
2221 * sem_util.adb (New_Copy_Tree.Visit_Entity): Extend previous change
2222 to generate new entities for subtype declarations located in
2223 Expression_With_Action nodes.
2225 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2227 * sem_elab.adb (Check_A_Call): Remove
2228 local variables Is_DIC_Proc and Issue_In_SPARK. Verify the
2229 need for Elaborate_All when SPARK elaboration checks are
2230 required. Update the checks for instances, variables, and calls
2231 to Default_Initial_Condition procedures.
2233 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2235 * aspects.ads, aspects.adb: Make the GNAT-specific pragma No_Inline
2236 into a boolean aspect, in analogy with the Ada aspect No_Return.
2238 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2240 * exp_ch6.adb, sem_ch13.adb, sem_ch6.adb: Minor reformatting.
2242 2017-04-25 Bob Duff <duff@adacore.com>
2244 * sem_res.adb (Resolve_Actuals): Under -gnatd.q, reset
2245 Is_True_Constant for an array variable that is passed to a
2246 foreign function as an 'in' parameter.
2247 * debug.adb: Document -gnatd.q.
2249 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2251 * sem_ch6.adb (Analyze_Expression_Function): If expression function
2252 is completion and return type is an access type do not freeze
2253 designated type: this will be done in the process of freezing
2254 the expression if needed.
2255 (Freeze_Expr_Types): Check whether type is complete before
2256 creating freeze node, to provide a better error message if
2257 reference is premature.
2258 * sem_ch13.adb (Check_Indexing_Functions): Ignore inherited
2259 functions created by type derivations.
2261 2017-04-25 Pascal Obry <obry@adacore.com>
2263 * g-sercom.ads: Add simple usage of GNAT.Serial_Communication.
2265 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2267 * sem_res.adb (Resolve_Type_Conversion):
2268 When resolving against any fixed type, set the type of the
2269 operand as universal real when the operand is a multiplication
2270 or a division where both operands are of any fixed type.
2271 (Unique_Fixed_Point_Type): Add local variable ErrN. Improve the
2272 placement of an error message by pointing to the operand of a
2273 type conversion rather than the conversion itself.
2275 2017-04-25 Thomas Quinot <quinot@adacore.com>
2277 * sem_ch13.adb (Build_Predicate_Function_Declaration): Set
2278 Needs_Debug_Info when producing SCOs.
2280 2017-04-25 Thomas Quinot <quinot@adacore.com>
2282 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2283 Always pass a null finalization master for a library level named access
2284 type to which a pragme No_Heap_Finalization applies.
2286 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2290 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1
2291 set to A'First(2) and vice versa.
2293 2017-04-25 Yannick Moy <moy@adacore.com>
2295 * freeze.adb (Freeze_Record_Type): Remove obsolete
2296 rule on volatile tagged record restriction on SPARK code.
2298 2017-04-25 Yannick Moy <moy@adacore.com>
2300 * sem_prag.adb (minor) Fix SPARK RM reference.
2302 2017-04-25 Yannick Moy <moy@adacore.com>
2304 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): Update
2305 comment to reflect which entity is chosen as unique entity.
2306 (Unique_Entity): Return full view instead of private spec for
2307 protected type or task type. Fix possible incorrect access when
2310 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2312 * sem_res.adb (Set_Slice_Subtype): Treat specially bit-packed
2313 array types only instead of all packed array types.
2315 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2317 * sem_ch6.adb (Conforming_Types): If type of formal as a specified
2318 dimension system, verify that dimensions of both match.
2319 (Check_Conformance): Add error message in case of dimension
2321 * sem_dim.ads, sem_dim.adb (Dimensions_Match): New utility
2324 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
2326 * gnatxref.adb, gnatfind.adb: Avoid using the term project file,
2329 2017-04-25 Yannick Moy <moy@adacore.com>
2331 * sem_util.adb: Minor refactoring.
2332 * freeze.adb (Freeze_Record_Type): Fix checking of SPARK RM 7.1.3(5).
2334 2017-04-25 Claire Dross <dross@adacore.com>
2336 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Go to
2337 ultimate alias when accessing overridden operation. Indeed, if the
2338 overridden operation is itself inherited, it won't have any explicit
2341 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2343 * sem_warn.adb (Warn_On_Overlapping_Actuals): There can be no
2344 overlap if the two formals have different types, because formally
2345 the corresponding actuals cannot designate the same objects.
2347 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2349 * sem_dim.adb (Dimensions_Of_Operand): minot cleanups: a) If
2350 dimensions are present from context, use them. b) If operand is
2351 a static constant rewritten as a literal, obtain the dimensions
2352 from the original declaration, otherwise use dimensions of type
2353 established from context.
2355 2017-04-25 Yannick Moy <moy@adacore.com>
2357 * sem_util.adb (Is_Effectively_Volatile): Protect against base type
2358 of array that is private.
2360 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2362 * sem_ch3.adb, exp_util.adb, sem_prag.adb, exp_ch4.adb: Minor
2365 2017-04-25 Yannick Moy <moy@adacore.com>
2367 * a-ngelfu.adb, a-ngelfu.ads: Add SPARK_Mode On on spec, Off
2370 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2372 * sem_disp.adb (Check_Dispatching_Context): Add guard to refine
2373 the check that recognizes a call to a private overridding and
2374 replaces the called subprogram with its alias.
2376 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2378 * exp_util.adb: Minor reformatting.
2380 2017-04-25 Justin Squirek <squirek@adacore.com>
2382 * exp_ch3.adb (Freeze_Type): Add condition to always treat
2383 interface types as a partial view of a private type for the
2384 generation of invariant procedure bodies.
2385 * exp_util.adb, exp_util.ads (Add_Inherited_Invariants):
2386 Add a condition to get the Corresponding_Record_Type for
2387 concurrent types, add condition to return in the absence of a
2388 class in the pragma, remove call to Replace_Type_References,
2389 and add call to Replace_References.
2390 (Add_Interface_Invariatns),
2391 (Add_Parent_Invariants): Modify call to Add_Inherited_Invariants
2392 to including the working type T.
2393 (Add_Own_Invariants): Remove
2394 legacy condition for separate units, remove dispatching for ASIS
2395 and save a copy of the expression in the pragma expression.
2396 (Build_Invariant_Procedure_Body): Default initalize vars,
2397 remove return condition on interfaces, always use the
2398 private type for interfaces, and move the processing of types
2399 until after the processing of invariants for the full view.
2400 (Build_Invariant_Procedure_Declaration): Remove condition
2401 to return if an interface type is encountered and add
2402 condition to convert the formal parameter to its class-wide
2403 counterpart if Work_Typ is abstract.
2404 (Replace_Type): Add call to Remove_Controlling_Arguments.
2405 (Replace_Type_Ref): Remove class-wide dispatching for the current
2406 instance of the type.
2407 (Replace_Type_References): Remove parameter "Derived"
2408 (Remove_Controlling_Arguments): Created in order to removing
2409 the controlliong argument from calls to primitives in the case
2410 of the formal parameter being an class-wide abstract type.
2411 * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Almost identical
2412 to the change made to Freeze_Type in exp_ch3. Add a condition
2413 to treat interface types as a partial view.
2414 * sem_prag.adb (Analyze_Pragma): Modify parameters in the call
2415 to Build_Invariant_Procedure_Declaration to properly generate a
2416 "partial" invariant procedure when Typ is an interface.
2418 2017-04-25 Bob Duff <duff@adacore.com>
2420 * a-numeri.ads: Go back to using brackets encoding for the Greek
2423 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2425 * sem_ch3.adb (Derive_Subprogram): Implement rule in RM 6.1.1
2426 (10-15): if derived type T with progenitors is abstract,
2427 and primitive P of this type inherits non-trivial classwide
2428 preconditions from both a parent operation and from an interface
2429 operation, then the inherited operation is abstract if the parent
2430 operation is not null.
2431 * sem_disp.ads, sem_disp.adb: replace function Covers_Some_Interface
2432 with Covered_Interface_Op to yield the actual interface operation
2433 that is implemented by a given inherited operation.
2435 2017-04-25 Javier Miranda <miranda@adacore.com>
2437 * exp_ch4.adb (Expand_N_Op_Expon): Relocate left
2438 and right operands after performing the validity checks. Required
2439 because validity checks may remove side effects from the operands.
2441 2017-04-25 Javier Miranda <miranda@adacore.com>
2443 * exp_attr.adb (Attribute_Unrestricted_Access):
2444 Do not disable implicit type conversion. Required to generate
2445 code that displaces the pointer to reference the secondary
2448 2017-04-25 Pascal Obry <obry@adacore.com>
2450 * prj-attr.adb, snames.ads-tmpl: Add package Install's
2451 Required_Artifacts attribute.
2453 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2455 * sem_util.adb (Same_Value): String literals are compile-time
2456 values, and comparing them must use Expr_Value_S.
2458 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2460 * sem_ch4.adb (Complete_Object_Interpretation): If an explicit
2461 dereference is introduced for the object, and the object is
2462 overloaded, do not check whether it is aliased, because it may
2463 include an implicit dereference.
2464 * sem_type.adb (Disambiguate): If two interpretations are access
2465 attribute types with the same designated type keep either of
2466 them and do not report an ambiguity. A true ambiguity will be
2469 2017-04-25 Bob Duff <duff@adacore.com>
2471 * a-numeri.ads: Change the encoding of Greek letter Pi from
2472 brackets encoding to UTF-8. Use pragma Wide_Character_Encoding
2473 to indicate the encoding. We considered using a byte order mark
2474 (BOM), but that causes various trouble (misc software eats the
2475 BOM, if you have a patch with a BOM, then it's not at the start
2476 of the patch, so it's not a BOM, the BOM affects with-ing files,
2478 * scng.adb, s-wchcnv.adb: Minor.
2480 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2482 * sem_ch3.adb, sem_ch8.adb, sem_disp.adb: Minor reformatting.
2483 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2485 * sem_ch3.adb (Add_Internal_Interface_Entities): Move
2486 Has_Non_Trivial_Precondition to sem_util. for use elsewhere.
2487 Improve error message on operations that inherit non-conforming
2488 classwide preconditions from ancestor and progenitor.
2489 * sem_util.ads, sem_util.adb (Has_Non_Trivial_Precondition):
2490 moved here from sem_ch3.
2491 * sem_ch8.adb (Analyze_Subprogram_Renaming): Implement legality
2492 check given in RM 6.1.1 (17) concerning renamings of overriding
2493 operations that inherits class-wide preconditions from ancestor
2496 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2498 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Code cleanup.
2499 (Build_Adjust_Statements): Code cleanup.
2500 (Build_Finalizer): Update the initialization of
2502 (Build_Finalize_Statements): Code cleanup.
2503 (Build_Initialize_Statements): Code cleanup.
2504 (Make_Deep_Array_Body): Update the initialization of
2506 (Make_Deep_Record_Body): Update the initialization of Exceptions_OK.
2507 (Process_Object_Declaration): Generate a null exception handler only
2508 when exceptions are allowed.
2509 (Process_Transients_In_Scope): Update the initialization of
2511 * exp_util.ads, exp_util.adb (Exceptions_In_Finalization_OK): New
2513 * sem_ch11.adb (Analyze_Exception_Handlers): Do not check any
2514 restrictions when the handler is internally generated and the
2517 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2519 * sem_ch3.adb (Has_Non_Trivial_Precondition): New predicate to
2520 enforce legality rule on classwide preconditions inherited from
2521 both an ancestor and a progenitor (RM 6.1.1 (10-13).
2522 * sem_disp.adb (Check_Dispatching_Context): A call to an abstract
2523 subprogram need not be dispatching if it appears in a precondition
2524 for an abstract or null subprogram.
2526 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2528 * sem_ch10.adb: Minor typo fix.
2530 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2532 * gcc-interface/Makefile.in: Cleanup VxWorks targets.
2534 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2536 * fname.adb (Is_Internal_File_Name): Arrange for the slices to
2537 have a length which is a power of 2.
2538 (Is_Predefined_File_Name): Likewise. Adjust comment.
2540 2017-04-25 Bob Duff <duff@adacore.com>
2542 * exp_aggr.adb (Component_Count): Protect the
2543 arithmetic from attempting to convert a value >= 2**31 to Int,
2544 which would otherwise raise Constraint_Error.
2546 2017-04-25 Bob Duff <duff@adacore.com>
2548 * opt.ads (Locking_Policy): Fix incorrect documentation. The
2549 first character of the policy name is not unique.
2551 2017-04-25 Bob Duff <duff@adacore.com>
2553 * s-fileio.adb (Name): Raise Use_Error if the file is a temp file.
2554 * s-ficobl.ads (Is_Temporary_File): Remove incorrect comment
2555 about this flag not being used. It was already used, and it is
2558 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2560 * einfo.adb Flag301 is now known as Ignore_SPARK_Mode_Pragmas.
2561 (Ignore_SPARK_Mode_Pragmas): New routine.
2562 (Set_Ignore_SPARK_Mode_Pragmas): New routine.
2563 (Write_Entity_Flags): Add an entry for Ignore_SPARK_Mode_Pragmas.
2564 * einfo.ads Add new attribute Ignore_SPARK_Mode_Pragmas and update
2566 (Ignore_SPARK_Mode_Pragmas): New routine
2567 along with pragma Inline.
2568 (Set_Ignore_SPARK_Mode_Pragmas): New routine along with pragma Inline.
2569 * opt.ads Rename flag Ignore_Pragma_SPARK_Mode to
2570 Ignore_SPARK_Mode_Pragmas_In_Instance.
2571 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
2572 Save and restore the value of global flag
2573 Ignore_SPARK_Mode_Pragmas_In_Instance. Set or reinstate the value
2574 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance when either
2575 the corresponding spec or the body must ignore all SPARK_Mode
2576 pragmas found within.
2577 (Analyze_Subprogram_Declaration): Mark
2578 the spec when it needs to ignore all SPARK_Mode pragmas found
2579 within to allow the body to infer this property in case it is
2580 instantiated or inlined later.
2581 * sem_ch7.adb (Analyze_Package_Body_Helper): Save and restore the
2582 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
2583 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
2584 when the corresponding spec also ignored all SPARK_Mode pragmas
2586 (Analyze_Package_Declaration): Mark the spec when
2587 it needs to ignore all SPARK_Mode pragmas found within to allow
2588 the body to infer this property in case it is instantiated or
2590 * sem_ch12.adb (Analyze_Formal_Package_Declaration):
2591 Save and restore the value of flag
2592 Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
2593 formal spec when it needs to ignore all SPARK_Mode
2594 pragmas found within to allow the body to infer this
2595 property in case it is instantiated or inlined later.
2596 (Analyze_Package_Instantiation): Save and restore the value
2597 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark
2598 the instance spec when it needs to ignore all SPARK_Mode
2599 pragmas found within to allow the body to infer this
2600 property in case it is instantiated or inlined later.
2601 (Analyze_Subprogram_Instantiation): Save and restore the value
2602 of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Mark the
2603 instance spec and anonymous package when they need to ignore
2604 all SPARK_Mode pragmas found within to allow the body to infer
2605 this property in case it is instantiated or inlined later.
2606 (Instantiate_Package_Body): Save and restore the value of global
2607 flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set the value of
2608 global flag Ignore_SPARK_Mode_Pragmas_In_Instance when the
2609 corresponding instance spec also ignored all SPARK_Mode pragmas
2611 (Instantiate_Subprogram_Body): Save and restore the
2612 value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance. Set
2613 the value of global flag Ignore_SPARK_Mode_Pragmas_In_Instance
2614 when the corresponding instance spec also ignored all SPARK_Mode
2615 pragmas found within.
2616 * sem_prag.adb (Analyze_Pragma): Update the reference to
2617 Ignore_Pragma_SPARK_Mode.
2618 * sem_util.adb (SPARK_Mode_Is_Off): A construct which ignored
2619 all SPARK_Mode pragmas defined within yields mode "off".
2621 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2623 * bindgen.adb, exp_dbug.adb, errout.adb, fname.adb: Minor reformatting.
2625 2017-04-25 Bob Duff <duff@adacore.com>
2627 * exp_atag.adb (Build_CW_Membership): Add "Suppress =>
2628 All_Checks" to avoid generating unnecessary checks.
2629 * exp_ch4.adb (Expand_N_In, Make_Tag_Check): Add "Suppress =>
2631 * sem.ads: Fix comment.
2632 * expander.ads: Fix comment.
2633 * exp_atag.ads: Fix comment: "Index = 0" should be
2636 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2638 * s-taprop-linux.adb: Minor editorial fixes.
2640 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2642 * sem_util.adb (New_Copy_Tree): Put back the declarations of the
2643 hash tables at library level. Reinstate the NCT_Hash_Tables_Used
2644 variable and set it to True whenever the main hash table is
2645 populated. Short- circuit the Assoc function if it is false
2646 and add associated guards.
2648 2017-04-25 Olivier Hainque <hainque@adacore.com>
2650 * bindgen.adb (Gen_Elab_Calls): Also update counter of lone
2651 specs without elaboration code that have an elaboration counter
2652 nevertheless, e.g. when compiled with -fpreserve-control-flow.
2653 * sem_ch10.adb (Analyze_Compilation_Unit):
2654 Set_Elaboration_Entity_Required when requested to preserve
2655 control flow, to ensure the unit elaboration is materialized at
2656 bind time, resulting in the inclusion of the unit object file
2657 in the executable closure at link time.
2659 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
2661 * exp_dbug.adb: In Debug_Renaming_Declaration,
2662 when dealing with indexed component, accept to produce a renaming
2663 symbol when the index is an IN parameter or when it is a name
2664 defined in an outer scope.
2666 2017-04-25 Yannick Moy <moy@adacore.com>
2668 * errout.adb (Error_Msg): Adapt continuation
2669 message in instantiations and inlined bodies for info messages.
2671 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2673 * fname.adb (Has_Internal_Extension): Add pragma Inline.
2674 Use direct 4-character slice comparisons.
2676 pragma Inline. (Has_Suffix): Delete.
2677 (Is_Internal_File_Name):
2678 Test Is_Predefined_File_Name first.
2679 (Is_Predefined_File_Name):
2680 Use direct slice comparisons as much as possible and limit all
2681 comparisons to at most 8 characters.
2683 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2685 * checks.adb (Insert_Valid_Check): Code cleanup.
2686 * exp_ch6.adb (Add_Validation_Call_By_Copy_Code): New routine.
2687 (Expand_Actuals): Generate proper copy-back for a validation
2688 variable when it acts as the argument of a type conversion.
2689 * sem_util.adb (Is_Validation_Variable_Reference): Augment the
2690 predicate to operate on type qualifications.
2692 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2694 * sem_prag.adb, exp_ch6.adb, binde.adb, sem_disp.adb, s-fileio.adb:
2697 2017-04-25 Bob Duff <duff@adacore.com>
2699 * sem_prag.adb (No_Return): Give an error if the pragma applies
2700 to a body. Specialize the error for the specless body case,
2701 as is done for (e.g.) pragma Convention.
2702 * debug.adb: Add switch -gnatd.J to disable the above legality
2703 checks. This is mainly for use in our test suite, to avoid
2704 rewriting a lot of illegal (but working) code. It might also
2705 be useful to customers. Under this switch, if a pragma No_Return
2706 applies to a body, and the procedure raises an exception (as it
2707 should), the pragma has no effect. If the procedure does return,
2708 execution is erroneous.
2710 2017-04-25 Bob Duff <duff@adacore.com>
2712 * exp_ch6.adb (Expand_Actuals): This is the
2713 root of the problem. It took N as an 'in out' parameter, and in
2714 some cases, rewrote N, but then set N to Original_Node(N). So
2715 the node returned in N had no Parent. The caller continued
2716 processing of this orphaned node. In some cases that caused a
2717 crash (e.g. Remove_Side_Effects climbs up Parents in a loop,
2718 and trips over the Empty Parent). The solution is to make N an
2719 'in' parameter. Instead of rewriting it, return the list of
2720 post-call actions, so the caller can do the rewriting later,
2721 after N has been fully processed.
2722 (Expand_Call_Helper): Move most of Expand_Call here. It has
2723 too many premature 'return' statements, and we want to do the
2724 rewriting on return.
2725 (Insert_Post_Call_Actions): New procedure to insert the post-call
2726 actions in the appropriate place. In the problematic case,
2727 that involves rewriting N as an Expression_With_Actions.
2728 (Expand_Call): Call the new procedures Expand_Call_Helper and
2729 Insert_Post_Call_Actions.
2731 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2733 * sem_prag.adb (Inherits_Class_Wide_Pre): Cleanup code, handle
2734 properly type derived from generic formal types, to handle
2735 properly modified version of ACATS 4.1B B611017.
2737 2017-04-25 Javier Miranda <miranda@adacore.com>
2739 * exp_unst.adb (Subp_Index): Adding missing
2740 support for renamings and functions that return a constrained
2741 array type (i.e. functions for which the frontend built a
2742 procedure with an extra out parameter).
2744 2017-04-25 Pascal Obry <obry@adacore.com>
2746 * s-string.adb: Minor code clean-up.
2748 2017-04-25 Bob Duff <duff@adacore.com>
2750 * s-os_lib.ads, s-os_lib.adb (Non_Blocking_Wait_Process): New
2752 * adaint.h, adaint.c (__gnat_portable_no_block_wait): C support
2753 function for Non_Blocking_Wait_Process.
2755 2017-04-25 Bob Duff <duff@adacore.com>
2757 * prep.adb (Preprocess): Remove incorrect
2758 Assert. Current character can be ASCII.CR.
2760 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2762 * sem_prag.adb (Set_Convention_From_Pragma): Cleanup code for
2763 convention Stdcall, which has a number of exceptions. Convention
2764 is legal on a component declaration whose type is an anonymous
2765 access to subprogram.
2767 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2769 * sem_ch4.adb: sem_ch4.adb Various reformattings.
2770 (Try_One_Prefix_Interpretation): Use the base type when dealing
2771 with a subtype created for purposes of constraining a private
2772 type with discriminants.
2774 2017-04-25 Javier Miranda <miranda@adacore.com>
2776 * einfo.ads, einfo.adb (Has_Private_Extension): new attribute.
2777 * warnsw.ads, warnsw.adb (All_Warnings): Set warning on late
2778 dispatching primitives (Restore_Warnings): Restore warning on
2779 late dispatching primitives (Save_Warnings): Save warning on late
2780 dispatching primitives (Do_Warning_Switch): Use -gnatw.j/-gnatw.J
2781 to enable/disable this warning.
2782 (WA_Warnings): Set warning on late dispatching primitives.
2783 * sem_ch3.adb (Analyze_Private_Extension_Declaration): Remember
2784 that its parent type has a private extension.
2785 * sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
2787 * usage.adb: Document -gnatw.j and -gnatw.J.
2789 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2791 * exp_ch7.adb, checks.adb, sem_prag.adb, eval_fat.adb: Minor
2794 2017-04-25 Bob Duff <duff@adacore.com>
2796 * binde.adb (Validate): Do not pass dynamic strings
2797 to pragma Assert, because older compilers do not support that.
2799 2017-04-25 Bob Duff <duff@adacore.com>
2801 * s-fileio.adb (Close): When a temp file is
2802 closed, delete it and clean up its Temp_File_Record immediately,
2803 rather than waiting until later.
2804 (Temp_File_Record): Add File
2805 component, so Close can know which Temp_File_Record corresponds
2806 to the file being closed.
2807 (Delete): Don't delete temp files,
2808 because they are deleted by Close.
2809 (Open): Set the File component
2810 of Temp_File_Record. This requires moving the creation of the
2811 Temp_File_Record to the end, after the AFCB has been created.
2813 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2815 * checks.adb (Insert_Valid_Check): Do not generate
2816 a validity check when inside a generic.
2818 2017-04-25 Yannick Moy <moy@adacore.com>
2820 * sem_res.adb (Resolve_Type_Conversion): Fix bad logic.
2822 2017-04-25 Arnaud Charlet <charlet@adacore.com>
2824 * snames.ads-tmpl (Snames): More names for detecting predefined
2825 potentially blocking subprograms.
2827 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2829 * sem_prag.adb (Analyze_Pre_Post_Condition): The rules
2830 concerning inheritance of class-wide preconditions do not apply
2833 2017-04-25 Bob Duff <duff@adacore.com>
2835 * s-ficobl.ads: Minor comment fix.
2837 2017-04-25 Yannick Moy <moy@adacore.com>
2839 * checks.adb (Apply_Scalar_Range_Check): Analyze precisely
2840 conversions from float to integer in GNATprove mode.
2841 (Apply_Type_Conversion_Checks): Make sure in GNATprove mode
2842 to call Apply_Type_Conversion_Checks, so that range checks
2843 are properly positioned when needed on conversions, including
2844 when converting from float to integer. (Determine_Range): In
2845 GNATprove mode, take into account the possibility of conversion
2846 from float to integer.
2847 * sem_res.adb (Resolve_Type_Conversion): Only enforce range
2848 check on conversions from fixed-point to integer, not anymore
2849 on conversions from floating-point to integer, when in GNATprove
2852 2017-04-25 Yannick Moy <moy@adacore.com>
2854 * checks.adb (Determine_Range_R): Special case type conversions
2855 from integer to float in order to get bounds in that case too.
2856 * eval_fat.adb (Machine): Avoid issuing warnings in GNATprove
2857 mode, for computations involved in interval checking.
2859 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2861 * checks.adb (Insert_Valid_Check): Partially reimplement validity
2863 * einfo.adb Node36 is now used as Validated_Object.
2864 (Validated_Object): New routine.
2865 (Set_Validated_Object): New routine.
2866 (Write_Field36_Name): Add an entry for Validated_Object.
2867 * einfo.ads Add new attribute Validated_Object along with
2869 (Validated_Object): New routine along with pragma Inline.
2870 (Set_Validated_Object): New routine along with pragma Inline.
2871 * exp_attr.adb (Make_Range_Test): Add processing for validation
2872 variables to avoid extra reads and copies of the prefix.
2873 * exp_ch6.adb (Expand_Actuals): Add copy-back for validation
2874 variables in order to reflect any changes done in the variable
2875 back into the original object.
2876 * sem_util.adb (Is_Validation_Variable_Reference): New routine.
2877 * sem_util.ads (Is_Validation_Variable_Reference): New routine.
2879 2017-04-25 Steve Baird <baird@adacore.com>
2881 * exp_ch7.adb (Build_Array_Deep_Procs,
2882 Build_Record_Deep_Procs, Make_Finalize_Address_Body): Don't
2883 generate Finalize_Address routines for CodePeer.
2885 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2887 * sem_prag.adb (Inherits_Class_Wide_Pre): subsidiary of
2888 Analyze_Pre_Post_Condition, to implement the legality checks
2889 mandated by AI12-0131: Pre'Class shall not be specified for an
2890 overriding primitive subprogram of a tagged type T unless the
2891 Pre'Class aspect is specified for the corresponding primitive
2892 subprogram of some ancestor of T.
2894 2017-04-25 Bob Duff <duff@adacore.com>
2896 * sem_ch8.adb (Use_One_Type): If a use_type_clause
2897 is redundant, set its Used_Operations to empty. This is only
2898 necessary for use clauses that appear in the parent of a generic
2899 child unit, because those use clauses get reanalyzed when we
2900 instantiate the generic, and we don't want the Used_Operations
2901 carried over from the original context (where it was probably
2904 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2906 * exp_ch6.adb: Minor reformatting.
2908 2017-04-25 Bob Duff <duff@adacore.com>
2910 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2911 Use Source_Index (Current_Sem_Unit) to find the correct casing.
2912 * exp_prag.adb (Expand_Pragma_Check): Use Source_Index
2913 (Current_Sem_Unit) to find the correct casing.
2914 * par.adb (Par): Null out Current_Source_File, to ensure that
2915 the above bugs won't rear their ugly heads again.
2917 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2919 * sem_ch8.adb (Find_Type): For an attribute reference
2920 'Class, if prefix type is synchronized and previous errors
2921 have suppressed the creation of the corresponding record type,
2922 create a spurious class-wide for the synchonized type itself,
2923 to catch other misuses of the attribute
2925 2017-04-25 Steve Baird <baird@adacore.com>
2927 * exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
2928 is True, then don't generate the accessibility check for the
2929 tag of a tagged result.
2930 * exp_intr.adb (Expand_Dispatching_Constructor_Call):
2931 if CodePeer_Mode is True, then don't generate the
2932 tag checks for the result of call to an instance of
2933 Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
2934 descendant of" check and the accessibility check).
2936 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2938 * sem_ch13.adb: Code cleanups.
2939 * a-strbou.ads: minor whitespace fix in Trim for bounded strings.
2940 * sem_ch8.ads: Minor comment fix.
2942 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
2944 * exp_ch4.adb (Library_Level_Target): New function.
2945 (Expand_Concatenate): When optimization is enabled, also expand
2946 the operation out-of-line if the concatenation is present within
2947 the expression of the declaration of a library-level object and
2948 not only if it is the expression of the declaration.
2950 2017-04-25 Bob Duff <duff@adacore.com>
2952 * freeze.adb (Freeze_Object_Declaration): Do
2953 not Remove_Side_Effects if there is a pragma Linker_Section,
2954 because in that case we want static initialization in the
2955 appropriate section.
2957 2017-04-25 Gary Dismukes <dismukes@adacore.com>
2959 * exp_dbug.adb: Minor rewording and reformatting.
2961 2017-04-25 Ed Schonberg <schonberg@adacore.com>
2963 * sem_attr.adb (Statically_Denotes_Object): New predicate, to
2964 handle the proposed changes to rules concerning potentially
2965 unevaluated expressions, to include selected components that
2966 do not depend on discriminants, and indexed components with
2968 * sem_util.adb (Is_Potentially_Unevaluated): Add check for
2969 predicate in quantified expression, and fix bugs in the handling
2970 of case expressions and membership test.
2971 (Analyze_Attribute_Old_Result): use new predicate.
2972 (Analyze_Attribute, case Loop_Entry): ditto.
2974 2017-04-25 Bob Duff <duff@adacore.com>
2976 * s-secsta.adb (SS_Info): Add a comment
2977 explaining why we don't need to walk all the chunks in order to
2978 compute the total size.
2980 2017-04-25 Bob Duff <duff@adacore.com>
2982 * namet.ads, namet.adb (Global_Name_Buffer): Increase the length
2983 of the global name buffer to 4*Max_Line_Length.
2985 2017-04-25 Javier Miranda <miranda@adacore.com>
2987 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): When creating a
2988 renaming entity for debug information, mark the entity as needing debug
2989 info if it comes from sources.
2991 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
2993 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Remove the
2994 restriction converning the use of 'Address where the prefix is
2995 of a controlled type.
2997 2017-04-25 Pierre-Marie de Rodat <derodat@adacore.com>
2999 * exp_dbug.adb: In Debug_Renaming_Declaration,
3000 skip slices that are made redundant by an indexed component
3002 * atree.h: New definition for Original_Node.
3004 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3006 * sem_prag.adb, sem_prag.ads: Minor reformatting.
3008 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3010 * sem_ch3.adb (Check_Entry_Contract): Call
3011 Preanalyze_Spec_Expression so that resolution takes place as well.
3012 * sem_util.adb (Check_Internal_Protected_Use): Reject properly
3013 internal calls that appear in preconditions of protected
3014 operations, in default values for same, and in contract guards
3015 for contract cases in SPARK.
3017 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3019 * a-numaux.ads: Fix description of a-numaux-darwin
3021 (Double): Define to Long_Float.
3022 * a-numaux-vxworks.ads (Double): Likewise.
3023 * a-numaux-darwin.ads
3025 * a-numaux-libc-x86.ads (Double): Define to Long_Long_Float.
3026 * a-numaux-x86.ads: Fix package description.
3027 * a-numaux-x86.adb (Is_Nan): Minor tweak.
3028 (Reduce): Adjust and complete description. Call Is_Nan instead of
3029 testing manually. Use an integer temporary to hold rounded value.
3030 * a-numaux-darwin.adb (Reduce): Likewise.
3031 (Is_Nan): New function.
3033 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3035 * sem_ch4.adb (Analyze_Selected_Component): Additional refinement
3036 on analysis of prefix whose type is a current instance of a
3037 synchronized type, but where the prefix itself is an entity that
3040 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3042 * exp_ch5.adb (Replace_Target): When rewriting the RHS, preserve
3043 the identity of callable entities therein, because they have been
3044 properly resolved, and prefixed calls may have been rewritten
3047 2017-04-25 Patrick Bernardi <bernardi@adacore.com>
3049 * exp_ch3.adb (Build_Init_Statements): Convert
3050 the expression of the pragma/aspect Secondary_Stack_Size to
3051 internal type System.Parameters.Size_Type before assigning
3052 it to the Secondary_Stack_Size component of the task type's
3053 corresponding record.
3055 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3057 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal
3058 (etc) optimizations when the type is modular and the offsets
3061 2017-04-25 Eric Botcazou <ebotcazou@adacore.com>
3063 * s-osinte-freebsd.ads: Minor comment tweaks
3065 2017-04-25 Javier Miranda <miranda@adacore.com>
3067 * urealp.adb (UR_Write): Reverse previous patch
3068 adding documentation on why we generate multiplications instead
3069 of divisions (needed to avoid expressions whose computation with
3070 large numbers may cause division by 0).
3072 2017-04-25 Bob Duff <duff@adacore.com>
3074 * erroutc.adb (Set_Specific_Warning_Off,
3075 Set_Warnings_Mode_Off): Use the correct source file for
3076 Stop. Was using Current_Source_File, which is only valid during
3077 parsing. Current_Source_File will have a leftover value from
3078 whatever file happened to be parsed last, because of a with_clause
3081 2017-04-25 Bob Duff <duff@adacore.com>
3083 * lib.ads, lib.adb (In_Internal_Unit): New functions similar
3084 to In_Predefined_Unit, but including GNAT units.
3085 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): Replace
3086 with Should_Ignore_Pragma_Par and Should_Ignore_Pragma_Sem,
3087 because Should_Ignore_Pragma was not working reliably outside
3088 the parser, because Current_Source_File is not valid.
3089 * sem_prag.adb, exp_prag.adb: Call Should_Ignore_Pragma_Sem.
3090 * par-prag.adb: Call Should_Ignore_Pragma_Par.
3092 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3094 * gnat1drv.adb (Gnat1Drv): Disable Generate_Processed_File in
3097 2017-04-25 Javier Miranda <miranda@adacore.com>
3099 * urealp.adb (UR_Write): Fix output of constants with a base other
3102 2017-04-25 Justin Squirek <squirek@adacore.com>
3104 * sem_ch13.adb (Get_Interfacing_Aspects): Moved to sem_util.adb.
3105 * sem_prag.adb (Analyze_Pragma, Process_Import_Or_Interface):
3106 Add extra parameter for Process_Interface_Name.
3107 (Process_Interface_Name): Add parameter for pragma to analyze
3108 corresponding aspect.
3109 * sem_util.ads, sem_util.adb (Get_Interfacing_Aspects): Added
3112 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3114 * exp_ch7.adb, einfo.ads, sem_prag.adb: Minor reformatting and typo
3117 2017-04-25 Yannick Moy <moy@adacore.com>
3119 * sem_res.adb (Resolve_Comparison_Op): Do not
3120 attempt evaluation of relational operations inside assertions.
3122 2017-04-25 Justin Squirek <squirek@adacore.com>
3124 * exp_util.adb (Add_Interface_Invariants):
3125 Restored, code moved back from Build_Invariant_Procedure_Body.
3126 (Add_Parent_Invariants): Restored, code moved back from
3127 Build_Invariant_Procedure_Body.
3128 (Build_Invariant_Procedure_Body):
3129 Remove refactored calls and integrated code from
3130 Add_Parent_Invariants and Add_Interface_Invariants.
3132 2017-04-25 Johannes Kanig <kanig@adacore.com>
3134 * errout.adb (Output_Messages): Adjust computation of total
3136 * erroutc.adb (Error_Msg): In statistics counts, deal
3137 correctly with informational messages that are not warnings.
3138 * errutil.adb (Finalize): adjust computation of total errors.
3140 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3142 * terminals.c (__gnat_terminate_pid): New.
3143 * g-exptty.ads (Terminate_Process): New. Update comments.
3145 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3147 * a-cfinve.ads, a-cofove.ads (Empty_Vector): add Global contract.
3149 2017-04-25 Justin Squirek <squirek@adacore.com>
3151 * sem_ch3.adb (Analyze_Declarations): Minor
3152 correction to comments, move out large conditional and scope
3153 traversal into a predicate.
3154 (Uses_Unseen_Lib_Unit_Priv): Predicate function made from extracted
3157 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3159 * sem_ch4.adb (Analyze_Selected_Component): Refine analysis
3160 of prefix whose type is a current instance of a synchronized
3161 type. If the prefix is an object this is an external call (or
3162 requeue) that can only access public operations of the object. The
3163 previous predicate was too restrictive, and did not allow public
3164 protected operations, only task entries.
3166 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3168 * sem_ch5.adb, fname.adb: Minor reformatting.
3170 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3172 * einfo.adb (Is_Anonymous_Access_Type): New routine.
3173 * einfo.ads Update the placement of
3174 E_Anonymous_Access_Subprogram_Type along with all subtypes that
3176 (Is_Anonymous_Access_Type): New routine.
3177 * exp_ch7.adb (Allows_Finalization_Master): Do not generate a
3178 master for an access type subject to pragma No_Heap_Finalization.
3179 * exp_util.adb (Build_Allocate_Deallocate_Proc): An object being
3180 allocated or deallocated does not finalization actions if the
3181 associated access type is subject to pragma No_Heap_Finalization.
3182 * opt.ads Add new global variable No_Heap_Finalization_Pragma.
3183 * par-prag.adb Pragma No_Heap_Finalization does not need special
3184 processing from the parser.
3185 * sem_ch6.adb (Check_Return_Subtype_Indication): Remove ancient
3186 ??? comments. Use the new predicate Is_Anonymous_Access_Type.
3187 * sem_prag.adb Add an entry in table Sig_Flags for pragma
3188 No_Heap_Finalization.
3189 (Analyze_Pragma): Add processing for
3190 pragma No_Heap_Finalization. Update various error messages to
3191 use Duplication_Error.
3192 * sem_util.ads, sem_util.adb (No_Heap_Finalization): New routine.
3193 * snames.ads-tmpl: Add new predefined name No_Heap_Finalization
3194 and corresponding pragma id.
3196 2017-04-25 Bob Duff <duff@adacore.com>
3198 * freeze.adb (Freeze_Record_Type): Use the
3199 underlying type of the component type to determine whether it's
3200 elementary. For representation clause purposes, a private type
3201 should behave the same as its full type.
3202 * fname.ads, fname.adb (Is_Predefined_File_Name):
3203 Make sure things like "system.ali" are recognized as predefined.
3205 2017-04-25 Javier Miranda <miranda@adacore.com>
3207 * debug.adb: Update documentation of -gnatd.6.
3209 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3211 * sem_ch5.adb (Preanalyze_Range): Handle properly an Ada2012
3212 element iterator when the name is an overloaded function call,
3213 one of whose interpretations yields an array.
3215 2017-04-25 Bob Duff <duff@adacore.com>
3217 * uname.ads, uname.adb (Is_Predefined_Unit_Name,
3218 Is_Internal_Unit_Name): New functions for operating on unit
3219 names, as opposed to file names. There's some duplicated code
3220 with fname.adb, which is unfortunate, but it seems like we don't
3221 want to add dependencies here.
3222 * fname-uf.adb (Get_File_Name): Change Is_Predefined_File_Name
3223 to Is_Predefined_Unit_Name; the former was wrong, because Uname
3224 is not a file name at all.
3225 * fname.ads, fname.adb: Document the fact that
3226 Is_Predefined_File_Name and Is_Internal_File_Name can be called
3227 for ALI files, and fix the code so it works properly for ALI
3228 files. E.g. these should return True for "system.ali".
3230 2017-04-25 Justin Squirek <squirek@adacore.com>
3232 * exp_util.adb (Add_Invariant): Removed,
3233 code moved to Add_Invariant_Check, Add_Inherited_Invariant,
3234 and Add_Own_Invariant. (Add_Invariant_Check): Used
3235 for adding runtime checks from any kind of invariant.
3236 (Add_Inherited_Invariant): Generates invariant checks for
3237 class-wide invariants (Add_Interface_Invariants): Removed, code
3238 moved to Build_Invariant_Procedure_Body (Add_Own_Invariant):
3239 Create a types own invariant procedure (Add_Parent_Invariants):
3240 Removed, code moved to Build_Invariant_Procedure_Body
3241 (Build_Invariant_Procedure_Body): Add refactored calls
3242 and integrated code from Add_Parent_Invariants and
3243 Add_Interface_Invariants.
3244 (Process_Type): Removed, the
3245 relavant code was inlined into both Add_Own_Invariant and
3246 Add_Inherited_Invariant.
3248 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3250 * make.adb, par-ch2.adb, sem_util.adb, scans.ads, sem_ch8.adb,
3251 scn.adb, osint.adb, fname.adb: Minor reformatting.
3253 2017-04-25 Pascal Obry <obry@adacore.com>
3255 * s-taprop-mingw.adb: Do not check for CloseHandle in
3258 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3260 * sem_util.adb (Check_Part_Of_Reference):
3261 Continue to examine the context if the reference appears within
3262 an expression function.
3264 2017-04-25 Justin Squirek <squirek@adacore.com>
3266 * exp_ch7.adb, exp_ch7.ads Remove Build_Invariant_Procedure_Body
3267 and Build_Invariant_Procedure_Declaration.
3268 * exp_util.ads, exp_util.adb Add Build_Invariant_Procedure_Body
3269 and Build_Invariant_Procedure_Declaration from exp_ch7
3270 and break-out Is_Untagged_Private_Derivation from
3271 Build_Invariant_Procedure_Body.
3272 (Replace_Type_References):
3273 Append an extra parameter to allow for dispatching replacements
3274 and add the corrasponding logic.
3275 (Type_Invariant): Remove
3276 Replace_Typ_Refs and replace its references with calls to
3277 Replace_Type_References.
3278 * sem_ch3.adb, sem_prag.adb: Remove with and use of exp_ch7.
3280 2017-04-25 Bob Duff <duff@adacore.com>
3282 * sem_util.ads, sem_util.adb (Should_Ignore_Pragma): New function
3283 that returns True when appropriate.
3284 * par-prag.adb, exp_prag.adb, sem_prag.adb: Do not ignore pragmas
3285 when compiling predefined files.
3286 * fname.ads, fname.adb (Is_Predefined_File_Name): Fix bug:
3287 "gnat.adc" should not be considered a predefined file name.
3288 That required (or at least encouraged) a lot of cleanup of global
3289 variable usage. We shouldn't be communicating information via
3290 the global name buffer.
3291 * bindgen.adb, errout.adb, fname-uf.adb, lib-load.adb, make.adb,
3292 * restrict.adb, sem_ch10.adb, sem_ch6.adb, sem_ch8.adb: Changes
3293 required by the above-mentioned cleanup.
3295 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3297 * osint.adb (Find_File): Handle properly a request for a
3298 configuration file whose name is a directory.
3300 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3302 * sem_attr.adb, sem_ch5.adb: Minor reformatting.
3304 2017-04-25 Bob Duff <duff@adacore.com>
3306 * types.ads: Minor: Fix '???' comment.
3307 * sem_ch8.adb: Minor comment fix.
3309 2017-04-25 Bob Duff <duff@adacore.com>
3311 * sem_prag.adb: Remove suspicious uses of Name_Buf.
3312 * stringt.ads, stringt.adb, exp_dbug.adb, sem_dim.adb: Remove
3313 Add_String_To_Name_Buffer, to avoid using the global Name_Buf.
3314 Add String_To_Name with no side effects.
3316 2017-04-25 Justin Squirek <squirek@adacore.com>
3318 * sem_ch3.adb (Analyze_Declarations): Add
3319 additional condition for edge case.
3321 2017-04-25 Bob Duff <duff@adacore.com>
3323 * par-ch2.adb, scans.ads, scn.adb: Do not give an error for
3324 reserved words inside pragmas. This is necessary to allow the
3325 pragma name Interface to be used in pragma Ignore_Pragma.
3326 * par.adb: Minor comment fix.
3328 2017-04-25 Javier Miranda <miranda@adacore.com>
3330 * a-tags.ads, a-tags.adb (Type_Is_Abstract): Renamed as Is_Abstract.
3331 * rtsfind.ads (RE_Type_Is_Abstract): Renamed as Is_Abstract.
3332 * exp_disp.adb (Make_DT): Update occurrences of RE_Type_Is_Abstract.
3333 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Update
3334 occurrences of RE_Type_Is_Abstract
3336 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3338 * exp_util.adb (Build_Chain): Account for ancestor
3339 subtypes while traversing the derivation chain.
3341 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3343 * sem_attr.adb: minor reformatting.
3345 2017-04-25 Doug Rupp <rupp@adacore.com>
3347 * sigtramp-vxworks-target.inc [PPC64]: Add a .localentry pseudo-op.
3349 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3351 * sem_ch5.adb (Analyze_Assignment): Reset Full_Analysis flag on
3352 the first pass over an assignment statement with target names,
3353 to prevent the generation of subtypes (such as discriminated
3354 record components)that may carry the target name outside of the
3355 tree for the assignment. The subtypes will be generated when
3356 the assignment is reanalyzed in full.
3357 (Analyze_Target_Name): Handle properly class-wide types.
3359 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3361 * elists.ads, elists.adb (Prepend_Unique_Elmt): New routine.
3362 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
3363 the purposes of freezing.
3364 * exp_util.adb Update the documentation and structure of the
3365 type map used in class-wide semantics of assertion expressions.
3366 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
3367 and resolve the triaged expression because all substitutions
3368 refer to the proper entities. Update the replacement of
3370 (Build_DIC_Procedure_Body): Add formal parameter
3371 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
3372 are now only processed when freezing occurs. Build a body only
3374 (Entity_Hash): Removed.
3375 (Map_Types): New routine.
3376 (Replace_Object_And_Primitive_References): Removed.
3377 (Replace_References): New routine.
3378 (Replace_Type_References): Moved to the library level of Exp_Util.
3379 (Type_Map_Hash): New routine.
3380 (Update_Primitives_Mapping): Update the mapping call.
3381 (Update_Primitives_Mapping_Of_Types): Removed.
3382 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
3383 parameter For_Freeze and update the comment on usage.
3384 (Map_Types): New routine.
3385 (Replace_References): New routine.
3386 (Replace_Type_References): Moved to the library level of Exp_Util.
3387 (Update_Primitives_Mapping_Of_Types): Removed.
3388 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
3389 properties of the private type to the full view in case the full
3390 view derives from a parent type and inherits a DIC pragma.
3391 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
3392 DIC pragma is placed at the top of a declarative region.
3394 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3396 * a-tasatt.adb: Complete previous change and use an unsigned
3397 int to avoid overflow checks.
3399 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3401 * sem_attr.adb (Analyze_Attribute, case 'Access): Specialize
3402 the error message when the attribute reference is an actual in
3403 a call to a subprogram inherited from a generic formal type with
3404 unknown discriminants, which makes the subprogram and its formal
3405 parameters intrinsic (see RM 6.3.1 (8) and (13)).
3407 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3409 * sem_aggr.adb, inline.adb, einfo.adb, einfo.ads, scng.adb,
3410 sem_prag.adb: Minor reformatting.
3412 2017-04-25 Bob Duff <duff@adacore.com>
3414 * sem_attr.adb (Type_Key): Add code in the
3415 recursive Compute_Type_Key to protect against fetching the source
3416 code for Standard, in case a component of the type is declared
3417 in Standard. There was already code to do this for the original
3418 type, but not for its components.
3420 2017-04-25 Javier Miranda <miranda@adacore.com>
3422 * exp_ch3.adb (Build_Initialization_Call): Handle
3423 subtypes of private types when searching for the underlying full
3424 view of a private type.
3426 2017-04-25 Javier Miranda <miranda@adacore.com>
3428 * sem_res.adb (Set_Mixed_Mode_Operand): A universal
3429 real conditional expression can appear in a fixed-type context
3430 and must be resolved with that context to facilitate the code
3431 generation to the backend.
3433 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3435 * einfo.adb, einfo.ads (Body_Needed_For_Inlining): New flag,
3436 to indicate whether during inline processing, when some unit U1
3437 appears in the context of a unit U2 compiled for instantiation
3438 or inlining purposes, the body of U1 needs to be compiled as well.
3439 * sem_prag.adb (Process_Inline): Set Body_Needed_For_Inlining if
3440 context is a package declaration.
3441 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
3442 Analyze_Generic_Package_Declaration): ditto.
3443 * inline.adb (Analyze_Inlined_Bodies): Check
3444 Body_Needed_For_Inlining.
3446 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3448 * par.adb (Current_Assign_Node): Global variable use to record
3449 the presence of a target_name in the right hand side of the
3450 assignment being parsed.
3451 * par-ch4.adb (P_Name): If the name is a target_name, mark the
3452 enclosing assignment node accordingly.
3453 * par-ch5.adb (P_Assignment_Statement): Set Current_Assign_Node
3455 * sem_ch5.adb (Analyze_Assignment): Disable expansion before
3456 analyzing RHS if the statement has target_names.
3457 * sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
3458 properly choices that are subtype marks.
3459 * exp_ch5.adb: Code cleanup.
3461 2017-04-25 Bob Duff <duff@adacore.com>
3463 * s-memory.adb: Add a comment regarding efficiency.
3464 * atree.adb: Fix the assertion, and combine 2 assertions into one,
3465 "the source has an extension if and only if the destination does."
3466 * sem_ch3.adb, sem_ch13.adb: Address ??? comments.
3468 2017-04-25 Arnaud Charlet <charlet@adacore.com trojanek>
3470 * a-tasatt.adb (Set_Value): Fix handling of 32bits -> 64bits
3473 2017-04-25 Doug Rupp <rupp@adacore.com>
3475 * init.c (__gnat_error_handler) [vxworks]: Turn on sigtramp
3476 handling for ppc64-vx7.
3477 * sigtramp-vxworks-target.inc
3478 [SIGTRAMP_BODY]: Add section for ppc64-vx7.
3480 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3482 * ada_get_targ.adb: New file.
3484 2017-04-25 Bob Duff <duff@adacore.com>
3486 * uintp.adb (Most_Sig_2_Digits): In case Direct (Right), fetch
3487 Direct_Val (Right), instead of the incorrect Direct_Val (Left).
3488 (UI_GCD): Remove ??? comment involving possible efficiency
3489 improvements. This just isn't important after all these years.
3491 * uintp.ads: Minor cleanup.
3493 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3495 * exp_util.adb, exp_util.ads, sem_ch7.adb, sem_prag.adb, exp_ch3.adb:
3496 Revert previous changes.
3497 * scng.adb: Minor reformatting.
3498 * s-stratt.ads: Fix unbalanced parens in comment.
3500 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3502 * sem_ch3.adb, exp_util.adb, sem_prag.adb, freeze.adb, sem_util.adb:
3505 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3507 * scng.adb (Scan): Handle '@' appropriately.
3508 * sem_ch5.adb: Code cleanup.
3510 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3512 * freeze.adb (Check_Expression_Function): Do not check for the
3513 use of deferred constants if the freezing of the expression
3514 function is triggered by its generated body, rather than a
3517 2017-04-25 Javier Miranda <miranda@adacore.com>
3519 * exp_attr.adb (Rewrite_Stream_Proc_Call): Handle
3520 subtypes of private types when performing the view conversion.
3522 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3524 * exp_ch3.adb (Freeze_Type): Signal the DIC body is created for
3525 the purposes of freezing.
3526 * exp_util.adb Update the documentation and structure of the
3527 type map used in class-wide semantics of assertion expressions.
3528 (Add_Inherited_Tagged_DIC): There is really no need to preanalyze
3529 and resolve the triaged expression because all substitutions
3530 refer to the proper entities. Update the replacement of
3532 (Build_DIC_Procedure_Body): Add formal parameter
3533 For_Freeze. Add local variable Build_Body. Inherited DIC pragmas
3534 are now only processed when freezing occurs. Build a body only
3536 (Entity_Hash): Removed.
3537 (Map_Types): New routine.
3538 (Replace_Object_And_Primitive_References): Removed.
3539 (Replace_References): New routine.
3540 (Replace_Type_References): Moved to the library level of Exp_Util.
3541 (Type_Map_Hash): New routine.
3542 (Update_Primitives_Mapping): Update the mapping call.
3543 (Update_Primitives_Mapping_Of_Types): Removed.
3544 * exp_util.ads (Build_DIC_Procedure_Body): Add formal
3545 parameter For_Freeze and update the comment on usage.
3546 (Map_Types): New routine.
3547 (Replace_References): New routine.
3548 (Replace_Type_References): Moved to the library level of Exp_Util.
3549 (Update_Primitives_Mapping_Of_Types): Removed.
3550 * sem_ch7.adb (Preserve_Full_Attributes): Propagate the DIC
3551 properties of the private type to the full view in case the full
3552 view derives from a parent type and inherits a DIC pragma.
3553 * sem_prag.adb (Analyze_Pragma): Guard against a case where a
3554 DIC pragma is placed at the top of a declarative region.
3556 2017-04-25 Tristan Gingold <gingold@adacore.com>
3558 * s-mmap.ads (Data): Add pragma Inline.
3560 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
3562 * checks.adb (Insert_Valid_Check): Do not use
3563 a renaming to alias a volatile name because this will lead to
3564 multiple evaluations of the volatile name. Use a constant to
3565 capture the value instead.
3567 2017-04-25 Doug Rupp <rupp@adacore.com>
3569 * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7.
3571 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3573 * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression):
3574 Add out parameter to indicate to caller that a wrapper must
3575 be constructed for an inherited primitive whose inherited
3576 pre/postcondition has called to overridden primitives.
3577 * freeze.adb (Check_Inherited_Conditions): Build wrapper body
3578 for inherited primitive that requires it.
3579 * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are
3580 legal primitive operations and belong to the list of bodies
3581 generated after the freeze point of a type.
3582 * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature
3583 of Build_Class_Wide_Expression.
3584 * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure
3585 to construct the specification of the wrapper subprogram created
3586 for an inherited operation.
3588 2017-04-25 Bob Duff <duff@adacore.com>
3590 * s-osinte-linux.ads (pthread_mutexattr_setprotocol,
3591 pthread_mutexattr_setprioceiling): Add new interfaces for these
3593 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB): Set
3594 protocols as appropriate for Locking_Policy 'C' and 'I'.
3595 * s-taprop-posix.adb: Minor reformatting to make it more similar
3596 to s-taprop-linux.adb.
3598 2017-04-25 Ed Schonberg <schonberg@adacore.com>
3600 * sem_ch3.adb (Get_Discriminant_Value, Search_Derivation_Levels):
3601 Handle properly a multi- level derivation involving both renamed
3602 and constrained parent discriminants, when the type to be
3603 constrained has fewer discriminants that the ultimate ancestor.
3605 2017-04-25 Bob Duff <duff@adacore.com>
3607 * sem_util.adb (Is_Object_Reference): In the
3608 case of N_Explicit_Dereference, return False if it came from a
3609 conditional expression.
3611 2017-04-25 Bob Duff <duff@adacore.com>
3613 * par-ch4.adb (P_Case_Expression): If a semicolon
3614 is followed by "when", assume that ";" was meant to be ",".
3616 2017-04-25 Gary Dismukes <dismukes@adacore.com>
3618 * sem_ch9.adb, sem_ch10.adb, sem_util.adb: Minor reformatting and typo
3621 2017-04-25 Arnaud Charlet <charlet@adacore.com>
3623 * rtsfind.ads (SPARK_Implicit_Load): New procedure for forced
3624 loading of an entity.
3625 * rtsfind.adb (SPARK_Implicit_Load): Body with a pattern
3626 previously repeated in the analysis.
3627 * sem_ch9.adb (Analyze_Protected_Type_Declaration): use new
3628 procedure SPARK_Implicit_Load. (Analyze_Task_Type_Declaration):
3629 use new procedure SPARK_Implicit_Load.
3630 * sem_ch10.adb (Analyze_Compilation_Unit): Use new procedure
3631 SPARK_Implicit_Load.
3633 2017-04-25 Javier Miranda <miranda@adacore.com>
3635 * sem_util.adb (New_Copy_Tree): By default
3636 copying of defining identifiers is prohibited because
3637 this would introduce an entirely new entity into the
3638 tree. This patch introduces an exception to this general
3639 rule: the declaration of constants and variables located in
3640 Expression_With_Action nodes.
3641 (Copy_Itype_With_Replacement): Renamed as Copy_Entity_With_Replacement.
3642 (In_Map): New subprogram.
3643 (Visit_Entity): New subprogram.
3644 (Visit_Node): Handle EWA_Level,
3645 EWA_Inner_Scope_Level, and take care of defining entities defined
3646 in Expression_With_Action nodes.
3648 2017-04-25 Thomas Quinot <quinot@adacore.com>
3650 * exp_ch6.adb: minor comment edit.
3651 * sinfo.ads, sinfo.adb: New Null_Statement attribute for null
3652 procedure specifications that come from source.
3653 * par-ch6.adb (P_Subprogram, case of a null procedure): Set new
3654 Null_Statement attribute.
3655 * par_sco.adb (Traverse_Declarations_Or_Statements): For a null
3656 procedure, generate statement SCO for the generated NULL statement.
3657 * sem_ch6.adb (Analyze_Null_Procedure): Use null statement from
3658 parser, if available.
3660 2017-04-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3662 * system-linux-s390.ads: Use Long_Integer'Size to define
3665 2017-04-04 Eric Botcazou <ebotcazou@adacore.com>
3667 * sem_ch3.adb (Build_Derived_Record_Type): Fix long line.
3669 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3671 * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
3672 * g-socket.adb (To_Host_Entry): Fix typo in comment.
3673 * gnat_ugn.texi: Fix typo.
3674 * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
3675 * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
3676 * sem_ch3.adb (Build_Derived_Record_Type): Likewise.
3677 * sem_util.adb (Mark_Coextensions): Likewise.
3678 * sem_util.ads (Available_Full_View_Of_Component): Likewise.
3680 2017-03-28 Andreas Schwab <schwab@suse.de>
3683 * system-linux-aarch64-ilp32.ads: New file.
3684 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
3685 from LIBGNAT_TARGET_PAIRS.
3686 (LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
3687 (LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
3688 LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
3689 or -mabi=ilp32, resp.
3691 2017-03-14 James Cowgill <James.Cowgill@imgtec.com>
3693 * s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.
3695 2017-03-08 Thanassis Tsiodras <ttsiodras@gmail.com>
3698 * socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.
3700 2017-03-08 Eric Botcazou <ebotcazou@adacore.com>
3703 * system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.
3705 * system-linux-arm.ads (Default_Bit_Order): Likewise.
3706 * system-linux-mips.ads (Default_Bit_Order): Likewise.
3707 * system-linux-armeb.ads: Delete.
3708 * system-linux-mipsel.ads: Likewise.
3709 * gcc-interface/Makefile.in (MIPS/Linux): Adjust.
3710 (ARM/Linux): Likewise.
3712 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3715 * gcc-interface/misc.c (gnat_handle_option): Pass true to
3716 handle_generated_option GENERATED_P.
3718 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3720 * gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
3721 around a justified modular type if it doesn't have the same scalar
3722 storage order as the enclosing record type.
3724 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3726 * gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
3727 of boolean rvalues to function calls.
3729 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3731 * gcc-interface/utils.c (fold_bit_position): New function.
3732 (rest_of_record_type_compilation): Call it instead of bit_position to
3733 compute the field position and remove the call to remove_conversions.
3734 (compute_related_constant): Factor out the multiplication in both
3735 operands, if any, and streamline the final test.
3737 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3739 * gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.
3741 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3743 * gcc-interface/decl.c: Include demangle.h.
3744 (is_cplusplus_method): Return again true for a primitive operation
3745 only if it is dispatching. For a subprogram with an interface name,
3746 call the demangler to get the number of C++ parameters and compare it
3747 with the number of Ada parameters.
3749 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3751 * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
3752 there is no end label, put the location of the At_End procedure on
3753 the call to the procedure.
3755 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3757 * gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
3758 value for array types with TYPE_INDEX_TYPE set on their domain type.
3759 * gcc-interface/utils.c (max_size): For operations and expressions, do
3760 not build a new node if the operands have not changed or are missing.
3762 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3764 * gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
3765 argument when recursing on TRUTH_NOT_EXPR.
3767 2017-02-12 John Marino <gnugcc@marino.st>
3769 * system-freebsd-x86.ads: Rename into...
3770 * system-freebsd.ads: ...this.
3771 (Default_Bit_Order): Define using Standard'Default_Bit_Order.
3772 * gcc-interface/Makefile.in: Support aarch64-freebsd.
3773 (x86-64/FreeBSD): Adjust to above renaming.
3774 (i386/FreeBSD): Likewise.
3776 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
3778 * comperr.adb: Update FSF bug reporting URL.
3780 2017-02-01 Eric Botcazou <ebotcazou@adacore.com>
3781 Jakub Jelinek <jakub@redhat.com>
3784 * adaint.c (__gnat_killprocesstree): Fix broken string handling.
3786 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3789 * gcc-interface/utils.c (get_global_context): Pass main_input_filename
3790 to build_translation_unit_decl.
3792 2017-01-23 Javier Miranda <miranda@adacore.com>
3794 * sem_util.adb (New_Copy_Tree): Code cleanup:
3795 removal of the internal map (ie. variable Actual_Map, its
3796 associated local variables, and all the code handling it).
3797 * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
3798 force loading of the System package when processing a task type.
3799 (Analyze_Protected_Type_Declaration): in GNATprove mode force
3800 loading of the System package when processing a protected type.
3801 * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
3802 force loading of the System package when processing compilation
3803 unit with a main-like subprogram.
3804 * frontend.adb (Frontend): remove forced loading of the System
3807 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3809 * sem_prag.adb (Default_Initial_Condition): If the desired type
3810 declaration is a derived type declaration with discriminants,
3811 it is rewritten as a private type declaration.
3812 * sem_ch13.adb (Replace_Type_References_Generic,
3813 Visible_Component): A discriminated private type with descriminnts
3814 has components that must be rewritten as selected components
3815 if they appear as identifiers in an aspect expression such as
3816 a Default_Initial_Condition.
3817 * sem_util.adb (Defining_Entity): support N_Iterator_Specification
3820 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3822 * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
3823 * gnat1drv.adb Generate an empty object file for an ignored
3824 Ghost compilation unit.
3825 * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.
3827 2017-01-23 Yannick Moy <moy@adacore.com>
3829 * sem_ch4.adb (Analyze_Indexed_Component_Form):
3830 Adapt to inlined prefix with string literal subtype.
3831 * inline.adb (Expand_Inlined_Call): Keep unchecked
3832 conversion inside inlined call when formal type is constrained.
3834 2017-01-23 Javier Miranda <miranda@adacore.com>
3836 * sem_util.adb (New_Copy_Tree): Code cleanup:
3837 removal of global variables. All the global variables, global
3838 functions and tables of this subprogram are now declared locally.
3840 2017-01-23 Gary Dismukes <dismukes@adacore.com>
3842 * exp_strm.ads: Minor reformatting and typo fixes.
3844 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3846 * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
3847 exp_aggr.adb: Minor reformatting.
3848 * g-diopit.adb: minor grammar/punctuation fix in comment.
3849 * g-byorma.ads: minor fix of unbalanced parens in comment.
3851 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3853 * par.adb: Update the documentation of component Labl.
3854 * par-ch6.adb (P_Return_Statement): Set the expected label of
3855 an extended return statement to Error.
3857 2017-01-23 Tristan Gingold <gingold@adacore.com>
3859 * s-boustr.ads, s-boustr.adb (Is_Full): New function.
3861 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3863 * expander.adb: Handle N_Delta_Aggregate.
3865 2017-01-23 Javier Miranda <miranda@adacore.com>
3867 * exp_ch6.adb (Expand_Call): Improve the code that
3868 checks if some formal of the called subprogram is a class-wide
3869 interface, to handle subtypes of class-wide interfaces.
3871 2017-01-23 Javier Miranda <miranda@adacore.com>
3873 * checks.adb (Apply_Parameter_Aliasing_Checks):
3874 Remove side effects of the actuals before generating the overlap
3877 2017-01-23 Justin Squirek <squirek@adacore.com>
3879 * exp_strm.ads, exp_strm.ads
3880 (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
3881 as to avoid getting the underlying type by default.
3882 * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
3883 underlying type in the Iiput and output attribute cases when
3884 building their respective functions.
3886 2017-01-23 Gary Dismukes <dismukes@adacore.com>
3888 * scng.adb: Minor reformatting of error message.
3890 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3892 * sem_ch6.adb (Analyze_Expression_Function): Do not attempt
3893 to freeze the return type of an expression funxtion that is a
3894 completion, if the type is a limited view and the non-limited
3897 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3899 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
3900 aggregate construct.
3901 (P_Record_Or_Array_Component_Association): An array aggregate
3902 can start with an Iterated_Component_Association.
3903 * scng.adb: Modify error message on improper use of @ in earlier
3904 versions of the language.
3905 * sinfo.ads: New node kind N_Delta_Aggregate.
3906 * sinfo.adb: An N_Delta_Aggregate has component associations and
3908 * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
3909 * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
3910 Create a new index for each one of the choices in the association,
3911 to prevent spurious homonyms in the scope.
3912 (Resolve_Delta_Aggregate): New.
3913 * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
3914 * exp_util.adb (Insert_Actions): Take into account
3916 * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
3917 * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
3918 and local procedures Expand_Delta_Array_Aggregate and
3919 expand_Delta_Record_Aggregate.
3920 * sprint.adb: Handle N_Delta_Aggregate.
3922 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3924 * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
3925 empty name when the exception declaration is subject to pragma
3927 (Null_String): New routine.
3929 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3931 * par-ch9.adb (P_Protected_Definition): Parse
3932 any optional and potentially illegal pragmas which appear in
3933 a protected operation declaration list.
3934 (P_Task_Items): Parse
3935 any optional and potentially illegal pragmas which appear in a
3938 2017-01-23 Pascal Obry <obry@adacore.com>
3940 * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
3941 is needed when a foreign thread call a Win32 API using a thread handle
3942 like GetThreadTimes() for example.
3944 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3946 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
3947 allow an 'Address clause to be specified on a prefix of a
3950 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3952 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
3953 attribute 'Valid is a renaming of the original expression when
3954 the expression denotes a name. For all other kinds of expression,
3955 use a constant to capture the value.
3956 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
3957 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
3959 2017-01-23 Justin Squirek <squirek@adacore.com>
3961 * sem_eval.adb (Eval_Integer_Literal): Add special
3962 case to avoid optimizing out check if the literal appears in
3965 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3967 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
3968 allow an 'Address clause to be specified on a prefix of a
3971 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
3973 * checks.adb (Insert_Valid_Check): Ensure that the prefix of
3974 attribute 'Valid is a renaming of the original expression when
3975 the expression denotes a name. For all other kinds of expression,
3976 use a constant to capture the value.
3977 * exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
3978 * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.
3980 2017-01-23 Justin Squirek <squirek@adacore.com>
3982 * sem_eval.adb (Eval_Integer_Literal): Add special
3983 case to avoid optimizing out check if the literal appears in
3986 2017-01-23 Ed Schonberg <schonberg@adacore.com>
3988 * sem_ch4.adb (Try_Primitive_Operations,
3989 Is_Valid_First_Argument_Of): argument is valid if it is a derived
3990 type with unknown discriminants that matches its underlying
3992 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand
3993 expression if its type is derived from a limited type with
3994 unknown discriminants, because the expansion (which is a call)
3995 must be expanded in the enclosing context to add the proper build-
3996 in-place parameters to the call.
3997 * lib.ads, exp_ch9.adb: Minor fixes in comments.
3999 2017-01-23 Yannick Moy <moy@adacore.com>
4001 * frontend.adb (Frontend): Do not load runtime
4002 unit for GNATprove when parsing failed.
4003 * exp_ch9.adb: minor removal of extra whitespace
4004 * exp_ch6.adb: minor typo in comment
4005 * sem_util.adb: Code cleanup.
4006 * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
4007 * a-ngcefu.adb: minor style fix in whitespace
4009 2017-01-23 Thomas Quinot <quinot@adacore.com>
4011 * scos.ads: Document usage of 'd' as default SCO kind for
4013 * par_sco.adb (Traverse_Declarations_Or_Statements.
4014 Traverse_Degenerate_Subprogram): New supporting routine for expression
4015 functions and null procedures.
4016 (Traverse_Declarations_Or_Statements.Traverse_One): Add
4017 N_Expression_Function to the subprogram case; add required
4018 support for null procedures and expression functions.
4020 2017-01-23 Bob Duff <duff@adacore.com>
4022 * namet.ads (Bounded_String): Decrease the size of type
4023 Bounded_String to avoid running out of stack space.
4024 * namet.ads (Append): Don't ignore buffer overflow; raise
4025 Program_Error instead.
4027 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4029 * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
4030 sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
4032 * exp_ch9.adb: minor style fix in comment.
4034 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4036 * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
4037 for a limited record extension with unknown discriminants whose
4038 full view has no discriminants.
4040 2017-01-23 Yannick Moy <moy@adacore.com>
4042 * exp_spark.adb: Alphabetize with clauses.
4044 2017-01-23 Yannick Moy <moy@adacore.com>
4046 * sem_util.adb (Has_Enabled_Property): Treat
4047 protected objects and variables differently from other variables.
4049 2017-01-23 Thomas Quinot <quinot@adacore.com>
4051 * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
4052 Split original Ada 95 part off into new subprogram
4053 below. Call that subprogram (instead of proceeding with
4054 AI95-0133 behaviour) if debug switch -gnatd.p is in use.
4055 (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
4056 * debug.adb Document new switch -gnatd.p
4057 * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
4058 record for reverse bit order if an error has already been posted
4059 on the record type. This avoids generating extraneous "info:"
4060 messages for illegal code.
4062 2017-01-23 Justin Squirek <squirek@adacore.com>
4064 * sem_ch3.adb (Analyze_Declarations): Correct comments
4065 * freeze.adb (Find_Constant): Add detection of deferred constants
4066 so they are not incorrectly flagged as premature.
4068 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4070 * scans.ads: New token At_Sign. Remove '@' from list of illegal
4071 characters for future version of the language. '@' is legal name.
4072 * scng.ads, scng.adb (Scan): Handle '@' appropriately.
4073 * scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
4074 denotes a Target_Name.
4075 * par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
4076 * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
4077 (Has_Target_Names): New flag on N_Assignment_Statement, to
4078 indicate that RHS has occurrences of N_Target_Name.
4079 * sem.adb: Call Analyze_Target_Name.
4080 * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
4081 (urrent_LHS): Global variable that denotes LHS of assignment,
4082 used in the analysis of Target_Name nodes.
4083 * sem_res.adb (Resolve_Target_Name): New procedure.
4084 * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
4085 N is an assignment statement whose RHS contains occurences of @
4086 that designate the value of the LHS of the assignment. If the
4087 LHS is side-effect free the target names can be replaced with
4088 a copy of the LHS; otherwise the semantics of the assignment
4089 is described in terms of a procedure with an in-out parameter,
4090 and expanded as such.
4091 (Expand_N_Assignment_Statement): Call
4092 Expand_Assign_With_Target_Names when needed.
4093 * exp_util.adb (Insert_Actions): Take into account N_Target_Name.
4094 * sprint.adb: Handle N_Target_Name.
4096 2017-01-23 Eric Botcazou <ebotcazou@adacore.com>
4098 * checks.adb: Minor fix in comment.
4100 2017-01-23 Philippe Gil <gil@adacore.com>
4102 * g-debpoo.adb (Do_Report) remove freed chunks from chunks
4103 count in Sort = Memory_Usage or Allocations_Count
4105 2017-01-23 Justin Squirek <squirek@adacore.com>
4107 * sem_ch3.adb: Code cleanup.
4109 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4111 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
4112 variables to the local variable section. Update the profile
4113 of various nested routine that previously had visibility
4114 of those globals. One the matching phase has completed,
4115 remove certain classes of clauses which are considered noise.
4116 (Check_Dependency_Clause): Properly detect a match between two
4117 'Result attributes. Update the various post-match cases to use
4118 Is_Already_Matched as this routine now automatically recognizes
4119 a previously matched 'Result attribute.
4120 (Is_Already_Matched): New routine.
4121 (Remove_Extra_Clauses): New routine.
4122 (Report_Extra_Clauses): Remove the detection of ... => null
4123 clauses as this is now done in Remove_Extra_Clauses.
4125 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4127 * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
4128 report on spurious overlaps between values involving a subtype
4129 with a static predicate, because the expansion of such a subtype
4130 into individual ranges in inhibited in ASIS mode.
4132 2017-01-23 Justin Squirek <squirek@adacore.com>
4134 * sem_ch3.adb (Analyze_Declarations): Add detection
4135 of an edge case and delay freezing if it is present.
4137 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4139 * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
4140 sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.
4142 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4144 * freeze.adb (Freeze_Subprogram): Ensure that all anonymous
4145 access-to-subprogram types inherit the convention of the
4146 associated subprogram. (Set_Profile_Convention): New routine.
4147 * sem_ch6.adb (Check_Conformance): Do not compare the conventions
4148 of the two entities directly, use Conventions_Match to account
4149 for anonymous access-to-subprogram and subprogram types.
4150 (Conventions_Match): New routine.
4152 2017-01-23 Claire Dross <dross@adacore.com>
4154 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
4155 which return Universal_Integer, force the overflow check flag for
4156 Length and Range_Length for types as big as Long_Long_Integer.
4158 2017-01-23 Claire Dross <dross@adacore.com>
4160 * exp_spark.adb (Expand_SPARK_Attribute_Reference): For
4161 attributes which return Universal_Integer, introduce a conversion
4162 to the expected type with the appropriate check flags set.
4163 * sem_res.adb (Resolve_Range): The higher bound can be in Typ's
4164 base type if the range is null. It may still be invalid if it
4165 is higher than the lower bound. This is checked later in the
4166 context in which the range appears.
4168 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com>
4170 * scos.ads: Introduce a constant to represent ignored
4171 dependencies in SCO_Unit_Table_Entry.
4173 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4175 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
4176 spaces from error messages.
4178 2017-01-23 Ed Schonberg <schonberg@adacore.com>
4180 * exp_ch3.adb (Check_Large_Modular_Array): New procedure,
4181 subsidiary to Expand_N_Object_ Declaration, to compute a guard on
4182 an object declaration for an array type with a modular index type
4183 with the size of Long_Long_Integer. Special processing is needed
4184 in this case to compute reliably the size of the object, and
4185 eventually to raise Storage_Error, when wrap-around arithmetic
4186 might compute a meangingless size for the object.
4188 2017-01-23 Justin Squirek <squirek@adacore.com>
4190 * a-wtenau.adb, par-endh.adb, sem_prag.adb,
4191 sem_type.adb: Code cleanups.
4193 2017-01-23 Bob Duff <duff@adacore.com>
4195 * sem_res.adb (Resolve_Call): In the part of the code where
4196 it is deciding whether to turn the call into an indexed
4197 component, avoid doing so if the call is to an instance of
4198 Unchecked_Conversion. Otherwise, the compiler turns it into an
4199 indexed component, and resolution of that turns it back into a
4200 function call, and so on, resulting in infinite recursion.
4201 * sem_util.adb (Needs_One_Actual): If the first formal has a
4202 default, then return False.
4204 2017-01-21 Eric Botcazou <ebotcazou@adacore.com>
4206 * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
4207 optimizations when the type is modular and the offsets are equal.
4209 2017-01-20 Thomas Quinot <quinot@adacore.com>
4211 * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
4214 2017-01-20 Nicolas Roche <roche@adacore.com>
4216 * terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
4218 2017-01-20 Bob Duff <duff@adacore.com>
4220 * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
4221 (etc) optimizations when the type is modular.
4223 2017-01-20 Yannick Moy <moy@adacore.com>
4225 * sem_ch6.adb (Move_Pragmas): move some pragmas,
4226 but copy the SPARK_Mode pragma instead of moving it.
4227 (Build_Subprogram_Declaration): Ensure that the generated spec
4228 and original body share the same SPARK_Pragma aspect/pragma.
4229 * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
4230 procedure to copy SPARK_Mode aspect.
4232 2017-01-20 Bob Duff <duff@adacore.com>
4234 * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
4236 * sem_ch13.adb (Resolve_Name): Enable setting the entity to
4237 Empty even in ASIS mode.
4239 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4241 * exp_ch9.adb: minor style fixes in comments.
4242 * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
4243 relative statement introduces an implicit dependency on
4244 Ada.Real_Time.Clock_Time.
4245 * sem_util.adb: Minor reformatting.
4247 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4249 * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
4250 must be treated as delayed aspect even if the expression is
4251 a literal, because the aspect affects the freezing and the
4252 elaboration of the object to which it applies.
4254 2017-01-20 Tristan Gingold <gingold@adacore.com>
4256 * s-osinte-vxworks.ads (Interrup_Range): New subtype.
4258 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4260 * lib-xref.adb (Generate_Reference): Do not warn about the
4261 presence of a pragma Unreferenced if the entity appears as the
4262 actual in a procedure call that does not come from source.
4264 2017-01-20 Pascal Obry <obry@adacore.com>
4266 * expect.c, terminals.c: Fix some warnings about unused variables.
4267 * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
4270 2017-01-20 Bob Duff <duff@adacore.com>
4272 * exp_attr.adb (Constrained): Apply an access check (check that
4273 the prefix is not null) when the prefix denotes an object of an
4274 access type; that is, when there is an implicit dereference.
4276 2017-01-20 Gary Dismukes <dismukes@adacore.com>
4278 * s-rident.ads (constant Profile_Info): Remove
4279 No_Calendar from GNAT_Extended_Ravenscar restrictions.
4281 2017-01-20 Tristan Gingold <gingold@adacore.com>
4283 * s-maccod.ads: Add pragma No_Elaboration_Code_All
4285 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4287 * ghost.adb (Mark_Ghost_Clause): New routine.
4288 (Prune_Node): Do not prune compilation unit nodes.
4289 (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
4290 This does not touch the node itself, but does prune all its fields.
4291 * ghost.ads (Mark_Ghost_Clause): New routine.
4292 * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
4293 package clause mentions Ghost and non-Ghost packages. Mark a
4294 use package clause as Ghost when it mentions a Ghost package.
4295 (Analyze_Use_Type): Emit an error when a use type clause mentions
4296 Ghost and non-Ghost types. Mark a use type clause as Ghost when
4297 it mentions a Ghost type.
4298 * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
4299 Ghost when it withs a Ghost unit.
4301 2017-01-20 Javier Miranda <miranda@adacore.com>
4303 * sem_res.adb (Resolve_Call): If a function call
4304 returns a limited view of a type and at the point of the call the
4305 function is not declared in the extended main unit then replace
4306 it with the non-limited view, which must be available. If the
4307 called function is in the extended main unit then no action is
4308 needed since the back-end handles this case.
4310 2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
4312 * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
4313 (Contains_Subprograms_Refs): ...this. Adjust comment
4314 for constants. (Is_Subp_Or_Const_Ref): Rename into...
4315 (Is_Subprogram_Ref): ...this.
4316 (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
4317 Has_Non_Subprograms_Referencer and adjust comment. Remove
4318 incorrect shortcut for package declarations and bodies.
4320 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4322 * sem_ch3.adb (Complete_Private_Subtype): If the scope of the
4323 base type differs from that of the completion and the private
4324 subtype is an itype (created for a constraint on an access
4325 type e.g.), set Delayed_Freeze on both to prevent out-of-scope
4328 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4330 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4331 When inheriting the SPARK_Mode of a prior expression function,
4332 look at the properly resolved entity rather than the initial
4333 candidate which may denote a homonym.
4335 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4337 * sem_prag.adb (Rewrite_Assertion_Kind): If the name is
4338 Precondition or Postcondition, and the context is pragma
4339 Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
4340 and suggest the standard names Assertion_Policy /Pre /Post
4343 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4345 * sem_ch10.adb, sem_cat.adb: Minor reformatting.
4347 2017-01-20 Javier Miranda <miranda@adacore.com>
4349 * sem_ch3.adb (Access_Type_Declaration): Protect access to the
4351 * sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
4352 * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
4355 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4357 * sem_ch13.adb (Analyze_Aspect_Specification, case
4358 Dynamic_Predicate): If the entity E is a subtype that inherits
4359 a static predicate for its parent P,, the inherited and the
4360 new predicate combine in the generated predicate function,
4361 and E only has a dynamic predicate.
4363 2017-01-20 Tristan Gingold <gingold@adacore.com>
4365 * s-boustr.ads, s-boustr.adb: New package.
4366 * Makefile.rtl: Add s-boustr.
4368 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4370 * inline.adb (Process_Formals): Qualify the
4371 expression of a return statement when it yields a universal type.
4373 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4375 * freeze.adb (Freeze_All): Freeze the default
4376 expressions of all eligible formal parameters that appear in
4377 entries, entry families, and protected subprograms.
4379 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4381 * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
4382 for illegal inherited Implicit_Dereference aspects with renamed
4385 2017-01-20 Javier Miranda <miranda@adacore.com>
4387 * debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
4388 * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
4389 * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
4390 (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
4391 Set_Prev, Tree_Read): Adding assertion.
4392 * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
4393 * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
4394 (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
4395 Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
4396 Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
4397 Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
4398 Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
4399 Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
4400 Set_ListN_With_Parent): Adding assertion.
4402 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4404 * sem_prag.adb (Process_Convention): Diagnose properly a pragma
4405 import that applies to several homograph subprograms. when one
4406 of them is declared by a subprogram body.
4408 2017-01-20 Justin Squirek <squirek@adacore.com>
4410 * exp_ch6.adb (Expand_Call): Remove optimization
4411 that nulls out calls to null procedures.
4413 2017-01-20 Yannick Moy <moy@adacore.com>
4415 * inline.adb (Expand_Inlined_Call): Keep more
4416 precise type of actual for inlining whenever possible. In
4417 particular, do not switch to the formal type in GNATprove mode in
4418 some case where the GNAT backend might require it for visibility.
4420 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4422 * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
4423 aspect Implicit_Dereference can be inherited by a full view if
4424 the partial view has no discriminants, because there is no way
4425 to apply the aspect to the partial view.
4426 (Build_Derived_Record_Type): If derived type renames discriminants
4427 of the parent, the new discriminant inherits the aspect from
4429 * sem_ch4.adb (Analyze_Call): Handle properly a parameterless
4430 call through an access discriminant designating a subprogram.
4431 * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
4432 properly a parameterless call through an access discriminant on
4433 the left-hand side of an assignment.
4434 * sem_res.adb (resolve): If an interpreation involves a
4435 discriminant with an implicit dereference and the expression is an
4436 entity, resolution takes place later in the appropriate routine.
4437 * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
4438 access discriminants that designate a subprogram type.
4440 2017-01-20 Pascal Obry <obry@adacore.com>
4442 * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
4444 2017-01-20 Yannick Moy <moy@adacore.com>
4446 * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
4447 on implicitly with'ed units in GNATprove mode.
4448 * sinfo.ads (Implicit_With): Document use of flag for implicitly
4449 with'ed units in GNATprove mode.
4451 2017-01-20 Ed Schonberg <schonberg@adacore.com>
4453 * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
4454 unit Do not report an error on a non-static entity that appears
4455 in the context of a spec expression, such as an aspect expression.
4457 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
4459 * einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
4460 (Is_Underlying_Full_View): New routine.
4461 (Set_Is_Underlying_Full_View): New routine.
4462 (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
4463 * einfo.ads Add new attribute Is_Underlying_Full_View.
4464 (Is_Underlying_Full_View): New routine along with pragma Inline.
4465 (Set_Is_Underlying_Full_View): New routine along with pragma Inline.
4466 * exp_util.adb (Build_DIC_Procedure_Body): Do not consider
4467 class-wide types and underlying full views. The first subtype
4468 is used as the working type for all Itypes, not just array base types.
4469 (Build_DIC_Procedure_Declaration): Do not consider
4470 class-wide types and underlying full views. The first subtype
4471 is used as the working type for all Itypes, not just array
4473 * freeze.adb (Freeze_Entity): Inherit the freeze node of a full
4474 view or an underlying full view without clobbering the attributes
4475 of a previous freeze node.
4476 (Inherit_Freeze_Node): New routine.
4477 * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
4479 (Build_Underlying_Full_View): Mark an underlying full view as such.
4480 * sem_ch7.adb (Install_Private_Declarations): Mark an underlying
4483 2017-01-20 Yannick Moy <moy@adacore.com>
4485 * sinfo.ads: Document lack of Do_Division_Check flag
4486 on float exponentiation.
4488 2017-01-19 Javier Miranda <miranda@adacore.com>
4490 * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the
4491 identifier attribute of a block-statement node. Required to avoid
4492 assertion failure when building the new containers library.
4494 2017-01-19 Bob Duff <duff@adacore.com>
4496 * exp_ch3.adb: Update comment.
4498 2017-01-19 Vincent Celier <celier@adacore.com>
4500 * gprep.adb (Gnatprep): Parse the definition file without
4501 "replace in comments" even when switch -C is used.
4503 2017-01-19 Justin Squirek <squirek@adacore.com>
4505 * exp_ch9.adb (Is_Pure_Barrier): Create function
4506 Is_Count_Attribute to identify an expansion of the 'Count
4509 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4511 * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the
4512 statements within an element iterator loop are only analyzed
4513 agter the loop is rewritten. Within a generic the analysis must
4514 be performed in any case to complete name capture.
4516 2017-01-19 Bob Duff <duff@adacore.com>
4518 * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first,
4519 before checking for unrecognized pragmas.
4520 Initialize Pname on its declarations; that's always good style.
4522 2017-01-19 Claire Dross <dross@adacore.com>
4524 * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the
4525 body into the tree for GNATprove by setting its Parent field. The
4526 components invariants of composite types are not checked by
4527 the composite type's invariant procedure in GNATprove mode.
4528 (Build_Invariant_Procedure_Declaration): Semi-insert the
4529 declaration into the tree for GNATprove by setting its Parent
4531 * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add
4532 the component invariants to the array type invariant procedure
4533 so that the procedure can be used to check the array type
4535 (Freeze_Record_Type): In GNATprove mode, do
4536 not add the component invariants to the record type invariant
4537 procedure so that the procedure can be used to check the record
4538 type invariants if any.
4540 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4542 * lib-xref-spark_specific.adb: Minor reformatting.
4543 * exp_ch7.adb (Add_Parent_Invariants): Do not process array types.
4545 2017-01-19 Javier Miranda <miranda@adacore.com>
4547 * exp_aggr.adb (Pass_Aggregate_To_Back_End): Renamed as
4548 Build_Back_End_Aggregate.
4549 (Generate_Aggregate_For_Derived_Type): Code cleanup.
4550 (Prepend_Stored_Values): Code cleanup.
4552 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4554 * sem_ch6.adb (Analyze_Expression_Function): Check for an
4555 incomplete return type after attempting to freeze it, so that
4556 other freeze actiona are generated in the proper order.
4558 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4560 * sem_aggr.adb (Resolve_Aggregate): If the type is a string
4561 type, ie. a type whose component is a character type, and the
4562 aggregate is positional, do not convert into a string literal
4563 if the index type is not an integer type, because the original
4564 type may be required in an enclosing operation.
4566 2017-01-19 Bob Duff <duff@adacore.com>
4568 * binde.adb, debug.adb: Enable new elaboration order algorithm
4569 by default. -dp switch reverts to the old algorithm.
4571 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4573 * sem_ch3.adb Add with and use clauses for Exp_Ch7.
4574 (Analyze_Declarations): Create the DIC and Invariant
4575 procedure bodies s after all freezing has taken place.
4576 (Build_Assertion_Bodies): New routine.
4577 * sem_ch7.adb Remove the with and use clauses for Exp_Ch7
4579 (Analyze_Package_Specification): Remove the
4580 generation of the DIC and Invariant procedure bodies. This is
4581 now done by Analyze_Declarations.
4582 * sem_disp.adb (Check_Dispatching_Operation): DIC and Invariant
4583 procedures are never treated as primitives.
4585 2017-01-19 Yannick Moy <moy@adacore.com>
4587 * frontend.adb: Analyze inlined bodies and check elaboration
4588 rules in GNATprove mode too.
4589 * sem_elab.adb (Delay_Element): Add Boolean component to save
4590 indication that call is in SPARK code. (Check_Elab_Calls):
4591 Check elaboration rules in GNATprove mode, and correctly set
4592 the current value of SPARK_Mode.
4593 * lib-xref-spark_specific.adb
4594 (Add_SPARK_Xrefs): Simplify iteration over dereferences.
4596 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4598 * exp_ch4.adb (Expand_Concatenate): Do no enable overflow
4599 checks on the expression for the high bound of concatenation
4600 when checks are disabled, to suppress warnings about potential
4601 constraint errors in restricted runtimes.
4603 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4605 * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Mark the
4606 representation-to-position function as inlined.
4607 * sem_cat.adb (Set_Categorization_From_Scope): Do not modify
4608 the purity of an internally generated entity if it has been
4609 explicitly marked as pure for optimization purposes.
4610 * exp_aggr.adb: Minor reformatting.
4612 2017-01-19 Javier Miranda <miranda@adacore.com>
4614 * exp_ch6.adb (Expand_Call): Remove side effects on
4615 actuals that are allocators with qualified expression since the
4616 initialization of the object is performed by means of individual
4617 statements (and hence it must be done before the call).
4619 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4621 * sem_ch3.adb (Analyze_Declarations): Minor reformatting.
4622 (Build_Derived_Enumeration_Type): If the derived type inherits a
4623 dynamic predicate from its parent, the bounds of the type must
4624 freeze because an explicit constraint is constructed for the
4625 type and the corresponding range is elaborated now.
4627 2017-01-19 Arnaud Charlet <charlet@adacore.com>
4629 * sem_attr.ads: minor fix of inconsistent casing in comment
4630 * lib-writ.ads: minor align comments in columns
4631 * sem_ch3.adb: Minor reformatting.
4632 * spark_xrefs.ads: minor fix typo in SPARK-related comment
4633 * table.ads: minor style fix in comment
4634 * lib-xref-spark_specific.adb
4635 (Add_SPARK_Xrefs): simplify processing of SPARK cross-references.
4636 * sem_ch12.adb: minor whitespace fix
4637 * freeze.adb: Add comment.
4638 * sem_util.adb (Unique_Name): for instances of
4639 generic subprograms ignore the name of the wrapper package.
4641 2017-01-19 Javier Miranda <miranda@adacore.com>
4643 * exp_aggr.adb (Resolve_Record_Aggregate):
4644 Factorize code needed for aggregates of limited and unlimited
4645 types in a new routine.
4646 (Pass_Aggregate_To_Back_End): New subprogram.
4648 2017-01-19 Yannick Moy <moy@adacore.com>
4650 * sinfo.adb (Pragma_Name): Only access up to Last_Pair of Pragma_Map.
4652 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4654 * sem_ch4.ads, sem_ch4.adb (Try_Object_Operation): Make subprogram
4655 public, for use elsewhere.
4656 * sem_ch6.adb (Analyze_Procedure_Call): In SPARK_Mode and within
4657 an Inlined_body, recognize a call that uses object notation
4658 and has not been rewritten as a regular call because regular
4659 expansion has not taken place.
4661 2017-01-19 Bob Duff <duff@adacore.com>
4663 * checks.adb (Apply_Type_Conversion_Checks): Disable small optimization
4664 in case of generic formal discrete types, because it causes crashes in
4665 the compiler when built with assertions on.
4667 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4669 * lib-xref-spark_specific.adb, sem_util.adb, sem_util.ads,
4670 sem_ch4.adb, sem_ch8.adb, lib-xref.ads: Minor reformatting.
4672 2017-01-19 Bob Duff <duff@adacore.com>
4674 * bcheck.adb (Check_Consistent_Dynamic_Elaboration_Checking):
4675 Increment Warnings_Detected. It was decrementing, which is
4676 wrong since we just issued a warning message.
4677 * binderr.ads (Errors_Detected, Warnings_Detected): Declare
4678 these variables to be of subtype Nat instead of Int, because
4679 they should never be negative.
4681 2017-01-19 Javier Miranda <miranda@adacore.com>
4683 * contracts.adb (Build_Postconditions_Procedure): Replace
4684 Generate_C_Code by Modify_Tree_For_C.
4685 * exp_aggr.adb (Build_Record_Aggr_Code, Expand_Array_Aggregate):
4686 Replace Generate_C_Code by Modify_Tree_For_C.
4687 * exp_attr.adb (Float_Valid, Is_GCC_Target): Replace Generate_C_Code by
4689 * exp_ch11.adb (Expand_N_Exception_Declaration): Replace
4690 Generate_C_Code by Modify_Tree_For_C.
4691 * exp_ch4.adb (Expand_Allocator_Expression): Replace
4692 Generate_C_Code by Modify_Tree_For_C.
4693 * exp_dbug.adb (Qualify_Entity_Name): Replace Generate_C_Code
4694 by Modify_Tree_For_C.
4695 * exp_util.adb (Remove_Side_Effects, Side_Effect_Free): Replace
4696 Generate_C_Code by Modify_Tree_For_C.
4697 * sem_res.adb (Resolve_Type_Conversion): Replace Generate_C_Code
4698 by Modify_Tree_For_C.
4699 * sinfo.ads (Modify_Tree_For_C): Adding documentation.
4701 2017-01-19 Javier Miranda <miranda@adacore.com>
4703 * sem_util.ads, sem_util.adb (Expression_Of_Expression_Function): New
4705 (Is_Inlinable_Expression_Function): New subprogram.
4706 * exp_ch6.ads, exp_ch6.adb (Expression_Of_Expression_Function): Moved
4708 (Is_Inlinable_Expression_Function): Moved to Sem_Util.
4710 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4712 * sem_ch4.adb (Diagnose_Call): Improve error message when a
4713 selected component has a prefix that might be interpreted
4714 as a parameterless function call, but none of the candidate
4715 interpretations is parameterless, and there is a hidden homonym
4716 of the prefix that is a package.
4717 * sem_ch8.adb (Find_Selected_Component): If the prefix might be
4718 interpreted as a parameterless function call and its analysis
4719 fails, do not call Analyze_Selected_Component.
4721 2017-01-19 Steve Baird <baird@adacore.com>
4723 * sem_util.ads: Add new Use_Full_View Boolean parameter to
4725 * sem_util.adb (Get_Index_Bounds): replace calls to Scalar_Range with
4726 calls to a newly-defined Scalar_Range_Of_Right_View function.
4728 2017-01-19 Arnaud Charlet <charlet@adacore.com>
4730 * gnat1drv.adb: minor fix of unbalanced parens in comment
4731 * lib-xref.ads (Traverse_Compilation_Unit): declaration moved
4732 to visible part of the package to allow re-use in GNATprove.
4733 * lib-xref-spark_specific.adb (Traverse_Stub): routine refactored
4734 from repeated code of Traverse_Compilation_Unit.
4735 (Traverse_Declaration_Or_Statement): fixed detection of
4736 generic subprograms and packages; also, iteration over case
4737 statement alternatives rewritten to avoid testing if the first
4738 alternative is present (since it must be present due to Ada
4739 syntax restrictions).
4741 2017-01-19 Hristian Kirtchev <kirtchev@adacore.com>
4743 * exp_ch6.adb (Expand_N_Subprogram_Body): Mark the spec as
4744 returning by reference not just for subprogram body stubs,
4745 but for all subprogram cases.
4746 * sem_util.adb: Code reformatting.
4747 (Requires_Transient_Scope): Update the call to Results_Differ.
4748 (Results_Differ): Update the parameter profile and the associated
4751 2017-01-19 Ed Schonberg <schonberg@adacore.com>
4753 * sem_dim.adb (Analyze_Dimension): Analyze object declaration and
4754 identifier nodes that do not come from source, to handle properly
4755 dimensionality check within an inlined body which inclddes both
4756 original operands and rewritten operands. This removes spurious
4757 dimensionality errors in the presence of front-end inlining,
4758 as well as in SPARK mode.
4760 2017-01-16 Jakub Jelinek <jakub@redhat.com>
4763 * gcc-interface/lang.opt (gant, gnatO, gnat): Add Driver flag.
4765 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4767 * gcc-interface/Makefile.in (SPARC/Solaris): Fix typo.
4769 2017-01-13 Arnaud Charlet <charlet@adacore.com>
4771 * doc/gnat_ugn/getting_started_with_gnat.rst,
4772 doc/gnat_ugn/inline_assembler.rst,
4773 doc/gnat_ugn/building_executable_programs_with_gnat.rst,
4774 doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
4775 doc/gnat_ugn/about_this_guide.rst,
4776 doc/gnat_ugn/platform_specific_information.rst,
4777 doc/gnat_ugn/example_of_binder_output.rst,
4778 doc/gnat_ugn/gnat_and_program_execution.rst,
4779 doc/gnat_ugn/gnat_utility_programs.rst,
4780 doc/gnat_ugn/the_gnat_compilation_model.rst,
4781 doc/gnat_rm/implementation_defined_attributes.rst,
4782 doc/gnat_rm/compatibility_and_porting_guide.rst,
4783 doc/gnat_rm/standard_library_routines.rst,
4784 doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
4785 doc/gnat_rm/implementation_defined_pragmas.rst,
4786 doc/gnat_rm/the_gnat_library.rst,
4787 doc/gnat_rm/obsolescent_features.rst,
4788 doc/gnat_rm/about_this_guide.rst,
4789 doc/gnat_rm/the_implementation_of_standard_i_o.rst,
4790 doc/gnat_rm/implementation_of_ada_2012_features.rst,
4791 doc/gnat_rm/interfacing_to_other_languages.rst,
4792 doc/gnat_rm/implementation_defined_aspects.rst,
4793 doc/gnat_rm.rst: Update documentation.
4794 * gnat_rm.texi, gnat_ugn.texi: Regenerated.
4796 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4798 * einfo.ads: minor grammar fixes in comment of Normalized_Position_Max.
4799 * scil_ll.adb: Minor style fix in comment.
4800 * sem_ch8.adb (Analyze_Expanded_Name): Perform dimension analysis
4801 even if entity is already set, because the node may be renalyzed
4802 after inlining transformations.
4804 2017-01-13 Javier Miranda <miranda@adacore.com>
4806 * sem_res.adb (Resolve_Call): Do not establish a transient scope
4807 for a call to inlinable expression function (since the call will
4808 be replaced by its returned object).
4809 * exp_ch6.ads (Is_Inlinable_Expression_Function): New subprogram.
4810 * exp_ch6.adb (Expression_Of_Expression_Function): New subprogram.
4811 (Expand_Call): For inlinable expression function call replace the
4812 call by its returned object.
4813 (Is_Inlinable_Expression_Function): New subprogram.
4815 2017-01-13 Gary Dismukes <dismukes@adacore.com>
4817 * checks.adb: Minor typo fix and reformatting.
4819 2017-01-13 Javier Miranda <miranda@adacore.com>
4821 * contracts.adb (Contract_Only_Subprograms): Remove formal.
4822 (Copy_Original_Specification): Removed.
4823 (Skip_Contract_Only_Subprogram): Move here checks previously
4824 located in the caller of this routine (to leave the code more clean).
4825 (Build_Contract_Only_Subprogram): Code cleanup.
4826 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): Removed.
4827 (Get_Contract_Only_Missing_Body_Name): Removed.
4829 2017-01-13 Javier Miranda <miranda@adacore.com>
4831 * sem_ch6.adb (Cloned_Expression): New subprogram.
4832 (Freeze_Expr_Types): Complete previous patch since the expression
4833 of an expression-function may have iterators and loops with
4834 defining identifiers which, as part of the preanalysis of the
4835 expression, may be left decorated with itypes that will not be
4836 available in the tree passed to the backend.
4838 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4840 * checks.adb (Apply_Type_Conversion_Checks): Optimize a type
4841 conversion to Integer of an expression that is an attribute
4842 reference 'Pos on an enumeration type.
4844 2017-01-13 Bob Duff <duff@adacore.com>
4846 * atree.ads: Minor comment fix.
4848 2017-01-13 Justin Squirek <squirek@adacore.com>
4850 * sem_ch6.adb (Check_Aggregate_Accessibility): Ignore function
4851 calls in accessibility check on return statement.
4853 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
4855 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
4856 Ensure that the input body is a subprogram body before trying to
4857 determine whether it denoted an expression function. Note that
4858 subprogram body stubs cannot denote expression functions.
4860 2017-01-13 Gary Dismukes <dismukes@adacore.com>
4862 * bindgen.adb, sem_ch6.adb, binde.adb, exp_ch3.adb: Minor reformatting
4865 2017-01-13 Javier Miranda <miranda@adacore.com>
4867 * einfo.ads (Component_Bit_Offset): Fix documentation.
4868 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
4869 on record holes for components with unknown compile-time offsets.
4871 2017-01-13 Bob Duff <duff@adacore.com>
4873 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
4874 * g-locfil.ads: Minor comment fix.
4876 2017-01-13 Bob Duff <duff@adacore.com>
4878 * binde.adb (Elab_New): New elaboration order algorithm
4879 that is expected to cause fewer ABE issues. This is a work in
4880 progress. The new algorithm is currently disabled, and can be
4881 enable by the -dp switch, or by modifying the Do_Old and Do_New
4882 etc. flags and rebuilding. Experimental code is included to
4883 compare the results of the old and new algorithms.
4884 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
4885 can have multiple of these tables, so the old and new algorithms
4887 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
4888 parameter of type array. This avoids the global variable, and
4889 allows bounds checking (which is normally defeated by the tables
4890 packages). It also ensures that the Elab_Order is read-only
4892 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
4893 subprograms that need it, as above.
4894 * debug.adb: Document new -dp switch. Modify doc of old -do
4896 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
4897 and Bindgen. Move writing of closure (-R and -Ra switches)
4898 to Binde; that's more convenient.
4900 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4902 * sem_ch6.adb (Analyze_Expression_Function): If the expression
4903 function is a completion, all entities referenced in the
4904 expression are frozen. As a consequence, a reference to an
4905 uncompleted private type from an enclosing scope is illegal.
4907 2017-01-13 Javier Miranda <miranda@adacore.com>
4909 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
4910 (Analyze_Subprogram_Body_Helper): At the occurrence of an
4911 expression function declaration that is a completion, its
4912 expression causes freezing (AI12-0103).
4914 2017-01-13 Vadim Godunko <godunko@adacore.com>
4916 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
4917 Reference functions of Ada.Containers.Indefinite_Holders.
4919 2017-01-13 Bob Duff <duff@adacore.com>
4921 * s-os_lib.ads: Minor comment fixes.
4923 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
4925 * exp_ch3.adb (Default_Initialize_Object): Do not default
4926 initialize an object when it is of a task type and restriction
4927 No_Tasking is in effect because the initialization is obsolete.
4928 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
4929 restriction No_Tasking is in effect.
4930 (Build_Master_Renaming): Do not rename a master when restriction
4931 No_Tasking is in effect.
4933 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4935 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
4936 the legality of An others clause applies as well to a choice in
4937 an Iterated_component_ association.
4938 (Resolve_Iterated_Component_Association): An others choice
4940 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
4941 Iterated_Component_Association is not static.
4943 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
4945 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
4946 control is passed to the expresion handler before the new mode
4948 * sem_ch12.adb (Analyze_Package_Instantiation,
4949 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
4950 in case control is passed to the expresion handler before the
4953 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
4955 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
4956 exp_aggr.adb: Minor reformatting.
4958 2017-01-13 Gary Dismukes <dismukes@adacore.com>
4960 * inline.adb: Minor reformatting and typo fix.
4962 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4964 * sem_util.ads, sem_util.adb (Choice_List): Move function here
4965 from sem_aggr.adb, for use elsewhere.
4966 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
4967 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
4968 Iterated_Component_Present.
4969 * exp_aggr.adb: Use Choice_List throughout, to handle
4970 Iterated_Component_Associations.
4971 (Gen_Loop): Generate proper loop for an
4972 Iterated_Component_Association: loop variable has the identifier
4973 of the original association. Generate a loop even for a single
4974 component choice, in order to make loop parameter visible in
4976 (Flatten): An Iterated_Component_Association is not static.
4978 2017-01-13 Yannick Moy <moy@adacore.com>
4980 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
4981 float exponentiation for statically known small negative values
4982 is the reciprocal of the exponentiation for the opposite value
4984 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
4985 Ensure that the value of float exponentiation for negative values
4986 is the reciprocal of the exponentiation for the opposite value
4988 * inline.adb (Expand_Inlined_Call): Fix the count
4989 for the number of generated gotos.
4991 2017-01-13 Yannick Moy <moy@adacore.com>
4993 * inline.adb: Code cleanup.
4994 * sem_util.adb (Is_OK_Volatile_Context): Add
4995 expression in delay statement as OK for volatile context.
4997 2017-01-13 Ed Schonberg <schonberg@adacore.com>
4999 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
5000 mode a choice that is a subtype with a static predicate is
5001 replaced by the values it covers. This transformation must not
5002 be performed in ASIS mode, to preserve the source for analysis.
5004 2017-01-13 Justin Squirek <squirek@adacore.com>
5006 * nlists.ads: Correct minor typo.
5008 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5010 * sem_ch13.adb: Minor reformatting and typo fix.
5012 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5014 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
5015 Iterated_Component_Association is a named association in an
5017 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
5018 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
5019 and resolve the discrete choices and the expression of the
5021 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
5022 Loop_Actions and Box_Present are attributes of
5023 N_Iterated_Component_Association nodes. Box_Present is always
5025 * sprint.adb (Sprint_Node): An Iterated_Component_Association
5026 has a Discrete_Choices list, as specified in the RM. A
5027 Component_Association for aggregate uses instead a Choices list.
5028 We have to live with this small inconsistency because the new
5029 construct also has a defining identifier, and there is no way
5030 to merge the two node structures.
5032 2017-01-13 Yannick Moy <moy@adacore.com>
5034 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
5035 list of pragmas to remove. Remove pragmas from the list of
5036 statements in the body to inline.
5037 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
5039 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5041 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
5042 Analyze_Declarations, to analyze and resolve the expressions of
5043 aspect specifications in the current declarative list, so that
5044 the expressions have proper entity and type info. This is needed
5045 for ASIS when there is no subsequent expansion to generate this
5046 semantic information.
5047 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
5048 original expression, to suppress cascaded errors when expression
5049 has been constant-folded.
5050 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
5051 ASIS mode, because there is no subsequent expansion to decorate
5054 2017-01-13 Yannick Moy <moy@adacore.com>
5056 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
5057 New function to detect when a call may be inlined or not in
5059 (Expand_Inlined_Call): Ensure that a temporary
5060 is always created in the cases where a type conversion may be
5061 needed on an input parameter in GNATprove mode, so that GNATprove
5062 sees the check to perform.
5063 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
5064 when not applicable due to actual requiring type conversion
5065 with possible check but no temporary value can be copied for
5066 GNATprove to see the check.
5068 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5070 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
5071 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
5072 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
5073 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
5074 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
5075 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
5076 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
5077 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
5078 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
5079 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
5080 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
5081 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
5082 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
5083 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
5084 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
5085 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
5086 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
5087 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
5088 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
5089 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
5090 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
5091 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
5092 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
5093 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
5094 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
5095 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
5096 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
5097 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
5098 statements to reflect the new style for case alternatives. Various
5099 code clean up and reformatting.
5101 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5103 * exp_util.adb: Minor reformatting.
5105 2017-01-13 Yannick Moy <moy@adacore.com>
5107 * exp_spark.adb: Code cleanup.
5108 * sem_ch9.adb (Analyze_Delay_Until): Resolve
5109 expression so that calls are identified as such inside delay
5112 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5114 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
5115 * par-ch3.adb (P_Discrete_Choice_List): An
5116 Iterated_Component_Association is an array aggregate component.
5117 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
5118 (Is_Quantified_Expression): New function that performs a lookahead
5119 to distinguish quantified expressions from iterated component
5121 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
5123 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
5124 * sem.adb (Analyze): Handle Iterated_Component_Association.
5125 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
5126 component associations.
5127 * sinfo.ads, sinfo.adb: Entries for for
5128 N_Iterated_Component_Association and its fields.
5129 * sprint.adb (Sprint_Node_Actual): Handle
5130 N_Iterated_Component_Association.
5132 2017-01-13 Justin Squirek <squirek@adacore.com>
5134 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
5135 of the style check until after preanalysis of acutals.
5137 2017-01-13 Yannick Moy <moy@adacore.com>
5139 * sem_ch13.adb: Minor reformatting.
5140 * par-ch11.adb: minor style fix in whitespace
5141 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
5142 reduced to Add_Artificial_ALI_File; style fix in declaration of
5143 Text; grammar fix in comment.
5144 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
5145 * freeze.adb: Cleanup to pass pragma instead of
5147 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
5148 replace System'To_Address by equivalent call.
5150 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5152 * bindusg.adb: Improve usage output for -f switch.
5154 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5156 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
5159 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5161 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
5162 treat comparisons on strings as legal in a Static_Predicate.
5163 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
5164 a function call that is the expansion of a string comparison.The
5165 function call is built when compiling the corresponding predicate
5166 function, but the expression has been found legal as a static
5167 predicate during earlier analysis.
5168 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
5169 properly a function call that is the expansion of a string
5170 comparison operation, in order to recover the Static_Predicate
5171 expression and apply it to a static argument when needed.
5173 2017-01-13 Tristan Gingold <gingold@adacore.com>
5175 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
5176 (Open_Read): Re-implement using Open_Read_No_Exception.
5177 (Open_Write): Raise exception in case of error.
5178 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
5179 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
5181 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
5183 2017-01-13 Yannick Moy <moy@adacore.com>
5185 * checks.adb: Code cleanup.
5187 2017-01-13 Yannick Moy <moy@adacore.com>
5189 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
5190 expression instead of unanalyzed aspect expression for checking
5191 the validity of inheriting an operation. Also copy the expression
5192 being passing it to Build_Class_Wide_Expression, as this call
5193 modifies its argument.
5194 * sem_util.ads Fix comment to reference correct function name
5197 2017-01-13 Javier Miranda <miranda@adacore.com>
5199 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
5200 when we propagate information about the indexes back to the original
5201 indexing mode and the prefix of the index is a function call, do not
5202 remove any parameter from such call.
5204 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5206 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
5207 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
5208 a build-in-place function whose result type is tagged.
5210 2017-01-13 Yannick Moy <moy@adacore.com>
5212 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5213 Do not generate a wrapper when the only candidate is a class-wide
5215 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
5216 inside a generic context.
5218 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5220 * exp_util.adb (Add_Inherited_Tagged_DIC):
5221 Pass the object parameters of both the parent and the derived
5222 type DIC procedure to the reference replacement circuitry.
5223 (Find_DIC_Type): Modify the circuitry to present the partial
5224 view of a private type in case the private type defines its own
5226 (Replace_Object_And_Primitive_References): Add two
5227 optional formal parameters. Update the comment on usage. Update
5228 the replacement of references to object parameters.
5230 2017-01-13 Gary Dismukes <dismukes@adacore.com>
5232 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
5234 2017-01-13 Ed Schonberg <schonberg@adacore.com>
5236 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
5237 an out parameter that is a type conversion, independently of th
5238 range check that may apply to the expression of the conversion,
5239 for use in GNATProve.
5241 2017-01-13 Yannick Moy <moy@adacore.com>
5243 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
5244 GNATprove_Mode here to Frontend.
5245 * frontend.adb (Frontend): Move the implicit with for System
5246 in GNATprove_Mode here as it ismore correct this way; the old
5247 place only worked by chance, since there were no overloaded names.
5248 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
5249 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
5250 four attributes identified in SRM 9(18), add an implicit with
5251 to Ada.Task_Identification.
5252 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
5253 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
5255 * checks.adb (Apply_Discriminant_Check,
5256 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
5257 In GNATprove mode, we do not apply the checks, but we still
5258 analyze the expression to possibly issue errors on SPARK
5259 code when a run-time error can be detected at compile time.
5260 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
5263 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5265 * expander.adb (Expand): Add a warning about using return
5266 statements in Ghost management code.
5267 * exp_ch3.adb (Freeze_Type): Add a warning about using return
5268 statements in Ghost management code.
5269 * exp_ch7.adb (Build_Invariant_Procedure_Body,
5270 Build_Invariant_Procedure_Declaration): Add a warning about
5271 using return statements in Ghost management code.
5272 * exp_disp.adb (Make_DT): Add a warning about using return
5273 statements in Ghost management code.
5274 * exp_util.adb (Build_DIC_Procedure_Body,
5275 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
5276 warning about using return statements in Ghost management code.
5277 * freeze.adb (Freeze_Entity): Add a warning about using return
5278 statements in Ghost management code.
5279 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
5280 statements in Ghost management code.
5281 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
5282 a warning about using return statements in Ghost management code.
5283 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
5284 return statements in Ghost management code.
5285 * sem_ch6.adb (Analyze_Procedure_Call,
5286 Analyze_Subprogram_Body_Helper): Add a warning about using return
5287 statements in Ghost management code.
5288 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
5289 using return statements in Ghost management code.
5290 * sem_ch12.adb (Analyze_Package_Instantiation,
5291 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
5292 Instantiate_Subprogram_Body): Add a warning about using return
5293 statements in Ghost management code.
5294 * sem_ch13.adb (Build_Predicate_Functions,
5295 Build_Predicate_Function_Declarations): Add a warning about
5296 using return statements in Ghost management code.
5297 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
5298 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
5299 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
5300 using return statements in Ghost management code.
5302 2017-01-13 Tristan Gingold <gingold@adacore.com>
5304 * s-mmosin-mingw.adb: Fix pragma import.
5306 2017-01-13 Arnaud Charlet <charlet@adacore.com>
5308 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
5311 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
5313 * atree.adb (Allocate_Initialize_Node): A newly created node is
5314 no longer marked as Ghost at this level.
5315 (Mark_New_Ghost_Node): New routine.
5316 (New_Copy): Mark the copy as Ghost.
5317 (New_Entity): Mark the entity as Ghost.
5318 (New_Node): Mark the node as Ghost.
5319 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
5320 apply to unanalyzed entities.
5321 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
5323 (Set_Is_Checked_Ghost_Entity): This attribute now
5324 applies to all entities as well as unanalyzed entities.
5325 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
5326 all entities as well as unanalyzed entities.
5327 * expander.adb Add with and use clauses for Ghost.
5328 (Expand): Install and revert the Ghost region associated with the node
5330 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
5331 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
5332 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
5333 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
5334 (Freeze_Type): Install and revert the Ghost region associated
5335 with the type being frozen.
5336 * exp_ch5.adb Remove with and use clauses for Ghost.
5337 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
5338 * exp_ch6.adb Remove with and use clauses for Ghost.
5339 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
5340 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
5341 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
5342 Ghost region of the working type.
5343 (Build_Invariant_Procedure_Declaration): Install and revert
5344 the Ghost region of the working type.
5345 (Expand_N_Package_Body): Remove all Ghost-related code.
5346 * exp_ch8.adb Remove with and use clauses for Ghost.
5347 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
5349 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
5350 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
5351 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
5353 * exp_ch13.adb Remove with and use clauses for Ghost.
5354 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
5355 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
5356 the tagged type. Move the generation of various entities within
5357 the Ghost region of the type.
5358 * exp_prag.adb Remove with and use clauses for Ghost.
5359 (Expand_Pragma_Check): Remove all Ghost-related code.
5360 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
5361 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
5362 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
5363 * exp_util.adb (Build_DIC_Procedure_Body): Install
5364 and revert the Ghost region of the working types.
5365 (Build_DIC_Procedure_Declaration): Install and revert the
5366 Ghost region of the working type.
5367 (Make_Invariant_Call): Install and revert the Ghost region of the
5369 (Make_Predicate_Call): Reimplemented. Install and revert the
5370 Ghost region of the associated type.
5371 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
5372 of the entity being frozen.
5373 (New_Freeze_Node): Removed.
5374 * ghost.adb Remove with and use clauses for Opt.
5375 (Check_Ghost_Completion): Update the parameter profile
5376 and all references to formal parameters.
5377 (Ghost_Entity): Update the comment on usage.
5378 (Install_Ghost_Mode): New routines.
5379 (Is_Ghost_Assignment): New routine.
5380 (Is_Ghost_Declaration): New routine.
5381 (Is_Ghost_Pragma): New routine.
5382 (Is_Ghost_Procedure_Call): New routine.
5383 (Is_Ghost_Renaming): Removed.
5384 (Is_OK_Declaration): Reimplemented.
5385 (Is_OK_Pragma): Reimplemented.
5386 (Is_OK_Statement): Reimplemented.
5387 (Is_Subject_To_Ghost): Update the comment on usage.
5388 (Mark_And_Set_Ghost_Assignment): New routine.
5389 (Mark_And_Set_Ghost_Body): New routine.
5390 (Mark_And_Set_Ghost_Completion): New routine.
5391 (Mark_And_Set_Ghost_Declaration): New routine.
5392 (Mark_And_Set_Ghost_Instantiation): New routine.
5393 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5394 (Mark_Full_View_As_Ghost): Removed.
5395 (Mark_Ghost_Declaration_Or_Body): New routine.
5396 (Mark_Ghost_Pragma): New routine.
5397 (Mark_Ghost_Renaming): New routine.
5398 (Mark_Pragma_As_Ghost): Removed.
5399 (Mark_Renaming_As_Ghost): Removed.
5400 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
5401 (Prune_Node): Freeze nodes no longer need special pruning, they
5402 are processed by the general ignored Ghost code mechanism.
5403 (Restore_Ghost_Mode): New routine.
5404 (Set_Ghost_Mode): Reimplemented.
5405 (Set_Ghost_Mode_From_Entity): Removed.
5406 * ghost.ads Add with and use clauses for Ghost.
5407 (Check_Ghost_Completion): Update the parameter profile
5408 along with the comment on usage.
5409 (Install_Ghost_Mode): New routine.
5410 (Is_Ghost_Assignment): New routine.
5411 (Is_Ghost_Declaration): New routine.
5412 (Is_Ghost_Pragma): New routine.
5413 (Is_Ghost_Procedure_Call): New routine.
5414 (Mark_And_Set_Ghost_Assignment): New routine.
5415 (Mark_And_Set_Ghost_Body): New routine.
5416 (Mark_And_Set_Ghost_Completion): New routine.
5417 (Mark_And_Set_Ghost_Declaration): New routine.
5418 (Mark_And_Set_Ghost_Instantiation): New routine.
5419 (Mark_And_Set_Ghost_Procedure_Call): New routine.
5420 (Mark_Full_View_As_Ghost): Removed.
5421 (Mark_Ghost_Pragma): New routine.
5422 (Mark_Ghost_Renaming): New routine.
5423 (Mark_Pragma_As_Ghost): Removed.
5424 (Mark_Renaming_As_Ghost): Removed.
5425 (Restore_Ghost_Mode): New routine.
5426 (Set_Ghost_Mode): Redefined.
5427 (Set_Ghost_Mode_From_Entity): Removed.
5428 * sem.adb (Analyze): Install and revert the Ghost region of the
5429 node being analyzed.
5430 (Do_Analyze): Change the way a clean Ghost
5431 region is installed and reverted.
5432 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
5433 all Ghost-related code.
5434 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
5435 (Analyze_Number_Declaration): Remove all Ghost-related code.
5436 (Analyze_Object_Declaration): Install and revert the Ghost region of
5437 a deferred object declaration's completion.
5438 (Array_Type_Declaration): Remove all Ghost-related code.
5439 (Build_Derived_Type): Update the comment on
5440 the propagation of Ghost attributes from a parent to a derived type.
5441 (Derive_Subprogram): Remove all Ghost-related code.
5442 (Make_Class_Wide_Type): Remove all Ghost-related code.
5443 (Make_Implicit_Base): Remove all Ghost-related code.
5444 (Process_Full_View): Install and revert the Ghost region of
5445 the partial view. There is no longer need to check the Ghost
5447 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
5448 region of the left hand side.
5449 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
5450 all Ghost-related code.
5451 (Analyze_Expression_Function): Remove all Ghost-related code.
5452 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
5453 (Analyze_Procedure_Call): Install and revert the Ghost region of
5454 the procedure being called.
5455 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
5456 region of the spec or body.
5457 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
5458 (Build_Subprogram_Declaration): Remove all Ghost-related code.
5459 (Find_Corresponding_Spec): Remove all Ghost-related code.
5460 (Process_Formals): Remove all Ghost-related code.
5461 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
5462 the Ghost region of the spec.
5463 (Analyze_Package_Declaration): Remove all Ghost-related code.
5464 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
5465 Ghost when it aliases a Ghost entity.
5466 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
5468 (Analyze_Object_Renaming): Mark a renaming as Ghost when
5469 it aliases a Ghost entity.
5470 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
5472 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
5473 aliases a Ghost entity.
5474 * sem_ch11.adb Remove with and use clauses for Ghost.
5475 (Analyze_Exception_Declaration): Remove all Ghost-related code.
5476 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
5478 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
5480 (Analyze_Package_Instantiation): Install and revert the Ghost region
5481 of the package instantiation.
5482 (Analyze_Subprogram_Instantiation): Install
5483 and revert the Ghost region of the subprogram instantiation.
5484 (Instantiate_Package_Body): Code clean up. Install and revert the
5485 Ghost region of the package body.
5486 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
5487 Ghost region of the subprogram body.
5488 * sem_ch13.adb (Build_Predicate_Functions): Install
5489 and revert the Ghost region of the related type.
5490 (Build_Predicate_Function_Declaration): Code clean up. Install
5491 and rever the Ghost region of the related type.
5492 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
5493 Install and revert the Ghost region of the pragma.
5494 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
5495 Ghost region of the pragma.
5496 (Analyze_Pragma): Install and revert the Ghost region of various
5497 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
5498 or encloses a Ghost entity.
5499 (Analyze_Pre_Post_Condition): Install and revert the Ghost
5500 region of the pragma.
5501 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
5502 Ghost region of the pragma.
5503 * sem_res.adb (Resolve): Remove all Ghost-related code.
5504 * sem_util.adb (Is_Declaration): Reimplemented.
5505 (Is_Declaration_Other_Than_Renaming): New routine.
5506 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
5507 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
5508 (Is_Ghost_Pragma): Removed.
5509 (Is_Ignored_Ghost_Pragma): New routine.
5510 (Set_Is_Checked_Ghost_Pragma): New routine.
5511 (Set_Is_Ghost_Pragma): Removed.
5512 (Set_Is_Ignored_Ghost_Pragma): New routine.
5513 * sinfo.ads: Update the documentation on Ghost mode and
5514 Ghost regions. New attributes Is_Checked_Ghost_Pragma
5515 and Is_Ignored_Ghost_Pragma along with usages in nodes.
5516 Remove attribute Is_Ghost_Pragma along with usages in nodes.
5517 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
5518 (Is_Ghost_Pragma): Removed along with pragma Inline.
5519 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
5520 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
5521 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
5522 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
5524 2017-01-12 Tristan Gingold <gingold@adacore.com>
5526 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
5527 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
5529 2017-01-12 Yannick Moy <moy@adacore.com>
5531 * errout.adb, errout.ads (Initialize): Factor common treatment
5533 (Reset_Warnings): New procedure to reset counts related to warnings.
5534 (Record_Compilation_Errors): New variable to store the presence of an
5535 error, used in gnat2why to allow changing the Warning_Mode.
5536 (Compilation_Errors): Use new variable Record_Compilation_Errors to
5537 store the presence of an error.
5539 2017-01-12 Javier Miranda <miranda@adacore.com>
5541 * sem_ch13.adb (Analyze_Aspect_Specifications):
5542 For Interrupt_Handler and Attach_ Handler aspects, decorate the
5543 internally built reference to the protected procedure as coming
5544 from sources and force its analysis.
5546 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5548 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
5549 inherit predicates if any from the first_subtype of the parent,
5550 not from the anonymous parent type.
5551 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
5552 predicate is not a static subtype.
5554 2017-01-12 Gary Dismukes <dismukes@adacore.com>
5556 * freeze.adb (Check_Suspicious_Convention): New procedure
5557 performing a warning check on discriminated record types with
5558 convention C or C++. Factored out of procedure Freeze_Record_Type,
5559 and changed to only apply to base types (to avoid spurious
5560 warnings on subtypes). Minor improvement of warning messages
5561 to refer to discriminated rather than variant record types.
5562 (Freeze_Record_Type): Remove code for performing a suspicious
5564 (Freeze_Entity): Only call Freeze_Record_Type
5565 on types that aren't declared within any enclosing generic units
5566 (rather than just excluding the type when the innermost scope
5567 is generic). Call Check_Suspicious_Convention whether or not
5568 the type is declared within a generic unit.
5569 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
5570 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
5573 2017-01-12 Tristan Gingold <gingold@adacore.com>
5575 * sysdep.c, adaint.c, rtinit.c, ming32.h:
5576 (__gnat_current_codepage): Renamed from CurrentCodePage
5577 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
5579 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5581 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
5582 quantified expressions, following AI12-050: the loop parameters
5583 of two quantified expressions are conformant if they have the
5586 2017-01-12 Arnaud Charlet <charlet@adacore.com>
5588 * gcc-interface/Makefile.in: Clean up VxWorks targets.
5590 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5592 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
5593 Hnadle properly the attribute reference when it appears as part
5594 of an expression in another loop aspect.
5596 2017-01-12 Ed Schonberg <schonberg@adacore.com>
5598 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
5599 subsidiary of Build_Initialization_Call, to complete generation
5600 of predicate checks on discriminants whose (sub)types have
5601 predicates, and to add checks on variants that do not have an
5603 * sem_util.adb (Gather_Components): A missing Others alternative is
5604 not an error when the type of the discriminant is a static predicate
5605 (and coverage has been checked when analyzing the case statement). A
5606 runtime check is generated to verify that a given discriminant
5607 satisfies the predicate (RM 3.8.1. (21.1/2)).
5609 2017-01-12 Yannick Moy <moy@adacore.com>
5611 * gnat1drv.adb (Adjust_Global_Switches): Only
5612 perform checking of exception mechanism when generating code.
5614 2017-01-12 Justin Squirek <squirek@adacore.com>
5616 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
5617 Remove handling of access component with invariant.
5618 (Build_Invariant_Procedure_Declaration): Remove return on class
5620 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
5621 conditional exception for component or array so Has_Own_Invariants
5622 flag is not falsly set.
5623 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
5624 wide type to have no invariant flags.
5626 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5628 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
5629 sem_ch13.adb: Minor reformatting.
5631 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5633 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
5634 adjustment primitive when the ancestor type was not properly frozen.
5635 (Gen_Assign): Guard against a missing initialization
5636 primitive when the component type was not properly frozen.
5637 (Initialize_Array_Component): Guard against a missing adjustment
5638 primitive when the component type was not properly frozen.
5639 (Initialize_Record_Component): Guard against a missing adjustment
5640 primitive when the component type was not properly frozen.
5641 (Process_Transient_Component_Completion): The transient object may
5642 not be finalized when its associated type was not properly frozen.
5643 * exp_ch3.adb (Build_Assignment): Guard against a missing
5644 adjustment primitive when the component type was not properly frozen.
5645 (Build_Initialization_Call): Guard against a missing
5646 initialization primitive when the associated type was not properly
5648 (Expand_N_Object_Declaration): Guard against a missing
5649 adjustment primitive when the base type was not properly frozen.
5650 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
5651 body when there is no adjustment primitive available. Create an
5652 empty Deep_Finalize body when there is no finalization primitive
5654 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
5655 missing finalization primitive when the designated type was
5656 not properly frozen.
5657 (Expand_N_Allocator): Guard against a missing initialization primitive
5658 when the designated type was not properly frozen.
5659 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
5660 only when the corresponding adjustment primitive is available.
5661 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
5662 adjustment/finalization statements only when there is an available
5663 primitive to carry out the action.
5664 (Build_Initialize_Statements): Generate the initialization/finalization
5665 statements only when there is an available primitive to carry out the
5667 (Make_Adjust_Call): Do not generate a call when the underlying
5668 type is not present due to a possible missing full view.
5669 (Make_Final_Call): Do not generate a call when the underlying
5670 type is not present due to a possible missing full view.
5671 (Make_Finalize_Address_Stmts): Generate an empty body when the
5672 designated type lacks a finalization primitive.
5673 (Make_Init_Call): Do not generate a call when the underlying type is
5674 not present due to a possible missing full view.
5675 (Process_Component_For_Adjust): Add the adjustment call only when the
5676 corresponding adjustment primitive is available.
5677 (Process_Component_For_Finalize): Add the finalization call only when
5678 the corresponding finalization primitive is available.
5679 (Process_Object_Declaration): Use a null statement to emulate a
5680 missing call to the finalization primitive of the object type.
5681 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
5682 (Make_Final_Call): Update the comment on usage.
5683 (Make_Init_Call): Update the comment on usage.
5684 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
5686 2017-01-12 Arnaud Charlet <charlet@adacore.com>
5688 * einfo.ads: Update documentation of Address_Taken.
5689 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
5690 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
5691 for subprograms when setting Address_Taken flag.
5693 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
5695 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
5696 Configurable_Run_Time_Mode off when analysing with'ed predefined
5699 2017-01-12 Gary Dismukes <dismukes@adacore.com>
5701 * sem_prag.adb: Minor reformatting.
5702 * sem_util.adb (Unique_Entity): fix result for
5703 bodies of entry families.
5705 2017-01-12 Justin Squirek <squirek@adacore.com>
5707 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
5708 Resolve_Suppressible in the pragma Assertion_Policy case.
5709 (Resolve_Suppressible): Created this function to factor out
5710 common code used to resolve Suppress to either Ignore or Check
5711 * snames.ads-tmpl: Add name for Suppressible.
5713 2017-01-12 Gary Dismukes <dismukes@adacore.com>
5715 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
5717 * debug.adb: Minor comment fixes.
5719 2017-01-12 Arnaud Charlet <charlet@adacore.com>
5721 * sem_util.adb (Unique_Entity): For concurrent
5722 bodies that are defined with stubs and complete a declaration
5723 of a single concurrent object return the entity of an implicit
5724 concurrent type, not the entity of the anonymous concurrent
5726 * debug.adb: -gnatd.J is no longer used.
5727 * make.adb (Globalize): Removed, no longer used.
5728 * sem_ch9.adb: minor typo in comment for entry index
5730 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
5732 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
5733 * exp_ch3.adb (Build_Init_Statements): As part of initialising
5734 the value record of a task, set its _Secondary_Stack_Size field
5736 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
5737 a _Secondary_Stack_Size field in the value record of
5738 the task if a Secondary_Stack_Size rep item is present.
5739 (Make_Task_Create_Call): Include secondary stack size
5740 parameter. If No_Secondary_Stack restriction is in place, passes
5742 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
5743 Secondary_Stack_Size.
5744 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
5745 function to define the overhead of the secondary stack.
5746 * s-tarest.adb (Create_Restricted_Task,
5747 Create_Restricted_Task_Sequential): Functions now include
5748 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
5749 * s-tarest.adb (Create_Restricted_Task,
5750 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
5751 include Secondary_Stack_Size parameter.
5752 (Task_Wrapper): Secondary stack now allocated to the size specified by
5753 the Secondary_Stack_Size parameter in the task's ATCB.
5754 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
5755 Secondary_Stack_Size component.
5756 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
5757 Create_Restricted_Task_Sequential): Function now include
5758 Secondary_Stack_Size parameter.
5759 (Task_Wrapper): Secondary stack now allocated to the size
5760 specified by the Secondary_Stack_Size parameter in the task's
5762 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
5763 to include Secondary_Stack_Size parameter.
5764 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
5765 Secondary_Stack_Size aspect, turning the aspect into its corresponding
5767 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
5768 * snames.adb-tmpl, snames.ads-tmpl: Added names
5769 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
5770 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
5772 2017-01-12 Yannick Moy <moy@adacore.com>
5774 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
5777 2017-01-12 Justin Squirek <squirek@adacore.com>
5779 * exp_attr.adb (Expand_N_Attribute_Reference):
5780 Fix Finalization_Size case by properly resolving the type after
5781 rewritting the node.
5783 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5785 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
5787 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
5788 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
5789 exp_sel.ads: Minor reformatting.
5791 2017-01-12 Justin Squirek <squirek@adacore.com>
5793 * exp_ch6.adb (Expand_Call): Add guard to prevent
5794 invariant checks from being created for internally generated
5797 2017-01-12 Bob Duff <duff@adacore.com>
5799 * lib-writ.ads: Remove incorrect comment.
5801 2017-01-12 Javier Miranda <miranda@adacore.com>
5803 * debug.adb (-gnatd.K): Enable generation of contract-only
5804 procedures in CodePeer mode.
5805 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
5807 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
5809 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
5811 (Get_Contract_Only_Missing_Body_Name): New subprogram.
5812 (Get_Contract_Only_Body): New subprogram.
5813 (Set_Contract_Only_Body): New subprogram.
5814 (Is_Contract_Only_Body): New subprogram.
5815 (Set_Is_Contract_Only_Body): New subprogram.
5816 (SCIL_Nodes): Replace table by hash-table.
5818 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5820 * exp_ch6.adb: Minor reformatting.
5821 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
5823 2017-01-12 Bob Duff <duff@adacore.com>
5825 * binde.adb (Forced): New reason for a dependence.
5826 (Force_Elab_Order): Implementation of the new switch.
5827 * binde.ads: Minor comment fixes.
5828 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
5829 long ago that is no longer supported; removed comment about that.
5830 * opt.ads (Force_Elab_Order_File): Name of file specified for
5832 * switch-b.adb: Parse -f switch.
5834 2017-01-12 Justin Squirek <squirek@adacore.com>
5836 * exp_ch6.adb (Check_View_Conversion): Created this function
5837 to properly chain calls to check type invariants that may be
5838 present in a subprogram call after the subprogram.
5839 (Expand_Call): Add a conditional to identify when a view conversion
5840 needs to be checked.
5841 * nlists.adb, nlists.ads (Prepend_New): New routine.
5842 (Prepend_New_To): New routine.
5844 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5846 * sinfo.ads: Minor reformatting.
5848 2017-01-12 Gary Dismukes <dismukes@adacore.com>
5850 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
5853 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
5855 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
5856 variable Definite. Create a local object and pass its 'Access to the
5857 BIP function when the result type is either definite or it does not
5858 require any finalization or secondary stack management.
5860 2017-01-12 Bob Duff <duff@adacore.com>
5862 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
5863 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
5864 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
5865 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
5866 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
5867 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
5868 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
5869 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
5870 Change name to Pragma_Name_Unmapped.
5871 (Pragma_Name_Mapped): Change name to Pragma_Name.
5872 This is because the "mapped" version should be the usual case.
5874 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
5876 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
5877 Is_Default_Init_Cond_Procedure, and
5878 Has_Inherited_Default_Init_Cond. Add uses of flags
5879 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
5880 (Default_Init_Cond_Procedure): Removed.
5881 (DIC_Procedure): New routine.
5882 (Has_Default_Init_Cond): Removed.
5883 (Has_DIC): New routine.
5884 (Has_Inheritable_Invariants): The attribute applies to the base type.
5885 (Has_Inherited_Default_Init_Cond): Removed.
5886 (Has_Inherited_DIC): New routine.
5887 (Has_Inherited_Invariants): The attribute applies to the base type.
5888 (Has_Own_DIC): New routine.
5889 (Has_Own_Invariants): The attribute applies to the base type.
5890 (Is_Default_Init_Cond_Procedure): Removed.
5891 (Is_DIC_Procedure): New routine.
5892 (Set_Default_Init_Cond_Procedure): Removed.
5893 (Set_DIC_Procedure): New routine.
5894 (Set_Has_Default_Init_Cond): Removed.
5895 (Set_Has_Inheritable_Invariants): The attribute applies
5897 (Set_Has_Inherited_Default_Init_Cond): Removed.
5898 (Set_Has_Inherited_DIC): New routine.
5899 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
5900 (Set_Has_Own_DIC): New routine.
5901 (Set_Has_Own_Invariants): The attribute applies to the base type.
5902 (Set_Is_Default_Init_Cond_Procedure): Removed.
5903 (Set_Is_DIC_Procedure): New routine.
5904 (Write_Entity_Flags): Update the output of all flags related to
5905 default initial condition.
5906 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
5907 of the call to the DIC procedure.
5908 (Freeze_Type): Generate the body of the DIC procedure.
5909 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
5910 all occurrences of Create_Append with Append_New_To. Do
5911 not generate an invariant procedure for a class-wide type.
5912 The generated body acts as a freeze action of the working type.
5913 (Build_Invariant_Procedure_Declaration): Do not generate an
5914 invariant procedure for a class-wide type.
5915 (Create_Append): Removed.
5916 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
5917 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
5918 class-wide pre/postcondition description and data structures from
5920 (Build_Class_Wide_Expression): Moved from Sem_Prag.
5921 (Build_DIC_Call): New routine.
5922 (Build_DIC_Procedure_Body): New routine.
5923 (Build_DIC_Procedure_Declaration): New routine.
5924 (Entity_Hash): Moved from Sem_Prag.
5925 (Find_DIC_Type): New routine.
5926 (Update_Primitives_Mapping): Reimplemented.
5927 (Update_Primitives_Mapping_Of_Types): New routine.
5928 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
5929 (Build_DIC_Call): New routine.
5930 (Build_DIC_Procedure_Body): New routine.
5931 (Build_DIC_Procedure_Declaration): New routine.
5932 (Update_Primitives_Mapping): Moved from Sem_Prag.
5933 (Update_Primitives_Mapping_Of_Types): New routine.
5934 * nlists.adb (Append_New): New routine.
5935 (Append_New_To): New routine.
5936 * nlists.ads (Append_New): New routine.
5937 (Append_New_To): New routine.
5938 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
5939 of DIC procedures here. This is now done at the end of the
5940 visible declarations, private declarations, and at the freeze
5942 (Analyze_Private_Extension_Declaration):
5943 A private extension inherits the DIC pragma of a parent type.
5944 (Analyze_Subtype_Declaration): No need to propagate invariant
5945 attributes to a subtype as those apply to the base type.
5946 (Build_Derived_Record_Type): No need to inherit invariants here
5947 as this is now done in Build_Derived_Type.
5948 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
5950 (Process_Full_View): Update the propagation of DIC attributes.
5951 (Propagate_Default_Init_Cond_Attributes): Removed.
5952 * sem_ch7.adb Add with and use clauses for Exp_Util.
5953 (Analyze_Package_Specification): Create the body of the DIC
5954 procedure at the end of the visible and private declarations.
5955 (Preserve_Full_Attributes): Propagate DIC attributes.
5956 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
5958 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
5959 * sem_elab.adb (Check_A_Call): Update the call to
5960 Is_Nontrivial_Default_Init_Cond_Procedure.
5961 * sem_prag.adb Remove the with and use clauses for
5962 GNAT.HTable. Move the handling of class- wide pre/postcondition
5963 description and data structures to Exp_Util.
5964 (Analyze_Pragma): Create the declaration of the DIC procedure. There
5965 is no need to propagate invariant-related attributes at this point
5966 as this is done in Build_Invariant_Procedure_Declaration.
5967 (Build_Class_Wide_Expression): Moved to Exp_Util.
5968 (Entity_Hash): Moved to Exp_Util.
5969 (Update_Primitives_Mapping): Moved to Exp_Util.
5970 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
5971 (Update_Primitives_Mapping): Moved to Exp_Util.
5972 * sem_util.adb: Remove with and use clauses for Ghost
5974 (Build_Default_Init_Cond_Call): Removed.
5975 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
5976 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
5977 (Get_Views): Reimplemented.
5978 (Has_Full_Default_Initialization): Reimplement the section on DIC.
5979 (Inherit_Default_Init_Cond_Procedure): Removed.
5980 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
5981 (Is_Nontrivial_DIC_Procedure): New routine.
5982 (Is_Verifiable_DIC_Pragma): New routine.
5983 (Propagate_DIC_Attributes): New routine.
5984 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
5985 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
5986 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
5987 (Inherit_Default_Init_Cond_Procedure): Removed.
5988 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
5989 (Is_Nontrivial_DIC_Procedure): New routine.
5990 (Is_Verifiable_DIC_Pragma): New routine.
5991 (Propagate_DIC_Attributes): New routine.
5992 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
5994 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
5996 (Expression_Copy): New routine along with pragma Inline.
5997 (Set_Expression_Copy): New routine along with pragma Inline.
5999 2017-01-06 Bob Duff <duff@adacore.com>
6001 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
6002 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
6003 we won't generate the call to s_stalib_adafinal when the main
6004 is not written in Ada.
6006 2017-01-06 Bob Duff <duff@adacore.com>
6008 * sem_prag.adb: Minor: remove pragma Warnings.
6010 2017-01-06 Tristan Gingold <gingold@adacore.com>
6012 * Makefile.rtl: Do not compile s-stchop by default.
6014 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6016 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
6017 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
6018 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
6019 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
6020 Reverted previous change for now.
6022 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6024 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
6025 check to default discriminant value if checks are enabled.
6026 (Build_Assignment): If type of component has static predicate,
6027 apply check to its default value, if any.
6029 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
6031 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
6032 * exp_ch3.adb (Build_Init_Statements): As part of initialising
6033 the value record of a task, set its _Secondary_Stack_Size field
6035 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
6036 a _Secondary_Stack_Size field in the value record of
6037 the task if a Secondary_Stack_Size rep item is present.
6038 (Make_Task_Create_Call): Include secondary stack size
6039 parameter. If No_Secondary_Stack restriction is in place, passes
6041 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
6042 Secondary_Stack_Size.
6043 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
6044 function to define the overhead of the secondary stack.
6045 * s-tarest.adb (Create_Restricted_Task,
6046 Create_Restricted_Task_Sequential): Functions now include
6047 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
6048 * s-tarest.adb (Create_Restricted_Task,
6049 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
6050 now include Secondary_Stack_Size parameter.
6052 Secondary stack now allocated to the size specified by the
6053 Secondary_Stack_Size parameter in the task's ATCB.
6054 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
6055 Secondary_Stack_Size component.
6056 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
6057 Create_Restricted_Task_Sequential): Function now include
6058 Secondary_Stack_Size parameter.
6059 (Task_Wrapper): Secondary stack
6060 now allocated to the size specified by the Secondary_Stack_Size
6061 parameter in the task's ATCB.
6062 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
6063 for Secondary_Stack_Size aspect, turning the aspect into its
6064 corresponding internal attribute.
6065 (Analyze_Attribute_Definition):
6066 Process Secondary_Stack_Size attribute.
6067 * snames.adb-tmpl, snames.ads-tmpl: Added names
6068 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
6069 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
6071 2017-01-06 Pascal Obry <obry@adacore.com>
6073 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
6074 Sequential_IO and Direct_IO.
6076 2017-01-06 Bob Duff <duff@adacore.com>
6078 * snames.ads-tmpl (Renamed): New name for the pragma argument.
6079 * par-ch2.adb: Allow the new pragma (with analysis deferred
6081 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
6082 Keep a mapping from new pragma names to old names.
6083 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
6084 implement it by calling Map_Pragma_Name.
6085 * checks.adb, contracts.adb, einfo.adb, errout.adb,
6086 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
6087 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
6088 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
6089 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
6090 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
6091 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
6094 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6096 * exp_ch9.adb: Minor reformatting.
6098 2017-01-06 Tristan Gingold <gingold@adacore.com>
6100 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
6101 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
6102 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
6104 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
6105 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
6106 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
6107 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
6109 2017-01-06 Bob Duff <duff@adacore.com>
6111 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
6112 dummy implementation of Map_Pragma_Name.
6114 2017-01-06 Tristan Gingold <gingold@adacore.com>
6116 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
6117 entry_body variable constant.
6118 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
6119 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
6121 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
6122 now access to constant.
6124 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6126 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
6127 reformatting and typo fixes.
6129 2017-01-06 Bob Duff <duff@adacore.com>
6131 * snames.ads-tmpl: New names for pragma renaming.
6132 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
6133 * par-prag.adb: Add new pragma name to case statement.
6134 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
6136 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
6137 Dummy implementation of Pragma_Name_Mapped.
6139 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6141 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
6142 better detect call within an entry_wrapper.
6143 * sem_res.adb (Resolve_Call): A protected call within an
6144 entity_wrapper is analyzed in the context of the protected
6145 object but corresponds to a pre-analysis and is not an access
6147 * sem_attr.adb: Minor reformatting.
6149 2017-01-06 Justin Squirek <squirek@adacore.com>
6151 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
6152 Finalization_Size to allow a prefix of any non-class-wide type.
6153 * sem_attr.ads Modify comment for Finalization_Size to include
6154 definite type use case.
6156 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6158 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
6159 on procedures that are wrappers created for entries that have
6161 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
6162 body is an entry_wrapper, compile it in the context of the
6163 synchronized type, because a precondition may refer to funtions
6165 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
6167 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
6168 within an Entry_Wrapper this is an external call whose target
6169 is the synchronized object that is the actual in the call to
6172 2017-01-06 Yannick Moy <moy@adacore.com>
6174 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
6175 in tree, which means not analyzing the previous prefix if the node has
6176 been rewritten into its prefix.
6178 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6180 * s-tpobop.adb: Minor reformatting.
6182 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6184 * checks.adb (Ensure_Valid): Do not generate a validity check
6185 within a generated predicate function, validity checks will have
6186 been applied earlier when required.
6188 2017-01-06 Tristan Gingold <gingold@adacore.com>
6190 * s-tpoben.ads (Protection_Entries): Add comment and reorder
6191 components for performances.
6192 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
6195 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6197 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
6198 If expression is compile-time known and obeys a static predicate
6199 it must be labelled as static, to prevent spurious warnings and
6200 run-time errors, e.g. in case statements. This is relevant when
6201 the expression is the result of constant-folding a type conversion
6202 whose expression is a variable with a known static value.
6204 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6206 * exp_attr.adb, sem_attr.ads: Minor reformatting.
6208 2017-01-06 Justin Squirek <squirek@adacore.com>
6210 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
6211 expansion of Finalization_Size attribute.
6212 * sem_attr.adb (Analyze_Attribute): Add entry to check the
6213 semantics of Finalization_Size.
6214 (Eval_Attribute): Add null entry for Finalization_Size.
6215 * sem_attr.ads: Add Finalization_Size to the implementation
6216 dependent attribute list.
6217 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
6219 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6221 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
6222 iterator specification with a serious syntactic error, transform
6223 construct into an infinite loop in order to continue analysis
6224 and prevent a compiler abort.
6226 2017-01-06 Tristan Gingold <gingold@adacore.com>
6228 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
6229 max_queue_lengths_array if unused.
6231 2017-01-06 Bob Duff <duff@adacore.com>
6233 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
6234 array access, in case "\" is at the end of Text.
6235 * stylesw.adb (Set_Style_Check_Options): Don't include input
6236 characters in the error message template, because they could
6237 be control characters such as "\", which Errout will try to
6240 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6242 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
6243 For a private type examine the visible declarations that follow
6244 the partial view, not just the private declarations that follow
6247 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6249 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
6252 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6254 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
6255 alias of the inherited op is the parent iterator, no need to
6256 examine dispatch table positions which might not be established
6257 yet if type is not frozen.
6258 * sem_disp.adb (Check_Controlling_Formals): The formal of a
6259 predicate function may be a subtype of a tagged type.
6260 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
6261 of representation items for the completion of a type extension
6262 where a predicate applies to the partial view.
6263 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
6264 parameter that designates function whose actual receives a
6265 predicate check, to improve warning message when the check will
6266 lead to infinite recursion.
6267 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
6268 Apply_Predicate_Check.
6270 2017-01-06 Tristan Gingold <gingold@adacore.com>
6272 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
6273 Gnat_Extended_Ravenscar.
6274 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
6276 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6278 * sem_util.ads: Minor typo fix and reformatting.
6280 2017-01-06 Yannick Moy <moy@adacore.com>
6282 * ghost.adb Minor fixing of references to SPARK RM.
6283 (Check_Ghost_Context): Check whether reference is to a lvalue
6284 before issuing an error about violation of SPARK RM 6.9(13)
6285 when declaration has Ghost policy Check and reference has Ghost
6287 * sem_util.adb Minor indentation.
6288 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
6289 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
6290 * sem_util.ads (Unique_Defining_Entity): Document the result
6291 for package body stubs.
6293 2017-01-06 Tristan Gingold <gingold@adacore.com>
6295 * raise-gcc.c (abort): Macro to call Abort_Propagation.
6296 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
6298 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6299 Do not generate the Entry_Max_Queue_Lengths_Array if all default
6301 * exp_util.adb (Corresponding_Runtime_Package): Consider
6302 Max_Queue_Length pragma.
6304 2017-01-06 Justin Squirek <squirek@adacore.com>
6306 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
6307 Remove declaration generation in the case of
6308 System_Tasking_Protected_Objects_Single_Entry being used,
6309 and add a warning message when this is detected to occur.
6310 (Make_Initialize_Protection): Remove reference pass in the case
6311 of System_Tasking_Protected_Objects_Single_Entry.
6312 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
6313 * s-tposen.adb (Initialize_Protection_Entry): Remove
6314 Entry_Queue_Max parameter.
6315 * s-tposen.ads: Remove the types use to store the entry queue
6317 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
6319 2017-01-06 Yannick Moy <moy@adacore.com>
6321 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
6322 behavior of function, to also accept out of range positions
6323 and raise Constraint_Error in such case, and to copy sloc from
6324 literal if No_Location passed as location.
6325 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
6326 of functions to raise Constraint_Error in case of value not in
6329 2017-01-06 Tristan Gingold <gingold@adacore.com>
6331 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
6332 Invalidate_Stack_Cache.
6334 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
6336 * s-os_lib.adb: Minor fix to the signature of Readlink.
6338 2017-01-06 Javier Miranda <miranda@adacore.com>
6340 * sem_ch6.adb (Conforming_Types): Handle another
6341 confusion between views in a nested instance with an actual
6342 private type whose full view is not in scope.
6344 2017-01-06 Arnaud Charlet <charlet@adacore.com>
6346 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
6347 mark a rewritten if statement as explicit (Comes_From_Source).
6349 2017-01-06 Gary Dismukes <dismukes@adacore.com>
6351 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
6353 2017-01-06 Tristan Gingold <gingold@adacore.com>
6355 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
6357 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6359 * sem_case.adb: Minor reformatting.
6361 2017-01-06 Thomas Quinot <quinot@adacore.com>
6363 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
6365 2017-01-06 Justin Squirek <squirek@adacore.com>
6367 * aspects.adb: Register aspect in Canonical_Aspect.
6368 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
6369 into respective tables.
6370 * einfo.ads, einfo.adb: Add a new attribute for
6371 handling the parameters for Pragma_Max_Entry_Queue
6372 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
6373 for accessing and setting were added as well.
6374 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
6375 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
6376 declaration for pramga arguments and store them in the protected
6378 (Make_Initialize_Protection): Pass a reference to
6379 the Entry_Max_Queue_Lengths_Array in the protected type node to
6381 * rtsfind.adb: Minor grammar fix.
6382 * rtsfind.ads: Register new types taken from the
6383 runtime libraries RE_Protected_Entry_Queue_Max and
6384 RE_Protected_Entry_Queue_Max_Array
6385 * s-tposen.adb, s-tpoben.adb
6386 (Initialize_Protection_Entry/Initialize_Protection_Entries):
6387 Add extra parameter and add assignment to local object.
6388 * s-tposen.ads, s-tpoben.ads: Add new types to
6389 store entry queue maximums and a field to the entry object record.
6390 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
6391 for Aspect_Max_Queue_Length.
6392 (Check_Aspect_At_Freeze_Point):
6393 Add aspect to list of aspects that don't require delayed analysis.
6394 * sem_prag.adb (Analyze_Pragma): Add case statement for
6395 Pragma_Max_Queue_Length, check semantics, and register arugments
6396 in the respective entry nodes.
6397 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
6398 and Has_Max_Queue_Length
6399 * snames.ads-tmpl: Add constant for the new aspect-name
6400 Name_Max_Queue_Length and corrasponding pragma.
6402 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6404 * exp_util.adb (Is_Controlled_Function_Call):
6405 Reimplemented. Consider any node which has an entity as the
6406 function call may appear in various ways.
6408 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6410 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
6411 an unchecked type conversion when performing a view conversion
6412 to/from a private type. In all other cases use a regular type
6413 conversion to ensure that any relevant checks are properly
6416 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
6418 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
6420 2017-01-06 Ed Schonberg <schonberg@adacore.com>
6422 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
6423 error on case expression that is an entity, when coverage is
6424 incomplete and entity has a static value obtained by local
6426 (Handle_Static_Predicate): New procedure, subsidiary of
6427 Check_Choices, to handle case alternatives that are either
6428 subtype names or subtype indications involving subtypes that
6429 have static predicates.
6431 2017-01-06 Thomas Quinot <quinot@adacore.com>
6433 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
6434 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
6436 2017-01-06 Bob Duff <duff@adacore.com>
6438 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
6439 Elaborate_All(P) to P itself. That could happen in obscure cases,
6440 and always introduced a cycle (P body must be elaborated before
6442 * lib-writ.ads: Comment clarification.
6443 * ali-util.ads: Minor comment fix.
6444 * ali.adb: Minor reformatting.
6446 2017-01-06 Tristan Gingold <gingold@adacore.com>
6448 * a-exexpr-gcc.adb: Improve comment.
6450 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6452 * s-linux-mips.ads: Use correct signal and errno constants.
6453 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
6455 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
6457 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
6458 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
6461 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
6463 * gnatvsn.ads: Bump copyright year.
6465 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6467 * gnat_ugn.texi: Bump @copying's copyright year.
6468 * gnat_rm.texi: Likewise.
6470 Copyright (C) 2017 Free Software Foundation, Inc.
6472 Copying and distribution of this file, with or without modification,
6473 are permitted in any medium without royalty provided the copyright
6474 notice and this notice are preserved.