1 2016-04-20 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch4.adb (Analyze_Selected_Component): A reference to the
4 current instance of a task type is legal if the prefix is an
5 expression of that task type and the selector is an entry or
8 2016-04-20 Arnaud Charlet <charlet@adacore.com>
10 * a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
11 varsize field at the end for efficiency.
13 2016-04-20 Vincent Celier <celier@adacore.com>
15 * gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
16 ls" includes the switch -V.
17 * clean.adb: "<target>-gnatclean -P" now calls "gprclean
19 * make.adb: "<target>-gnatmake -P" now calls "gprbuild
22 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
24 * sem_ch12.adb (Qualify_Type): Do not perform
25 partial qualification when the immediate scope is a generic unit.
27 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
29 * exp_unst.adb: Minor reformatting.
31 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
33 * exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
34 tag assignment and adjustment preceed the accessibility check.
35 * exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
37 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
39 * exp_prag.adb (Expand_Attributes): Ensure that
40 the temporary used to capture the value of attribute 'Old's
41 prefix is properly initialized.
43 2016-04-20 Javier Miranda <miranda@adacore.com>
45 * exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
48 2016-04-20 Arnaud Charlet <charlet@adacore.com>
50 * sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
53 2016-04-20 Vincent Celier <celier@adacore.com>
55 * make.adb: Code cleanup.
57 2016-04-20 Arnaud Charlet <charlet@adacore.com>
59 * exp_ch4.adb (Expand_Allocator_Expression): Help C code
62 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
64 * sem_ch12.adb (Copy_Generic_Node): Handle the special
65 qualification installed for universal literals that act as
66 operands in binary or unary operators. (Qualify_Operand): Mark
67 the qualification to signal the instantiation mechanism how to
68 handle global reference propagation.
69 * sinfo.adb (Is_Qualified_Universal_Literal): New routine.
70 (Set_Is_Qualified_Universal_Literal): New routine.
71 * sinfo.ads New attribute Is_Qualified_Universal_Literal along
72 with occurrences in nodes.
73 (Is_Qualified_Universal_Literal):
74 New routine along with pragma Inline.
75 (Set_Is_Qualified_Universal_Literal): New routine along with
78 2016-04-20 Ed Schonberg <schonberg@adacore.com>
80 * sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
81 so that the corresponding checks are preserved across compilations
82 that include System.Constants in their context.
84 2016-04-20 Gary Dismukes <dismukes@adacore.com>
86 * sem_type.adb: Minor typo fix and reformatting.
87 * a-conhel.ads: Update comment.
89 2016-04-20 Bob Duff <duff@adacore.com>
91 * a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
92 code so it doesn't trigger an "uninit var" warning.
94 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
96 * sem_attr.ads Add new table Universal_Type_Attribute.
97 * sem_util.adb (Yields_Universal_Type): Use a table lookup when
100 2016-04-20 Ed Schonberg <schonberg@adacore.com>
102 * exp_aggr.adb (Init_Stored_Discriminants,
103 Init_Visible_Discriminants): New procedures, subsidiary of
104 Build_Record_Aggr_Code, to handle properly the construction
105 of aggregates for a derived type that constrains some parent
106 discriminants and renames others.
108 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
110 * sem_ch12.adb (Qualify_Universal_Operands): New routine.
111 (Save_References_In_Operator): Add explicit qualifications in
112 the generic template for all operands of universal type.
113 * sem_type.adb (Disambiguate): Update the call to Matches.
114 (Matches): Reimplemented.
115 * sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
117 2016-04-20 Ed Schonberg <schonberg@adacore.com>
119 * sem_ch13.adb (Rep_Item_Too_Late): Better error message for
120 an illegal aspect that freezes the entity to which it applies.
122 2016-04-20 Bob Duff <duff@adacore.com>
124 * a-stwibo.ads, a-stzbou.ads
125 ("="): Add overriding keyword before function to avoid crash when
126 compiler is called with -gnatyO (check overriding indicators).
128 2016-04-20 Ed Schonberg <schonberg@adacore.com>
130 * sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
131 is a configuration pragma and it uses the ARG syntax, insert
132 the rewritten pragma after the current one rather than using
135 2016-04-20 Arnaud Charlet <charlet@adacore.com>
137 * exp_aggr.adb (Backend_Processing_Possible): Add handling of
140 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
142 * s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
143 s-imglli.adb: Minor reformatting.
145 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
147 * sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
148 renamed operator when the associated node appears within a
150 * sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
152 2016-04-20 Yannick Moy <moy@adacore.com>
154 * osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
155 * einfo.adb (Set_Overridden_Operation): Add assertion.
156 * sem_util.adb (Unique_Entity): for renaming-as-body return the spec
159 2016-04-20 Javier Miranda <miranda@adacore.com>
161 * exp_unst.adb (Append_Unique_Call): New subprogram.
162 (Unnest_Subprogram): Replace the unique occurrence
163 of Call.Append() by Append_Unique_Call() which protects us from
164 adding to the Calls table duplicated entries.
166 2016-04-20 Arnaud Charlet <charlet@adacore.com>
168 * exp_attr.adb (Is_GCC_Target): Fix for C backend.
169 * xref_lib.ads (Dependencies_Tables): instantiate
170 Table package with types that guarantee its safe use.
171 * s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
174 2016-04-20 Arnaud Charlet <charlet@adacore.com>
176 * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
177 Disable expansion when generating C code.
178 * sinfo.ads, inline.ads: Minor editing.
180 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
182 * sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
185 2016-04-20 Javier Miranda <miranda@adacore.com>
187 * contracts.adb (Build_Postconditions_Procedure): Code cleanup.
188 * ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
189 declaration of the internally built _postcondition procedure.
191 2016-04-20 Arnaud Charlet <charlet@adacore.com>
193 * snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
195 * sem_util.adb (Is_Unchecked_Conversion_Instance):
196 defense against library-level renamings of other functions,
197 which are never instances of Unchecked_Conversion.
198 * einfo.ads: minor fix of casing in comment
200 2016-04-20 Ed Schonberg <schonberg@adacore.com>
202 * exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
203 that has been analyzed and expanded already. Qualify the names
204 in the proper body for use in the generation of C code.
206 2016-04-20 Javier Miranda <miranda@adacore.com>
208 * contracts.adb (Build_Postconditions_Procedure): Force its
209 inlining when generating C code.
210 * sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
211 _postconditions when generating C code.
212 * exp_ch6.adb (Inlined_Subprogram): Inline calls to
213 _postconditions when generating C code.
214 * sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
215 types of return value and argument changed from Node_Id to
218 2016-04-20 Vincent Celier <celier@adacore.com>
220 * make.adb, clean.adb, gnatname.adb: Revert previous change for now.
222 2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
224 * sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
225 the Has_Delayed_Freeze flag on the anonymous instance node.
227 2016-04-20 Javier Miranda <miranda@adacore.com>
229 * sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
230 scope associated with the renaming object declaration.
231 * exp_util.adb (Insert_Actions): Remove handling of iterator
232 loop marked as requiring the secondary stack.
234 2016-04-20 Ed Schonberg <schonberg@adacore.com>
236 * sem_attr.adb (Analyze_Attribute, case 'Image): Implement
237 AI12-0124, which extends the functionality of the attribute so it
238 reflects the semantics of GNAT 'Img when applied to scalar types.
239 * lib-xref.adb: minor whitespace layout fix.
241 2016-04-20 Vincent Celier <celier@adacore.com>
243 * clean.adb (Gnatclean): Fail if project file specified and
244 gprclean is not available.
245 * gnatname.adb: Fail is -P is used and gprname is not available.
246 * make.adb (Initialize): Fail if project file specified and
247 gprbuild is not available.
249 2016-04-20 Bob Duff <duff@adacore.com>
251 * sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
254 2016-04-20 Gary Dismukes <dismukes@adacore.com>
256 * par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
259 2016-04-20 Ed Schonberg <schonberg@adacore.com>
261 * sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
262 If the pragma comes from an aspect specification, verify that
263 the aspect applies to an entity with a declarative part.
264 * exp_ch5.adb: Code cleanup.
266 2016-04-20 Ed Schonberg <schonberg@adacore.com>
268 * sem_res.adb (Resolve_If_Expression): If first expression is
269 universal, resolve subsequent ones with the corresponding class
270 type (Any_Integer or Any_Real).
272 2016-04-20 Ed Schonberg <schonberg@adacore.com>
274 * sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
275 disabled, complete the analysis of the iterator name to ensure
276 that reference for entities within are properly generated.
278 2016-04-20 Arnaud Charlet <charlet@adacore.com>
280 * a-dispat.ads (Yield): add Global contract.
281 * a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
282 * a-taside.adb: Added Initializes => Tasking_State.
284 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
286 * sem_ch13.adb (Build_Invariant_Procedure):
287 Reimplement the invariant procedure spec and body insertion.
289 2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
291 * sem_ch13.adb (Add_Invariant): Do not replace
292 the saved expression of an invariatn aspect when inheriting
293 a class-wide type invariant as this clobbers the existing
294 expression. Do not use New_Copy_List as it is unnecessary
295 and leaves the parent pointers referencing the wrong part of
296 the tree. Do not replace the type references for ASIS when
297 inheriting a class-wide type invariant as this clobbers the
298 existing replacement.
300 2016-04-20 Ed Schonberg <schonberg@adacore.com>
302 * sem_util.adb (Build_Explicit_Dereference): If the designated
303 expression is an entity name, generate reference to the entity
304 because it will not be resolved again.
306 2016-04-19 Arnaud Charlet <charlet@adacore.com>
308 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
309 gnat_rm.texi: Update documentation.
311 2016-04-19 Olivier Hainque <hainque@adacore.com>
313 * par_sco.adb (Traverse_One, case N_Case_Statement):
314 Skip pragmas before the first alternative.
315 (Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
317 2016-04-19 Tristan Gingold <gingold@adacore.com>
319 * adaint.c (__gnat_lwp_self): New function (for darwin).
320 * s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
323 2016-04-19 Olivier Hainque <hainque@adacore.com>
325 * sem_util.adb (Build_Elaboration_Entity): Always request an
326 elab counter when preserving control-flow.
328 2016-04-19 Olivier Hainque <hainque@adacore.com>
330 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
331 Needs_Debug_Info when producing SCOs.
332 * par_sco.adb (Traverse_Aspects): Fix categorization of
333 Type_Invariant to match actual processing as activated depending
334 on pragma Assertion_Policy.
335 * sem_prag.adb (Analyze_Pragma): Remove special case for
336 Name_Invariant regarding SCO generation, which completely disabled
337 the production of SCOs for Invariant pragmas and aspects.
339 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
341 * checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
344 2016-04-19 Ed Schonberg <schonberg@adacore.com>
346 * freeze.adb (Freeze_Profile): Refine predicate that checks
347 whether a function that returns a limited view is declared in
348 another unit and cannot be frozen at this point.
350 2016-04-19 Ed Schonberg <schonberg@adacore.com>
352 * exp_aggr.adb (Component_Count): Handle properly superflat
353 arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
354 return value of the function is Natural, rather than leaving
355 the handling of such arrays to the caller of this function.
357 2016-04-19 Arnaud Charlet <charlet@adacore.com>
359 * sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
360 sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
361 * sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
362 Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
363 to publicly visible routine in Sem_Util.
365 2016-04-19 Ed Schonberg <schonberg@adacore.com>
367 * checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
368 the check if the type of the actual is By_Reference.
370 2016-04-19 Arnaud Charlet <charlet@adacore.com>
372 * sem_res.adb (Within_Subprogram_Call): Detect
373 also nodes that appear in entry calls.
374 (Resolve_Actuals, Insert_Default): Propagate
375 dimension information if any, from default expression to the
376 copy that appears in the list of actuals.
377 * uintp.ads: minor whitespace fix in comment.
378 * sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
380 * set_targ.adb (Set_Targ): convert directly from
381 Natural to Pos, without intermediate conversion to Int.
383 2016-04-19 Arnaud Charlet <charlet@adacore.com>
385 * sem_ch6.adb (Process_Formals): Mark suspicious reference to
387 * sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
389 * sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
390 to SPARK RM in both comment and error message.
392 2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
394 * sem_ch6.adb (Possible_Freeze): If the type is an incomplete
395 CW type, then the subprogram must have a delayed freeze. This
396 ensures that the backend can properly recover the full view when
397 elaborating the access subprogram declaration.
399 2016-04-19 Ed Schonberg <schonberg@adacore.com>
401 * sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
402 overloadable entity if originally overloaded.
404 2016-04-19 Arnaud Charlet <charlet@adacore.com>
406 * exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
407 exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
408 sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
409 sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
412 2016-04-19 Arnaud Charlet <charlet@adacore.com>
414 * sem_util.adb (Copy_Node_With_Replacement):
415 use Set_Comes_From_Source instead of directly manipulating
416 internals of the node table.
417 * sem_util.adb (Within_Scope): refactored to remove duplicated code.
418 * sem_aux.adb (Get_Rep_Pragma,
419 Subprogram_Body_Entity, Subprogram_Spec): declare variables that
420 do not change as constants and initialize them in the declaration.
421 (Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
422 variables that do not change as constants and initialize them
425 2016-04-19 Ed Schonberg <schonberg@adacore.com>
427 * sem_res.adb (Resolve_Entry_Call): If the entry has
428 preconditions it is rewritten by means of a wrapper that
429 incorporates the original call. Before rewriting generate a
430 reference to the entry being called to prevent spurious warnings
431 and provide correct cross-reference information.
433 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
435 * sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
436 local constant Scop. Ignore any internally generated loops when
437 performing the check concerning an abstract subprogram call
438 without a controlling argument.
439 * sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
441 2016-04-19 Bob Duff <duff@adacore.com>
443 * sem_elab.adb (Check_A_Call): There are cases where we have No
444 (Ent) after the Alias loop, even when there was no previous error,
445 so we can't assert that there was an error.
447 2016-04-19 Ed Schonberg <schonberg@adacore.com>
449 * sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
450 Reject use of type name as a prefix to 'access within an aggregate
451 in a context that is not the declarative region of a type.
453 2016-04-19 Vincent Celier <celier@adacore.com>
455 * gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
456 -P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
457 -l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
458 Remove anything related to project files
459 * g-mbdira.adb: minor whitespace cleanup
460 * g-spipat.adb: minor removal of extra spaces after closing paren
462 2016-04-19 Ed Schonberg <schonberg@adacore.com>
464 * exp_ch6.adb (Expand_Actuals): If post-statements are present
465 and the enclosing context is a function call or indexing, build
466 an Expression_With_Actions for the call.
468 2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
470 * lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
471 a with line for an ignored Ghost unit.
472 * sem_ch7.adb (Analyze_Package_Declaration): Add local constant
473 Par. A child package is Ghost when its parent is Ghost.
474 * sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
475 a subprogram declaration that acts as a compilation unit.
477 2016-04-18 Michael Matz <matz@suse.de>
479 * gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
480 (gnat_to_gnu_field): Ditto.
481 (components_to_record): Ditto.
482 (create_variant_part_from): Ditto.
483 (copy_and_substitute_in_size): Ditto.
484 (substitute_in_type): Ditto.
485 * gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
486 (make_packable_type): Ditto.
487 (maybe_pad_type): Ditto.
488 (finish_fat_pointer_type): Ditto.
489 (finish_record_type): Ditto and use SET_DECL_ALIGN.
490 (rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
491 (create_field_decl): Use SET_DECL_ALIGN.
493 2016-04-18 Arnaud Charlet <charlet@adacore.com>
495 * einfo.adb (Overridden_Operation): assert that
496 function is called for valid arguments.
497 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
498 s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
499 sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
500 sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
501 s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
502 No space after closing parenthesis except where required for
504 * sem_res.adb: Minor reformatting.
506 2016-04-18 Arnaud Charlet <charlet@adacore.com>
508 * exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
509 statement when relevant.
511 2016-04-18 Bob Duff <duff@adacore.com>
513 * a-cuprqu.adb (Enqueue): Properly handle the
514 case where the new element has a unique priority.
516 2016-04-18 Tristan Gingold <gingold@adacore.com>
518 * adaint.h: Define stat structures and functions for iOS
521 2016-04-18 Arnaud Charlet <charlet@adacore.com>
523 * sem_res.adb (Resolve_Entry_Call): reset
524 Is_Overloaded flag after resolving calls to overloaded protected
526 * exp_spark.adb (Expand_SPARK): call
527 Qualify_Entity_Names for tasking nodes, i.e. protected types,
528 task types and entries.
529 * exp_ch4.adb (Expand_N_If_Expression): Refine previous change
530 in case of an unconstrained type.
532 2016-04-18 Yannick Moy <moy@adacore.com>
534 * sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
535 comment to document usage of subprogram in GNATprove.
537 2016-04-18 Ed Schonberg <schonberg@adacore.com>
539 * sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
540 message for wrong placement of aspect Test_Case.
542 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
544 * einfo.ads: Update the documentation of attribute Renamed_Object.
545 * exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
547 2016-04-18 Gary Dismukes <dismukes@adacore.com>
549 * exp_ch4.adb (Optimize_Length_Comparison): Return immediately
550 in the case of AAMP (same as for use of the -gnatd.P switch) to
551 suppress this optimization, which avoids creating a dependence
552 on the 64-bit arithmetic package.
554 2016-04-18 Arnaud Charlet <charlet@adacore.com>
556 * exp_ch4.adb: Update comment.
558 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
560 * exp_ch6.adb (Expand_Call): Make sure instantiations are
561 registered only once as pending here.
563 2016-04-18 Arnaud Charlet <charlet@adacore.com>
565 * exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
566 (Minimize_Expression_With_Actions): New flag.
567 (Adjust_Global_Switches): Set Minimize_Expression_With_Actions
569 (Resolve_Short_Circuit): Redo previous change
570 using Minimize_Expression_With_Actions.
571 (Expand_N_If_Expression,
572 Expand_Short_Circuit_Operator): Restore old code to avoid
573 Expression_With_Actions when Minimize_Expression_With_Actions
576 2016-04-18 Vincent Celier <celier@adacore.com>
578 * s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
579 Stderr_File): Close local file descriptors when no longer needed.
581 2016-04-18 Ed Schonberg <schonberg@adacore.com>
583 * sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
584 mode check that the type of the cursor in an iteration over
585 a formal container is not volatile. The proper check on the
586 element type is done elsewhere.
588 2016-04-18 Ed Schonberg <schonberg@adacore.com>
590 * sem_ch6.adb (Process_Formals): Do not set a delay freeze on
591 a subprogram that returns a class-wide type, if the subprogram
592 is a compilation unit, because otherwise gigi will treat the
593 subprogram as external, leading to link errors.
595 2016-04-18 Arnaud Charlet <charlet@adacore.com>
597 * sem_res.adb (Resolve_Short_Circuit): Do not use
598 expression-with-actions when generating C.
600 2016-04-18 Yannick Moy <moy@adacore.com>
602 * sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
603 raise node in GNATprove mode.
605 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
607 * s-fileio.adb: Minor reformatting.
608 * sem_prag.adb (Analyze_Input_Item): Add local
609 variable Input_OK. Do not consider mappings of generic formal
610 parameters to actuals.
612 2016-04-18 Ed Schonberg <schonberg@adacore.com>
614 * sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
615 type, the cursor is declared in the scope of the parent type.
616 (Analyze_Parameter_Specification): A qualified expression with an
617 iterator type indicates an iteration over a container (explicit
620 2016-04-18 Arnaud Charlet <charlet@adacore.com>
622 * osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
623 * gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
624 * debug.adb: Reserve -gnatd.4 to force generation of C files.
626 2016-04-18 Yannick Moy <moy@adacore.com>
628 * sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
629 division by zero, instead possibly issue a warning.
630 * sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
631 static division by zero, instead add check flag on original
633 * sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
634 Only issue error when both SPARK_Mode is On and Warn is False.
636 2016-04-18 Yannick Moy <moy@adacore.com>
638 * checks.adb (Apply_Scalar_Range_Check): Force
639 warning instead of error when SPARK_Mode is On, on index out of
640 bounds, and set check flag for GNATprove.
642 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
644 * sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
645 Update the comment on usage. Reimplemented.
646 (Check_Input_States.Check_Constituent_Usage): Update the comment
647 on usage. A Proof_In constituent can now refine an Input state
648 as long as there is at least one Input constituent present.
650 2016-04-18 Ed Schonberg <schonberg@adacore.com>
652 * sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
653 body id as the sloc of the entity in the generated subprogram
654 declaration, to avoid spurious conformance errors when style
657 2016-04-18 Ed Schonberg <schonberg@adacore.com>
659 * sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
660 Refine check on illegal calls to entities within a task body,
661 when the entity is declared in an object of the same type. In
662 a generic context there might be no explicit dereference but if
663 the prefix includes an access type the construct is legal.
665 2016-04-18 Arnaud Charlet <charlet@adacore.com>
667 * rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
670 2016-04-18 Bob Duff <duff@adacore.com>
672 * sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
673 if the pragma came from an aspect specification.
675 2016-04-18 Gary Dismukes <dismukes@adacore.com>
677 * gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
679 2016-04-18 Ed Schonberg <schonberg@adacore.com>
681 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
682 superfluous conformance check on an inlined body with a previous
683 spec, use the fact that the generated declaration does not come
684 from source. We must treat the entity as coming from source to
685 enable some back-end inlining when pragma appears after the body.
687 2016-04-18 Gary Dismukes <dismukes@adacore.com>
689 * lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
690 exp_intr.adb: Minor reformatting and typo corrections.
692 2016-04-18 Ed Schonberg <schonberg@adacore.com>
694 * sem_ch6.adb: Code cleanup.
696 2016-04-18 Thomas Quinot <quinot@adacore.com>
698 * sem_ch13.adb: Minor reformatting and error message tweaking
699 (remove extraneous spaces).
701 2016-04-18 Johannes Kanig <kanig@adacore.com>
703 * gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
705 2016-04-18 Bob Duff <duff@adacore.com>
707 * s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
708 exists, and it's a fifo, we use "w" as the open string instead of
709 "r+". This is necessary to make a write to the fifo block until
712 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
714 * sem_attr.adb (Denote_Same_Function): Account
715 for a special case where a primitive of a tagged type inherits
716 a class-wide postcondition from a parent type.
718 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
720 * par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
721 (P_Pragma): Signal Scan_Pragma_Argument_Association when the use
722 of reserved words is OK.
723 (Scan_Pragma_Argument_Association):
724 Add new formal Reserved_Words_OK and update the comment on
725 usage. Code cleanup. Parse an expression or a reserved word in
726 identifier form for pragmas Restriction_Warnings and Restrictions
728 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
729 Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
730 (Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
732 (Set_Restriction_No_Use_Of_Attribute): Properly set the warning
733 flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
734 Update the parameter profile.
735 (Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
737 * restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
738 the comment on usage.
739 (Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
740 * sem_attr.adb (Analyze_Attribute): Check restriction
742 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
743 restriction No_Use_Of_Attribute before any rewritings have
745 * sem_prag.adb (Analyze_Pragma): Check restriction
746 No_Use_Of_Pragma before any rewritings have taken place.
748 2016-04-18 Bob Duff <duff@adacore.com>
750 * sem_ch6.adb (Is_Inline_Pragma): The pragma
751 argument can be a selected component, which has no Chars field,
752 so we need to deal with that case (use the Selector_Name).
753 (Check_Inline_Pragma): We need to test Is_List_Member before
754 calling In_Same_List, because in case of a library unit, they're
755 not in lists, so In_Same_List fails an assertion.
757 2016-04-18 Bob Duff <duff@adacore.com>
759 * namet.ads, namet.adb: Add an Append that appends a
760 Bounded_String onto a Bounded_String. Probably a little more
761 efficient than "Append(X, +Y);". Also minor cleanup.
762 (Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
763 Append_Unqualified_Decoded): Make sure these work with non-empty
765 * casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
766 parameter, defaulting to Global_Name_Buffer.
767 * errout.ads, errout.adb (Adjust_Name_Case): Pass a
768 Bounded_String parameter, no default.
769 * exp_ch11.adb (Expand_N_Raise_Statement): Use local
770 Bounded_String instead of Global_Name_Buffer.
771 * exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
772 to Append_Entity_Name, and pass a Bounded_String parameter,
773 instead of using globals.
774 (Add_Source_Info): Pass a Bounded_String parameter, instead of
776 (Expand_Source_Info): Use local instead of globals.
777 * stringt.ads, stringt.adb (Append): Add an Append procedure
778 for appending a String_Id onto a Bounded_String.
779 (String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
781 * sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
782 Adjust_Name_Case parameter.
783 * erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
784 Set_Casing; that's the default.
785 * lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
786 protected subprograms are entry calls; otherwise it is not possible to
787 distinguish them from regular subprogram calls.
789 2016-04-18 Gary Dismukes <dismukes@adacore.com>
791 * sem_ch13.adb (Has_Good_Profile): Improvement
792 of error message. Now indicates subtype_mark of formal parameter
793 rather than the formal's name, plus minor rewording.
795 2016-04-18 Pascal Obry <obry@adacore.com>
797 * adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
799 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
801 * stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
803 2016-04-18 Gary Dismukes <dismukes@adacore.com>
805 * par-ch4.adb, sem_prag.adb: Minor reformatting.
807 2016-04-18 Bob Duff <duff@adacore.com>
809 * sinput.ads, sinput.adb (Build_Location_String): Take a
810 parameter instead of using a global variable. The function
811 version no longer destroys the Name_Buffer.
812 * stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
813 parameter, which defaults to the Global_Name_Buffer, so some
814 calls can avoid the global.
815 * exp_ch11.adb, exp_intr.adb: Use new interfaces above
816 to avoid using globals. All but one call to Build_Location_String
817 avoids the global. Only one call to String_From_Name_Buffer
820 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
822 * namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
824 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
826 * sem_eval.adb (Choice_Matches): Check the expression
827 against the predicate values when the choice denotes a
828 subtype with a static predicate.
829 (Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
830 tests for predicates.
831 (Is_OK_Static_Subtype): A subtype with a dynamic predicate
832 is not static. (Is_Static_Subtype): A subtype with a dynamic
833 predicate is not static.
834 * sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
835 (Is_Static_Subtype): Update the comment on usage.
837 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
839 * sem_prag.adb (Analyze_Input_Item): Allow
840 generic formals to appear as initialization items.
842 2016-04-18 Ed Schonberg <schonberg@adacore.com>
844 * sem_ch13.adb (Analyze_Stream_TSS_Definition,
845 Has_Good_Profile): Additional error message to indicate that
846 the second parameter of the subprogram must be a first subtype.
848 2016-04-18 Ed Schonberg <schonberg@adacore.com>
850 * sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
851 Use the pragma lookahead that determines whether a subprogram
852 is to be inlined, when some level of backend optimization is
854 * sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
855 code used to create an instance body when needed for inlining.
856 * exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
857 call appears within an instantiation that is not a compilation
858 unit, add a pending instantiation for the enclosing instance,
859 so the backend can inline in turn the calls contained in the
862 2016-04-18 Ed Schonberg <schonberg@adacore.com>
864 * sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
865 that relates operations of the parent type to the operations of
866 the derived type has three distinct sources:
867 a) explicit operations of the derived type carry an
868 Overridden_Operation that designates the operation in the
870 b) Implicit operations that are inherited by the derived type
871 carry an alias that may be an explicit subprogram (in which case
872 it may have an Overridden_ Operation indicator) or may also be
873 inherited and carry its own alias.
874 c) If the parent type is an interface, the operation of the
875 derived type does not override, but the interface operation
876 indicates the operation that implements it.
877 * sem_prag.adb: Minor reformatting.
878 * sem_prag.adb (Check_External_Property): Update
879 the comment on usage. Reimplement.
881 2016-04-18 Ed Schonberg <schonberg@adacore.com>
883 * exp_ch5.adb (Expand_Assignment_Statement): In restricted
884 profiles such as ZFP, ceiling priority is not available.
886 2016-04-18 Bob Duff <duff@adacore.com>
888 * namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
890 2016-04-18 Bob Duff <duff@adacore.com>
892 * sem_elab.adb (Output_Calls): Use
893 Get_Name_String, to clearly indicate that the global Name_Buffer
894 is being used. The previous code used Is_Internal_Name, which
895 returns a Boolean, but also has a side effect of setting the
896 Name_Buffer. Then it called the other Is_Internal_Name, which uses
897 the Name_Buffer for its input. And then it called Error_Msg_N,
898 again using the Name_Buffer. We haven't eliminated the global
899 usage here, but we've made it a bit clearer.
900 This also allows us to have a side-effect-free version of
902 * namet.ads, namet.adb: Provide a type Bounded_String, along with
903 routines that can be used without using global variables. Provide
904 Global_Name_Buffer so existing code can continue to use the
905 global. Mark the routines that use globals as obsolete. New code
906 shouldn't call the obsolete ones, and we should clean up existing
907 code from time to time.
908 Name_Find_Str is renamed as Name_Find.
909 * namet.h: Changed as necessary to interface to the new version
911 * bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
914 2016-04-18 Yannick Moy <moy@adacore.com>
916 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
917 outside of GNATprove, hence it should not be removed.
919 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
921 * sem_prag.adb (Analyze_Refinement_Clause):
922 The refinement of an external abstract state can now mention
923 non-external constituents.
924 (Check_External_Property): Update all SPARK RM references.
926 2016-04-18 Bob Duff <duff@adacore.com>
928 * exp_intr.adb: Remove some duplicated code.
930 2016-04-18 Yannick Moy <moy@adacore.com>
932 * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
933 package spec and body out of SPARK.
935 2016-04-18 Johannes Kanig <kanig@adacore.com>
937 * spark_xrefs.ads: Minor comment update.
939 2016-04-18 Johannes Kanig <kanig@adacore.com>
941 * gnat1drv.adb (Gnat1drv): Force loading of System
944 2016-04-18 Bob Duff <duff@adacore.com>
946 * a-cuprqu.adb: Correction to previous change. If a new node
947 is inserted at the front of the queue (because it is higher
948 priority than the previous front node), we need to update
949 Header.Next_Unequal -- not just in the case where the queue was
952 2016-04-18 Bob Duff <duff@adacore.com>
954 * a-cuprqu.ads: Change the representation of List_Type from a
955 singly-linked list to a doubly-linked list. In addition, add a
956 pointer Next_Unequal, which points past a possibly-long chain
957 of equal-priority items. This increases efficiency, especially
958 in the case of many equal-priority items.
959 * a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
960 advantage of new data structure.
961 (Finalize): Rewrite in terms of Dequeue, for simplicity.
963 2016-04-18 Yannick Moy <moy@adacore.com>
965 * contracts.adb (Analyze_Object_Contract,
966 Analyze_Protected_Contract): Remove tests performed in GNATprove.
967 * sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
968 Remove query for tests performed in GNATprove.
970 2016-04-18 Ed Schonberg <schonberg@adacore.com>
972 * sem_aggr.adb (Resolve_Record_Aggregate): If
973 Warn_On_Redundant_Constructs is enabled, report a redundant box
974 association that does not cover any components, as it done for
975 redundant others associations in case statements.
977 2016-04-18 Ed Schonberg <schonberg@adacore.com>
979 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
980 Analyze the generated Check pragma for an inherited condition so
981 that it does not freeze the dispatching type of the primitive
982 operation, because it is pre-analyzed at the point of the
983 subprogram declaration (and not in the subprogram body, as is
984 done during regular expansion).
986 2016-04-18 Vincent Celier <celier@adacore.com>
988 * ali.ads: Increase the range of all _Id types to 100 millions.
990 2016-04-18 Gary Dismukes <dismukes@adacore.com>
992 * sem_warn.adb (Check_References): Change warning to suggest
993 using pragma Export rather than saying "volatile has no effect".
995 2016-04-18 Bob Duff <duff@adacore.com>
997 * g-souinf.ads (Compilation_ISO_Date): New function to return
998 the current date in ISO form.
999 * exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
1000 a call to Compilation_ISO_Date into a string literal containing
1001 the current date in ISO form.
1002 * exp_intr.ads (Add_Source_Info): Improve documentation.
1003 * sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
1004 Compilation_ISO_Date.
1005 * snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
1007 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1009 * layout.adb (Set_Elem_Alignment): Extend setting of alignment
1010 to subtypes that are not first subtypes.
1012 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1014 * sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
1016 * sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
1017 generated pragmas after subprogram declaration, rather than in
1018 the corresponding subprogram body.
1019 * sem_ch6.adb (New_Overloaded_Entity): In GNATProve
1020 mode, if the operation is overridding, call
1021 Collect_Inherited_Class_Wide_Conditions to generate the
1022 corresponding pragmas immediately after the corresponding
1023 subprogram declaration.
1025 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1027 * spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
1028 type to natural numbers.
1029 (Stype): document code characters for concurrent entities.
1031 2016-04-18 Olivier Hainque <hainque@adacore.com>
1033 * targparm.ads: Update the Frontend_Exceptions default internal
1035 (Frontend_Exceptions_On_Target): Change default value to True.
1037 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1039 * sem_ch4.adb (Analyze_Selected_Component): Refine error
1040 detection when a selected component in the body of a synchronized
1041 type is a reference to an object of the same type declared
1042 elsewhere. The construct is legal if the prefix of the selected
1043 component includes an explicit dereference at any point.
1045 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1047 * sem_ch3.adb (Analyze_Object_Declaration): Do not consider
1048 internally generated expressions when trying to determine whether
1049 a formal parameter of a tagged type subject to Extensions_Visible
1050 False is used to initialize an object.
1051 * sem_ch4.adb (Analyze_Type_Conversion): Do not consider
1052 internally generated expressions when trying to determine whether
1053 a formal parameter of a tagged type subject to Extensions_Visible
1054 False is used in a type conversion.
1056 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1058 * sem_res.adb (Is_Protected_Operation_Call):
1059 Add guards to account for a non-decorated selected component.
1061 2016-04-18 Yannick Moy <moy@adacore.com>
1063 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
1064 implementation of Body_Has_SPARK_Mode_On.
1065 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
1066 New function replacing previous Get_SPARK_Mode_From_Pragma, that
1067 deals also with aspects.
1068 (Get_SPARK_Mode_Type): Make function internal again.
1069 * inline.adb, sem_ch7.adb, sem_util.adb: Use new
1070 Get_SPARK_Mode_From_Annotation.
1072 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1074 * contracts.adb (Analyze_Object_Contract): Update references to
1076 * freeze.adb (Freeze_Entity): Update references to SPARK RM.
1077 * ghost.adb Add with and use clauses for Sem_Disp.
1078 (Check_Ghost_Derivation): Removed.
1079 (Check_Ghost_Overriding):
1080 Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
1081 (Check_Ghost_Primitive): New routine.
1082 (Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
1083 Update references to SPARK RM. (Is_OK_Pragma): Update references
1084 to SPARK RM. Predicates are now a valid context for references
1086 * ghost.ads (Check_Ghost_Derivation): Removed.
1087 (Check_Ghost_Overriding): Update the comment on usage.
1088 (Check_Ghost_Primitive): New routine.
1089 (Check_Ghost_Refinement): New routine.
1090 (Remove_Ignored_Ghost_Code): Update references to SPARK RM.
1091 * sem_ch3.adb (Process_Full_View): Remove the now obsolete check
1092 related to Ghost derivations
1093 * sem_ch6.adb (Check_Conformance): Remove now obsolete check
1094 related to the convention-like behavior of pragma Ghost.
1095 (Check_For_Primitive_Subprogram): Verify that the Ghost policy
1096 of a tagged type and its primitive agree.
1097 * sem_prag.adb (Analyze_Pragma): Update references to SPARK
1098 RM. Move the verification of pragma Assertion_Policy Ghost
1099 to the proper place. Remove the now obsolete check related
1100 to Ghost derivations.
1101 (Collect_Constituent): Add a call to Check_Ghost_Refinement.
1102 * sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
1104 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1106 * layout.adb: Fix more minor typos in comments.
1108 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1110 * a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
1112 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1114 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
1115 mode, collect inherited class-wide conditions to generate the
1116 corresponding pragmas.
1117 * sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
1118 * contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
1119 procedure for overriding subprograms, used to generate the pragmas
1120 corresponding to an inherited class- wide pre- or postcondition.
1121 * sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
1122 from contracts.adb (Replace_Condition_Entities): Subsidiary
1123 Build_Pragma_Check_Equivalent, to implement the proper semantics
1124 of inherited class-wide conditions, as given in AI12-0113.
1125 (Process_Class_Wide_Condition): Removed.
1126 (Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
1127 in contract of subprogram, to collect inherited class-wide
1129 (Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
1131 2016-04-18 Yannick Moy <moy@adacore.com>
1133 * a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
1134 * a-calend.ads (Ada.Calendar): Mark package spec as
1135 SPARK_Mode and add synchronous external abstract state Clock_Time.
1137 2016-04-18 Yannick Moy <moy@adacore.com>
1139 * sem_res.adb (Resolve_Call): Prevent inlining of
1140 calls inside expression functions. Factor previous code issuing
1141 errors to call Cannot_Inline instead, which does appropriate
1142 processing of message for GNATprove.
1144 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1146 * einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
1147 osint-b.adb: Cleanups.
1149 2016-04-18 Yannick Moy <moy@adacore.com>
1151 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
1152 body to inline in GNATprove mode when SPARK_Mode On applies to
1154 * sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
1157 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1159 * layout.adb: Fix minor typo in comment.
1160 * inline.adb: Fix minor pasto.
1161 * sem_ch12.ads: Fix minor typos in comments.
1163 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1165 * sem_disp.adb (Check_Dispatching_Call): Major rewriting to
1166 handle some complex cases of tag indeterminate calls that are
1167 actuals in other dispatching calls that are themselves tag
1169 (Check_Dispatching_Context): Add parameter to support recursive
1170 check for an enclosing construct that may provide a tag for a
1171 tag-indeterminate call.
1173 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1175 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
1176 Add global variables Task_Input_Seen and Task_Output_Seen.
1177 (Analyze_Global_Item): Detect an illegal use of the current
1178 instance of a single protected/task type in a global annotation.
1179 (Analyze_Input_Output): Inputs and output related to the current
1180 instance of a task unit are now tracked.
1181 (Check_Usage): Require
1182 the presence of the current instance of a task unit only when
1183 one input/output is available. (Current_Task_Instance_Seen):
1185 (Is_CCT_Instance): New parameter profile. Update
1186 the comment on usage. The routine now properly recognizes several
1187 cases related to single protected/task types.
1189 2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
1191 * freeze.adb (Freeze_Entity): Use New_Freeze_Node
1192 to create a brand new freeze node. This handles a case where an
1193 ignored Ghost context is freezing something which is not ignored
1194 Ghost and whose freeze node should not be removed from the tree.
1195 (New_Freeze_Node): New routine.
1197 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1199 * sigtramp.h (__gnat_set_is_vxsim) New function to
1200 tell sigtramp-vxworks to handle vxsim signal contexts. *
1201 sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
1202 differences in the sigcontext structure between the expected
1203 regular x86 or x86_64 ones and the ones received in case of
1204 exexution on the vxworks simulator.
1205 * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
1206 this information to sigtramp-vxworks.c. Remove the old mechanism for
1208 * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
1210 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1212 * exp_ch3.adb (Inline_Init_Proc): New function returning
1213 whether the initialization procedure of a type should be
1214 inlined. Return again True for controlled type themselves.
1215 (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
1216 (Build_Record_Init_Proc): Likewise.
1218 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1220 * gnatvsn.ads (Library_Version): Bump to 7.
1222 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1224 * sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
1225 on the entity of a subprogram declaration that is completed by
1226 an expression function.
1228 2016-04-18 Ed Schonberg <schonberg@adacore.com>
1230 * sem_util.adb (Is_Current_Instance): A entity given by a subtype
1231 declaration can appear in an aspect specification for a dynamic
1232 predicate, and a pragma for aspect Predicate_Failure.
1233 * exp_util.adb (Replace_Subtype_References): Replace current
1234 occurrences of the subtype to which a dynamic predicate applies,
1235 byt the expression that triggers a predicate check. Needed to
1236 implement new aspect Predicate_Failure.
1238 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1240 * a-intsig.ads, a-intsig.adb: Removed, no longer used.
1241 * Makefile.rtl: update accordingly.
1243 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1245 * sem_type.adb (Disambiguate): Call Covers only when necessary
1246 for standard operators.
1248 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1250 * atree.ads (Num_Extension_Nodes): Add couple of figures
1252 * atree.adb: Add GNAT.Heap_Sort_G dependency.
1253 (Print_Statistics): New exported procedure to print statistics.
1255 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1257 * exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
1258 as to be inlined if the type needs finalization.
1260 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1262 * sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
1263 alignment for x86_64.
1264 * init.c: Better fix for guard page reset on x86_64-vx7.
1265 Do not try to retrieve the page that actually raised
1266 the signal as the probing mechanism used on x86_64 do not allow
1267 such retrieval. We thus just test if the guard page is active,
1268 and re-activate it if not.
1270 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1272 * a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
1275 2016-04-18 Jerome Lambourg <lambourg@adacore.com>
1277 * affinity.c: Use the proper type for task id.
1278 * init.c (__gnat_inum_to_ivec): ivec is a pointer.
1280 2016-04-18 Arnaud Charlet <charlet@adacore.com>
1282 * sem_prag.adb (Process_Convention): Relax rule on exporting
1283 Intrinsic types if Relaxed_RM_Semantics is True.
1285 2016-04-18 Vincent Celier <celier@adacore.com>
1287 * sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
1288 checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
1289 sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
1290 sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
1291 exp_ch3.ads, exp_unst.adb: Change "descendent" to
1292 "descendant" in comments, error messages and identifiers.
1293 * gcc-interface/decl.c: Ditto.
1295 2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
1297 * sem_type.adb (Operator_Matches_Spec): Call First_Formal on
1298 New_S only once at the beginning of the function.
1300 2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
1302 * gcc-interface/decl.c (components_to_record): Restrict the previous
1303 change to fields with variable size.
1305 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
1307 * gcc-interface/decl.c (components_to_record): Add special case for
1308 single field with representation clause at offset 0.
1310 2016-03-16 Svante Signell <svante.signell@gmail.com>
1312 * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
1313 * s-osinte-gnu.ads: New file.
1315 2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
1317 * system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
1318 (Stack_Check_Limits): Set to False.
1319 * system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
1320 (Stack_Check_Limits): Set to False.
1321 * system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
1322 (Stack_Check_Limits): Set to False.
1323 * system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
1324 (Stack_Check_Limits): Set to False.
1325 * system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
1326 (Stack_Check_Limits): Set to False.
1328 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1330 * gcc-interface/trans.c (statement_node_p): New predicate.
1331 (gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
1332 not return dummy results for expressions attached to packed array
1333 implementation types.
1335 2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
1337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
1338 the expression of a renaming manually in case #3.
1340 2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
1342 * system-linux-s390.ads: Enable Stack_Check_Probes.
1343 * system-linux-s390.ads: Likewise.
1345 2016-02-29 Martin Liska <mliska@suse.cz>
1347 * gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
1348 Replace ENABLE_CHECKING macro with flag_checking.
1350 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1352 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
1353 handling of unconstrained array types as designated types into common
1354 processing. Also handle array types as incomplete designated types.
1356 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1358 * gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
1359 ASIS mode, fully lay out the minimal record type.
1361 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1363 * gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
1364 (build_return_expr): Likewise.
1365 (Call_to_gnu): If this is a function call and there is no target,
1366 create a temporary for the return value for all aggregate types,
1367 but never create it for a return statement. Push a binding level
1368 around the call in more cases. Remove obsolete code.
1370 2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
1372 * gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
1373 * gcc-interface/gigi.h (gigi): Remove useless attribute.
1374 (gnat_gimplify_expr): Likewise.
1375 (gnat_to_gnu_external): Declare.
1376 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
1377 code dealing with the expression of external constants into...
1378 Invoke gnat_to_gnu_external instead.
1379 <E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
1380 when not for a definition. Deal with COMPOUND_EXPR and variables with
1381 DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
1382 'reference to a function call in a renaming. Remove obsolete test and
1383 adjust associated comment.
1384 * gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
1385 temporaries created to hold the return value, if any.
1386 (gnat_to_gnu_external): ...this. New function.
1387 * gcc-interface/utils.c (create_var_decl): Detect a constant created
1388 to hold 'reference to function call.
1389 * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
1390 for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
1392 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1394 * exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
1395 the prefix denotes an entity which Has_Atomic_Components.
1396 * gcc-interface/trans.c (node_is_atomic): Return true if the prefix
1397 denotes an entity which Has_Atomic_Components.
1399 2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
1401 * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
1402 for fat pointer or scalar types.
1404 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1406 * gcc-interface/gigi.h (maybe_debug_type): New inline function.
1407 * gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
1408 Call maybe_character_value on the array bounds. Get to the base type
1409 of the index type and call maybe_debug_type on it.
1410 * gcc-interface/utils.c (finish_character_type): Add special treatment
1413 2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
1415 * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
1416 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
1418 2016-02-12 Jakub Jelinek <jakub@redhat.com>
1420 * prj-tree.ads: Spelling fixes - behaviour -> behavior and
1421 neighbour -> neighbor.
1422 * prep.adb: Likewise.
1423 * prj.ads: Likewise.
1424 * prepcomp.adb: Likewise.
1425 * g-socket.ads: Likewise.
1426 * s-imgrea.adb: Likewise.
1427 * a-calend.adb: Likewise.
1428 * exp_disp.adb: Likewise.
1429 * doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
1430 * g-socket.adb: Likewise.
1431 * sem_ch12.adb: Likewise.
1432 * terminals.c: Likewise.
1434 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
1436 * gcc-interface/misc.c (gnat_init): Remove second argument in call to
1437 build_common_tree_nodes.
1439 2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
1441 * gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
1442 DECL_IGNORED_P last.
1444 2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
1446 * gcc-interface/gigi.h (enum attr_type): Rename into...
1447 (enum attrib_type): ...this.
1448 (struct attrib): Adjust.
1449 * gcc-interface/decl.c (prepend_one_attribute): Likewise.
1451 2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
1453 * exp_ch2.adb (Expand_Current_Value): Make an appropriate character
1454 literal if the entity is of a character type.
1455 * gcc-interface/lang.opt (fsigned-char): New option.
1456 * gcc-interface/misc.c (gnat_handle_option): Accept it.
1457 (gnat_init): Adjust comment.
1458 * gcc-interface/gigi.h (finish_character_type): New prototype.
1459 (maybe_character_type): New inline function.
1460 (maybe_character_value): Likewise.
1461 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
1462 a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1463 Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
1464 <E_Enumeration_Subtype>: For a subtype of character with RM_Size and
1465 Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
1466 Copy TYPE_STRING_FLAG from type to subtype.
1467 <E_Array_Type>: Deal with character index types.
1468 <E_Array_Subtype>: Likewise.
1469 * gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
1470 char_type_node throughout.
1471 (build_raise_check): Likewise.
1472 (get_type_length): Deal with character types.
1473 (Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
1475 <Attr_Pred>: Likewise.
1476 (Loop_Statement_to_gnu): Likewise.
1477 (Raise_Error_to_gnu): Likewise.
1478 <N_Indexed_Component>: Deal with character index types. Remove
1480 <N_Slice>: Likewise.
1481 <N_Type_Conversion>: Deal with character types. Minor tweak.
1482 <N_Unchecked_Type_Conversion>: Likewise.
1484 <N_Op_Eq>: Likewise.
1485 (emit_index_check): Delete.
1486 * gcc-interface/utils.c (finish_character_type): New function.
1487 (gnat_signed_or_unsigned_type_for): Deal with built-in character types.
1488 * gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
1489 with char_type_node.
1490 (build_call_raise): Likewise.
1491 (build_call_raise_column): Likewise.
1492 (build_call_raise_range): Likewise.
1494 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1496 * gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
1497 (build_call_raise_range): Likewise.
1498 (gnat_unsigned_type): Delete.
1499 (gnat_signed_type): Likewise.
1500 (gnat_signed_or_unsigned_type_for): New prototype.
1501 (gnat_unsigned_type_for): New inline function.
1502 (gnat_signed_type_for): Likewise.
1503 * gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
1504 * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
1505 (gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
1506 and compute their base type from that.
1507 <E_Array_Subtype>: Remove duplicate declaration.
1508 * gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
1509 * gcc-interface/trans.c (get_type_length): Likewise.
1510 (Attribute_to_gnu): Likewise.
1511 (Loop_Statement_to_gnu): Likewise.
1512 (Call_to_gnu): Likewise.
1513 (gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
1514 and gnat_signed_type_for. Minor tweaks.
1515 (build_binary_op_trapv): Likewise.
1516 (emit_check): Likewise.
1517 (convert_with_check): Likewise.
1518 (Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
1519 functions. Minor tweaks.
1520 (Case_Statement_to_gnu): Remove dead code.
1521 (gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
1522 (init_code_table): Minor reordering.
1523 * gcc-interface/utils.c (gnat_unsigned_type): Delete.
1524 (gnat_signed_type): Likewise.
1525 (gnat_signed_or_unsigned_type_for): New function.
1526 (unchecked_convert): Use directly the size in the test for precision
1527 vs size adjustments.
1528 (install_builtin_elementary_types): Call gnat_signed_type_for.
1529 * gcc-interface/utils2.c (nonbinary_modular_operation): Call
1531 (build_goto_raise): New function taken from...
1532 (build_call_raise): ...here. Call it.
1533 (build_call_raise_column): Add KIND parameter and call it.
1534 (build_call_raise_range): Likewise.
1536 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1538 * gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
1539 (TYPE_IMPL_PACKED_ARRAY_P): ...this.
1540 (TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
1541 * gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
1542 and tweak gnat_encodings tests throughout.
1543 (initial_value_needs_conversion): Likewise.
1544 (intrin_arglists_compatible_p): Likewise.
1545 * gcc-interface/misc.c (gnat_print_type): Likewise.
1546 (gnat_get_debug_type): Likewise.
1547 (gnat_get_fixed_point_type_info): Likewise.
1548 (gnat_get_array_descr_info): Likewise.
1549 (get_array_bit_stride): Likewise.
1550 (gnat_get_type_bias): Fix formatting.
1551 (enumerate_modes): Likewise.
1552 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
1553 (add_decl_expr): Simplify NULL_TREE test.
1554 (end_stmt_group): Likewise.
1555 (build_binary_op_trapv): Fix formatting.
1556 (get_exception_label): Use switch statement.
1557 (init_code_table): Move around.
1558 * gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
1559 (gnat_poplevel): Likewise.
1560 (gnat_set_type_context): Likewise.
1561 (defer_or_set_type_context): Fix formatting.
1562 (gnat_pushdecl): Simplify NULL_TREE test.
1563 (maybe_pad_type): Likewise.
1564 (add_parallel_type): Likewise.
1565 (create_range_type): Likewise.
1566 (process_deferred_decl_context): Likewise.
1567 (convert): Likewise.
1568 (def_builtin_1): Likewise.
1569 * gcc-interface/utils2.c (find_common_type): Likewise.
1570 (build_binary_op): Likewise.
1571 (gnat_rewrite_reference): Likewise.
1572 (get_inner_constant_reference): Likewise.
1574 2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
1577 * gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
1578 the parent function instead of the current function in order to issue
1579 the warning or the error. Add guard for ignored functions.
1581 2016-01-17 Jakub Jelinek <jakub@redhat.com>
1583 * adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
1585 2016-01-15 Jakub Jelinek <jakub@redhat.com>
1587 * adaint.c (__gnat_locate_exec_on_path): Use const char * instead
1588 of char * for path_val to avoid warnings.
1590 2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
1592 * gcc-interface/utils.c: Bump copyright year.
1593 (rest_of_record_type_compilation): Add XVE/XVU parallel types to
1594 the current lexical scope.
1596 2016-01-04 Jakub Jelinek <jakub@redhat.com>
1598 * gnat_ugn.texi: Bump @copying's copyright year.
1599 * gnat_rm.texi: Likewise.
1601 2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
1603 * gnatvsn.ads: Bump copyright year.
1606 Copyright (C) 2016 Free Software Foundation, Inc.
1608 Copying and distribution of this file, with or without modification,
1609 are permitted in any medium without royalty provided the copyright
1610 notice and this notice are preserved.